Commit 803148b9 authored by Geoff Simmons's avatar Geoff Simmons

Fix various examples for kubectl-type deployments (non-helm).

We must now pass in the Pod namespace and name via the downward API,
because the varnishd start script requires it.
parent 06b3fabb
...@@ -33,6 +33,15 @@ spec: ...@@ -33,6 +33,15 @@ spec:
mountPath: "/var/run/varnish-home" mountPath: "/var/run/varnish-home"
- name: offload - name: offload
mountPath: "/var/run/offload" mountPath: "/var/run/offload"
env:
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
livenessProbe: livenessProbe:
exec: exec:
command: command:
......
...@@ -33,6 +33,15 @@ spec: ...@@ -33,6 +33,15 @@ spec:
mountPath: "/var/run/varnish-home" mountPath: "/var/run/varnish-home"
- name: offload - name: offload
mountPath: "/var/run/offload" mountPath: "/var/run/offload"
env:
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
livenessProbe: livenessProbe:
exec: exec:
command: command:
......
...@@ -33,6 +33,15 @@ spec: ...@@ -33,6 +33,15 @@ spec:
mountPath: "/var/run/varnish-home" mountPath: "/var/run/varnish-home"
- name: offload - name: offload
mountPath: "/var/run/offload" mountPath: "/var/run/offload"
env:
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
livenessProbe: livenessProbe:
exec: exec:
command: command:
......
...@@ -35,6 +35,15 @@ spec: ...@@ -35,6 +35,15 @@ spec:
mountPath: "/var/run/varnish-home" mountPath: "/var/run/varnish-home"
- name: offload - name: offload
mountPath: "/var/run/offload" mountPath: "/var/run/offload"
env:
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
livenessProbe: livenessProbe:
exec: exec:
command: command:
......
...@@ -35,6 +35,15 @@ spec: ...@@ -35,6 +35,15 @@ spec:
mountPath: "/var/run/varnish-home" mountPath: "/var/run/varnish-home"
- name: offload - name: offload
mountPath: "/var/run/offload" mountPath: "/var/run/offload"
env:
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
livenessProbe: livenessProbe:
exec: exec:
command: command:
......
...@@ -35,6 +35,15 @@ spec: ...@@ -35,6 +35,15 @@ spec:
mountPath: "/var/run/varnish-home" mountPath: "/var/run/varnish-home"
- name: offload - name: offload
mountPath: "/var/run/offload" mountPath: "/var/run/offload"
env:
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
livenessProbe: livenessProbe:
exec: exec:
command: command:
......
...@@ -35,6 +35,15 @@ spec: ...@@ -35,6 +35,15 @@ spec:
mountPath: "/var/run/varnish-home" mountPath: "/var/run/varnish-home"
- name: offload - name: offload
mountPath: "/var/run/offload" mountPath: "/var/run/offload"
env:
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
livenessProbe: livenessProbe:
exec: exec:
command: command:
......
...@@ -102,6 +102,15 @@ spec: ...@@ -102,6 +102,15 @@ spec:
mountPath: "/var/run/offload" mountPath: "/var/run/offload"
- name: persistent-storage - name: persistent-storage
mountPath: "/run/varnish-home/persistent-storage" mountPath: "/run/varnish-home/persistent-storage"
env:
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
livenessProbe: livenessProbe:
exec: exec:
command: command:
......
...@@ -33,6 +33,15 @@ spec: ...@@ -33,6 +33,15 @@ spec:
mountPath: "/var/run/varnish-home" mountPath: "/var/run/varnish-home"
- name: offload - name: offload
mountPath: "/var/run/offload" mountPath: "/var/run/offload"
env:
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
livenessProbe: livenessProbe:
exec: exec:
command: command:
......
...@@ -89,6 +89,15 @@ spec: ...@@ -89,6 +89,15 @@ spec:
mountPath: "/var/run/varnish-home" mountPath: "/var/run/varnish-home"
- name: offload - name: offload
mountPath: "/var/run/offload" mountPath: "/var/run/offload"
env:
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
livenessProbe: livenessProbe:
exec: exec:
command: command:
......
...@@ -104,6 +104,15 @@ spec: ...@@ -104,6 +104,15 @@ spec:
- -n - -n
- /var/run/varnish-home - /var/run/varnish-home
env: env:
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
# Use the PROXY protocol (cf. proxy.yaml). # Use the PROXY protocol (cf. proxy.yaml).
- name: PROTO - name: PROTO
value: PROXY value: PROXY
......
...@@ -110,6 +110,15 @@ spec: ...@@ -110,6 +110,15 @@ spec:
# the http targetPort in the Service. # the http targetPort in the Service.
- name: HTTP_PORT - name: HTTP_PORT
value: "8888" value: "8888"
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- image: varnish-ingress/haproxy - image: varnish-ingress/haproxy
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
name: varnish-ingress-offloader name: varnish-ingress-offloader
......
...@@ -89,6 +89,7 @@ spec: ...@@ -89,6 +89,7 @@ spec:
mountPath: "/var/run/varnish-home" mountPath: "/var/run/varnish-home"
- name: offload - name: offload
mountPath: "/var/run/offload" mountPath: "/var/run/offload"
env:
livenessProbe: livenessProbe:
exec: exec:
command: command:
...@@ -109,6 +110,15 @@ spec: ...@@ -109,6 +110,15 @@ spec:
# see: https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt # see: https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt
- name: PROTO - name: PROTO
value: PROXY value: PROXY
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- image: varnish-ingress/haproxy - image: varnish-ingress/haproxy
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
name: varnish-ingress-offloader name: varnish-ingress-offloader
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment