Skip to content

Commit 5f929c7

Browse files
authored
Merge pull request #65 from cloudkite-io/add-per-pod-image
Add per pod image config
2 parents 0b22c95 + 71dfecf commit 5f929c7

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

mssql/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ name: mssql
33
description: A Helm chart for Kubernetes
44
type: application
55
version: 0.1.1
6-
appVersion: "0.1.1"
6+
appVersion: "0.1.2"

mssql/sample.values.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
loadBalancerName: mssql-load-balancer
2+
3+
# Global image configuration
4+
image:
5+
repository: gcr.io/cloudkite-public/mssql
6+
tag: "2022"
7+
pullPolicy: IfNotPresent
8+
29
databases:
310
- name: db-a
411
database: db_a
@@ -27,6 +34,10 @@ databases:
2734
secretName: db-b-db-secret
2835
secretKey: sa-password
2936
edition: Developer
37+
image:
38+
repository: gcr.io/cloudkite-public/mssql
39+
tag: "2019"
40+
pullPolicy: IfNotPresent
3041
initSql: |
3142
CREATE DATABASE another_db;
3243
GO;

mssql/templates/statefulset.yaml.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
{{- range .Values.databases }}
2+
{{- $image := .image | default dict }}
3+
{{- $repository := $image.repository | default $.Values.image.repository }}
4+
{{- $tag := $image.tag | default $.Values.image.tag | toString }}
5+
{{- $pullPolicy := $image.pullPolicy | default $.Values.image.pullPolicy }}
26
---
37
apiVersion: apps/v1
48
kind: StatefulSet
@@ -53,7 +57,7 @@ spec:
5357

5458
containers:
5559
- name: mssql
56-
image: gcr.io/cloudkite-public/mssql:2022
60+
image: "{{ $repository }}:{{ $tag }}"
5761
ports:
5862
- containerPort: 1433
5963
protocol: TCP
@@ -128,7 +132,7 @@ spec:
128132
limits:
129133
memory: "4Gi"
130134
{{- end }}
131-
imagePullPolicy: IfNotPresent
135+
imagePullPolicy: {{ $pullPolicy }}
132136
volumeMounts:
133137
- name: data
134138
mountPath: /var/opt/mssql

0 commit comments

Comments
 (0)