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.

49 lines
1.3 KiB

  1. ---
  2. apiVersion: apps/v1
  3. kind: ReplicaSet
  4. metadata:
  5. name: registry
  6. namespace: {{ registry_namespace }}
  7. labels:
  8. k8s-app: registry
  9. version: v{{ registry_image_tag }}
  10. kubernetes.io/cluster-service: "true"
  11. addonmanager.kubernetes.io/mode: Reconcile
  12. spec:
  13. replicas: 1
  14. selector:
  15. matchLabels:
  16. k8s-app: registry
  17. version: v{{ registry_image_tag }}
  18. template:
  19. metadata:
  20. labels:
  21. k8s-app: registry
  22. version: v{{ registry_image_tag }}
  23. kubernetes.io/cluster-service: "true"
  24. spec:
  25. serviceAccountName: registry
  26. containers:
  27. - name: registry
  28. image: {{ registry_image_repo }}:{{ registry_image_tag }}
  29. imagePullPolicy: {{ k8s_image_pull_policy }}
  30. env:
  31. - name: REGISTRY_HTTP_ADDR
  32. value: :5000
  33. - name: REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY
  34. value: /var/lib/registry
  35. volumeMounts:
  36. - name: registry-pvc
  37. mountPath: /var/lib/registry
  38. ports:
  39. - containerPort: 5000
  40. name: registry
  41. protocol: TCP
  42. volumes:
  43. - name: registry-pvc
  44. {% if registry_storage_class != none %}
  45. persistentVolumeClaim:
  46. claimName: registry-pvc
  47. {% else %}
  48. emptyDir: {}
  49. {% endif %}