apiVersion: apps/v1 kind: DaemonSet metadata: name: {{ include "spire.fullname" . }}-agent namespace: {{ .Release.Namespace }} labels: {{- include "spire.agent.labels" . | nindent 4 }} spec: selector: matchLabels: {{- include "spire.agent.selectorLabels" . | nindent 6 }} updateStrategy: type: RollingUpdate template: metadata: labels: {{- include "spire.agent.selectorLabels" . | nindent 8 }} spec: hostPID: true hostNetwork: true dnsPolicy: ClusterFirstWithHostNet serviceAccountName: {{ include "spire.serviceAccountName" . }}-agent initContainers: - name: init # This is a small image with wait-for-it, choose whatever image # you prefer that waits for a service to be up. This image is built # from https://github.com/lqhl/wait-for-it image: gcr.io/spiffe-io/wait-for-it:latest args: ["-t", "30", "{{ include "spire.fullname" . }}-server:8081"] containers: - name: {{ .Chart.Name }}-agent image: "{{ .Values.agent.image.repository }}:{{ .Values.agent.image.tag | default .Chart.AppVersion }}" args: ["-config", "/run/spire/config/agent.conf"] volumeMounts: - name: spire-config mountPath: /run/spire/config readOnly: true - name: spire-bundle mountPath: /run/spire/bundle readOnly: true - name: spire-agent-socket mountPath: /run/spire/sockets readOnly: false - name: spire-token mountPath: /var/run/secrets/tokens livenessProbe: httpGet: path: /live port: 8080 initialDelaySeconds: 15 periodSeconds: 60 readinessProbe: httpGet: path: /ready port: 8080 initialDelaySeconds: 15 periodSeconds: 60 volumes: - name: spire-config configMap: name: {{ include "spire.fullname" . }}-agent - name: spire-bundle configMap: name: {{ include "spire.fullname" . }}-bundle - name: spire-agent-socket hostPath: path: /run/spire/sockets type: DirectoryOrCreate - name: spire-token projected: sources: - serviceAccountToken: path: spire-agent expirationSeconds: 7200 audience: spire-server