820d8e6ce6
New override are added to allow installation of the registry on different ports than ``5000``. The default port is unchanged from previous versions
50 lines
1.5 KiB
Django/Jinja
50 lines
1.5 KiB
Django/Jinja
---
|
|
apiVersion: apps/v1
|
|
kind: ReplicaSet
|
|
metadata:
|
|
name: registry
|
|
namespace: {{ registry_namespace }}
|
|
labels:
|
|
k8s-app: registry
|
|
version: v{{ registry_image_tag }}
|
|
kubernetes.io/cluster-service: "true"
|
|
addonmanager.kubernetes.io/mode: Reconcile
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
k8s-app: registry
|
|
version: v{{ registry_image_tag }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
k8s-app: registry
|
|
version: v{{ registry_image_tag }}
|
|
kubernetes.io/cluster-service: "true"
|
|
spec:
|
|
priorityClassName: {% if registry_namespace == 'kube-system' %}system-cluster-critical{% else %}k8s-cluster-critical{% endif %}{{''}}
|
|
serviceAccountName: registry
|
|
containers:
|
|
- name: registry
|
|
image: {{ registry_image_repo }}:{{ registry_image_tag }}
|
|
imagePullPolicy: {{ k8s_image_pull_policy }}
|
|
env:
|
|
- name: REGISTRY_HTTP_ADDR
|
|
value: :{{ registry_port }}
|
|
- name: REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY
|
|
value: /var/lib/registry
|
|
volumeMounts:
|
|
- name: registry-pvc
|
|
mountPath: /var/lib/registry
|
|
ports:
|
|
- containerPort: {{ registry_port }}
|
|
name: registry
|
|
protocol: TCP
|
|
volumes:
|
|
- name: registry-pvc
|
|
{% if registry_storage_class != "" %}
|
|
persistentVolumeClaim:
|
|
claimName: registry-pvc
|
|
{% else %}
|
|
emptyDir: {}
|
|
{% endif %}
|