Skip to content

Commit

Permalink
Set annotations on teleport-kube-agent StatefulSet (#46393)
Browse files Browse the repository at this point in the history
* set annotations on teleport-kube-agent statefulset

* empty commit to trigger ci

---------

Co-authored-by: Sean Liao <sean+git@liao.dev>
  • Loading branch information
strideynet and seankhliao authored Sep 9, 2024
1 parent b5f5656 commit 80877f8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/chart/teleport-kube-agent/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ metadata:
{{- if .Values.extraLabels.deployment }}
{{- toYaml .Values.extraLabels.deployment | nindent 4 }}
{{- end }}
{{- if .Values.annotations.deployment }}
annotations:
{{- toYaml .Values.annotations.deployment | nindent 4 }}
{{- end }}
spec:
serviceName: {{ .Release.Name }}
replicas: {{ $replicaCount }}
Expand Down
13 changes: 13 additions & 0 deletions examples/chart/teleport-kube-agent/tests/statefulset_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,19 @@ tests:
- matchSnapshot:
path: spec.template.spec

- it: sets StatefulSet annotations when specified
template: statefulset.yaml
values:
- ../.lint/stateful.yaml
- ../.lint/annotations.yaml
asserts:
- equal:
path: metadata.annotations.kubernetes\.io/deployment
value: test-annotation
- equal:
path: metadata.annotations.kubernetes\.io/deployment-different
value: 3

- it: sets Pod annotations when specified
template: statefulset.yaml
values:
Expand Down

0 comments on commit 80877f8

Please sign in to comment.