2018-02-04 12:32:33 +08:00
|
|
|
---
|
2018-02-09 15:47:57 +08:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: ReplicaSet
|
2018-02-04 12:32:33 +08:00
|
|
|
metadata:
|
2018-08-22 11:02:56 +08:00
|
|
|
name: registry
|
2018-02-09 15:47:57 +08:00
|
|
|
namespace: {{ registry_namespace }}
|
2018-02-04 12:32:33 +08:00
|
|
|
labels:
|
2018-02-09 15:47:57 +08:00
|
|
|
k8s-app: registry
|
2018-02-04 12:32:33 +08:00
|
|
|
version: v{{ registry_image_tag }}
|
|
|
|
kubernetes.io/cluster-service: "true"
|
|
|
|
addonmanager.kubernetes.io/mode: Reconcile
|
|
|
|
spec:
|
|
|
|
replicas: 1
|
|
|
|
selector:
|
2018-02-09 15:47:57 +08:00
|
|
|
matchLabels:
|
|
|
|
k8s-app: registry
|
|
|
|
version: v{{ registry_image_tag }}
|
2018-02-04 12:32:33 +08:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
2018-02-09 15:47:57 +08:00
|
|
|
k8s-app: registry
|
2018-02-04 12:32:33 +08:00
|
|
|
version: v{{ registry_image_tag }}
|
|
|
|
kubernetes.io/cluster-service: "true"
|
|
|
|
spec:
|
2018-09-25 22:50:22 +08:00
|
|
|
priorityClassName: {% if registry_namespace == 'kube-system' %}system-cluster-critical{% else %}k8s-cluster-critical{% endif %}{{''}}
|
2018-08-23 00:16:13 +08:00
|
|
|
serviceAccountName: registry
|
2018-02-04 12:32:33 +08:00
|
|
|
containers:
|
|
|
|
- name: registry
|
|
|
|
image: {{ registry_image_repo }}:{{ registry_image_tag }}
|
2018-02-09 15:47:57 +08:00
|
|
|
imagePullPolicy: {{ k8s_image_pull_policy }}
|
2018-02-04 12:32:33 +08:00
|
|
|
env:
|
|
|
|
- name: REGISTRY_HTTP_ADDR
|
2020-03-17 20:52:22 +08:00
|
|
|
value: :{{ registry_port }}
|
2018-02-04 12:32:33 +08:00
|
|
|
- name: REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY
|
|
|
|
value: /var/lib/registry
|
|
|
|
volumeMounts:
|
2018-02-09 15:47:57 +08:00
|
|
|
- name: registry-pvc
|
2018-02-04 12:32:33 +08:00
|
|
|
mountPath: /var/lib/registry
|
|
|
|
ports:
|
2020-03-17 20:52:22 +08:00
|
|
|
- containerPort: {{ registry_port }}
|
2018-02-04 12:32:33 +08:00
|
|
|
name: registry
|
|
|
|
protocol: TCP
|
|
|
|
volumes:
|
2018-02-09 15:47:57 +08:00
|
|
|
- name: registry-pvc
|
2018-12-28 14:23:19 +08:00
|
|
|
{% if registry_storage_class != "" %}
|
2018-02-09 15:47:57 +08:00
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: registry-pvc
|
|
|
|
{% else %}
|
2018-02-04 12:32:33 +08:00
|
|
|
emptyDir: {}
|
2018-02-09 15:47:57 +08:00
|
|
|
{% endif %}
|