Skip to content

Commit ab5009e

Browse files
committed
fix: helm charts for better minikube support
1 parent 7b79c92 commit ab5009e

File tree

8 files changed

+66
-33
lines changed

8 files changed

+66
-33
lines changed

.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,11 @@ values_production*
88

99
values_staging.yaml
1010

11-
.vs
11+
.vs
12+
example.com\+5-key.pem
13+
14+
example.com\+5.pem
15+
16+
example.com\+6-key.pem
17+
18+
example.com\+6.pem

templates/default/secrets.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ type: Opaque
66
stringData:
77
STRIPE_API_KEY: {{ .Values.diffgramSecrets.STRIPE_API_KEY }}
88
DIFFGRAM_AWS_ACCESS_KEY_SECRET: {{ .Values.diffgramSecrets.DIFFGRAM_AWS_ACCESS_KEY_SECRET }}
9+
DIFFGRAM_AWS_ACCESS_KEY_ID: {{ .Values.diffgramSecrets.DIFFGRAM_AWS_ACCESS_KEY_ID }}
910
_ANALYTICS_WRITE_KEY: {{ .Values.diffgramSecrets._ANALYTICS_WRITE_KEY }}
1011
MAILGUN_KEY: {{ .Values.diffgramSecrets.MAILGUN_KEY }}
1112
HUB_SPOT_KEY: {{ .Values.diffgramSecrets.HUB_SPOT_KEY }}

templates/hooks/secrets_db_migrations.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ metadata:
1010
type: Opaque
1111
stringData:
1212
STRIPE_API_KEY: {{ .Values.diffgramSecrets.STRIPE_API_KEY }}
13+
DIFFGRAM_AWS_ACCESS_KEY_ID: {{ .Values.diffgramSecrets.DIFFGRAM_AWS_ACCESS_KEY_ID }}
1314
DIFFGRAM_AWS_ACCESS_KEY_SECRET: {{ .Values.diffgramSecrets.DIFFGRAM_AWS_ACCESS_KEY_SECRET }}
1415
_ANALYTICS_WRITE_KEY: {{ .Values.diffgramSecrets._ANALYTICS_WRITE_KEY }}
1516
MAILGUN_KEY: {{ .Values.diffgramSecrets.MAILGUN_KEY }}

templates/ingress.yaml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,37 @@ metadata:
66
annotations:
77
kubernetes.io/ingress.class: "nginx"
88
nginx.ingress.kubernetes.io/use-regex: "true"
9+
{{ if eq .Values.useTls false}}
910
nginx.ingress.kubernetes.io/enable-cors: "true"
11+
nginx.ingress.kubernetes.io/hsts: "false"
12+
hsts: "false"
13+
nginx.ingress.kubernetes.io/ssl-redirect: "false"
14+
nginx.ingress.kubernetes.io/configuration-snippet: |
15+
add_header Access-Control-Allow-Methods "POST, GET, PUT, PATCH, DELETE, OPTIONS";
16+
add_header Access-Control-Allow-Credentials true;
17+
add_header Access-Control-Allow-Headers *;
18+
add_header Access-Control-Expose-Headers "X-NewRelic-App-Data";
19+
proxy_pass_header directory_id;
20+
more_clear_headers 'Strict-Transport-Security';
21+
if ($scheme = https) {
22+
add_header Strict-Transport-Security "max-age=0;";
23+
}
24+
{{ end }}
25+
{{ if eq .Values.useTls true}}
26+
nginx.ingress.kubernetes.io/enable-cors: "true"
27+
nginx.ingress.kubernetes.io/configuration-snippet: |
28+
proxy_pass_header directory_id;
29+
{{ end }}
30+
1031
nginx.org/proxy-pass-headers: directory_id
1132
{{ if eq .Values.useTls true}}
1233
cert-manager.io/issuer: "letsencrypt-prod"
1334
{{ end }}
1435
watch-namespace: {{ .Release.Namespace }}
15-
# nginx.ingress.kubernetes.io/ssl-redirect: "false"
1636
# nginx.ingress.kubernetes.io/force-ssl-redirect: "false"
1737
# Limit uploads to 8TB
1838
nginx.ingress.kubernetes.io/proxy-body-size: 800000m
19-
nginx.ingress.kubernetes.io/configuration-snippet: |
20-
proxy_pass_header directory_id;
39+
2140
spec:
2241
{{ if eq .Values.useTls true}}
2342
tls:

