-
Notifications
You must be signed in to change notification settings - Fork 556
/
Copy pathecr-secret-operator.clusterserviceversion.yaml
339 lines (339 loc) · 14.1 KB
/
ecr-secret-operator.clusterserviceversion.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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
apiVersion: operators.coreos.com/v1alpha1
kind: ClusterServiceVersion
metadata:
annotations:
alm-examples: |-
[
{
"apiVersion": "ecr.mobb.redhat.com/v1alpha1",
"kind": "Secret",
"metadata": {
"name": "ecr-secret-sample",
"namespace": "test-ecr-secret-operator"
},
"spec": {
"ecr_registry": "ACCOUNT_ID.dkr.ecr.us-east-2.amazonaws.com",
"frequency": "10h",
"generated_secret_name": "ecr-docker-secret",
"region": "us-east-2"
}
},
{
"apiVersion": "ecr.mobb.redhat.com/v1alpha1",
"kind": "ArgoHelmRepoSecret",
"metadata": {
"labels": {
"app.kubernetes.io/created-by": "ecr-secret-operator",
"app.kubernetes.io/instance": "argohelmreposecret-sample",
"app.kubernetes.io/managed-by": "kustomize",
"app.kubernetes.io/name": "argohelmreposecret",
"app.kubernetes.io/part-of": "ecr-secret-operator"
},
"name": "argohelmreposecret-sample"
},
"spec": null
}
]
capabilities: Basic Install
categories: Integration & Delivery
containerImage: quay.io/mobb/ecr-secret-operator:v0.4.1
createdAt: "2023-04-14T14:52:13Z"
operatorframework.io/suggested-namespace: ecr-secret-operator
operators.operatorframework.io/builder: operator-sdk-v1.28.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
repository: https://github.com/rh-mobb/ecr-secret-operator
support: Managed Openshift Black Belt
name: ecr-secret-operator.v0.4.1
namespace: placeholder
spec:
apiservicedefinitions: {}
customresourcedefinitions:
owned:
- description: ArgoHelmRepoSecret is the Schema for the argohelmreposecrets API
displayName: Argo Helm Repo Secret
kind: ArgoHelmRepoSecret
name: argohelmreposecrets.ecr.mobb.redhat.com
version: v1alpha1
- description: Secret is the Schema for the secrets API
displayName: Secret
kind: Secret
name: secrets.ecr.mobb.redhat.com
version: v1alpha1
description: "# ECR Secret Operator\n\nAmazon Elastic Container Registry [Private
Registry Authentication](https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html)
provides a temporary token that is valid only for 12 hours. It is a challenge
for automatic container image build process to refresh the token or secret in
a timely manner.\n\nThis operators frequently talks with AWS ECR GetAuthroization
Token and create/update the secret, so that the service account can perform docker
image build.\n\n\n## How to use this operator\n\n### Prerequisites\n\n* [Create
an ECR private repository](https://docs.aws.amazon.com/AmazonECR/latest/userguide/repository-create.html)\n*
Create An Openshift Cluster\n* Provide AWS Authentication to the operator. Two
Options:\n **Note: You have to provide a secret aws-ecr-cloud-credentials in
the installed namespace**\n * [IAM User](https://github.com/rh-mobb/ecr-secret-operator/tree/main/docs/iam_user.md)\n
\ * [STS Assume Role](https://github.com/rh-mobb/ecr-secret-operator/tree/main/docs/iam_assume_role.md)\n\n###
Install the operator\n\n### Create the ECR Secret CRD\n\n```\napiVersion: ecr.mobb.redhat.com/v1alpha1\nkind:
Secret\nmetadata:\n name: ecr-secret\n namespace: test-ecr-secret-operator\nspec:\n
\ generated_secret_name: ecr-docker-secret\n ecr_registry: [ACCOUNT_ID].dkr.ecr.us-east-2.amazonaws.com\n
\ frequency: 10h\n region: us-east-2\n```\n\n```\noc create -f CRD_FILE\n```\n\nA
docker registry secret is created by the operator momentally and the token is
patched every 10 hours\n\n```\noc get secret ecr-docker-secret \nNAME TYPE
\ DATA AGE\necr-docker-secret kubernetes.io/dockerconfigjson
\ 1 16h\n```\n\n### A sample build process with generated secret\n\n\nLink
the secret to builder\n\n```\noc secrets link builder ecr-docker-secret \n```\n\nConfigure
[build config](https://github.com/rh-mobb/ecr-secret-operator/tree/main/samples/build-config.yaml)
to point to your ECR Container repository\n\n```\noc create imagestream ruby\noc
tag openshift/ruby:2.5-ubi8 ruby:2.5\noc create -f samples/build-config.yaml\noc
start-build ruby-sample-build --wait\n```\n\nBuild should succeed and push the
image to the the private ECR Container repository\n\n"
displayName: ECR Secret Operator
icon:
- base64data: /9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD84QzQ5OjcBCgoKDQwNGg8PGjclHyU3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3N//AABEIAH8AfwMBIgACEQEDEQH/xAAcAAEAAgIDAQAAAAAAAAAAAAAABwgFBgEDBAL/xABEEAABAwIDBQQGBAsJAQAAAAABAAIDBBEFBiEHEjFBYRMiUaEUMkJxgZGCscHCFRYj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BH0Qgi8aAEEgjhY2Nv5hWN2V5u/GbA+xrJAcTog2Oo8ZR7MnxHHqD0Vc+rR1C2TZ5W4lh+cMPlwankqZ3u7OSBntwuI37+AGhueYCCzyIOCIC6aumgrKaWmqoWTQTNLJI5BdrmniCF3IggrE9lFZBnGipKNj5sAqZw90xNzBGO86N/vA3Qed9dQpzja1jA1gAaNABwAX0iAiIgIiICIiAsHnbA25iyviGG2HayREwk+zK3Vh+YCziIKv5NyhiubqgNoI/R6Vp/L1crTuR+IA9p3QfGysFlPKeFZWofR8Nh/KvA7apeAZJj4uPh4DgFm4omQs3ImNY0ahrRYL7QEREBERAREQEREBERAREQEREBERAREQf/2Q==
mediatype: image/jpeg
install:
spec:
clusterPermissions:
- rules:
- apiGroups:
- ""
resources:
- secrets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ecr.mobb.redhat.com
resources:
- argohelmreposecrets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ecr.mobb.redhat.com
resources:
- argohelmreposecrets/finalizers
verbs:
- update
- apiGroups:
- ecr.mobb.redhat.com
resources:
- argohelmreposecrets/status
verbs:
- get
- patch
- update
- apiGroups:
- ecr.mobb.redhat.com
resources:
- secrets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ecr.mobb.redhat.com
resources:
- secrets/finalizers
verbs:
- update
- apiGroups:
- ecr.mobb.redhat.com
resources:
- secrets/status
verbs:
- get
- patch
- update
- apiGroups:
- authentication.k8s.io
resources:
- tokenreviews
verbs:
- create
- apiGroups:
- authorization.k8s.io
resources:
- subjectaccessreviews
verbs:
- create
serviceAccountName: ecr-secret-operator-controller-manager
deployments:
- label:
control-plane: controller-manager
name: ecr-secret-operator-controller-manager
spec:
replicas: 1
selector:
matchLabels:
control-plane: controller-manager
strategy: {}
template:
metadata:
annotations:
kubectl.kubernetes.io/default-container: manager
labels:
control-plane: controller-manager
spec:
containers:
- args:
- --secure-listen-address=0.0.0.0:8443
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --v=0
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0
name: kube-rbac-proxy
ports:
- containerPort: 8443
name: https
protocol: TCP
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 5m
memory: 64Mi
- args:
- --health-probe-bind-address=:8081
- --metrics-bind-address=127.0.0.1:8080
- --leader-elect
command:
- /manager
env:
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
key: aws_access_key_id
name: aws-ecr-cloud-credentials
optional: true
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
key: aws_secret_access_key
name: aws-ecr-cloud-credentials
optional: true
- name: AWS_SDK_LOAD_CONFIG
value: "1"
- name: AWS_CONFIG_FILE
value: /var/run/secrets/aws/credentials
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.annotations['olm.targetNamespaces']
image: quay.io/mobb/ecr-secret-operator:v0.4.1
livenessProbe:
httpGet:
path: /healthz
port: 8081
initialDelaySeconds: 15
periodSeconds: 20
name: manager
readinessProbe:
httpGet:
path: /readyz
port: 8081
initialDelaySeconds: 5
periodSeconds: 10
resources:
limits:
cpu: 500m
memory: 1000Mi
requests:
cpu: 10m
memory: 64Mi
securityContext:
allowPrivilegeEscalation: false
volumeMounts:
- mountPath: /var/run/secrets/aws
name: aws-credentials
readOnly: true
- mountPath: /var/run/secrets/openshift/serviceaccount
name: bound-sa-token
readOnly: true
securityContext:
runAsNonRoot: true
serviceAccountName: ecr-secret-operator-controller-manager
terminationGracePeriodSeconds: 10
volumes:
- name: aws-credentials
secret:
optional: true
secretName: aws-ecr-cloud-credentials
- name: bound-sa-token
projected:
sources:
- serviceAccountToken:
audience: openshift
path: token
permissions:
- rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
serviceAccountName: ecr-secret-operator-controller-manager
strategy: deployment
installModes:
- supported: true
type: OwnNamespace
- supported: true
type: SingleNamespace
- supported: true
type: MultiNamespace
- supported: true
type: AllNamespaces
keywords:
- ecr
- aws
- redhat
links:
- name: Ecr Secret Operator
url: https://github.com/rh-mobb/ecr-secret-operator
maintainers:
- email: [email protected]
name: Shaozhen Ding
maturity: alpha
provider:
name: Managed Openshift Black Belt
replaces: ecr-secret-operator.v0.4.0
version: 0.4.1