* Update spire-identity-exchange for 0.4.0 Signed-off-by: Kevin Fox <[email protected]> * Understand the plugin config Signed-off-by: Kevin Fox <[email protected]> * Fix test Signed-off-by: Kevin Fox <[email protected]> * Update ip Signed-off-by: Kevin Fox <[email protected]> * Update name Signed-off-by: Kevin Fox <[email protected]> * Update name Signed-off-by: Kevin Fox <[email protected]> * Update name Signed-off-by: Kevin Fox <[email protected]> * Fix broken socket path Signed-off-by: Kevin Fox <[email protected]> * Nope, it was right before Signed-off-by: Kevin Fox <[email protected]> * Try disabling the spiffe plugin for now Signed-off-by: Kevin Fox <[email protected]> * Try logging more Signed-off-by: Kevin Fox <[email protected]> * Map non container behavior Signed-off-by: Kevin Fox <[email protected]> * Map non container behavior Signed-off-by: Kevin Fox <[email protected]> * Map non container behavior Signed-off-by: Kevin Fox <[email protected]> * Map non container behavior Signed-off-by: Kevin Fox <[email protected]> * Map non container behavior Signed-off-by: Kevin Fox <[email protected]> * Map non container behavior Signed-off-by: Kevin Fox <[email protected]> * Map non container behavior Signed-off-by: Kevin Fox <[email protected]> * Add missing csi driver settings Signed-off-by: Kevin Fox <[email protected]> * Test Signed-off-by: Kevin Fox <[email protected]> * Test Signed-off-by: Kevin Fox <[email protected]> * Fix Signed-off-by: Kevin Fox <[email protected]> * Use local oidc discovery provider path by default Signed-off-by: Kevin Fox <[email protected]> * Enable spire-identity-exchange in shared infrastructure Signed-off-by: Kevin Fox <[email protected]> * Update timeout Signed-off-by: Kevin Fox <[email protected]> * Update timeout Signed-off-by: Kevin Fox <[email protected]> * Test config Signed-off-by: Kevin Fox <[email protected]> * Test config Signed-off-by: Kevin Fox <[email protected]> * Test config Signed-off-by: Kevin Fox <[email protected]> * Test config Signed-off-by: Kevin Fox <[email protected]> * Fix Signed-off-by: Kevin Fox <[email protected]> * Fix Signed-off-by: Kevin Fox <[email protected]> * Bump spire-ha-agent version to fix issue Signed-off-by: Kevin Fox <[email protected]> * Fix Signed-off-by: Kevin Fox <[email protected]> * Fix Signed-off-by: Kevin Fox <[email protected]> * Bump version Signed-off-by: Kevin Fox <[email protected]> * Update version bits to match what it should be, minus final bump Signed-off-by: Kevin Fox <[email protected]> --------- Signed-off-by: Kevin Fox <[email protected]> Signed-off-by: kfox1111 <[email protected]> Co-authored-by: Faisal Memon <[email protected]>
233 lines
8.6 KiB
YAML
233 lines
8.6 KiB
YAML
{{- $configSum := (include (print $.Template.BasePath "/configmap.yaml") . | sha256sum) }}
|
|
{{- $trustDomain := include "spire-lib.trust-domain" . }}
|
|
{{- $fileTLS := or .Values.tls.rest.enabled .Values.tls.grpc.enabled }}
|
|
{{- $extraCSIDrivers := include "spire-identity-exchange.extra-csi-drivers" . | fromJson }}
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "spire-identity-exchange.fullname" . }}
|
|
namespace: {{ include "spire-identity-exchange.namespace" . }}
|
|
labels:
|
|
{{- include "spire-identity-exchange.labels" . | nindent 4 }}
|
|
{{- with .Values.annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- if not .Values.autoscaling.enabled }}
|
|
replicas: {{ .Values.replicaCount }}
|
|
{{- end }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "spire-identity-exchange.selectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
checksum/config: {{ $configSum }}
|
|
{{- with .Values.podAnnotations }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "spire-identity-exchange.selectorLabels" . | nindent 8 }}
|
|
release: {{ .Release.Name }}
|
|
release-namespace: {{ .Release.Namespace }}
|
|
component: spire-identity-exchange
|
|
{{- with .Values.podLabels }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
spec:
|
|
shareProcessNamespace: true
|
|
{{- with (coalesce .Values.imagePullSecrets .Values.global.imagePullSecrets) }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
serviceAccountName: {{ include "spire-identity-exchange.serviceAccountName" . }}
|
|
securityContext:
|
|
{{- include "spire-identity-exchange.podSecurityContext" . | nindent 8 }}
|
|
initContainers:
|
|
- name: spire-server-attestor
|
|
securityContext:
|
|
{{- include "spire-lib.securitycontext" . | nindent 12 }}
|
|
resources:
|
|
{{- toYaml .Values.spireServerAttestorSPIFFEWorkloadAPI.resources | nindent 12 }}
|
|
image: {{ template "spire-lib.image" (dict "appVersion" $.Chart.AppVersion "image" .Values.spireServerAttestorSPIFFEWorkloadAPI.image "global" .Values.global) }}
|
|
imagePullPolicy: {{ .Values.spireServerAttestorSPIFFEWorkloadAPI.image.pullPolicy }}
|
|
restartPolicy: Always
|
|
args:
|
|
- /trustbundle/socket
|
|
env:
|
|
- name: SPIFFE_ENDPOINT_SOCKET
|
|
value: "unix://{{ include "spire-identity-exchange.workload-api-socket-path" . }}"
|
|
- name: SPIFFE_TRUST_DOMAIN
|
|
value: {{ $trustDomain }}
|
|
readinessProbe:
|
|
exec:
|
|
command:
|
|
- /ko-app/spire-server-attestor-spiffe-workload-api
|
|
- --healthcheck
|
|
- /trustbundle/socket
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 30
|
|
timeoutSeconds: 10
|
|
successThreshold: 1
|
|
failureThreshold: 3
|
|
volumeMounts:
|
|
- name: spiffe-workload-api
|
|
mountPath: /spiffe-workload-api
|
|
readOnly: true
|
|
- name: trustbundle
|
|
mountPath: /trustbundle
|
|
- name: spire-agent
|
|
securityContext:
|
|
{{- include "spire-lib.securitycontext" . | nindent 12 }}
|
|
resources:
|
|
{{- toYaml .Values.spireAgent.resources | nindent 12 }}
|
|
image: {{ template "spire-lib.image" (dict "image" .Values.spireAgent.image "global" .Values.global) }}
|
|
imagePullPolicy: {{ .Values.spireAgent.image.pullPolicy }}
|
|
restartPolicy: Always
|
|
args:
|
|
- -config
|
|
- /etc/spire/agent/six-agent.conf
|
|
- -socketPath
|
|
- /agent-data/api.sock
|
|
ports:
|
|
- containerPort: 8182
|
|
name: healthz
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /live
|
|
port: healthz
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /ready
|
|
port: healthz
|
|
volumeMounts:
|
|
- name: spiffe-workload-api
|
|
mountPath: /spiffe-workload-api
|
|
readOnly: true
|
|
- name: spire-identity-exchange-config
|
|
mountPath: /etc/spire/agent/six-agent.conf
|
|
subPath: six-agent.conf
|
|
readOnly: true
|
|
- name: spire-agent-socket
|
|
mountPath: /agent
|
|
- name: trustbundle
|
|
mountPath: /trustbundle
|
|
readOnly: true
|
|
- name: spire-agent-data
|
|
mountPath: /agent-data
|
|
containers:
|
|
- name: spire-identity-exchange
|
|
securityContext:
|
|
{{- include "spire-lib.securitycontext" . | nindent 12 }}
|
|
image: {{ template "spire-lib.image" (dict "appVersion" $.Chart.AppVersion "image" .Values.image "global" .Values.global) }}
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
args:
|
|
- -config
|
|
- /etc/spire/identity-exchange/six.conf
|
|
- -expand-env
|
|
env:
|
|
- name: SPIFFE_TRUST_DOMAIN
|
|
value: {{ $trustDomain | quote }}
|
|
- name: K8S_CLUSTER_NAME
|
|
value: {{ include "spire-lib.cluster-name" . | trim | quote }}
|
|
- name: SPIFFE_JWT_ISSUER
|
|
value: {{ include "spire-lib.jwt-issuer" . | trim | quote }}
|
|
{{- with .Values.extraEnv }}
|
|
{{- . | toYaml | nindent 12 }}
|
|
{{- end }}
|
|
ports:
|
|
{{- if .Values.tls.rest.enabled }}
|
|
- containerPort: {{ .Values.tls.rest.port }}
|
|
name: rest
|
|
{{- end }}
|
|
{{- if .Values.tls.grpc.enabled }}
|
|
- containerPort: {{ .Values.tls.grpc.port }}
|
|
name: grpc
|
|
{{- end }}
|
|
{{- if .Values.spiffe.rest.enabled }}
|
|
- containerPort: {{ .Values.spiffe.rest.port }}
|
|
name: rest-spiffe
|
|
{{- end }}
|
|
{{- if .Values.spiffe.grpc.enabled }}
|
|
- containerPort: {{ .Values.spiffe.grpc.port }}
|
|
name: grpc-spiffe
|
|
{{- end }}
|
|
- containerPort: {{ .Values.telemetry.prometheus.port }}
|
|
name: prom
|
|
volumeMounts:
|
|
- name: spiffe-workload-api
|
|
mountPath: {{ include "spire-identity-exchange.workload-api-socket-path" . | dir }}
|
|
readOnly: true
|
|
{{- range $driver, $volumeName := $extraCSIDrivers }}
|
|
- name: {{ $volumeName }}
|
|
mountPath: /spiffe-workload-apis/{{ $driver }}
|
|
readOnly: true
|
|
{{- end }}
|
|
{{- if $fileTLS }}
|
|
- name: certdir
|
|
mountPath: /secret
|
|
readOnly: true
|
|
{{- end }}
|
|
- name: spire-identity-exchange-config
|
|
mountPath: /etc/spire/identity-exchange/six.conf
|
|
subPath: six.conf
|
|
readOnly: true
|
|
- name: spire-agent-socket
|
|
mountPath: /agent
|
|
readOnly: true
|
|
#readinessProbe:
|
|
# httpGet:
|
|
# path: /ready
|
|
# port: healthz
|
|
# {- toYaml .Values.readinessProbe | nindent 12 }}
|
|
#livenessProbe:
|
|
# httpGet:
|
|
# path: /live
|
|
# port: healthz
|
|
# {- toYaml .Values.livenessProbe | nindent 12 }}
|
|
resources:
|
|
{{- toYaml .Values.resources | nindent 12 }}
|
|
volumes:
|
|
- name: spiffe-workload-api
|
|
csi:
|
|
driver: "{{ .Values.csiDriverName }}"
|
|
readOnly: true
|
|
{{- range $driver, $volumeName := $extraCSIDrivers }}
|
|
- name: {{ $volumeName }}
|
|
csi:
|
|
driver: "{{ $driver }}"
|
|
readOnly: true
|
|
{{- end }}
|
|
{{- if $fileTLS }}
|
|
- name: certdir
|
|
{{- if .Values.tls.externalSecret.enabled }}
|
|
secret:
|
|
secretName: {{ .Values.tls.externalSecret.secretName }}
|
|
{{- else if .Values.tls.certManager.enabled }}
|
|
secret:
|
|
secretName: {{ include "spire-identity-exchange.fullname" . }}-cert
|
|
{{- end }}
|
|
{{- end }}
|
|
- name: spire-agent-socket
|
|
emptyDir: {}
|
|
- name: spire-agent-data
|
|
emptyDir: {}
|
|
- name: trustbundle
|
|
emptyDir: {}
|
|
- name: spire-identity-exchange-config
|
|
configMap:
|
|
name: {{ include "spire-identity-exchange.fullname" . }}
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|