c12s-kubespray/roles/kubernetes-apps/registry/templates/registry-proxy-ds.yml.j2
Bjoern Teipel 820d8e6ce6
Adding new registry_port option (#5779)
New override are added to allow installation of the registry
on different ports than ``5000``. The default port is unchanged
from previous versions
2020-03-17 05:52:22 -07:00

38 lines
1.2 KiB
Django/Jinja

---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: registry-proxy
namespace: {{ registry_namespace }}
labels:
k8s-app: registry-proxy
kubernetes.io/cluster-service: "true"
version: v{{ registry_proxy_image_tag }}
spec:
selector:
matchLabels:
k8s-app: registry-proxy
version: v{{ registry_proxy_image_tag }}
template:
metadata:
labels:
k8s-app: registry-proxy
kubernetes.io/name: "registry-proxy"
kubernetes.io/cluster-service: "true"
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:
- name: registry-proxy
image: {{ registry_proxy_image_repo }}:{{ registry_proxy_image_tag }}
imagePullPolicy: {{ k8s_image_pull_policy }}
env:
- name: REGISTRY_HOST
value: registry.{{ registry_namespace }}.svc.{{ cluster_name }}
- name: REGISTRY_PORT
value: "{{ registry_port }}"
ports:
- name: registry
containerPort: 80
hostPort: {{ registry_port }}