Skip to content

Commit 808ac38

Browse files
author
Adam kafka
committed
Support annotations in helm chart
This is related to #416. To use IAM Roles Anywhere, we will have a client certificate managed by a different cert-manager issuer. To reload the certificate when it is renewed, we need to be able to set annotations on the deployment (to make use of https://github.com/stakater/Reloader). Validation: ``` $ helm template "foo" . --show-only templates/deployment.yaml | head -n 20 --- apiVersion: apps/v1 kind: Deployment metadata: name: foo-aws-privateca-issuer namespace: default labels: helm.sh/chart: aws-privateca-issuer-v1.6.0 app.kubernetes.io/name: aws-privateca-issuer app.kubernetes.io/instance: foo app.kubernetes.io/version: "v1.6.0" app.kubernetes.io/managed-by: Helm spec: replicas: 2 strategy: type: RollingUpdate rollingUpdate: maxUnavailable: 1 revisionHistoryLimit: 10 $ cat annotation.yaml annotations: foo: bar $ helm template "foo" . -f annotation.yaml --show-only templates/deployment.yaml | head -n 20 --- apiVersion: apps/v1 kind: Deployment metadata: name: foo-aws-privateca-issuer namespace: default labels: helm.sh/chart: aws-privateca-issuer-v1.6.0 app.kubernetes.io/name: aws-privateca-issuer app.kubernetes.io/instance: foo app.kubernetes.io/version: "v1.6.0" app.kubernetes.io/managed-by: Helm annotations: foo: bar spec: replicas: 2 strategy: type: RollingUpdate rollingUpdate: ``` Signed-off-by: Adam Kafka <[email protected]>
1 parent 27d9af6 commit 808ac38

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

charts/aws-pca-issuer/templates/deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ metadata:
55
namespace: {{ .Release.Namespace }}
66
labels:
77
{{- include "aws-privateca-issuer.labels" . | nindent 4 }}
8+
{{- if .Values.annotations }}
9+
annotations:
10+
{{- toYaml .Values.annotations | nindent 4 }}
11+
{{- end }}
812
spec:
913
{{- if not .Values.autoscaling.enabled }}
1014
replicas: {{ .Values.replicaCount }}

charts/aws-pca-issuer/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
# Number of replicas to run of the issuer
44
replicaCount: 2
55

6+
# Annotations to be added to the Deployment Resource
7+
annotations: {}
8+
69
image:
710
# Image repository
811
repository: public.ecr.aws/k1n1h4h4/cert-manager-aws-privateca-issuer

0 commit comments

Comments
 (0)