templates/ingress_configmap.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
apiVersion: v1
22
kind: ConfigMap
33
data:
4+
{{ if eq .Values.useTls false}}
5+
hsts: "false"
6+
ssl-redirect: "false"
7+
{{ end }}
48
enable-underscores-in-headers: "true"
59
ignore-invalid-headers: "false"
610
use-gzip: "true" # ENABLE GZIP COMPRESSION
711
gzip-types: "*" # SPECIFY MIME TYPES TO COMPRESS ("*" FOR ALL)
812
metadata:
9-
name: nginx-configuration
13+
name: ingress-nginx-controller
1014
namespace: {{ .Release.Namespace }}

templates/postgres/deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ apiVersion: "apps/v1"
55
kind: "Deployment"
66
metadata:
77
name: "postgres"
8-
namespace: {{ .Release.Namespace }}"
8+
namespace: {{ .Release.Namespace }}
99
labels:
1010
app: "postgres"
1111
annotations:
@@ -44,7 +44,7 @@ spec:
4444
- name: postgres-storage
4545
persistentVolumeClaim:
4646
claimName: postgres-pv-claim
47-
{{ if eq .Values.nodeGroupLabel }}
47+
{{ if .Values.nodeGroupLabel }}
4848
nodeSelector:
4949
poolName: {{ .Values.nodeGroupLabel }}
5050
{{ end }}

templates/walrus/secrets.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ type: Opaque
66
stringData:
77
STRIPE_API_KEY: {{ .Values.diffgramSecrets.STRIPE_API_KEY }}
88
DIFFGRAM_AWS_ACCESS_KEY_SECRET: {{ .Values.diffgramSecrets.DIFFGRAM_AWS_ACCESS_KEY_SECRET }}
9+
DIFFGRAM_AWS_ACCESS_KEY_ID: {{ .Values.diffgramSecrets.DIFFGRAM_AWS_ACCESS_KEY_ID }}
910
_ANALYTICS_WRITE_KEY: {{ .Values.diffgramSecrets._ANALYTICS_WRITE_KEY }}
1011
MAILGUN_KEY: {{ .Values.diffgramSecrets.MAILGUN_KEY }}
1112
HUB_SPOT_KEY: {{ .Values.diffgramSecrets.HUB_SPOT_KEY }}

values.yaml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Declare variables to be passed into your templates.
44

55
# The Diffgram Version. Whenever a new update arrives, this will be changed.
6-
diffgramVersion: latest
6+
diffgramVersion: 0.13.3
77

88
# Either 'opencore' or 'enterprise'. Please note that selecting 'enterprise'
99
# requires that you also set imagePullCredentials.gcrCredentials.
@@ -15,9 +15,9 @@ diffgramEdition: opencore
1515
diffgramDomain: example.com
1616

1717
# Set this to true if you want to use cert manager for TLS certificates generation.
18-
useCertManager: false
18+
useCertManager: true
1919
# Use it to activate TLS on the nginx ingress
20-
useTls: false
20+
useTls: true
2121

