You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.1 KiB

  1. ---
  2. apiVersion: apps/v1
  3. kind: DaemonSet
  4. metadata:
  5. name: registry-proxy
  6. namespace: {{ registry_namespace }}
  7. labels:
  8. k8s-app: registry-proxy
  9. version: v{{ registry_proxy_image_tag }}
  10. spec:
  11. selector:
  12. matchLabels:
  13. k8s-app: registry-proxy
  14. version: v{{ registry_proxy_image_tag }}
  15. template:
  16. metadata:
  17. labels:
  18. k8s-app: registry-proxy
  19. kubernetes.io/name: "registry-proxy"
  20. version: v{{ registry_proxy_image_tag }}
  21. spec:
  22. priorityClassName: {% if registry_namespace == 'kube-system' %}system-node-critical{% else %}k8s-cluster-critical{% endif %}{{''}}
  23. serviceAccountName: registry-proxy
  24. containers:
  25. - name: registry-proxy
  26. image: {{ registry_proxy_image_repo }}:{{ registry_proxy_image_tag }}
  27. imagePullPolicy: {{ k8s_image_pull_policy }}
  28. env:
  29. - name: REGISTRY_HOST
  30. value: registry.{{ registry_namespace }}.svc.{{ cluster_name }}
  31. - name: REGISTRY_PORT
  32. value: "{{ registry_port }}"
  33. ports:
  34. - name: registry
  35. containerPort: 80
  36. hostPort: {{ registry_port }}