Skip to content

Commit 2fb6049

Browse files
feat(argo-cd): adding annotations option for Certificate (argoproj#2156)
* feat(certificate): adding annotations options for the `Certificate` resources Signed-off-by: Amit Ben Ami <[email protected]> * feat: bumping the chart version Signed-off-by: Amit Ben Ami <[email protected]> --------- Signed-off-by: Amit Ben Ami <[email protected]> Co-authored-by: Marco Kilchhofer <[email protected]>
1 parent 5ec59e9 commit 2fb6049

File tree

5 files changed

+25
-3
lines changed

5 files changed

+25
-3
lines changed

charts/argo-cd/Chart.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ appVersion: v2.7.7
33
kubeVersion: ">=1.23.0-0"
44
description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes.
55
name: argo-cd
6-
version: 5.38.0
6+
version: 5.38.1
77
home: https://github.com/argoproj/argo-helm
88
icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png
99
sources:
@@ -26,5 +26,5 @@ annotations:
2626
fingerprint: 2B8F22F57260EFA67BE1C5824B11F800CD9D2252
2727
url: https://argoproj.github.io/argo-helm/pgp_keys.asc
2828
artifacthub.io/changes: |
29-
- kind: changed
30-
description: Upgrade dexidp from v2.36.0 to v2.37.0
29+
- kind: added
30+
description: Adding the option to set `annotations` for `Certificate` resources

charts/argo-cd/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@ NAME: my-release
407407
| global.affinity.nodeAffinity.matchExpressions | list | `[]` | Default match expressions for node affinity |
408408
| global.affinity.nodeAffinity.type | string | `"hard"` | Default node affinity rules. Either: `none`, `soft` or `hard` |
409409
| global.affinity.podAntiAffinity | string | `"soft"` | Default pod anti-affinity rules. Either: `none`, `soft` or `hard` |
410+
| global.certificateAnnotations | object | `{}` | Annotations for the all deployed Certificates |
410411
| global.deploymentAnnotations | object | `{}` | Annotations for the all deployed Deployments |
411412
| global.deploymentStrategy | object | `{}` | Deployment strategy for the all deployed Deployments |
412413
| global.env | list | `[]` | Environment variables to pass to all deployed Deployments |
@@ -676,6 +677,7 @@ NAME: my-release
676677
| server.autoscaling.targetCPUUtilizationPercentage | int | `50` | Average CPU utilization percentage for the Argo CD server [HPA] |
677678
| server.autoscaling.targetMemoryUtilizationPercentage | int | `50` | Average memory utilization percentage for the Argo CD server [HPA] |
678679
| server.certificate.additionalHosts | list | `[]` | Certificate Subject Alternate Names (SANs) |
680+
| server.certificate.annotations | object | `{}` | Annotations to be applied to the Server Certificate |
679681
| server.certificate.domain | string | `"argocd.example.com"` | Certificate primary domain (commonName) |
680682
| server.certificate.duration | string | `""` (defaults to 2160h = 90d if not specified) | The requested 'duration' (i.e. lifetime) of the certificate. |
681683
| server.certificate.enabled | bool | `false` | Deploy a Certificate resource (requires cert-manager) |
@@ -1036,6 +1038,7 @@ If you want to use an existing Redis (eg. a managed service from a cloud provide
10361038
| applicationSet.affinity | object | `{}` (defaults to global.affinity preset) | Assign custom [affinity] rules |
10371039
| applicationSet.args | object | `{}` | DEPRECATED - ApplicationSet controller command line flags |
10381040
| applicationSet.certificate.additionalHosts | list | `[]` | Certificate Subject Alternate Names (SANs) |
1041+
| applicationSet.certificate.annotations | object | `{}` | Annotations to be applied to the ApplicationSet Certificate |
10391042
| applicationSet.certificate.domain | string | `"argocd.example.com"` | Certificate primary domain (commonName) |
10401043
| applicationSet.certificate.duration | string | `""` (defaults to 2160h = 90d if not specified) | The requested 'duration' (i.e. lifetime) of the certificate. |
10411044
| applicationSet.certificate.enabled | bool | `false` | Deploy a Certificate resource (requires cert-manager) |

charts/argo-cd/templates/argocd-applicationset/certificate.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
apiVersion: {{ include "argo-cd.apiVersion.cert-manager" . }}
33
kind: Certificate
44
metadata:
5+
{{- with (mergeOverwrite (deepCopy .Values.global.certificateAnnotations) .Values.applicationSet.certificate.annotations) }}
6+
annotations:
7+
{{- range $key, $value := . }}
8+
{{ $key }}: {{ $value | quote }}
9+
{{- end }}
10+
{{- end }}
511
name: {{ template "argo-cd.applicationSet.fullname" . }}
612
namespace: {{ .Release.Namespace | quote }}
713
labels:

charts/argo-cd/templates/argocd-server/certificate.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
apiVersion: {{ include "argo-cd.apiVersion.cert-manager" . }}
33
kind: Certificate
44
metadata:
5+
{{- with (mergeOverwrite (deepCopy .Values.global.certificateAnnotations) .Values.server.certificate.annotations) }}
6+
annotations:
7+
{{- range $key, $value := . }}
8+
{{ $key }}: {{ $value | quote }}
9+
{{- end }}
10+
{{- end }}
511
name: {{ include "argo-cd.server.fullname" . }}
612
namespace: {{ .Release.Namespace | quote }}
713
labels:

charts/argo-cd/values.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,9 @@ global:
147147
# -- Environment variables to pass to all deployed Deployments
148148
env: []
149149

150+
# -- Annotations for the all deployed Certificates
151+
certificateAnnotations: {}
152+
150153
## Argo Configs
151154
configs:
152155
# General Argo CD configuration
@@ -1743,6 +1746,8 @@ server:
17431746
algorithm: RSA
17441747
# -- Key bit size of the private key. If algorithm is set to `Ed25519`, size is ignored.
17451748
size: 2048
1749+
# -- Annotations to be applied to the Server Certificate
1750+
annotations: {}
17461751
# -- Usages for the certificate
17471752
### Ref: https://cert-manager.io/docs/reference/api-docs/#cert-manager.io/v1.KeyUsage
17481753
usages: []
@@ -2681,6 +2686,8 @@ applicationSet:
26812686
algorithm: RSA
26822687
# -- Key bit size of the private key. If algorithm is set to `Ed25519`, size is ignored.
26832688
size: 2048
2689+
# -- Annotations to be applied to the ApplicationSet Certificate
2690+
annotations: {}
26842691

26852692
## Notifications controller
26862693
notifications:

0 commit comments

Comments
 (0)