Skip to content

Commit

Permalink
[scalardb-cluster] Support Azure Marketplace (#275)
Browse files Browse the repository at this point in the history
  • Loading branch information
kota2and3kan authored Oct 1, 2024
1 parent 052acb4 commit 52e3a65
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 0 deletions.
4 changes: 4 additions & 0 deletions charts/scalardb-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ Current chart version is `2.0.0-SNAPSHOT`
| envoy.service.ports.envoy.targetPort | int | `60053` | envoy k8s internal name |
| envoy.service.type | string | `"ClusterIP"` | service types in kubernetes |
| fullnameOverride | string | `""` | String to fully override scalardb-cluster.fullname template |
| global.azure | object | `{"images":{"envoy":{"image":"scalar-envoy","registry":"scalar.azurecr.io","tag":"2.0.0-SNAPSHOT"},"scalardbCluster":{"image":"scalardb-cluster-node-azure-payg-premium","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.scalardbCluster | object | `{"image":"scalardb-cluster-node-azure-payg-premium","registry":"scalar.azurecr.io","tag":"4.0.0-SNAPSHOT"}` | Container image of ScalarDB Cluster for Azure Marketplace. |
| global.platform | string | `""` | Specify the platform that you use. This configuration is for internal use. |
| nameOverride | string | `""` | String to partially override scalardb-cluster.fullname template (will maintain the release name) |
| scalardbCluster.affinity | object | `{}` | The affinity/anti-affinity feature, greatly expands the types of constraints you can express. |
| scalardbCluster.extraVolumeMounts | list | `[]` | Defines additional volume mounts. If you want to get a heap dump of the ScalarDB Cluster node, you need to mount a volume to make the dump file persistent. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ spec:
{{- end }}
labels:
{{- include "scalardb-cluster.selectorLabels" . | nindent 8 }}
{{- if eq .Values.global.platform "azure" }}
azure-extensions-usage-release-identifier: {{ .Release.Name }}
{{- end }}
spec:
restartPolicy: Always
serviceAccountName: {{ include "scalardb-cluster.serviceAccountName" . }}
Expand All @@ -39,7 +42,11 @@ spec:
- name: {{ .Chart.Name }}-node
securityContext:
{{- toYaml .Values.scalardbCluster.securityContext | nindent 12 }}
{{- if eq .Values.global.platform "azure" }}
image: "{{ .Values.global.azure.images.scalardbCluster.registry }}/{{ .Values.global.azure.images.scalardbCluster.image }}:{{ .Values.global.azure.images.scalardbCluster.tag }}"
{{- else }}
image: "{{ .Values.scalardbCluster.image.repository }}:{{ .Values.scalardbCluster.image.tag | default .Chart.AppVersion }}"
{{- end }}
imagePullPolicy: {{ .Values.scalardbCluster.image.pullPolicy }}
ports:
- containerPort: 60053
Expand Down
46 changes: 46 additions & 0 deletions charts/scalardb-cluster/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,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"
}
}
},
"scalardbCluster": {
"type": "object",
"properties": {
"image": {
"type": "string"
},
"registry": {
"type": "string"
},
"tag": {
"type": "string"
}
}
}
}
}
}
},
"platform": {
"type": "string"
}
}
},
"nameOverride": {
"type": "string"
},
Expand Down
17 changes: 17 additions & 0 deletions charts/scalardb-cluster/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 ScalarDB Cluster for Azure Marketplace.
scalardbCluster:
tag: "4.0.0-SNAPSHOT"
image: "scalardb-cluster-node-azure-payg-premium"
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 scalardb-cluster.fullname template (will maintain the release name)
nameOverride: ""
# -- String to fully override scalardb-cluster.fullname template
Expand Down

0 comments on commit 52e3a65

Please sign in to comment.