c12s-kubespray/roles/kubernetes-apps/registry/templates/registry-proxy-ds.yml.j2

37 lines
1.1 KiB
Text
Raw Permalink Normal View History

---
2018-02-09 07:47:57 +00:00
apiVersion: apps/v1
kind: DaemonSet
metadata:
2018-02-09 07:47:57 +00:00
name: registry-proxy
namespace: {{ registry_namespace }}
labels:
2018-02-09 07:47:57 +00:00
k8s-app: registry-proxy
version: v{{ registry_proxy_image_tag }}
spec:
2018-02-09 07:47:57 +00:00
selector:
matchLabels:
k8s-app: registry-proxy
version: v{{ registry_proxy_image_tag }}
template:
metadata:
labels:
2018-02-09 07:47:57 +00:00
k8s-app: registry-proxy
kubernetes.io/name: "registry-proxy"
version: v{{ registry_proxy_image_tag }}
spec:
priorityClassName: {% if registry_namespace == 'kube-system' %}system-node-critical{% else %}k8s-cluster-critical{% endif %}{{''}}
serviceAccountName: registry-proxy
containers:
2018-02-09 07:47:57 +00:00
- name: registry-proxy
image: {{ registry_proxy_image_repo }}:{{ registry_proxy_image_tag }}
2018-02-09 07:47:57 +00:00
imagePullPolicy: {{ k8s_image_pull_policy }}
env:
- name: REGISTRY_HOST
value: registry.{{ registry_namespace }}.svc.{{ dns_domain }}
- name: REGISTRY_PORT
value: "{{ registry_port }}"
ports:
- name: registry
containerPort: 80
hostPort: {{ registry_port }}