forked from canonical/microk8s
-
Notifications
You must be signed in to change notification settings - Fork 0
/
registry.yaml
69 lines (69 loc) · 1.31 KB
/
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
---
apiVersion: v1
kind: Namespace
metadata:
name: container-registry
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: registry-claim
namespace: container-registry
spec:
accessModes:
- ReadWriteMany
volumeMode: Filesystem
resources:
requests:
storage: 20Gi
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: registry
name: registry
namespace: container-registry
spec:
replicas: 1
template:
metadata:
labels:
app: registry
spec:
containers:
- name: registry
image: cdkbot/registry-$ARCH:2.6
env:
- name: REGISTRY_HTTP_ADDR
value: :5000
- name: REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY
value: /var/lib/registry
ports:
- containerPort: 5000
name: registry
protocol: TCP
volumeMounts:
- mountPath: /var/lib/registry
name: registry-data
volumes:
- name: registry-data
persistentVolumeClaim:
claimName: registry-claim
---
apiVersion: v1
kind: Service
metadata:
labels:
app: registry
name: registry
namespace: container-registry
spec:
type: NodePort
selector:
app: registry
ports:
- name: "registry"
port: 5000
targetPort: 5000
nodePort: 32000