Skip to content

Instantly share code, notes, and snippets.

@christopherhein
Created January 7, 2016 18:55
Show Gist options
  • Select an option

  • Save christopherhein/a28634b45dc87cf48dbd to your computer and use it in GitHub Desktop.

Select an option

Save christopherhein/a28634b45dc87cf48dbd to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: ReplicationController
metadata:
name: kube-registry-v0
namespace: kube-system
labels:
k8s-app: kube-registry
version: v0
kubernetes.io/cluster-service: "true"
spec:
replicas: 1
selector:
k8s-app: kube-registry
version: v0
template:
metadata:
labels:
k8s-app: kube-registry
version: v0
kubernetes.io/cluster-service: "true"
spec:
containers:
- name: registry
image: registry:2
resources:
# keep request = limit to keep this container in guaranteed class
limits:
cpu: 100m
memory: 100Mi
requests:
cpu: 100m
memory: 100Mi
env:
- name: REGISTRY_HTTP_ADDR
value: :5000
{% if pillar.get('cluster_registry_disk_type', '') == 'gce' %}
- name: REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY
value: /var/lib/registry
{% elif pillar.get('registry_storage', '') == 's3' %}
- name: "REGISTRY_STORAGE"
value: {{ pillar.get('registry_storage') }}
- name: "REGISTRY_STORAGE_S3_ACCESSKEY"
value: {{ pillar.get('registry_storage_s3_accesskey') }}
- name: "REGISTRY_STORAGE_S3_SECRETKEY"
value: {{ pillar.get('registry_storage_s3_secretkey') }}
- name: "REGISTRY_STORAGE_S3_REGION"
value: {{ pillar.get('registry_storage_s3_region') }}
- name: "REGISTRY_STORAGE_S3_BUCKET"
value: {{ pillar.get('registry_storage_s3_bucket') }}
- name: "REGISTRY_STORAGE_S3_ENCRYPT"
value: "true"
- name: "REGISTRY_STORAGE_S3_SECURE"
value: "false"
{% endif %}
volumeMounts:
- name: image-store
mountPath: /var/lib/registry
ports:
- containerPort: 5000
name: registry
protocol: TCP
volumes:
- name: image-store
persistentVolumeClaim:
claimName: kube-registry-pvc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment