File tree Expand file tree Collapse file tree 10 files changed +129
-82
lines changed
postgres-operator/templates
hugo/content/installation Expand file tree Collapse file tree 10 files changed +129
-82
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ helm init --service-account tiller
Original file line number Diff line number Diff line change 2
2
apiVersion : rbac.authorization.k8s.io/v1beta1
3
3
kind : ClusterRoleBinding
4
4
metadata :
5
- name : {{ template "postgres-operator.fullname" . }}
6
- labels :
7
- app : {{ template "postgres-operator.name" . }}
8
- chart : {{ template "postgres-operator.chart" . }}
9
- release : {{ .Release.Name }}
10
- heritage : {{ .Release.Service }}
5
+ name : pgopclusterbinding
11
6
roleRef :
12
7
apiGroup : rbac.authorization.k8s.io
13
8
kind : ClusterRole
14
- name : {{ template "postgres-operator.fullname" . }}
9
+ name : pgopclusterrole
15
10
subjects :
16
- - kind : ServiceAccount
17
- name : {{ template "postgres-operator.serviceAccountName" . }}
18
- namespace : " {{ .Release.Namespace }}"
11
+ - apiGroup : rbac.authorization.k8s.io
12
+ kind : User
13
+ name : postgres-operator
14
+
15
+ ---
16
+
17
+ apiVersion : rbac.authorization.k8s.io/v1beta1
18
+ kind : ClusterRoleBinding
19
+ metadata :
20
+ name : pgopclusterbindingcrd
21
+ roleRef :
22
+ apiGroup : rbac.authorization.k8s.io
23
+ kind : ClusterRole
24
+ name : pgopclusterrolecrd
25
+ subjects :
26
+ - apiGroup : rbac.authorization.k8s.io
27
+ kind : User
28
+ name : postgres-operator
29
+
19
30
{{ end }}
Original file line number Diff line number Diff line change 2
2
apiVersion : rbac.authorization.k8s.io/v1beta1
3
3
kind : ClusterRole
4
4
metadata :
5
- name : {{ template "postgres-operator.fullname" . }}
6
- labels :
7
- app : {{ template "postgres-operator.name" . }}
8
- chart : {{ template "postgres-operator.chart" . }}
9
- release : {{ .Release.Name }}
10
- heritage : {{ .Release.Service }}
5
+ name : pgopclusterrole
11
6
rules :
12
7
- verbs :
13
8
- get
14
9
- list
15
- - watch
16
- - create
17
- - patch
18
- - update
19
10
apiGroups :
20
11
- ' *'
21
12
resources :
22
- - customresourcedefinitions
23
- - customresourcedefinitions/status
24
13
- nodes
25
- - jobs
26
- - jobs/status
27
- - pgbackups
28
- - pgingests
14
+
15
+ ---
16
+ kind : ClusterRole
17
+ apiVersion : rbac.authorization.k8s.io/v1beta1
18
+ metadata :
19
+ name : pgopclusterrolecrd
20
+ rules :
21
+ - verbs :
22
+ - ' *'
23
+ apiGroups :
24
+ - ' *'
25
+ resources :
29
26
- pgclusters
30
27
- pgpolicies
31
- - pgpolicylogs
32
28
- pgupgrades
33
29
- pgtasks
34
- {{ end }}
30
+ - pgingests
31
+ - pgbackups
32
+ - pgreplicas
33
+
34
+
35
+ {{ end }}
Original file line number Diff line number Diff line change 15
15
app : {{ template "postgres-operator.name" . }}
16
16
release : {{ .Release.Name }}
17
17
spec :
18
+ serviceAccountName : postgres-operator
18
19
containers :
19
- - name : {{ .Chart.Name }}- apiserver
20
+ - name : apiserver
20
21
image : " {{ .Values.env.co_image_prefix }}/pgo-apiserver:{{ .Values.env.co_image_tag }}"
21
22
imagePullPolicy : {{ .Values.image.pullPolicy }}
22
23
securityContext : {}
36
37
- name : operator-conf
37
38
mountPath : /operator-conf
38
39
readOnly : true
39
- - name : {{ .Chart.Name }}- operator
40
+ - name : operator
40
41
image : " {{ .Values.env.co_image_prefix }}/postgres-operator:{{ .Values.env.co_image_tag }}"
41
42
imagePullPolicy : {{ .Values.image.pullPolicy }}
42
43
securityContext : {}
Original file line number Diff line number Diff line change
1
+ {{ if .Values.serviceAccount.create }}
2
+ apiVersion : v1
3
+ kind : ServiceAccount
4
+ metadata :
5
+ name : postgres-operator
6
+ labels :
7
+ app : {{ template "postgres-operator.name" . }}
8
+ chart : {{ template "postgres-operator.chart" . }}
9
+ release : {{ .Release.Name }}
10
+ heritage : {{ .Release.Service }}
11
+ namespace : " {{ .Release.Namespace }}"
12
+
13
+ ---
14
+
15
+ kind : Role
16
+ apiVersion : rbac.authorization.k8s.io/v1beta1
17
+ metadata :
18
+ name : pgo-role
19
+ namespace : " {{ .Release.Namespace }}"
20
+ rules :
21
+ - apiGroups :
22
+ - ' *'
23
+ resources :
24
+ - " *"
25
+ verbs :
26
+ - " *"
27
+ - apiGroups :
28
+ - " "
29
+ resources :
30
+ - pods
31
+ - services
32
+ - endpoints
33
+ - persistentvolumeclaims
34
+ - events
35
+ - configmaps
36
+ - secrets
37
+ verbs :
38
+ - " *"
39
+ - apiGroups :
40
+ - apps
41
+ resources :
42
+ - deployments
43
+ - daemonsets
44
+ - replicasets
45
+ - statefulsets
46
+ verbs :
47
+ - " *"
48
+
49
+ ---
50
+
51
+ kind : RoleBinding
52
+ apiVersion : rbac.authorization.k8s.io/v1beta1
53
+ metadata :
54
+ name : pgo-role-binding
55
+ namespace : " {{ .Release.Namespace }}"
56
+ subjects :
57
+ - kind : ServiceAccount
58
+ name : postgres-operator
59
+ namespace : " {{ .Release.Namespace }}"
60
+ roleRef :
61
+ kind : Role
62
+ name : pgo-role
63
+ apiGroup : rbac.authorization.k8s.io
64
+
65
+
66
+ {{ end }}
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ apiVersion : v1
2
+ kind : ServiceAccount
3
+ metadata :
4
+ name : tiller
5
+ namespace : kube-system
6
+ ---
7
+ apiVersion : rbac.authorization.k8s.io/v1beta1
8
+ kind : ClusterRoleBinding
9
+ metadata :
10
+ name : tiller
11
+ roleRef :
12
+ apiGroup : rbac.authorization.k8s.io
13
+ kind : ClusterRole
14
+ name : cluster-admin
15
+ subjects :
16
+ - kind : ServiceAccount
17
+ name : tiller
18
+ namespace : kube-system
Original file line number Diff line number Diff line change @@ -121,7 +121,6 @@ tar xvzf ./postgres-operator.3.2.tar.gz
121
121
Next, deploy the operator to your Kubernetes cluster -
122
122
....
123
123
cd $COROOT
124
- go get github.com/blang/expenv
125
124
make installrbac
126
125
make deployoperator
127
126
....
You can’t perform that action at this time.
0 commit comments