Skip to content

Commit ed647c6

Browse files
authored
feat: add pod annotations (#1897)
Signed-off-by: Miguel Martinez <miguel@chainloop.dev>
1 parent ed9c733 commit ed647c6

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

deployment/chainloop/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,7 @@ chainloop config save \
710710
| `controlplane.automountServiceAccountToken` | Mount Service Account token in controlplane pods | `false` |
711711
| `controlplane.hostAliases` | controlplane pods host aliases | `[]` |
712712
| `controlplane.deploymentAnnotations` | Annotations for controlplane deployment | `{}` |
713+
| `controlplane.podAnnotations` | Annotations for controlplane pods | `{}` |
713714
| `controlplane.podLabels` | Extra labels for controlplane pods | `{}` |
714715
| `controlplane.podAffinityPreset` | Pod affinity preset. Ignored if `controlplane.affinity` is set. Allowed values: `soft` or `hard` | `""` |
715716
| `controlplane.podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `controlplane.affinity` is set. Allowed values: `soft` or `hard` | `soft` |
@@ -858,6 +859,7 @@ chainloop config save \
858859
| `cas.automountServiceAccountToken` | Mount Service Account token in cas pods | `false` |
859860
| `cas.hostAliases` | cas pods host aliases | `[]` |
860861
| `cas.deploymentAnnotations` | Annotations for cas deployment | `{}` |
862+
| `cas.podAnnotations` | Annotations for cas pods | `{}` |
861863
| `cas.podLabels` | Extra labels for cas pods | `{}` |
862864
| `cas.podAffinityPreset` | Pod affinity preset. Ignored if `cas.affinity` is set. Allowed values: `soft` or `hard` | `""` |
863865
| `cas.podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `cas.affinity` is set. Allowed values: `soft` or `hard` | `soft` |

deployment/chainloop/templates/cas/deployment.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ spec:
2828
checksum/config: {{ include (print $.Template.BasePath "/cas" "/configmap.yaml") . | sha256sum }}
2929
checksum/config-secret: {{ include (print $.Template.BasePath "/cas" "/secret-config.yaml") . | sha256sum }}
3030
checksum/public-key-secret: {{ include (print $.Template.BasePath "/cas" "/secret-jwt-public-key.yaml") . | sha256sum }}
31+
{{- if .Values.cas.podAnnotations }}
32+
{{- include "common.tplvalues.render" (dict "value" .Values.cas.podAnnotations "context" $) | nindent 8 }}
33+
{{- end }}
3134
labels: {{ include "chainloop.cas.labels" . | nindent 8 }}
3235
spec:
3336
{{- include "common.images.renderPullSecrets" (dict "images" (list .Values.cas.image) "context" $) | nindent 6 }}

deployment/chainloop/templates/controlplane/deployment.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ spec:
3030
checksum/secret-config: {{ include (print $.Template.BasePath "/controlplane" "/secret-config.yaml") . | sha256sum }}
3131
checksum/cas-private-key: {{ include (print $.Template.BasePath "/controlplane" "/secret-jwt-cas-private-key.yaml") . | sha256sum }}
3232
kubectl.kubernetes.io/default-container: controlplane
33+
{{- if .Values.controlplane.podAnnotations }}
34+
{{- include "common.tplvalues.render" (dict "value" .Values.controlplane.podAnnotations "context" $) | nindent 8 }}
35+
{{- end }}
3336
labels: {{- include "chainloop.controlplane.labels" . | nindent 8 }}
3437
spec:
3538
{{- include "common.images.renderPullSecrets" (dict "images" (list .Values.controlplane.image .Values.controlplane.migration.image) "context" $) | nindent 6 }}

deployment/chainloop/values.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,11 @@ controlplane:
746746
##
747747
deploymentAnnotations: {}
748748

749+
## @param controlplane.podAnnotations Annotations for controlplane pods
750+
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
751+
##
752+
podAnnotations: {}
753+
749754
## @param controlplane.podLabels Extra labels for controlplane pods
750755
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
751756
##
@@ -1423,6 +1428,11 @@ cas:
14231428
##
14241429
deploymentAnnotations: {}
14251430

1431+
## @param cas.podAnnotations Annotations for cas pods
1432+
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
1433+
##
1434+
podAnnotations: {}
1435+
14261436
## @param cas.podLabels Extra labels for cas pods
14271437
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
14281438
##

0 commit comments

Comments
 (0)