-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path01_deployment.yaml
70 lines (68 loc) · 1.55 KB
/
01_deployment.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
63
64
65
66
67
68
69
apiVersion: apps/v1
kind: Deployment
metadata:
name: path-change
namespace: tekton
labels:
app: path-change
spec:
selector:
matchLabels:
app: path-change
replicas: 1
template:
metadata:
name: path-change
labels:
app: path-change
spec:
containers:
- name: path-change
image: ghcr.io/wlun001/path-change
imagePullPolicy: IfNotPresent
resources:
requests:
cpu: 50m
memory: 150Mi
env:
- name: APP_ENV
value: prod
- name: CONFIG_FILE
value: /etc/fc/config.yaml
- name: SECRET_TOKEN
valueFrom:
secretKeyRef:
name: webhook-secret
key: token
ports:
- containerPort: 8080
volumeMounts:
- mountPath: /etc/fc
name: config-volume
- mountPath: /home/pathchange/.ssh
name: ssh-volume
securityContext:
runAsUser: 1001 # pathchange user
securityContext:
fsGroup: 1000 # to make SSH key readable
volumes:
- name: config-volume
configMap:
name: path-change-conf
- name: ssh-volume
secret:
secretName: ssh-credentials
defaultMode: 0400
---
apiVersion: v1
kind: Service
metadata:
name: path-change
namespace: tekton
spec:
selector:
app: path-change
ports:
- port: 80
targetPort: 8080
type: ClusterIP