Skip to content

Commit aec7a0c

Browse files
committed
chore: grant anubispaulista admin rights in minecraft namespace
1 parent 281cf5d commit aec7a0c

5 files changed

Lines changed: 149 additions & 0 deletions

File tree

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
apiVersion: v1
2+
kind: ServiceAccount
3+
metadata:
4+
name: kube-vip-cloud-controller
5+
namespace: kube-system
6+
---
7+
apiVersion: rbac.authorization.k8s.io/v1
8+
kind: ClusterRole
9+
metadata:
10+
annotations:
11+
rbac.authorization.kubernetes.io/autoupdate: "true"
12+
name: system:kube-vip-cloud-controller-role
13+
rules:
14+
- apiGroups:
15+
- coordination.k8s.io
16+
resources:
17+
- leases
18+
verbs:
19+
- get
20+
- create
21+
- update
22+
- list
23+
- put
24+
- apiGroups:
25+
- ""
26+
resources:
27+
- configmaps
28+
- endpoints
29+
- events
30+
- services/status
31+
- leases
32+
verbs:
33+
- '*'
34+
- apiGroups:
35+
- ""
36+
resources:
37+
- nodes
38+
- services
39+
verbs:
40+
- list
41+
- get
42+
- watch
43+
- update
44+
---
45+
apiVersion: rbac.authorization.k8s.io/v1
46+
kind: ClusterRoleBinding
47+
metadata:
48+
name: system:kube-vip-cloud-controller-binding
49+
roleRef:
50+
apiGroup: rbac.authorization.k8s.io
51+
kind: ClusterRole
52+
name: system:kube-vip-cloud-controller-role
53+
subjects:
54+
- kind: ServiceAccount
55+
name: kube-vip-cloud-controller
56+
namespace: kube-system
57+
---
58+
apiVersion: apps/v1
59+
kind: Deployment
60+
metadata:
61+
name: kube-vip-cloud-provider
62+
namespace: kube-system
63+
spec:
64+
replicas: 1
65+
revisionHistoryLimit: 10
66+
selector:
67+
matchLabels:
68+
app: kube-vip
69+
component: kube-vip-cloud-provider
70+
strategy:
71+
rollingUpdate:
72+
maxSurge: 25%
73+
maxUnavailable: 25%
74+
type: RollingUpdate
75+
template:
76+
metadata:
77+
labels:
78+
app: kube-vip
79+
component: kube-vip-cloud-provider
80+
spec:
81+
containers:
82+
- args:
83+
- --leader-elect-resource-name=kube-vip-cloud-controller
84+
command:
85+
- /kube-vip-cloud-provider
86+
image: ghcr.io/kube-vip/kube-vip-cloud-provider:v0.0.10
87+
imagePullPolicy: IfNotPresent
88+
name: kube-vip-cloud-provider
89+
dnsPolicy: Default
90+
serviceAccountName: kube-vip-cloud-controller
91+
tolerations:
92+
- effect: NoSchedule
93+
key: node-role.kubernetes.io/control-plane
94+
operator: Exists
95+
affinity:
96+
nodeAffinity:
97+
preferredDuringSchedulingIgnoredDuringExecution:
98+
- weight: 10
99+
preference:
100+
matchExpressions:
101+
- key: node-role.kubernetes.io/control-plane
102+
operator: Exists

components/kube-vip/configmap.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: kubevip
5+
data:
6+
range-global: 192.168.14.205-192.168.14.245
7+
# currently not using a cidr
8+
# skip-end-ips-in-cidr: "true"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
# The kubevip ConfigMap must live in kube-system — that is where the cloud
5+
# controller looks for it. See:
6+
# https://kube-vip.io/docs/usage/cloud-provider/#cloud-controller-manager
7+
namespace: kube-system
8+
9+
resources:
10+
- cloud-controller.yaml
11+
- configmap.yaml

components/rbac/rolebinding.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,17 @@ roleRef:
4949
kind: ClusterRole
5050
name: admin
5151
apiGroup: rbac.authorization.k8s.io
52+
---
53+
apiVersion: rbac.authorization.k8s.io/v1
54+
kind: RoleBinding
55+
metadata:
56+
name: anubispaulista-admin-vicki-wiki
57+
namespace: minecraft
58+
subjects:
59+
- kind: ServiceAccount
60+
name: anubispaulista
61+
namespace: rbac-admin
62+
roleRef:
63+
kind: ClusterRole
64+
name: admin
65+
apiGroup: rbac.authorization.k8s.io

manifests/rbac/manifests.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,20 @@ metadata:
2626
---
2727
apiVersion: rbac.authorization.k8s.io/v1
2828
kind: RoleBinding
29+
metadata:
30+
name: anubispaulista-admin-vicki-wiki
31+
namespace: minecraft
32+
roleRef:
33+
apiGroup: rbac.authorization.k8s.io
34+
kind: ClusterRole
35+
name: admin
36+
subjects:
37+
- kind: ServiceAccount
38+
name: anubispaulista
39+
namespace: rbac-admin
40+
---
41+
apiVersion: rbac.authorization.k8s.io/v1
42+
kind: RoleBinding
2943
metadata:
3044
name: anubispaulista-admin-vic-sandbox
3145
namespace: vic-sandbox

0 commit comments

Comments
 (0)