Skip to content
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
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@
Helm Chart for DIffgram

# Pre-requisites
### Setting Up the Docker Registry Key:
### Opencore or Enterprise

To install the helm chart you will need to receive a GCR key with the permissions from
Make sure you set the value of `diffgramEdition` in the `values.yaml` to either `opencore`
or `enterprise`.

If you set the `diffgramEdition` to `enterprise` you will have to provide the GCR credentials
Key (Provided by the Diffgram Team). And set the value on `imagePullCredentials.gcrCredentials` value inside the `values.yaml` file.
### Setting Up the Docker Registry Key (Enterprise Only):

To install the helm chart with the Enterprise Edition of Diffgram you will need to receive a GCR key with the permissions from
the Diffgram team to fetch our images.

Please Contact us if you want to get one here: https://diffgram.com/contact
Expand Down
7 changes: 7 additions & 0 deletions templates/default/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ spec:
labels:
app: diffgram-default
spec:
{{ if eq .Values.diffgramEdition "enterprise"}}
imagePullSecrets:
- name: diffgramsecret
{{ end }}
volumes:
- name: service-account-credentials-volume
secret:
Expand All @@ -39,7 +41,12 @@ spec:
command: ['sh', '-c', 'until pg_isready -h postgres-azure-service -p 5432; do echo waiting for database; sleep 2; done;']
{{ end }}
containers:
{{ if eq .Values.diffgramEdition "enterprise"}}
- image: gcr.io/diffgram-enterprise/default:{{ .Values.diffgramVersion }}
{{ end }}
{{ if eq .Values.diffgramEdition "opencore"}}
- image: gcr.io/diffgram-open-core/default:{{ .Values.diffgramVersion }}
{{ end }}
imagePullPolicy: Always
name: diffgram-default
ports:
Expand Down
7 changes: 7 additions & 0 deletions templates/frontend/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,17 @@ spec:
labels:
app: frontend
spec:
{{ if eq .Values.diffgramEdition "enterprise"}}
imagePullSecrets:
- name: diffgramsecret
{{ end }}
containers:
{{ if eq .Values.diffgramEdition "enterprise"}}
- image: gcr.io/diffgram-enterprise/frontend:{{ .Values.diffgramVersion }}
{{ end }}
{{ if eq .Values.diffgramEdition "opencore"}}
- image: gcr.io/diffgram-open-core/frontend:{{ .Values.diffgramVersion }}
{{ end }}
imagePullPolicy: Always
name: frontend
resources:
Expand Down
9 changes: 8 additions & 1 deletion templates/hooks/database_pre_install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ spec:
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
spec:
restartPolicy: Never
{{ if eq .Values.diffgramEdition "enterprise"}}
imagePullSecrets:
- name: db-migrations-pull-secret
{{ end }}
volumes:
- name: service-account-credentials-volume-hook
secret:
Expand All @@ -33,7 +35,12 @@ spec:
- key: sa_json
path: sa_credentials.json
containers:
{{ if eq .Values.diffgramEdition "enterprise"}}
- image: gcr.io/diffgram-enterprise/default:{{ .Values.diffgramVersion }}
{{ end }}
{{ if eq .Values.diffgramEdition "opencore"}}
- image: gcr.io/diffgram-open-core/default:{{ .Values.diffgramVersion }}
{{ end }}
imagePullPolicy: Always
name: pre-upgrade-alembic-hook
volumeMounts:
Expand All @@ -46,4 +53,4 @@ spec:
- secretRef:
name: db-migrations-secret
# The actual migrations command
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"]
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"]
9 changes: 8 additions & 1 deletion templates/hooks/database_pre_upgrade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ spec:
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
spec:
restartPolicy: Never
{{ if eq .Values.diffgramEdition "enterprise"}}
imagePullSecrets:
- name: diffgramsecret
{{ end }}
volumes:
- name: service-account-credentials-volume-hook
secret:
Expand All @@ -33,7 +35,12 @@ spec:
- key: sa_json
path: sa_credentials.json
containers:
{{ if eq .Values.diffgramEdition "enterprise"}}
- image: gcr.io/diffgram-enterprise/default:{{ .Values.diffgramVersion }}
{{ end }}
{{ if eq .Values.diffgramEdition "opencore"}}
- image: gcr.io/diffgram-open-core/default:{{ .Values.diffgramVersion }}
{{ end }}
imagePullPolicy: Always
name: pre-upgrade-alembic-hook
volumeMounts:
Expand All @@ -46,4 +53,4 @@ spec:
- secretRef:
name: db-migrations-secret
# The actual migrations command
command: ["sh","-c", "cd shared; export PYTHONPATH=/app; pip install sqlalchemy-utils==0.36.6;python /app/testing_and_other/create_database.py;"]
command: ["sh","-c", "cd shared; export PYTHONPATH=/app; pip install sqlalchemy-utils==0.36.6;python /app/play_and_scripts/scripts/create_database.py;"]
7 changes: 7 additions & 0 deletions templates/walrus/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ spec:
labels:
app: diffgram-walrus
spec:
{{ if eq .Values.diffgramEdition "enterprise"}}
imagePullSecrets:
- name: diffgramsecret
{{ end }}
volumes:
- name: service-account-credentials-volume
secret:
Expand Down Expand Up @@ -45,7 +47,12 @@ spec:
do echo waiting for database; sleep 2; done;']
{{ end }}
containers:
{{ if eq .Values.diffgramEdition "enterprise"}}
- image: gcr.io/diffgram-enterprise/walrus:{{ .Values.diffgramVersion }}
{{ end }}
{{ if eq .Values.diffgramEdition "opencore"}}
- image: gcr.io/diffgram-open-core/walrus:{{ .Values.diffgramVersion }}
{{ end }}
imagePullPolicy: Always
name: diffgram-walrus
ports:
Expand Down
4 changes: 4 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
# The Diffgram Version. Whenever a new update arrives, this will be changed.
diffgramVersion: latest

# Either 'opencore' or 'enterprise'. Please note that selecting 'enterprise'
# requires that you also set imagePullCredentials.gcrCredentials.
diffgramEdition: opencore

# Set this to your public domain where you want diffgram to be.
diffgramDomain: example.com

Expand Down