-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
Copy pathimagepullsecret-patcher.yaml
100 lines (96 loc) · 2.1 KB
/
imagepullsecret-patcher.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
apiVersion: v1
kind: Namespace
metadata:
name: imagepullsecret-patcher
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: imagepullsecret-patcher
namespace: imagepullsecret-patcher
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
k8s-app: imagepullsecret-patcher
name: imagepullsecret-patcher
rules:
- apiGroups:
- ""
resources:
- secrets
- serviceaccounts
verbs:
- list
- patch
- create
- get
- delete
- apiGroups:
- ""
resources:
- namespaces
verbs:
- list
- get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: imagepullsecret-patcher
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: imagepullsecret-patcher
subjects:
- kind: ServiceAccount
name: imagepullsecret-patcher
namespace: imagepullsecret-patcher
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: imagepullsecret-patcher
namespace: imagepullsecret-patcher
labels:
name: imagepullsecret-patcher
spec:
replicas: 1
selector:
matchLabels:
name: imagepullsecret-patcher
template:
metadata:
labels:
name: imagepullsecret-patcher
spec:
automountServiceAccountToken: true
serviceAccountName: imagepullsecret-patcher
containers:
- name: imagepullsecret-patcher
image: "quay.io/titansoft/imagepullsecret-patcher:v0.14"
env:
- name: CONFIG_FORCE
value: "true"
- name: CONFIG_DEBUG
value: "false"
- name: CONFIG_ALLSERVICEACCOUNT
value: "true"
- name: CONFIG_DOCKERCONFIGJSONPATH
value: "/app/secrets/.dockerconfigjson"
volumeMounts:
- name: src-dockerconfigjson
mountPath: "/app/secrets"
readOnly: true
resources:
requests:
cpu: 0.1
memory: 15Mi
limits:
cpu: 0.2
memory: 30Mi
volumes:
- name: src-dockerconfigjson
secret:
secretName: image-pull-secret