diff --git a/charts/osm/templates/_helpers.tpl b/charts/osm/templates/_helpers.tpl index b4fb0723ac..48aaa9a782 100644 --- a/charts/osm/templates/_helpers.tpl +++ b/charts/osm/templates/_helpers.tpl @@ -43,62 +43,62 @@ securityContext: {{/* osm-controller image */}} {{- define "osmController.image" -}} {{- if .Values.osm.image.tag -}} -{{- printf "%s/osm-controller:%s" .Values.osm.image.registry .Values.osm.image.tag -}} +{{- printf "%s/%s:%s" .Values.osm.image.registry .Values.osm.image.name.osmController .Values.osm.image.tag -}} {{- else -}} -{{- printf "%s/osm-controller@%s" .Values.osm.image.registry .Values.osm.image.digest.osmController -}} +{{- printf "%s/%s@%s" .Values.osm.image.registry .Values.osm.image.name.osmController .Values.osm.image.digest.osmController -}} {{- end -}} {{- end -}} {{/* osm-injector image */}} {{- define "osmInjector.image" -}} {{- if .Values.osm.image.tag -}} -{{- printf "%s/osm-injector:%s" .Values.osm.image.registry .Values.osm.image.tag -}} +{{- printf "%s/%s:%s" .Values.osm.image.registry .Values.osm.image.name.osmInjector .Values.osm.image.tag -}} {{- else -}} -{{- printf "%s/osm-injector@%s" .Values.osm.image.registry .Values.osm.image.digest.osmInjector -}} +{{- printf "%s/%s@%s" .Values.osm.image.registry .Values.osm.image.name.osmInjector .Values.osm.image.digest.osmInjector -}} {{- end -}} {{- end -}} {{/* Sidecar init image */}} {{- define "osmSidecarInit.image" -}} {{- if .Values.osm.image.tag -}} -{{- printf "%s/init:%s" .Values.osm.image.registry .Values.osm.image.tag -}} +{{- printf "%s/%s:%s" .Values.osm.image.registry .Values.osm.image.name.osmSidecarInit .Values.osm.image.tag -}} {{- else -}} -{{- printf "%s/init@%s" .Values.osm.image.registry .Values.osm.image.digest.osmSidecarInit -}} +{{- printf "%s/%s@%s" .Values.osm.image.registry .Values.osm.image.name.osmSidecarInit .Values.osm.image.digest.osmSidecarInit -}} {{- end -}} {{- end -}} {{/* osm-bootstrap image */}} {{- define "osmBootstrap.image" -}} {{- if .Values.osm.image.tag -}} -{{- printf "%s/osm-bootstrap:%s" .Values.osm.image.registry .Values.osm.image.tag -}} +{{- printf "%s/%s:%s" .Values.osm.image.registry .Values.osm.image.name.osmBootstrap .Values.osm.image.tag -}} {{- else -}} -{{- printf "%s/osm-bootstrap@%s" .Values.osm.image.registry .Values.osm.image.digest.osmBootstrap -}} +{{- printf "%s/%s@%s" .Values.osm.image.registry .Values.osm.image.name.osmBootstrap .Values.osm.image.digest.osmBootstrap -}} {{- end -}} {{- end -}} {{/* osm-crds image */}} {{- define "osmCRDs.image" -}} {{- if .Values.osm.image.tag -}} -{{- printf "%s/osm-crds:%s" .Values.osm.image.registry .Values.osm.image.tag -}} +{{- printf "%s/%s:%s" .Values.osm.image.registry .Values.osm.image.name.osmCRDs .Values.osm.image.tag -}} {{- else -}} -{{- printf "%s/osm-crds@%s" .Values.osm.image.registry .Values.osm.image.digest.osmCRDs -}} +{{- printf "%s/%s@%s" .Values.osm.image.registry .Values.osm.image.name.osmCRDs .Values.osm.image.digest.osmCRDs -}} {{- end -}} {{- end -}} {{/* osm-preinstall image */}} {{- define "osmPreinstall.image" -}} {{- if .Values.osm.image.tag -}} -{{- printf "%s/osm-preinstall:%s" .Values.osm.image.registry .Values.osm.image.tag -}} +{{- printf "%s/%s:%s" .Values.osm.image.registry .Values.osm.image.name.osmPreinstall .Values.osm.image.tag -}} {{- else -}} -{{- printf "%s/osm-preinstall@%s" .Values.osm.image.registry .Values.osm.image.digest.osmPreinstall -}} +{{- printf "%s/%s@%s" .Values.osm.image.registry .Values.osm.image.name.osmPreinstall .Values.osm.image.digest.osmPreinstall -}} {{- end -}} {{- end -}} {{/* osm-healthcheck image */}} {{- define "osmHealthcheck.image" -}} {{- if .Values.osm.image.tag -}} -{{- printf "%s/osm-healthcheck:%s" .Values.osm.image.registry .Values.osm.image.tag -}} +{{- printf "%s/%s:%s" .Values.osm.image.registry .Values.osm.image.name.osmHealthcheck .Values.osm.image.tag -}} {{- else -}} -{{- printf "%s/osm-healthcheck@%s" .Values.osm.image.registry .Values.osm.image.digest.osmHealthcheck -}} +{{- printf "%s/%s@%s" .Values.osm.image.registry .Values.osm.image.name.osmHealthcheck .Values.osm.image.digest.osmHealthcheck -}} {{- end -}} {{- end -}} diff --git a/charts/osm/values.schema.json b/charts/osm/values.schema.json index 55fad02342..edd5649b56 100644 --- a/charts/osm/values.schema.json +++ b/charts/osm/values.schema.json @@ -244,12 +244,14 @@ "examples": [ { "registry": "openservicemesh", + "name": "osm-controller", "pullPolicy": "IfNotPresent", "tag": "v0.4.2" } ], "required": [ "registry", + "name", "pullPolicy", "tag", "digest" @@ -264,6 +266,65 @@ "openservicemesh" ] }, + "name": { + "$id": "#/properties/osm/properties/image/properties/name", + "type": "object", + "title": "Default image names", + "description": "Default image names for control plane.", + "required": [ + "osmController", + "osmInjector", + "osmSidecarInit", + "osmBootstrap", + "osmCRDs", + "osmPreinstall", + "osmHealthcheck" + ], + "properties": { + "osmController": { + "$id": "#/properties/osm/properties/image/properties/name/properties/osmController", + "type": "string", + "title": "osm-controller's image names", + "description": "osm-controller container's image names." + }, + "osmInjector": { + "$id": "#/properties/osm/properties/image/properties/name/properties/osmInjector", + "type": "string", + "title": "osm-injector's image name", + "description": "osm-injector container's image name." + }, + "osmSidecarInit": { + "$id": "#/properties/osm/properties/image/properties/name/properties/osmSidecarInit", + "type": "string", + "title": "osm-osmSidecarInit's image name", + "description": "osm-osmSidecarInit container's image name." + }, + "osmBootstrap": { + "$id": "#/properties/osm/properties/image/properties/name/properties/osmBootstrap", + "type": "string", + "title": "osm-boostrap's image name", + "description": "osm-bootstrap container's image name." + }, + "osmCRDs": { + "$id": "#/properties/osm/properties/image/properties/name/properties/osmCRDs", + "type": "string", + "title": "osm-crds' image name", + "description": "osm-crds container's image name." + }, + "osmPreinstall": { + "$id": "#/properties/osm/properties/image/properties/name/properties/osmPreinstall", + "type": "string", + "title": "osm-preinstall's image name", + "description": "osm-preinstall container's image name." + }, + "osmHealthcheck": { + "$id": "#/properties/osm/properties/image/properties/name/properties/osmHealthcheck", + "type": "string", + "title": "osm-healthcheck's image name", + "description": "osm-healthcheck container's image name." + } + } + }, "pullPolicy": { "$id": "#/properties/osm/properties/image/properties/pullPolicy", "type": "string", diff --git a/charts/osm/values.yaml b/charts/osm/values.yaml index 448b610b3b..110eb85b0b 100644 --- a/charts/osm/values.yaml +++ b/charts/osm/values.yaml @@ -13,6 +13,22 @@ osm: pullPolicy: IfNotPresent # -- Container image tag for control plane images tag: "latest-main" + # -- Image name defaults + name: + # -- osm-controller's image name + osmController: osm-controller + # -- osm-injector's image name + osmInjector: osm-injector + # -- Sidecar init container's image name + osmSidecarInit: init + # -- osm-boostrap's image name + osmBootstrap: osm-bootstrap + # -- osm-crds' image name + osmCRDs: osm-crds + # -- osm-preinstall's image name + osmPreinstall: osm-preinstall + # -- osm-healthcheck's image name + osmHealthcheck: osm-healthcheck # -- Image digest (defaults to latest compatible tag) digest: # -- osm-controller's image digest