diff --git a/charts/scalardl/README.md b/charts/scalardl/README.md index 1968e295..af7c1ddf 100644 --- a/charts/scalardl/README.md +++ b/charts/scalardl/README.md @@ -26,6 +26,10 @@ Current chart version is `5.0.0-SNAPSHOT` | envoy.service.ports.envoy.targetPort | int | `50051` | envoy k8s internal name | | envoy.service.type | string | `"ClusterIP"` | service types in kubernetes | | fullnameOverride | string | `""` | String to fully override scalardl.fullname template | +| global.azure | object | `{"images":{"envoy":{"image":"scalar-envoy","registry":"scalar.azurecr.io","tag":"2.0.0-SNAPSHOT"},"scalardlLedger":{"image":"scalardl-ledger-azure-payg","registry":"scalar.azurecr.io","tag":"4.0.0-SNAPSHOT"}}}` | Azure Marketplace specific configurations. | +| global.azure.images.envoy | object | `{"image":"scalar-envoy","registry":"scalar.azurecr.io","tag":"2.0.0-SNAPSHOT"}` | Container image of Envoy for Azure Marketplace. | +| global.azure.images.scalardlLedger | object | `{"image":"scalardl-ledger-azure-payg","registry":"scalar.azurecr.io","tag":"4.0.0-SNAPSHOT"}` | Container image of ScalarDL Ledger for Azure Marketplace. | +| global.platform | string | `""` | Specify the platform that you use. This configuration is for internal use. | | ledger.affinity | object | `{}` | the affinity/anti-affinity feature, greatly expands the types of constraints you can express | | ledger.existingSecret | string | `""` | Name of existing secret to use for storing database username and password | | ledger.extraVolumeMounts | list | `[]` | Defines additional volume mounts. | diff --git a/charts/scalardl/templates/ledger/deployment.yaml b/charts/scalardl/templates/ledger/deployment.yaml index 13c016a2..64ef14e3 100644 --- a/charts/scalardl/templates/ledger/deployment.yaml +++ b/charts/scalardl/templates/ledger/deployment.yaml @@ -21,6 +21,9 @@ spec: checksum/config: {{ include (print $.Template.BasePath "/ledger/configmap.yaml") . | sha256sum }} labels: {{- include "scalardl-ledger.selectorLabels" . | nindent 8 }} + {{- if eq .Values.global.platform "azure" }} + azure-extensions-usage-release-identifier: {{ .Release.Name }} + {{- end }} spec: restartPolicy: Always {{- if .Values.ledger.serviceAccount.serviceAccountName }} @@ -66,7 +69,11 @@ spec: - name: {{ .Chart.Name }}-ledger securityContext: {{- toYaml .Values.ledger.securityContext | nindent 12 }} + {{- if eq .Values.global.platform "azure" }} + image: "{{ .Values.global.azure.images.scalardlLedger.registry }}/{{ .Values.global.azure.images.scalardlLedger.image }}:{{ .Values.global.azure.images.scalardlLedger.tag }}" + {{- else }} image: "{{ .Values.ledger.image.repository }}:{{ .Values.ledger.image.version }}" + {{- end }} imagePullPolicy: {{ .Values.ledger.image.pullPolicy }} volumeMounts: {{- if .Values.ledger.scalarLedgerConfiguration.ledgerProofEnabled }} diff --git a/charts/scalardl/values.schema.json b/charts/scalardl/values.schema.json index 3866580f..1bb3ed00 100644 --- a/charts/scalardl/values.schema.json +++ b/charts/scalardl/values.schema.json @@ -76,6 +76,52 @@ "fullnameOverride": { "type": "string" }, + "global": { + "type": "object", + "properties": { + "azure": { + "type": "object", + "properties": { + "images": { + "type": "object", + "properties": { + "envoy": { + "type": "object", + "properties": { + "image": { + "type": "string" + }, + "registry": { + "type": "string" + }, + "tag": { + "type": "string" + } + } + }, + "scalardlLedger": { + "type": "object", + "properties": { + "image": { + "type": "string" + }, + "registry": { + "type": "string" + }, + "tag": { + "type": "string" + } + } + } + } + } + } + }, + "platform": { + "type": "string" + } + } + }, "ledger": { "type": "object", "properties": { diff --git a/charts/scalardl/values.yaml b/charts/scalardl/values.yaml index 06c0b8cd..a7375e45 100644 --- a/charts/scalardl/values.yaml +++ b/charts/scalardl/values.yaml @@ -2,6 +2,23 @@ # This is a YAML-formatted file. # Declare variables to be passed into your templates. +global: + # -- Specify the platform that you use. This configuration is for internal use. + platform: "" + # -- Azure Marketplace specific configurations. + azure: + images: + # -- Container image of ScalarDL Ledger for Azure Marketplace. + scalardlLedger: + tag: "4.0.0-SNAPSHOT" + image: "scalardl-ledger-azure-payg" + registry: "scalar.azurecr.io" + # -- Container image of Envoy for Azure Marketplace. + envoy: + tag: "2.0.0-SNAPSHOT" + image: "scalar-envoy" + registry: "scalar.azurecr.io" + # -- String to partially override scalardl.fullname template (will maintain the release name) nameOverride: ""