2222
dbSettings:
2323
# Specify How the DB Service should be created
@@ -38,8 +38,8 @@ dbSettings:
3838
# All the Secrets Used in Diffgram.
3939
diffgramSecrets:
4040
STRIPE_API_KEY: none
41-
DIFFGRAM_AWS_ACCESS_KEY_ID: none
42-
DIFFGRAM_AWS_ACCESS_KEY_SECRET: none
41+
DIFFGRAM_AWS_ACCESS_KEY_ID: write_your_aws_access_key
42+
DIFFGRAM_AWS_ACCESS_KEY_SECRET: write_your_aws_access_key_secret
4343
_ANALYTICS_WRITE_KEY: provided_by_diffgram_team
4444
MAILGUN_KEY: provided_by_diffgram_team
4545
HUB_SPOT_KEY: provided_by_diffgram_team
@@ -58,17 +58,17 @@ diffgramSettings:
5858
USERDOMAIN: kubernetes
5959
WALRUS_SERVICE_URL_BASE: example.com
6060
DIFFGRAM_SYSTEM_MODE: production
61-
DIFFGRAM_STATIC_STORAGE_PROVIDER: gcp
61+
DIFFGRAM_STATIC_STORAGE_PROVIDER: aws
6262
DIFFGRAM_S3_BUCKET_NAME: none
6363
DIFFGRAM_AZURE_CONTAINER_NAME: none
6464
ML__DIFFGRAM_AZURE_CONTAINER_NAME: none
6565
ML__DIFFGRAM_S3_BUCKET_NAME: diffgram-testing
6666
CLOUD_STORAGE_BUCKET: diffgram-testing
6767
ML__CLOUD_STORAGE_BUCKET: diffgram-testing
6868
SERVICE_ACCOUNT_FULL_PATH: /etc/gcp/sa_credentials.json
69-
PROCESS_MEDIA_NUM_VIDEO_THREADS: "1"
70-
PROCESS_MEDIA_NUM_FRAME_THREADS: "4"
71-
DATABASE_CONNECTION_POOL_SIZE: "10"
69+
PROCESS_MEDIA_NUM_VIDEO_THREADS: '"1"'
70+
PROCESS_MEDIA_NUM_FRAME_THREADS: '"4"'
71+
DATABASE_CONNECTION_POOL_SIZE: '"10"'
7272
GOOGLE_APPLICATION_CREDENTIALS: /etc/gcp/sa_credentials.json # Check the volume in deployment.yaml and service_account_secret.yaml
7373
EMAIL_DOMAIN_NAME: example.com
7474

@@ -81,10 +81,10 @@ diffgramSettings:
8181
# If you know the OS diffgram is running ON put it here, otherwise leave default
8282
DIFFGRAM_HOST_OS: helm_os_default
8383
NEW_RELIC_LICENSE_KEY: none
84-
ALLOW_EVENTHUB: False
85-
EMAIL_VALIDATION: False
86-
ALLOW_STRIPE_BILLING: False
87-
IS_OPEN_SOURCE: True
84+
ALLOW_EVENTHUB: '"False"'
85+
EMAIL_VALIDATION: '"False"'
86+
ALLOW_STRIPE_BILLING: '"False"'
87+
IS_OPEN_SOURCE: '"True"'
8888

8989
imagePullCredentials:
9090
# The service account with permissions to pull from the GCR Repository. [Should be Provided by Diffgram Team.]
@@ -95,30 +95,30 @@ nodeGroupLabel: null
9595
# The service for API calls.
9696
# This are minimal defaults. Please feel free to change them as you start having more usage
9797
defaultService:
98-
numReplicas: 2
98+
numReplicas: 1
9999
requests:
100-
cpu: "2.0"
101-
memory: "4G"
100+
cpu: "1.0"
101+
memory: "1G"
102102
limits:
103103
cpu: "2.0"
104-
memory: "4G"
104+
memory: "2G"
105105
# The service for the UI frontend.
106106
# This are minimal defaults. Please feel free to change them as you start having more usage
107107
frontendService:
108108
numReplicas: 1
109109
requests:
110-
cpu: "2.0"
111-
memory: "2G"
110+
cpu: "1.0"
111+
memory: "1G"
112112
limits:
113-
cpu: "2.0"
114-
memory: "2G"
113+
cpu: "1.0"
114+
memory: "1G"
115115
# The service for video processing. This is where the heavy processing takes place.
116116
# This are minimal defaults. Please feel free to change them as you start having more usage
117117
walrusService:
118-
numReplicas: 2
118+
numReplicas: 1
119119
requests:
120-
cpu: "4.0"
121-
memory: "14G"
120+
cpu: "1.0"
121+
memory: "1G"
122122
limits:
123-
cpu: "8.0"
124-
memory: "32G"
123+
cpu: "2.0"
124+
memory: "2G"

0 commit comments

Comments
 (0)