Skip to content

Commit 7a770aa

Browse files
committed
wip: Add alb-controller-manager deploy files
1 parent 714d80d commit 7a770aa

File tree

4 files changed

+146
-0
lines changed

4 files changed

+146
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
namespace: kube-system
5+
name: stackit-application-load-balancer-contoller-manager
6+
labels:
7+
app: stackit-application-load-balancer-contoller-manager
8+
spec:
9+
replicas: 2
10+
strategy:
11+
type: RollingUpdate
12+
selector:
13+
matchLabels:
14+
app: stackit-application-load-balancer-contoller-manager
15+
template:
16+
metadata:
17+
labels:
18+
app: stackit-application-load-balancer-contoller-manager
19+
spec:
20+
serviceAccountName: stackit-application-load-balancer-contoller-manager
21+
terminationGracePeriodSeconds: 30
22+
containers:
23+
- name: stackit-application-load-balancer-contoller-manager
24+
# TODO(jamand): Adapt image tag
25+
image: ghcr.io/stackitcloud/cloud-provider-stackit/stackit-application-load-balancer-contoller-manager:XXX
26+
args:
27+
- "--authorization-always-allow-paths=/metrics"
28+
- "--leader-elect=true"
29+
- "--leader-elect-resource-name=stackit-application-load-balancer-contoller-manager"
30+
- "--enable-http2"
31+
- "--metrics-bind-address=8080"
32+
- "--secureMetrics=false"
33+
# TODO(jamand): Check webhook cert + enableHTTP2 flag
34+
env:
35+
- name: STACKIT_SERVICE_ACCOUNT_KEY_PATH
36+
value: /etc/serviceaccount/sa_key.json
37+
ports:
38+
- containerPort: 8080
39+
hostPort: 8080
40+
name: metrics
41+
protocol: TCP
42+
- containerPort: 8081
43+
hostPort: 8081
44+
name: probe
45+
protocol: TCP
46+
resources:
47+
limits:
48+
cpu: "0.5"
49+
memory: 500Mi
50+
requests:
51+
cpu: "0.1"
52+
memory: 100Mi
53+
volumeMounts:
54+
- mountPath: /etc/serviceaccount
55+
name: cloud-secret
56+
volumes:
57+
- name: cloud-secret
58+
secret:
59+
secretName: stackit-cloud-secret
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
resources:
5+
- deployment.yaml
6+
- rbac.yaml
7+
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
apiVersion: v1
2+
kind: ServiceAccount
3+
metadata:
4+
namespace: kube-system
5+
name: stackit-application-load-balancer-contoller-manager
6+
---
7+
apiVersion: rbac.authorization.k8s.io/v1
8+
kind: ClusterRole
9+
metadata:
10+
name: stackit-application-load-balancer-contoller-manager
11+
rules:
12+
# TODO(jamand): Go through rules again
13+
- apiGroups:
14+
- ""
15+
resources:
16+
- events
17+
verbs:
18+
- create
19+
- patch
20+
- update
21+
- apiGroups:
22+
- ""
23+
resources:
24+
- nodes
25+
verbs:
26+
- list
27+
- apiGroups:
28+
- "networking.k8s.io"
29+
resources:
30+
- ingress
31+
verbs:
32+
- get
33+
- apiGroups:
34+
- "networking.k8s.io"
35+
resources:
36+
- ingress/status
37+
verbs:
38+
- patch
39+
- apiGroups:
40+
- "networking.k8s.io"
41+
resources:
42+
- ingressclass
43+
verbs:
44+
- list
45+
- patch
46+
- update
47+
- watch
48+
---
49+
kind: ClusterRoleBinding
50+
apiVersion: rbac.authorization.k8s.io/v1
51+
metadata:
52+
name: stackit-application-load-balancer-contoller-manager
53+
roleRef:
54+
apiGroup: rbac.authorization.k8s.io
55+
kind: ClusterRole
56+
name: stackit-application-load-balancer-contoller-manager
57+
subjects:
58+
- kind: ServiceAccount
59+
name: stackit-application-load-balancer-contoller-manager
60+
namespace: kube-system
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
labels:
5+
app: stackit-application-load-balancer-contoller-manager
6+
namespace: kube-system
7+
name: stackit-application-load-balancer-contoller-manager
8+
spec:
9+
selector:
10+
app: stackit-application-load-balancer-contoller-manager
11+
ports:
12+
- name: probe
13+
port: 8081
14+
targetPort: probe
15+
protocol: TCP
16+
- name: metrics
17+
port: 8080
18+
targetPort: metrics
19+
protocol: TCP
20+
type: ClusterIP

0 commit comments

Comments
 (0)