Skip to content

Commit b60791f

Browse files
author
PJEstrada
authored
Merge pull request #1 from diffgram/add-opencore-image
Add Opencore Image Support
2 parents f23f8c5 + 67745a9 commit b60791f

File tree

7 files changed

+50
-4
lines changed

7 files changed

+50
-4
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,16 @@
22
Helm Chart for DIffgram
33

44
# Pre-requisites
5-
### Setting Up the Docker Registry Key:
5+
### Opencore or Enterprise
66

7-
To install the helm chart you will need to receive a GCR key with the permissions from
7+
Make sure you set the value of `diffgramEdition` in the `values.yaml` to either `opencore`
8+
or `enterprise`.
9+
10+
If you set the `diffgramEdition` to `enterprise` you will have to provide the GCR credentials
11+
Key (Provided by the Diffgram Team). And set the value on `imagePullCredentials.gcrCredentials` value inside the `values.yaml` file.
12+
### Setting Up the Docker Registry Key (Enterprise Only):
13+
14+
To install the helm chart with the Enterprise Edition of Diffgram you will need to receive a GCR key with the permissions from
815
the Diffgram team to fetch our images.
916

1017
Please Contact us if you want to get one here: https://diffgram.com/contact

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: 8 additions & 1 deletion
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:
@@ -46,4 +53,4 @@ spec:
4653
- secretRef:
4754
name: db-migrations-secret
4855
# The actual migrations command
49-
command: ["sh","-c", "cd shared; export PYTHONPATH=/app; pip install sqlalchemy-utils==0.36.6;python /app/testing_and_other/create_database.py; alembic upgrade head"]
56+
command: ["sh","-c", "cd shared; export PYTHONPATH=/app; pip install sqlalchemy-utils==0.36.6;python /app/play_and_scripts/scripts/create_database.py; alembic upgrade head"]

templates/hooks/database_pre_upgrade.yaml

Lines changed: 8 additions & 1 deletion
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: diffgramsecret
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:
@@ -46,4 +53,4 @@ spec:
4653
- secretRef:
4754
name: db-migrations-secret
4855
# The actual migrations command
49-
command: ["sh","-c", "cd shared; export PYTHONPATH=/app; pip install sqlalchemy-utils==0.36.6;python /app/testing_and_other/create_database.py;"]
56+
command: ["sh","-c", "cd shared; export PYTHONPATH=/app; pip install sqlalchemy-utils==0.36.6;python /app/play_and_scripts/scripts/create_database.py;"]

templates/walrus/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-walrus
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:
@@ -45,7 +47,12 @@ spec:
4547
do echo waiting for database; sleep 2; done;']
4648
{{ end }}
4749
containers:
50+
{{ if eq .Values.diffgramEdition "enterprise"}}
4851
- image: gcr.io/diffgram-enterprise/walrus:{{ .Values.diffgramVersion }}
52+
{{ end }}
53+
{{ if eq .Values.diffgramEdition "opencore"}}
54+
- image: gcr.io/diffgram-open-core/walrus:{{ .Values.diffgramVersion }}
55+
{{ end }}
4956
imagePullPolicy: Always
5057
name: diffgram-walrus
5158
ports:

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)