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.

48 lines
1.3 KiB

  1. ---
  2. apiVersion: apps/v1
  3. kind: ReplicaSet
  4. metadata:
  5. name: registry-v{{ registry_image_tag }}
  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. containers:
  26. - name: registry
  27. image: {{ registry_image_repo }}:{{ registry_image_tag }}
  28. imagePullPolicy: {{ k8s_image_pull_policy }}
  29. env:
  30. - name: REGISTRY_HTTP_ADDR
  31. value: :5000
  32. - name: REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY
  33. value: /var/lib/registry
  34. volumeMounts:
  35. - name: registry-pvc
  36. mountPath: /var/lib/registry
  37. ports:
  38. - containerPort: 5000
  39. name: registry
  40. protocol: TCP
  41. volumes:
  42. - name: registry-pvc
  43. {% if registry_storage_class != none %}
  44. persistentVolumeClaim:
  45. claimName: registry-pvc
  46. {% else %}
  47. emptyDir: {}
  48. {% endif %}