-
Notifications
You must be signed in to change notification settings - Fork 3
/
image-registry.yaml
142 lines (132 loc) · 3.14 KB
/
image-registry.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: kube-image-registry-volume
namespace: kube-system
labels:
kubernetes.io/cluster-service: "true"
storage: image-registry-volume
spec:
capacity:
storage: 20G
accessModes:
- ReadWriteOnce
hostPath:
path: /srv/registry/
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: kube-image-registry-volume-claim
namespace: kube-system
labels:
kubernetes.io/cluster-service: "true"
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 15G
---
apiVersion: v1
kind: Service
metadata:
name: kube-image-registry
namespace: kube-system
labels:
k8s-app: kube-image-registry-upstream
kubernetes.io/cluster-service: "true"
kubernetes.io/name: "KubeRegistry"
spec:
selector:
k8s-app: kube-image-registry-upstream
ports:
- name: registry
port: 5000
protocol: TCP
---
# kubectl label nodes le-staging-registry image-registry=true
apiVersion: v1
kind: ReplicationController
metadata:
name: kube-image-registry-v0
namespace: kube-system
labels:
k8s-app: kube-image-registry-upstream
version: v0
kubernetes.io/cluster-service: "true"
spec:
replicas: 1
selector:
k8s-app: kube-image-registry-upstream
version: v0
template:
metadata:
labels:
k8s-app: kube-image-registry-upstream
version: v0
kubernetes.io/cluster-service: "true"
spec:
containers:
- name: image-registry
image: registry:2
resources:
limits:
cpu: 100m
memory: 100Mi
env:
- name: REGISTRY_HTTP_ADDR
value: :5000
- name: REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY
value: /var/lib/registry
volumeMounts:
- name: image-store
mountPath: /var/lib/registry
ports:
- containerPort: 5000
name: registry
protocol: TCP
volumes:
- name: image-store
persistentVolumeClaim:
claimName: kube-image-registry-volume-claim
nodeSelector:
role: image-registry
---
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: kube-image-registry-proxy
namespace: kube-system
labels:
k8s-app: kube-image-registry-proxy
kubernetes.io/cluster-service: "true"
version: v0.4
spec:
template:
metadata:
labels:
k8s-app: kube-image-registry-proxy
kubernetes.io/name: "kube-image-registry-proxy"
kubernetes.io/cluster-service: "true"
version: v0.4
spec:
containers:
- name: kube-image-registry-proxy
image: gcr.io/google_containers/kube-registry-proxy:0.4
resources:
limits:
cpu: 100m
memory: 50Mi
env:
- name: REGISTRY_HOST
value: kube-image-registry.kube-system.svc.cluster.local
- name: REGISTRY_PORT
value: "5000"
ports:
- name: registry
containerPort: 80
hostPort: 5000
protocol: TCP
# vim: ts=2 sts=2 sw=2