diff --git a/charts/opentelemetry-operator/Chart.yaml b/charts/opentelemetry-operator/Chart.yaml index ff2f923d5..ea6751a86 100644 --- a/charts/opentelemetry-operator/Chart.yaml +++ b/charts/opentelemetry-operator/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: opentelemetry-operator -version: 0.64.1 +version: 0.64.2 description: OpenTelemetry Operator Helm chart for Kubernetes type: application home: https://opentelemetry.io/ diff --git a/charts/opentelemetry-operator/examples/default/rendered/admission-webhooks/operator-webhook-with-cert-manager.yaml b/charts/opentelemetry-operator/examples/default/rendered/admission-webhooks/operator-webhook-with-cert-manager.yaml index 6d3e3edb2..7047e614e 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/admission-webhooks/operator-webhook-with-cert-manager.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/admission-webhooks/operator-webhook-with-cert-manager.yaml @@ -6,7 +6,7 @@ metadata: annotations: cert-manager.io/inject-ca-from: default/example-opentelemetry-operator-serving-cert labels: - helm.sh/chart: opentelemetry-operator-0.64.1 + helm.sh/chart: opentelemetry-operator-0.64.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.103.0" app.kubernetes.io/managed-by: Helm @@ -91,7 +91,7 @@ metadata: annotations: cert-manager.io/inject-ca-from: default/example-opentelemetry-operator-serving-cert labels: - helm.sh/chart: opentelemetry-operator-0.64.1 + helm.sh/chart: opentelemetry-operator-0.64.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.103.0" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/certmanager.yaml b/charts/opentelemetry-operator/examples/default/rendered/certmanager.yaml index 31462a0f3..e712d82da 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/certmanager.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/certmanager.yaml @@ -4,7 +4,7 @@ apiVersion: cert-manager.io/v1 kind: Certificate metadata: labels: - helm.sh/chart: opentelemetry-operator-0.64.1 + helm.sh/chart: opentelemetry-operator-0.64.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.103.0" app.kubernetes.io/managed-by: Helm @@ -30,7 +30,7 @@ apiVersion: cert-manager.io/v1 kind: Issuer metadata: labels: - helm.sh/chart: opentelemetry-operator-0.64.1 + helm.sh/chart: opentelemetry-operator-0.64.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.103.0" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/clusterrole.yaml b/charts/opentelemetry-operator/examples/default/rendered/clusterrole.yaml index 3834d5ba9..0542fb475 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/clusterrole.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/clusterrole.yaml @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: labels: - helm.sh/chart: opentelemetry-operator-0.64.1 + helm.sh/chart: opentelemetry-operator-0.64.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.103.0" app.kubernetes.io/managed-by: Helm @@ -223,7 +223,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: labels: - helm.sh/chart: opentelemetry-operator-0.64.1 + helm.sh/chart: opentelemetry-operator-0.64.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.103.0" app.kubernetes.io/managed-by: Helm @@ -242,7 +242,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: labels: - helm.sh/chart: opentelemetry-operator-0.64.1 + helm.sh/chart: opentelemetry-operator-0.64.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.103.0" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/clusterrolebinding.yaml b/charts/opentelemetry-operator/examples/default/rendered/clusterrolebinding.yaml index 89d61fded..7925f16fc 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/clusterrolebinding.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/clusterrolebinding.yaml @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: labels: - helm.sh/chart: opentelemetry-operator-0.64.1 + helm.sh/chart: opentelemetry-operator-0.64.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.103.0" app.kubernetes.io/managed-by: Helm @@ -26,7 +26,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: labels: - helm.sh/chart: opentelemetry-operator-0.64.1 + helm.sh/chart: opentelemetry-operator-0.64.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.103.0" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/deployment.yaml b/charts/opentelemetry-operator/examples/default/rendered/deployment.yaml index 0b28e97fe..a6e823000 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/deployment.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/deployment.yaml @@ -4,7 +4,7 @@ apiVersion: apps/v1 kind: Deployment metadata: labels: - helm.sh/chart: opentelemetry-operator-0.64.1 + helm.sh/chart: opentelemetry-operator-0.64.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.103.0" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/role.yaml b/charts/opentelemetry-operator/examples/default/rendered/role.yaml index 8ea15aafe..9b727552c 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/role.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/role.yaml @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: labels: - helm.sh/chart: opentelemetry-operator-0.64.1 + helm.sh/chart: opentelemetry-operator-0.64.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.103.0" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/rolebinding.yaml b/charts/opentelemetry-operator/examples/default/rendered/rolebinding.yaml index 7289773ac..9f9919ba9 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/rolebinding.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/rolebinding.yaml @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: labels: - helm.sh/chart: opentelemetry-operator-0.64.1 + helm.sh/chart: opentelemetry-operator-0.64.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.103.0" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/service.yaml b/charts/opentelemetry-operator/examples/default/rendered/service.yaml index 4d85c4b94..f064d83e9 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/service.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/service.yaml @@ -4,7 +4,7 @@ apiVersion: v1 kind: Service metadata: labels: - helm.sh/chart: opentelemetry-operator-0.64.1 + helm.sh/chart: opentelemetry-operator-0.64.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.103.0" app.kubernetes.io/managed-by: Helm @@ -32,7 +32,7 @@ apiVersion: v1 kind: Service metadata: labels: - helm.sh/chart: opentelemetry-operator-0.64.1 + helm.sh/chart: opentelemetry-operator-0.64.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.103.0" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/serviceaccount.yaml b/charts/opentelemetry-operator/examples/default/rendered/serviceaccount.yaml index bf9c0b266..cfcd7717c 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/serviceaccount.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/serviceaccount.yaml @@ -6,7 +6,7 @@ metadata: name: opentelemetry-operator namespace: default labels: - helm.sh/chart: opentelemetry-operator-0.64.1 + helm.sh/chart: opentelemetry-operator-0.64.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.103.0" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/tests/test-certmanager-connection.yaml b/charts/opentelemetry-operator/examples/default/rendered/tests/test-certmanager-connection.yaml index bb54ff860..ca37446da 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/tests/test-certmanager-connection.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/tests/test-certmanager-connection.yaml @@ -6,7 +6,7 @@ metadata: name: "example-opentelemetry-operator-cert-manager" namespace: default labels: - helm.sh/chart: opentelemetry-operator-0.64.1 + helm.sh/chart: opentelemetry-operator-0.64.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.103.0" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/tests/test-service-connection.yaml b/charts/opentelemetry-operator/examples/default/rendered/tests/test-service-connection.yaml index b77a5c128..7c2b96a35 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/tests/test-service-connection.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/tests/test-service-connection.yaml @@ -6,7 +6,7 @@ metadata: name: "example-opentelemetry-operator-metrics" namespace: default labels: - helm.sh/chart: opentelemetry-operator-0.64.1 + helm.sh/chart: opentelemetry-operator-0.64.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.103.0" app.kubernetes.io/managed-by: Helm @@ -44,7 +44,7 @@ metadata: name: "example-opentelemetry-operator-webhook" namespace: default labels: - helm.sh/chart: opentelemetry-operator-0.64.1 + helm.sh/chart: opentelemetry-operator-0.64.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.103.0" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/templates/_helpers.tpl b/charts/opentelemetry-operator/templates/_helpers.tpl index 3cd697c9b..6539a73f5 100644 --- a/charts/opentelemetry-operator/templates/_helpers.tpl +++ b/charts/opentelemetry-operator/templates/_helpers.tpl @@ -110,8 +110,9 @@ a cert is loaded from an existing secret or is provided via `.Values` {{- end }} {{- else }} {{- $altNames := list ( printf "%s-webhook.%s" (include "opentelemetry-operator.fullname" .) .Release.Namespace ) ( printf "%s-webhook.%s.svc" (include "opentelemetry-operator.fullname" .) .Release.Namespace ) -}} -{{- $ca := genCA "opentelemetry-operator-operator-ca" 365 }} -{{- $cert := genSignedCert (include "opentelemetry-operator.fullname" .) nil $altNames 365 $ca }} +{{- $tmpperioddays := int .Values.admissionWebhooks.autoGenerateCert.certPeriodDays | default 365 }} +{{- $ca := genCA "opentelemetry-operator-operator-ca" $tmpperioddays }} +{{- $cert := genSignedCert (include "opentelemetry-operator.fullname" .) nil $altNames $tmpperioddays $ca }} {{- $certCrtEnc = b64enc $cert.Cert }} {{- $certKeyEnc = b64enc $cert.Key }} {{- $caCertEnc = b64enc $ca.Cert }} diff --git a/charts/opentelemetry-operator/values.schema.json b/charts/opentelemetry-operator/values.schema.json index 1116b813c..f70b1ac26 100644 --- a/charts/opentelemetry-operator/values.schema.json +++ b/charts/opentelemetry-operator/values.schema.json @@ -1571,11 +1571,20 @@ "examples": [ true ] + }, + "certPeriodDays": { + "type": "integer", + "default": 365, + "title": "Cert period time in days.", + "examples": [ + 365 + ] } }, "examples": [{ "enabled": true, - "recreate": true + "recreate": true, + "certPeriodDays": 365 }] }, "certFile": { diff --git a/charts/opentelemetry-operator/values.yaml b/charts/opentelemetry-operator/values.yaml index 47cda8281..d35d406b2 100644 --- a/charts/opentelemetry-operator/values.yaml +++ b/charts/opentelemetry-operator/values.yaml @@ -260,6 +260,8 @@ admissionWebhooks: enabled: true # If set to true, new webhook key/certificate is generated on helm upgrade. recreate: true + # Cert period time in days. The default is 365 days. + certPeriodDays: 365 ## TLS Certificate Option 3: Use your own self-signed certificate. ## certManager and autoGenerateCert must be disabled and certFile, keyFile, and caFile must be set.