-
-
Notifications
You must be signed in to change notification settings - Fork 51
/
deploy.yaml
83 lines (83 loc) · 2.17 KB
/
deploy.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
---
# Source: k8s-ecr-login-renew/templates/001-ServiceAccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: k8s-ecr-login-renew-account
namespace: default
---
# Source: k8s-ecr-login-renew/templates/002-ClusterRole.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: k8s-ecr-login-renew-role
rules:
- apiGroups: [""]
resources:
- namespaces
verbs:
- list
- apiGroups: [""]
resources:
- secrets
- serviceaccounts
- serviceaccounts/token
verbs:
- 'delete'
- 'create'
- 'patch'
- 'get'
---
# Source: k8s-ecr-login-renew/templates/003-ClusterRoleBinding.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: k8s-ecr-login-renew-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: k8s-ecr-login-renew-role
subjects:
- kind: ServiceAccount
name: k8s-ecr-login-renew-account
namespace: default
---
# Source: k8s-ecr-login-renew/templates/005-CronJob.yaml
apiVersion: batch/v1
kind: CronJob
metadata:
name: k8s-ecr-login-renew-cron
namespace: default
spec:
schedule: "* */6 * * *"
successfulJobsHistoryLimit: 3
failedJobsHistoryLimit: 5
jobTemplate:
spec:
template:
metadata:
spec:
serviceAccountName: k8s-ecr-login-renew-account
terminationGracePeriodSeconds: 0
restartPolicy: Never
containers:
- name: k8s-ecr-login-renew
imagePullPolicy: IfNotPresent
image: nabsul/k8s-ecr-login-renew:v1.7.1
env:
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: k8s-ecr-login-renew-aws-secret
key: AWS_ACCESS_KEY_ID
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: k8s-ecr-login-renew-aws-secret
key: AWS_SECRET_ACCESS_KEY
- name: AWS_REGION
value: us-west-2
- name: DOCKER_SECRET_NAME
value: k8s-ecr-login-renew-docker-secret
- name: TARGET_NAMESPACE
value: default