Debian Codegraph @

samples/guestbook/gcp/guestbook.yaml.in

raw
1 apiVersion: extensions/v1beta1
2 kind: Deployment
3 metadata:
4 name: guestbook
5 labels:
6 app: guestbook
7 spec:
8 replicas: 1
9 selector:
10 matchLabels:
11 app: guestbook
12 strategy:
13 type: RollingUpdate
14 rollingUpdate:
15 maxSurge: 1
16 maxUnavailable: 1
17 template:
18 metadata:
19 labels:
20 app: guestbook
21 spec:
22 volumes:
23 - name: google-cloud-key
24 secret:
25 secretName: guestbook-key
26 containers:
27 - name: guestbook
28 image: {{IMAGE}}
29 args:
30 - "-env=gcp"
31 - "-bucket={{bucket}}"
32 - "-db_host={{database_instance}}"
33 - "-cloud_sql_region={{database_region}}"
34 - "-runtime_config={{motd_var_config}}"
35 - "-motd_var={{motd_var_name}}"
36 imagePullPolicy: Always
37 ports:
38 - containerPort: 8080
39 protocol: TCP
40 volumeMounts:
41 - name: google-cloud-key
42 mountPath: /var/secrets/google
43 env:
44 - name: GOOGLE_APPLICATION_CREDENTIALS
45 value: /var/secrets/google/key.json
46 livenessProbe:
47 httpGet:
48 path: /healthz/liveness
49 port: 8080
50 readinessProbe:
51 httpGet:
52 path: /healthz/readiness
53 port: 8080
54 ---
55 apiVersion: v1
56 kind: Service
57 metadata:
58 name: guestbook
59 labels:
60 app: guestbook
61 spec:
62 type: LoadBalancer
63 selector:
64 app: guestbook
65 ports:
66 - port: 8080
67 protocol: TCP
68 targetPort: 8080