-
Notifications
You must be signed in to change notification settings - Fork 52
/
tls-app.yaml
62 lines (62 loc) · 1.61 KB
/
tls-app.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
apiVersion: apps/v1
kind: Deployment
metadata:
name: tls-app
labels:
app: tls-app
spec:
selector:
matchLabels:
app: tls-app
replicas: 1
template:
metadata:
labels:
app: tls-app
spec:
initContainers:
- name: certificate-init-container
image: gcr.io/hightowerlabs/certificate-init-container:0.0.2
imagePullPolicy: Always
env:
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
args:
- "-additional-dnsnames=example.com"
- "-cert-dir=/etc/tls"
- "-namespace=$(NAMESPACE)"
- "-pod-ip=$(POD_IP)"
- "-pod-name=$(POD_NAME)"
- "-service-names=tls-app"
volumeMounts:
- name: tls
mountPath: /etc/tls
containers:
- name: tls-app
image: gcr.io/hightowerlabs/tls-app:1.0.0
imagePullPolicy: Always
args:
- "-tls-cert=/etc/tls/tls.crt"
- "-tls-key=/etc/tls/tls.key"
ports:
- containerPort: 443
resources:
limits:
memory: "50Mi"
cpu: "100m"
volumeMounts:
- name: tls
mountPath: /etc/tls
volumes:
- name: tls
emptyDir: {}