From 5019aaacfcaa4da2cba32218fdf583eede00f224 Mon Sep 17 00:00:00 2001 From: joshvanl Date: Mon, 17 Jan 2022 09:27:05 +0000 Subject: [PATCH] Update SecretTemplate API comments to highlight that annotations are appended to base annotations Signed-off-by: joshvanl --- deploy/crds/crd-certificates.yaml | 2 +- internal/apis/certmanager/types_certificate.go | 4 +++- internal/apis/certmanager/v1alpha2/types_certificate.go | 4 +++- internal/apis/certmanager/v1alpha3/types_certificate.go | 4 +++- internal/apis/certmanager/v1beta1/types_certificate.go | 4 +++- pkg/apis/certmanager/v1/types_certificate.go | 4 +++- 6 files changed, 16 insertions(+), 6 deletions(-) diff --git a/deploy/crds/crd-certificates.yaml b/deploy/crds/crd-certificates.yaml index d82da0855..9c0699e20 100644 --- a/deploy/crds/crd-certificates.yaml +++ b/deploy/crds/crd-certificates.yaml @@ -206,7 +206,7 @@ spec: description: SecretName is the name of the secret resource that will be automatically created and managed by this Certificate resource. It will be populated with a private key and certificate, signed by the denoted issuer. type: string secretTemplate: - description: SecretTemplate defines annotations and labels to be copied to the Certificate's Secret. Labels and annotations on the Secret will be changed as they appear on the SecretTemplate. + description: SecretTemplate defines annotations and labels to be copied to the Certificate's Secret. Labels and annotations on the Secret will be changed as they appear on the SecretTemplate when added or removed. SecretTemplate annotations are added in conjunction with, and cannot overwrite, the base set of annotations cert-manager sets on the Certificate's Secret. type: object properties: annotations: diff --git a/internal/apis/certmanager/types_certificate.go b/internal/apis/certmanager/types_certificate.go index 8276739fd..7d4566d9f 100644 --- a/internal/apis/certmanager/types_certificate.go +++ b/internal/apis/certmanager/types_certificate.go @@ -125,7 +125,9 @@ type CertificateSpec struct { // SecretTemplate defines annotations and labels to be copied to the // Certificate's Secret. Labels and annotations on the Secret will be changed - // as they appear on the SecretTemplate. + // as they appear on the SecretTemplate when added or removed. SecretTemplate + // annotations are added in conjunction with, and cannot overwrite, the base + // set of annotations cert-manager sets on the Certificate's Secret. SecretTemplate *CertificateSecretTemplate // Keystores configures additional keystore output formats stored in the diff --git a/internal/apis/certmanager/v1alpha2/types_certificate.go b/internal/apis/certmanager/v1alpha2/types_certificate.go index 32afca574..65f3c56cb 100644 --- a/internal/apis/certmanager/v1alpha2/types_certificate.go +++ b/internal/apis/certmanager/v1alpha2/types_certificate.go @@ -137,7 +137,9 @@ type CertificateSpec struct { // SecretTemplate defines annotations and labels to be copied to the // Certificate's Secret. Labels and annotations on the Secret will be changed - // as they appear on the SecretTemplate. + // as they appear on the SecretTemplate when added or removed. SecretTemplate + // annotations are added in conjunction with, and cannot overwrite, the base + // set of annotations cert-manager sets on the Certificate's Secret. // +optional SecretTemplate *CertificateSecretTemplate `json:"secretTemplate,omitempty"` diff --git a/internal/apis/certmanager/v1alpha3/types_certificate.go b/internal/apis/certmanager/v1alpha3/types_certificate.go index 7afbf14ff..6bea14801 100644 --- a/internal/apis/certmanager/v1alpha3/types_certificate.go +++ b/internal/apis/certmanager/v1alpha3/types_certificate.go @@ -135,7 +135,9 @@ type CertificateSpec struct { // SecretTemplate defines annotations and labels to be copied to the // Certificate's Secret. Labels and annotations on the Secret will be changed - // as they appear on the SecretTemplate. + // as they appear on the SecretTemplate when added or removed. SecretTemplate + // annotations are added in conjunction with, and cannot overwrite, the base + // set of annotations cert-manager sets on the Certificate's Secret. // +optional SecretTemplate *CertificateSecretTemplate `json:"secretTemplate,omitempty"` diff --git a/internal/apis/certmanager/v1beta1/types_certificate.go b/internal/apis/certmanager/v1beta1/types_certificate.go index ef18b4b5f..ee8c2dc25 100644 --- a/internal/apis/certmanager/v1beta1/types_certificate.go +++ b/internal/apis/certmanager/v1beta1/types_certificate.go @@ -136,7 +136,9 @@ type CertificateSpec struct { // SecretTemplate defines annotations and labels to be copied to the // Certificate's Secret. Labels and annotations on the Secret will be changed - // as they appear on the SecretTemplate. + // as they appear on the SecretTemplate when added or removed. SecretTemplate + // annotations are added in conjunction with, and cannot overwrite, the base + // set of annotations cert-manager sets on the Certificate's Secret. // +optional SecretTemplate *CertificateSecretTemplate `json:"secretTemplate,omitempty"` diff --git a/pkg/apis/certmanager/v1/types_certificate.go b/pkg/apis/certmanager/v1/types_certificate.go index 582843ea2..e0537afb4 100644 --- a/pkg/apis/certmanager/v1/types_certificate.go +++ b/pkg/apis/certmanager/v1/types_certificate.go @@ -140,7 +140,9 @@ type CertificateSpec struct { // SecretTemplate defines annotations and labels to be copied to the // Certificate's Secret. Labels and annotations on the Secret will be changed - // as they appear on the SecretTemplate. + // as they appear on the SecretTemplate when added or removed. SecretTemplate + // annotations are added in conjunction with, and cannot overwrite, the base + // set of annotations cert-manager sets on the Certificate's Secret. // +optional SecretTemplate *CertificateSecretTemplate `json:"secretTemplate,omitempty"`