Run oidc discovery provider as separate pod using workload api

Signed-off-by: Marco Franssen <[email protected]>
This commit is contained in:
Marco Franssen
2023-02-18 13:04:01 +01:00
committed by Marco Franssen
parent 31bce3b09e
commit f2d7aa1f62
5 changed files with 112 additions and 40 deletions
@@ -91,36 +91,6 @@ spec:
- name: spire-workload-registrar-config
mountPath: /run/spire/k8s-workload-registrar/config
readOnly: true
{{- if eq (.Values.oidc.enabled | toString) "true" }}
- name: spire-oidc
image: "{{ .Values.oidc.image.repository }}:{{ .Values.oidc.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.oidc.image.pullPolicy }}
args:
- -config
- /run/spire/oidc/config/oidc-discovery-provider.conf
ports:
- containerPort: {{ .Values.oidc.service.port }}
name: oidc-http
- containerPort: 443
name: oidc-https
volumeMounts:
- name: spire-server-socket
mountPath: {{ include "spire.sockets" . }}
readOnly: true
- name: spire-oidc-config
mountPath: /run/spire/oidc/config/
readOnly: true
{{- if eq (.Values.server.dataStorage.enabled | toString) "true" }}
- name: spire-data
mountPath: /run/spire/data
readOnly: false
{{ end }}
readinessProbe:
exec:
command: ["/bin/ps", "aux", " ||", "grep", "oidc-discovery-provider -config /run/spire/oidc/config/oidc-discovery-provider.conf"]
initialDelaySeconds: 5
periodSeconds: 5
{{ end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
@@ -140,11 +110,6 @@ spec:
- name: spire-config
configMap:
name: {{ include "spire.fullname" . }}-server
{{- if eq (.Values.oidc.enabled | toString) "true" }}
- name: spire-oidc-config
configMap:
name: {{ include "spire.fullname" . }}-oidc-discovery-provider
{{ end }}
- name: spire-server-socket
hostPath:
path: /run/spire/server-sockets