Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[scalardb-cluster] Support Azure Marketplace #275

Merged
merged 4 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}
Comment on lines +27 to +29
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 }}
Comment on lines +45 to +49
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We must pull container images from ACR for Azure Marketplace instead of our public container registry.
https://learn.microsoft.com/en-us/partner-center/marketplace-offers/azure-container-technical-assets-kubernetes#update-the-helm-chart

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
Loading