1+ apiVersion : apps/v1 
2+ kind : Deployment 
3+ metadata :
4+   name : cache-server 
5+   labels :
6+     app : cache-server 
7+ spec :
8+   replicas : 1 
9+   selector :
10+     matchLabels :
11+       app : cache-server 
12+   template :
13+     metadata :
14+       labels :
15+         app : cache-server 
16+     spec :
17+       securityContext :
18+         seccompProfile :
19+           type : RuntimeDefault 
20+       containers :
21+         - name : server 
22+           securityContext :
23+             allowPrivilegeEscalation : false 
24+             runAsNonRoot : true 
25+             runAsUser : 1000 
26+             runAsGroup : 0 
27+             capabilities :
28+               drop :
29+                 - ALL 
30+           image : ghcr.io/kubeflow/kfp-cache-server:dummy 
31+           env :
32+             - name : DEFAULT_CACHE_STALENESS 
33+               valueFrom :
34+                 configMapKeyRef :
35+                   name : pipeline-install-config 
36+                   key : DEFAULT_CACHE_STALENESS 
37+             - name : MAXIMUM_CACHE_STALENESS 
38+               valueFrom :
39+                 configMapKeyRef :
40+                   name : pipeline-install-config 
41+                   key :  MAXIMUM_CACHE_STALENESS 
42+             - name : CACHE_IMAGE 
43+               valueFrom :
44+                 configMapKeyRef :
45+                   name : pipeline-install-config 
46+                   key : cacheImage 
47+             - name : CACHE_NODE_RESTRICTIONS 
48+               valueFrom :
49+                 configMapKeyRef :
50+                   name : pipeline-install-config 
51+                   key : cacheNodeRestrictions 
52+             - name : DBCONFIG_DRIVER 
53+               value : mysql 
54+             - name : DBCONFIG_DB_NAME 
55+               valueFrom :
56+                 configMapKeyRef :
57+                   name : pipeline-install-config 
58+                   key : cacheDb 
59+             - name : DBCONFIG_HOST_NAME 
60+               valueFrom :
61+                 configMapKeyRef :
62+                   name : n 
63+                   key : dbHost 
64+             - name : DBCONFIG_PORT 
65+               valueFrom :
66+                 configMapKeyRef :
67+                   name : pipeline-install-config 
68+                   key : dbPort 
69+             - name : DBCONFIG_USER 
70+               valueFrom :
71+                 secretKeyRef :
72+                   name : mysql-secret 
73+                   key : username 
74+             - name : DBCONFIG_PASSWORD 
75+               valueFrom :
76+                 secretKeyRef :
77+                   name : mysql-secret 
78+                   key : password 
79+             - name : NAMESPACE_TO_WATCH 
80+               valueFrom :
81+                 fieldRef :
82+                   fieldPath : metadata.namespace 
83+             #  If you update WEBHOOK_PORT, also change the value of the
84+             #  containerPort "webhook-api" to match.
85+             - name : WEBHOOK_PORT 
86+               value : " 8443" 
87+           args : ["--db_driver=$(DBCONFIG_DRIVER)", 
88+                  " --db_host=$(DBCONFIG_HOST_NAME)" , 
89+                  " --db_port=$(DBCONFIG_PORT)" , 
90+                  " --db_name=$(DBCONFIG_DB_NAME)" , 
91+                  " --db_user=$(DBCONFIG_USER)" , 
92+                  " --db_password=$(DBCONFIG_PASSWORD)" , 
93+                  " --namespace_to_watch=$(NAMESPACE_TO_WATCH)" , 
94+                  " --listen_port=$(WEBHOOK_PORT)" , 
95+           ] 
96+           imagePullPolicy : Always 
97+           ports :
98+             - containerPort : 8443 
99+               name : webhook-api 
100+           volumeMounts :
101+             - name : webhook-tls-certs 
102+               mountPath : /etc/webhook/certs 
103+               readOnly : true 
104+       volumes :
105+         - name : webhook-tls-certs 
106+           secret :
107+             secretName : webhook-server-tls 
108+       serviceAccountName : kubeflow-pipelines-cache 
0 commit comments