Skip to content

Commit 02fc8fd

Browse files
authored
Fix config files (#362)
1 parent 089aef7 commit 02fc8fd

10 files changed

+45
-13
lines changed

config/default/kustomization.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Adds namespace to all resources.
2-
namespace: cluster-api-provider-ibmvpccloud-system
2+
namespace: capi-ibmcloud-system
33

44
# Value of this field is prepended to the
55
# names of all resources, e.g. a deployment named
66
# "wordpress" becomes "alices-wordpress".
77
# Note that it should also match with the prefix (text before '-') of the namespace
88
# field above.
9-
namePrefix: cluster-api-provider-ibmvpccloud-
9+
namePrefix: capi-ibmcloud-
1010

1111
# Labels to add to all resources and selectors.
1212
#commonLabels:
@@ -29,6 +29,7 @@ patchesStrategicMerge:
2929
# If you want your controller-manager to expose the /metrics
3030
# endpoint w/o any authn/z, please comment the following line.
3131
- manager_auth_proxy_patch.yaml
32+
- manager_image_patch.yaml
3233

3334
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
3435
# crd/kustomization.yaml

config/default/manager_auth_proxy_patch.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ spec:
2121
name: https
2222
- name: manager
2323
args:
24-
- "--metrics-addr=127.0.0.1:8080"
25-
- "--enable-leader-election"
24+
- "--metrics-bind-addr=127.0.0.1:8080"
25+
- "--leader-elect"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: controller-manager
5+
namespace: system
6+
spec:
7+
template:
8+
spec:
9+
containers:
10+
# Change the value of image field below to your controller image URL
11+
- image: gcr.io/k8s-staging-capi-ibmcloud/cluster-api-ibmcloud-controller:main
12+
name: manager

config/manager/manager.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ spec:
3838
cpu: 100m
3939
memory: 20Mi
4040
terminationGracePeriodSeconds: 10
41+
serviceAccountName: manager

config/rbac/auth_proxy_client_clusterrole.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: rbac.authorization.k8s.io/v1beta1
1+
apiVersion: rbac.authorization.k8s.io/v1
22
kind: ClusterRole
33
metadata:
44
name: metrics-reader

config/rbac/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ resources:
1010
- auth_proxy_role.yaml
1111
- auth_proxy_role_binding.yaml
1212
- auth_proxy_client_clusterrole.yaml
13+
- service_account.yaml

config/rbac/leader_election_role.yaml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: rbac.authorization.k8s.io/v1
33
kind: Role
44
metadata:
5-
name: leader-election-role
5+
name: leader-elect-role
66
rules:
77
- apiGroups:
88
- ""
@@ -25,8 +25,20 @@ rules:
2525
- update
2626
- patch
2727
- apiGroups:
28-
- ""
28+
- ""
2929
resources:
30-
- events
30+
- events
3131
verbs:
32-
- create
32+
- create
33+
- apiGroups:
34+
- "coordination.k8s.io"
35+
resources:
36+
- leases
37+
verbs:
38+
- get
39+
- list
40+
- watch
41+
- create
42+
- update
43+
- patch
44+
- delete
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
apiVersion: rbac.authorization.k8s.io/v1
22
kind: RoleBinding
33
metadata:
4-
name: leader-election-rolebinding
4+
name: leader-elect-rolebinding
55
roleRef:
66
apiGroup: rbac.authorization.k8s.io
77
kind: Role
8-
name: leader-election-role
8+
name: leader-elect-role
99
subjects:
1010
- kind: ServiceAccount
11-
name: default
11+
name: manager
1212
namespace: system

config/rbac/role_binding.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ roleRef:
88
name: manager-role
99
subjects:
1010
- kind: ServiceAccount
11-
name: default
11+
name: manager
1212
namespace: system

config/rbac/service_account.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
apiVersion: v1
2+
kind: ServiceAccount
3+
metadata:
4+
name: manager
5+
namespace: system

0 commit comments

Comments
 (0)