Skip to content

Commit

Permalink
spire: add scheduling configurations to helm-chart
Browse files Browse the repository at this point in the history
Previously, it was not possible to run the spire-agent on nodes with
taints like the cilium-agent does by default. This feature matches
similar behaviour.

Added as well options to define affinity, nodeSelector and tolerations
for spire-server.

Fixes: #27228

Signed-off-by: Thorben von Hacht <tvonhacht@apple.com>
  • Loading branch information
tvonhacht-apple authored and lmb committed Aug 16, 2023
1 parent ec9cb23 commit b599370
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Documentation/helm-values.rst

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions install/kubernetes/cilium/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ spec:
port: 4251
initialDelaySeconds: 5
periodSeconds: 5
{{- with .Values.authentication.mutual.spire.install.agent.tolerations }}
tolerations:
{{- toYaml . | trim | nindent 8 }}
{{- end }}
volumes:
- name: spire-config
configMap:
Expand Down
12 changes: 12 additions & 0 deletions install/kubernetes/cilium/templates/spire/server/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,18 @@ spec:
port: 8080
initialDelaySeconds: 5
periodSeconds: 5
{{- with .Values.authentication.mutual.spire.install.server.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.authentication.mutual.spire.install.server.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.authentication.mutual.spire.install.server.tolerations }}
tolerations:
{{- toYaml . | trim | nindent 8 }}
{{- end }}
volumes:
- name: spire-config
configMap:
Expand Down
11 changes: 11 additions & 0 deletions install/kubernetes/cilium/values.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions install/kubernetes/cilium/values.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3164,6 +3164,9 @@ authentication:
labels: { }
# -- SPIRE Workload Attestor kubelet verification.
skipKubeletVerification: true
# -- SPIRE agent tolerations configuration
# ref: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
tolerations: []
server:
# -- SPIRE server image
image: ghcr.io/spiffe/spire-server:1.6.3@sha256:f4bc49fb0bd1d817a6c46204cc7ce943c73fb0a5496a78e0e4dc20c9a816ad7f
Expand All @@ -3185,6 +3188,14 @@ authentication:
annotations: {}
# -- Labels to be added to the SPIRE server service
labels: {}
# -- SPIRE server affinity configuration
affinity: {}
# -- SPIRE server nodeSelector configuration
# ref: ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector
nodeSelector: {}
# -- SPIRE server tolerations configuration
# ref: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
tolerations: []
# SPIRE server datastorage configuration
dataStorage:
# -- Enable SPIRE server data storage
Expand Down

0 comments on commit b599370

Please sign in to comment.