diff --git a/charts/spire/README.md b/charts/spire/README.md index 3637d7f..7cb50a3 100644 --- a/charts/spire/README.md +++ b/charts/spire/README.md @@ -130,6 +130,7 @@ Kubernetes: `>=1.21.0-0` | spiffe-csi-driver.image.registry | string | `"ghcr.io"` | The OCI registry to pull the image from | | spiffe-csi-driver.image.repository | string | `"spiffe/spiffe-csi-driver"` | The repository within the registry | | spiffe-csi-driver.image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion | +| spiffe-csi-driver.image.version | string | `""` | This value is deprecated in favor of tag. (Will be removed in a future release) | | spiffe-csi-driver.imagePullSecrets | list | `[]` | | | spiffe-csi-driver.kubeletPath | string | `"/var/lib/kubelet"` | | | spiffe-csi-driver.nameOverride | string | `""` | | @@ -138,6 +139,7 @@ Kubernetes: `>=1.21.0-0` | spiffe-csi-driver.nodeDriverRegistrar.image.registry | string | `"registry.k8s.io"` | The OCI registry to pull the image from | | spiffe-csi-driver.nodeDriverRegistrar.image.repository | string | `"sig-storage/csi-node-driver-registrar"` | The repository within the registry | | spiffe-csi-driver.nodeDriverRegistrar.image.tag | string | `"v2.6.2"` | Overrides the image tag | +| spiffe-csi-driver.nodeDriverRegistrar.image.version | string | `""` | This value is deprecated in favor of tag. (Will be removed in a future release) | | spiffe-csi-driver.nodeDriverRegistrar.resources | object | `{}` | | | spiffe-csi-driver.nodeSelector | object | `{}` | | | spiffe-csi-driver.pluginName | string | `"csi.spiffe.io"` | Set the csi driver name deployed to Kubernetes. | @@ -171,6 +173,7 @@ Kubernetes: `>=1.21.0-0` | spiffe-oidc-discovery-provider.image.registry | string | `"ghcr.io"` | The OCI registry to pull the image from | | spiffe-oidc-discovery-provider.image.repository | string | `"spiffe/oidc-discovery-provider"` | The repository within the registry | | spiffe-oidc-discovery-provider.image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion | +| spiffe-oidc-discovery-provider.image.version | string | `""` | This value is deprecated in favor of tag. (Will be removed in a future release) | | spiffe-oidc-discovery-provider.imagePullSecrets | list | `[]` | | | spiffe-oidc-discovery-provider.ingress.annotations | object | `{}` | | | spiffe-oidc-discovery-provider.ingress.className | string | `""` | | @@ -184,6 +187,7 @@ Kubernetes: `>=1.21.0-0` | spiffe-oidc-discovery-provider.insecureScheme.nginx.image.registry | string | `"docker.io"` | The OCI registry to pull the image from | | spiffe-oidc-discovery-provider.insecureScheme.nginx.image.repository | string | `"nginxinc/nginx-unprivileged"` | The repository within the registry | | spiffe-oidc-discovery-provider.insecureScheme.nginx.image.tag | string | `"1.23.2-alpine"` | Overrides the image tag | +| spiffe-oidc-discovery-provider.insecureScheme.nginx.image.version | string | `""` | This value is deprecated in favor of tag. (Will be removed in a future release) | | spiffe-oidc-discovery-provider.insecureScheme.nginx.resources | object | `{}` | | | spiffe-oidc-discovery-provider.nameOverride | string | `""` | | | spiffe-oidc-discovery-provider.namespaceOverride | string | `""` | | @@ -204,6 +208,7 @@ Kubernetes: `>=1.21.0-0` | spiffe-oidc-discovery-provider.telemetry.prometheus.nginxExporter.image.registry | string | `"docker.io"` | The OCI registry to pull the image from | | spiffe-oidc-discovery-provider.telemetry.prometheus.nginxExporter.image.repository | string | `"nginx/nginx-prometheus-exporter"` | The repository within the registry | | spiffe-oidc-discovery-provider.telemetry.prometheus.nginxExporter.image.tag | string | `"0.11.0"` | Overrides the image tag | +| spiffe-oidc-discovery-provider.telemetry.prometheus.nginxExporter.image.version | string | `""` | This value is deprecated in favor of tag. (Will be removed in a future release) | | spiffe-oidc-discovery-provider.telemetry.prometheus.nginxExporter.resources | object | `{}` | | | spiffe-oidc-discovery-provider.telemetry.prometheus.podMonitor.enabled | bool | `false` | | | spiffe-oidc-discovery-provider.telemetry.prometheus.podMonitor.labels | object | `{}` | | @@ -223,6 +228,7 @@ Kubernetes: `>=1.21.0-0` | spire-agent.image.registry | string | `"ghcr.io"` | The OCI registry to pull the image from | | spire-agent.image.repository | string | `"spiffe/spire-agent"` | The repository within the registry | | spire-agent.image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion. | +| spire-agent.image.version | string | `""` | This value is deprecated in favor of tag. (Will be removed in a future release) | | spire-agent.imagePullSecrets | list | `[]` | | | spire-agent.initContainers | list | `[]` | | | spire-agent.logLevel | string | `"info"` | The log level, valid values are "debug", "info", "warn", and "error" | @@ -252,7 +258,8 @@ Kubernetes: `>=1.21.0-0` | spire-agent.waitForIt.image.pullPolicy | string | `"IfNotPresent"` | The image pull policy | | spire-agent.waitForIt.image.registry | string | `"cgr.dev"` | The OCI registry to pull the image from | | spire-agent.waitForIt.image.repository | string | `"chainguard/wait-for-it"` | The repository within the registry | -| spire-agent.waitForIt.image.tag | string | `"latest"` | Overrides the image tag | +| spire-agent.waitForIt.image.tag | string | `"latest-20230517"` | Overrides the image tag | +| spire-agent.waitForIt.image.version | string | `""` | This value is deprecated in favor of tag. (Will be removed in a future release) | | spire-agent.waitForIt.resources | object | `{}` | | | spire-agent.workloadAttestors.k8s.skipKubeletVerification | bool | `true` | If true, kubelet certificate verification is skipped | | spire-agent.workloadAttestors.unix.enabled | bool | `false` | enables the Unix workload attestor | @@ -284,6 +291,7 @@ Kubernetes: `>=1.21.0-0` | spire-server.controllerManager.image.registry | string | `"ghcr.io"` | The OCI registry to pull the image from | | spire-server.controllerManager.image.repository | string | `"spiffe/spire-controller-manager"` | The repository within the registry | | spire-server.controllerManager.image.tag | string | `"0.2.2"` | Overrides the image tag | +| spire-server.controllerManager.image.version | string | `""` | This value is deprecated in favor of tag. (Will be removed in a future release) | | spire-server.controllerManager.resources | object | `{}` | | | spire-server.controllerManager.securityContext | object | `{}` | | | spire-server.controllerManager.service.annotations | object | `{}` | | @@ -293,7 +301,8 @@ Kubernetes: `>=1.21.0-0` | spire-server.controllerManager.validatingWebhookConfiguration.upgradeHook.image.pullPolicy | string | `"IfNotPresent"` | The image pull policy | | spire-server.controllerManager.validatingWebhookConfiguration.upgradeHook.image.registry | string | `"docker.io"` | The OCI registry to pull the image from | | spire-server.controllerManager.validatingWebhookConfiguration.upgradeHook.image.repository | string | `"rancher/kubectl"` | The repository within the registry | -| spire-server.controllerManager.validatingWebhookConfiguration.upgradeHook.image.tag | string | `"latest"` | Overrides the image tag | +| spire-server.controllerManager.validatingWebhookConfiguration.upgradeHook.image.tag | string | `""` | Overrides the image tag | +| spire-server.controllerManager.validatingWebhookConfiguration.upgradeHook.image.version | string | `""` | This value is deprecated in favor of tag. (Will be removed in a future release) | | spire-server.dataStore.sql.databaseName | string | `"spire"` | Only used by "postgres" or "mysql" | | spire-server.dataStore.sql.databaseType | string | `"sqlite3"` | Other supported databases are "postgres" and "mysql" | | spire-server.dataStore.sql.host | string | `""` | Only used by "postgres" or "mysql" | @@ -315,6 +324,7 @@ Kubernetes: `>=1.21.0-0` | spire-server.image.registry | string | `"ghcr.io"` | The OCI registry to pull the image from | | spire-server.image.repository | string | `"spiffe/spire-server"` | The repository within the registry | | spire-server.image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion. | +| spire-server.image.version | string | `""` | This value is deprecated in favor of tag. (Will be removed in a future release) | | spire-server.imagePullSecrets | list | `[]` | | | spire-server.initContainers | list | `[]` | | | spire-server.jwtIssuer | string | `"oidc-discovery.example.org"` | The JWT issuer domain | diff --git a/charts/spire/charts/spiffe-csi-driver/README.md b/charts/spire/charts/spiffe-csi-driver/README.md index a2dd166..b759f31 100644 --- a/charts/spire/charts/spiffe-csi-driver/README.md +++ b/charts/spire/charts/spiffe-csi-driver/README.md @@ -20,6 +20,7 @@ A Helm chart to install the SPIFFE CSI driver. | image.registry | string | `"ghcr.io"` | The OCI registry to pull the image from | | image.repository | string | `"spiffe/spiffe-csi-driver"` | The repository within the registry | | image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion | +| image.version | string | `""` | This value is deprecated in favor of tag. (Will be removed in a future release) | | imagePullSecrets | list | `[]` | | | kubeletPath | string | `"/var/lib/kubelet"` | | | nameOverride | string | `""` | | @@ -28,6 +29,7 @@ A Helm chart to install the SPIFFE CSI driver. | nodeDriverRegistrar.image.registry | string | `"registry.k8s.io"` | The OCI registry to pull the image from | | nodeDriverRegistrar.image.repository | string | `"sig-storage/csi-node-driver-registrar"` | The repository within the registry | | nodeDriverRegistrar.image.tag | string | `"v2.6.2"` | Overrides the image tag | +| nodeDriverRegistrar.image.version | string | `""` | This value is deprecated in favor of tag. (Will be removed in a future release) | | nodeDriverRegistrar.resources | object | `{}` | | | nodeSelector | object | `{}` | | | pluginName | string | `"csi.spiffe.io"` | Set the csi driver name deployed to Kubernetes. | diff --git a/charts/spire/charts/spiffe-csi-driver/values.yaml b/charts/spire/charts/spiffe-csi-driver/values.yaml index e07ff13..1825452 100644 --- a/charts/spire/charts/spiffe-csi-driver/values.yaml +++ b/charts/spire/charts/spiffe-csi-driver/values.yaml @@ -8,6 +8,8 @@ image: repository: spiffe/spiffe-csi-driver # -- The image pull policy pullPolicy: IfNotPresent + # -- This value is deprecated in favor of tag. (Will be removed in a future release) + version: "" # -- Overrides the image tag whose default is the chart appVersion tag: "" resources: {} @@ -63,6 +65,8 @@ nodeDriverRegistrar: repository: sig-storage/csi-node-driver-registrar # -- The image pull policy pullPolicy: IfNotPresent + # -- This value is deprecated in favor of tag. (Will be removed in a future release) + version: "" # -- Overrides the image tag tag: v2.6.2 resources: {} diff --git a/charts/spire/charts/spiffe-oidc-discovery-provider/README.md b/charts/spire/charts/spiffe-oidc-discovery-provider/README.md index 04dd1cc..48ee4df 100644 --- a/charts/spire/charts/spiffe-oidc-discovery-provider/README.md +++ b/charts/spire/charts/spiffe-oidc-discovery-provider/README.md @@ -35,6 +35,7 @@ A Helm chart to install the SPIFFE OIDC discovery provider. | image.registry | string | `"ghcr.io"` | The OCI registry to pull the image from | | image.repository | string | `"spiffe/oidc-discovery-provider"` | The repository within the registry | | image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion | +| image.version | string | `""` | This value is deprecated in favor of tag. (Will be removed in a future release) | | imagePullSecrets | list | `[]` | | | ingress.annotations | object | `{}` | | | ingress.className | string | `""` | | @@ -48,6 +49,7 @@ A Helm chart to install the SPIFFE OIDC discovery provider. | insecureScheme.nginx.image.registry | string | `"docker.io"` | The OCI registry to pull the image from | | insecureScheme.nginx.image.repository | string | `"nginxinc/nginx-unprivileged"` | The repository within the registry | | insecureScheme.nginx.image.tag | string | `"1.23.2-alpine"` | Overrides the image tag | +| insecureScheme.nginx.image.version | string | `""` | This value is deprecated in favor of tag. (Will be removed in a future release) | | insecureScheme.nginx.resources | object | `{}` | | | nameOverride | string | `""` | | | namespaceOverride | string | `""` | | @@ -68,6 +70,7 @@ A Helm chart to install the SPIFFE OIDC discovery provider. | telemetry.prometheus.nginxExporter.image.registry | string | `"docker.io"` | The OCI registry to pull the image from | | telemetry.prometheus.nginxExporter.image.repository | string | `"nginx/nginx-prometheus-exporter"` | The repository within the registry | | telemetry.prometheus.nginxExporter.image.tag | string | `"0.11.0"` | Overrides the image tag | +| telemetry.prometheus.nginxExporter.image.version | string | `""` | This value is deprecated in favor of tag. (Will be removed in a future release) | | telemetry.prometheus.nginxExporter.resources | object | `{}` | | | telemetry.prometheus.podMonitor.enabled | bool | `false` | | | telemetry.prometheus.podMonitor.labels | object | `{}` | | diff --git a/charts/spire/charts/spiffe-oidc-discovery-provider/values.yaml b/charts/spire/charts/spiffe-oidc-discovery-provider/values.yaml index 9243ba7..f0b5071 100644 --- a/charts/spire/charts/spiffe-oidc-discovery-provider/values.yaml +++ b/charts/spire/charts/spiffe-oidc-discovery-provider/values.yaml @@ -16,6 +16,8 @@ image: repository: spiffe/oidc-discovery-provider # -- The image pull policy pullPolicy: IfNotPresent + # -- This value is deprecated in favor of tag. (Will be removed in a future release) + version: "" # -- Overrides the image tag whose default is the chart appVersion tag: "" @@ -65,6 +67,8 @@ insecureScheme: repository: nginxinc/nginx-unprivileged # -- The image pull policy pullPolicy: IfNotPresent + # -- This value is deprecated in favor of tag. (Will be removed in a future release) + version: "" # -- Overrides the image tag tag: 1.23.2-alpine # chainguard image does not support the templates feature @@ -147,6 +151,8 @@ telemetry: repository: nginx/nginx-prometheus-exporter # -- The image pull policy pullPolicy: IfNotPresent + # -- This value is deprecated in favor of tag. (Will be removed in a future release) + version: "" # -- Overrides the image tag tag: "0.11.0" diff --git a/charts/spire/charts/spire-agent/README.md b/charts/spire/charts/spire-agent/README.md index 36f22ce..05b24af 100644 --- a/charts/spire/charts/spire-agent/README.md +++ b/charts/spire/charts/spire-agent/README.md @@ -26,6 +26,7 @@ A Helm chart to install the SPIRE agent. | image.registry | string | `"ghcr.io"` | The OCI registry to pull the image from | | image.repository | string | `"spiffe/spire-agent"` | The repository within the registry | | image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion. | +| image.version | string | `""` | This value is deprecated in favor of tag. (Will be removed in a future release) | | imagePullSecrets | list | `[]` | | | initContainers | list | `[]` | | | logLevel | string | `"info"` | The log level, valid values are "debug", "info", "warn", and "error" | @@ -55,7 +56,8 @@ A Helm chart to install the SPIRE agent. | waitForIt.image.pullPolicy | string | `"IfNotPresent"` | The image pull policy | | waitForIt.image.registry | string | `"cgr.dev"` | The OCI registry to pull the image from | | waitForIt.image.repository | string | `"chainguard/wait-for-it"` | The repository within the registry | -| waitForIt.image.tag | string | `"latest"` | Overrides the image tag | +| waitForIt.image.tag | string | `"latest-20230517"` | Overrides the image tag | +| waitForIt.image.version | string | `""` | This value is deprecated in favor of tag. (Will be removed in a future release) | | waitForIt.resources | object | `{}` | | | workloadAttestors.k8s.skipKubeletVerification | bool | `true` | If true, kubelet certificate verification is skipped | | workloadAttestors.unix.enabled | bool | `false` | enables the Unix workload attestor | diff --git a/charts/spire/charts/spire-agent/values.yaml b/charts/spire/charts/spire-agent/values.yaml index 872737f..afd4453 100644 --- a/charts/spire/charts/spire-agent/values.yaml +++ b/charts/spire/charts/spire-agent/values.yaml @@ -9,6 +9,8 @@ image: repository: spiffe/spire-agent # -- The image pull policy pullPolicy: IfNotPresent + # -- This value is deprecated in favor of tag. (Will be removed in a future release) + version: "" # -- Overrides the image tag whose default is the chart appVersion. tag: "" @@ -86,8 +88,10 @@ waitForIt: repository: chainguard/wait-for-it # -- The image pull policy pullPolicy: IfNotPresent + # -- This value is deprecated in favor of tag. (Will be removed in a future release) + version: "" # -- Overrides the image tag - tag: latest + tag: latest-20230517 resources: {} # workloadAttestors determine a workload's properties and then generate a set of selectors associated with it. diff --git a/charts/spire/charts/spire-server/README.md b/charts/spire/charts/spire-server/README.md index f0fa3a3..d0ab19f 100644 --- a/charts/spire/charts/spire-server/README.md +++ b/charts/spire/charts/spire-server/README.md @@ -45,6 +45,7 @@ A Helm chart to install the SPIRE server. | controllerManager.image.registry | string | `"ghcr.io"` | The OCI registry to pull the image from | | controllerManager.image.repository | string | `"spiffe/spire-controller-manager"` | The repository within the registry | | controllerManager.image.tag | string | `"0.2.2"` | Overrides the image tag | +| controllerManager.image.version | string | `""` | This value is deprecated in favor of tag. (Will be removed in a future release) | | controllerManager.resources | object | `{}` | | | controllerManager.securityContext | object | `{}` | | | controllerManager.service.annotations | object | `{}` | | @@ -54,7 +55,8 @@ A Helm chart to install the SPIRE server. | controllerManager.validatingWebhookConfiguration.upgradeHook.image.pullPolicy | string | `"IfNotPresent"` | The image pull policy | | controllerManager.validatingWebhookConfiguration.upgradeHook.image.registry | string | `"docker.io"` | The OCI registry to pull the image from | | controllerManager.validatingWebhookConfiguration.upgradeHook.image.repository | string | `"rancher/kubectl"` | The repository within the registry | -| controllerManager.validatingWebhookConfiguration.upgradeHook.image.tag | string | `"latest"` | Overrides the image tag | +| controllerManager.validatingWebhookConfiguration.upgradeHook.image.tag | string | `""` | Overrides the image tag | +| controllerManager.validatingWebhookConfiguration.upgradeHook.image.version | string | `""` | This value is deprecated in favor of tag. (Will be removed in a future release) | | dataStore.sql.databaseName | string | `"spire"` | Only used by "postgres" or "mysql" | | dataStore.sql.databaseType | string | `"sqlite3"` | Other supported databases are "postgres" and "mysql" | | dataStore.sql.host | string | `""` | Only used by "postgres" or "mysql" | @@ -76,6 +78,7 @@ A Helm chart to install the SPIRE server. | image.registry | string | `"ghcr.io"` | The OCI registry to pull the image from | | image.repository | string | `"spiffe/spire-server"` | The repository within the registry | | image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion. | +| image.version | string | `""` | This value is deprecated in favor of tag. (Will be removed in a future release) | | imagePullSecrets | list | `[]` | | | initContainers | list | `[]` | | | jwtIssuer | string | `"oidc-discovery.example.org"` | The JWT issuer domain | diff --git a/charts/spire/charts/spire-server/values.yaml b/charts/spire/charts/spire-server/values.yaml index 6b01d90..21558de 100644 --- a/charts/spire/charts/spire-server/values.yaml +++ b/charts/spire/charts/spire-server/values.yaml @@ -12,6 +12,8 @@ image: repository: spiffe/spire-server # -- The image pull policy pullPolicy: IfNotPresent + # -- This value is deprecated in favor of tag. (Will be removed in a future release) + version: "" # -- Overrides the image tag whose default is the chart appVersion. tag: "" @@ -169,6 +171,8 @@ controllerManager: repository: spiffe/spire-controller-manager # -- The image pull policy pullPolicy: IfNotPresent + # -- This value is deprecated in favor of tag. (Will be removed in a future release) + version: "" # -- Overrides the image tag tag: "0.2.2" @@ -229,8 +233,10 @@ controllerManager: repository: rancher/kubectl # -- The image pull policy pullPolicy: IfNotPresent + # -- This value is deprecated in favor of tag. (Will be removed in a future release) + version: "" # -- Overrides the image tag - tag: latest + tag: "" telemetry: prometheus: diff --git a/charts/spire/templates/_spire-lib.tpl b/charts/spire/templates/_spire-lib.tpl index d32bffb..ca059d9 100644 --- a/charts/spire/templates/_spire-lib.tpl +++ b/charts/spire/templates/_spire-lib.tpl @@ -40,13 +40,15 @@ {{- define "spire-lib.image" -}} {{- $registry := include "spire-lib.registry" . }} -{{- if eq (substr 0 7 .image.tag) "sha256:" -}} -{{- printf "%s/%s@%s" $registry .image.repository .image.tag -}} -{{- else if .appVersion -}} -{{- printf "%s/%s:%s" $registry .image.repository (default .appVersion .image.tag) -}} -{{- else if .image.tag -}} -{{- printf "%s/%s:%s" $registry .image.repository .image.tag -}} -{{- else -}} -{{- printf "%s/%s" $registry .image.repository -}} -{{- end -}} +{{- $repo := .image.repository }} +{{- $tag := (default .image.tag .image.version) | toString }} +{{- if eq (substr 0 7 $tag) "sha256:" }} +{{- printf "%s/%s@%s" $registry $repo $tag }} +{{- else if .appVersion }} +{{- printf "%s/%s:%s" $registry $repo (default .appVersion $tag) }} +{{- else if $tag }} +{{- printf "%s/%s:%s" $registry $repo $tag }} +{{- else }} +{{- printf "%s/%s" $registry $repo }} +{{- end }} {{- end }}