Skip to content

Commit

Permalink
[scalardl-ledger] Support Azure Marketplace (#277)
Browse files Browse the repository at this point in the history
  • Loading branch information
kota2and3kan authored Dec 4, 2024
1 parent 14bc02f commit c94eb21
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 0 deletions.
4 changes: 4 additions & 0 deletions charts/scalardl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |
Expand Down
7 changes: 7 additions & 0 deletions charts/scalardl/templates/ledger/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down
46 changes: 46 additions & 0 deletions charts/scalardl/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
17 changes: 17 additions & 0 deletions charts/scalardl/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ""

Expand Down

0 comments on commit c94eb21

Please sign in to comment.