Skip to content

Commit 5ee1f4d

Browse files
skipper: update hostname-credentials-controller
The logic previously implemented by secret-combiner was moved into hostname-credentials-controller. Signed-off-by: Alexander Yastrebov <[email protected]>
1 parent 9557cae commit 5ee1f4d

File tree

3 files changed

+54
-115
lines changed

3 files changed

+54
-115
lines changed

cluster/manifests/deletions.yaml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@ pre_apply:
44
namespace: kube-system
55
kind: Deployment
66

7+
# TODO: remove after rollout
8+
- kind: CronJob
9+
name: secret-combiner
10+
namespace: kube-system
11+
- kind: RoleBinding
12+
name: secret-combiner
13+
namespace: kube-system
14+
- kind: Role
15+
name: secret-combiner
16+
namespace: kube-system
17+
- kind: ServiceAccount
18+
name: secret-combiner
19+
namespace: kube-system
20+
721
# everything defined under here will be deleted after applying the manifests
822
post_apply:
923
- name: cronjob-monitor
@@ -75,7 +89,6 @@ post_apply:
7589
{{ end }}
7690

7791
{{- if ne .Cluster.ConfigItems.skipper_oauth2_ui_login "true" }}
78-
# hostname-credentials-controller
7992
- kind: CronJob
8093
name: hostname-credentials-controller
8194
namespace: kube-system
@@ -91,20 +104,6 @@ post_apply:
91104
labels:
92105
application: skipper-ingress
93106
component: hostname-credentials
94-
95-
# secret-combiner
96-
- kind: CronJob
97-
name: secret-combiner
98-
namespace: kube-system
99-
- kind: RoleBinding
100-
name: secret-combiner
101-
namespace: kube-system
102-
- kind: Role
103-
name: secret-combiner
104-
namespace: kube-system
105-
- kind: ServiceAccount
106-
name: secret-combiner
107-
namespace: kube-system
108107
- kind: Secret
109108
name: hostname-credentials
110109
namespace: kube-system

cluster/manifests/skipper/hostname-credentials-controller.yaml

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# {{ if eq .Cluster.ConfigItems.skipper_oauth2_ui_login "true" }}
2-
# {{ $version := "main-11" }}
2+
# {{ $version := "main-12" }}
33
apiVersion: v1
44
kind: ServiceAccount
55
metadata:
@@ -56,6 +56,42 @@ subjects:
5656
name: hostname-credentials-controller
5757
namespace: kube-system
5858
---
59+
apiVersion: rbac.authorization.k8s.io/v1
60+
kind: Role
61+
metadata:
62+
name: hostname-credentials-controller
63+
namespace: kube-system
64+
labels:
65+
application: skipper-ingress
66+
component: hostname-credentials
67+
rules:
68+
- apiGroups:
69+
- ""
70+
resources:
71+
- secrets
72+
verbs:
73+
- list
74+
- get
75+
- create
76+
- update
77+
---
78+
apiVersion: rbac.authorization.k8s.io/v1
79+
kind: RoleBinding
80+
metadata:
81+
name: hostname-credentials-controller
82+
namespace: kube-system
83+
labels:
84+
application: skipper-ingress
85+
component: hostname-credentials
86+
roleRef:
87+
apiGroup: rbac.authorization.k8s.io
88+
kind: Role
89+
name: hostname-credentials-controller
90+
subjects:
91+
- kind: ServiceAccount
92+
name: hostname-credentials-controller
93+
namespace: kube-system
94+
---
5995
apiVersion: batch/v1
6096
kind: CronJob
6197
metadata:
@@ -91,10 +127,12 @@ spec:
91127
args:
92128
- -ingress-selector=application
93129
- -credentials-namespace=kube-system
94-
- -credentials-name-template={hostname}-grant-credentials
130+
- -credentials-name-template={host}-grant-credentials
95131
- -credentials-selector=application=skipper-ingress,component=hostname-credentials
96132
- -credentials-labels=application=skipper-ingress,component=hostname-credentials
97133
- -credentials-redirect-uri-path={{ .Cluster.ConfigItems.skipper_oauth2_redirect_uri_path }}
134+
- -combined-secret-name=hostname-credentials
135+
- -combined-secret-labels=application=skipper-ingress,component=hostname-credentials-combined
98136
resources:
99137
limits:
100138
cpu: 10m

cluster/manifests/skipper/secret-combiner.yaml

Lines changed: 0 additions & 98 deletions
This file was deleted.

0 commit comments

Comments
 (0)