Skip to content

Commit 2c85afc

Browse files
committed
WIP Initial refactoring of deployments
1 parent f23f8c5 commit 2c85afc

File tree

4 files changed

+25
-0
lines changed

4 files changed

+25
-0
lines changed

templates/default/deployment.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ spec:
1515
labels:
1616
app: diffgram-default
1717
spec:
18+
{{ if eq .Values.diffgramEdition "enterprise"}}
1819
imagePullSecrets:
1920
- name: diffgramsecret
21+
{{ end }}
2022
volumes:
2123
- name: service-account-credentials-volume
2224
secret:
@@ -39,7 +41,12 @@ spec:
3941
command: ['sh', '-c', 'until pg_isready -h postgres-azure-service -p 5432; do echo waiting for database; sleep 2; done;']
4042
{{ end }}
4143
containers:
44+
{{ if eq .Values.diffgramEdition "enterprise"}}
4245
- image: gcr.io/diffgram-enterprise/default:{{ .Values.diffgramVersion }}
46+
{{ end }}
47+
{{ if eq .Values.diffgramEdition "opencore"}}
48+
- image: gcr.io/diffgram-open-core/default:{{ .Values.diffgramVersion }}
49+
{{ end }}
4350
imagePullPolicy: Always
4451
name: diffgram-default
4552
ports:

templates/frontend/deployment.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,17 @@ spec:
1515
labels:
1616
app: frontend
1717
spec:
18+
{{ if eq .Values.diffgramEdition "enterprise"}}
1819
imagePullSecrets:
1920
- name: diffgramsecret
21+
{{ end }}
2022
containers:
23+
{{ if eq .Values.diffgramEdition "enterprise"}}
2124
- image: gcr.io/diffgram-enterprise/frontend:{{ .Values.diffgramVersion }}
25+
{{ end }}
26+
{{ if eq .Values.diffgramEdition "opencore"}}
27+
- image: gcr.io/diffgram-open-core/frontend:{{ .Values.diffgramVersion }}
28+
{{ end }}
2229
imagePullPolicy: Always
2330
name: frontend
2431
resources:

templates/hooks/database_pre_install.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ spec:
2323
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
2424
spec:
2525
restartPolicy: Never
26+
{{ if eq .Values.diffgramEdition "enterprise"}}
2627
imagePullSecrets:
2728
- name: db-migrations-pull-secret
29+
{ {end }}
2830
volumes:
2931
- name: service-account-credentials-volume-hook
3032
secret:
@@ -33,7 +35,12 @@ spec:
3335
- key: sa_json
3436
path: sa_credentials.json
3537
containers:
38+
{{ if eq .Values.diffgramEdition "enterprise"}}
3639
- image: gcr.io/diffgram-enterprise/default:{{ .Values.diffgramVersion }}
40+
{{ end }}
41+
{{ if eq .Values.diffgramEdition "opencore"}}
42+
- image: gcr.io/diffgram-open-core/default:{{ .Values.diffgramVersion }}
43+
{{ end }}
3744
imagePullPolicy: Always
3845
name: pre-upgrade-alembic-hook
3946
volumeMounts:

values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
# The Diffgram Version. Whenever a new update arrives, this will be changed.
66
diffgramVersion: latest
77

8+
# Either 'opencore' or 'enterprise'. Please note that selecting 'enterprise'
9+
# requires that you also set imagePullCredentials.gcrCredentials.
10+
diffgramEdition: opencore
11+
812
# Set this to your public domain where you want diffgram to be.
913
diffgramDomain: example.com
1014

0 commit comments

Comments
 (0)