Skip to content

Commit 70864c2

Browse files
committed
Deployment works on SSL, must fix many more details
1 parent 95ca66b commit 70864c2

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

deploy/templates/deployment.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ spec:
5151
secretKeyRef:
5252
name: "{{ .Release.Name }}-{{ .Values.useEnvironment }}"
5353
key: dbPassword
54+
- name: POD_IP
55+
valueFrom:
56+
fieldRef:
57+
fieldPath: status.podIP
58+
- name: ALLOWED_HOSTS
59+
value: "{{ .Release.Name }}-{{ .Values.useEnvironment }}.{{ .Values.useDomain }},$(POD_IP)"
5460
livenessProbe:
5561
httpGet:
5662
path: /healthy/

deploy/templates/service.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,15 @@ metadata:
77

88
spec:
99
type: {{ .Values.service.type }}
10+
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }}
1011
ports:
1112
- name: http
1213
protocol: TCP
1314
port: 80
1415
targetPort: 8000
16+
- name: https
17+
protocol: TCP
18+
port: 443
19+
targetPort: 8000
1520
selector:
1621
app: "{{ .Release.Name }}-{{ .Values.useEnvironment }}"

deploy/values.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ replicaCount: 1
66

77
secrets:
88
dbUser: "django"
9-
dbHost: "store-postgres"
9+
dbHost: "store-postgresql"
1010
dbPort: "5432"
1111

1212
service:
1313
type: LoadBalancer
14+
externalTrafficPolicy: Cluster
1415
annotations:
1516
service.beta.kubernetes.io/do-loadbalancer-protocol: "http"
1617
service.beta.kubernetes.io/do-loadbalancer-tls-ports: "443"
1718
service.beta.kubernetes.io/do-loadbalancer-redirect-http-to-https: "true"
18-
service.beta.kubernetes.io/do-loadbalancer-enable-proxy-protocol: "true"
19+
# service.beta.kubernetes.io/do-loadbalancer-enable-proxy-protocol: "true"
1920
service.beta.kubernetes.io/do-loadbalancer-disable-lets-encrypt-dns-records: "false"
20-

0 commit comments

Comments
 (0)