Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(CU-8695egu2z)!: update workerpool controller (#82)
This is basically a port of changes generated by spacelift-io/kube-workerpool-controller#128 to the Helm chart. To help the review, here is below the plain k8s manifest diff that I "Helmified". ```diff --- build/manifests/manifests.yaml 2025-01-09 14:51:37 +++ build/manifests/manifests.new.yaml 2025-01-09 15:54:16 @@ -2,12 +2,8 @@ kind: Namespace metadata: labels: - app.kubernetes.io/component: manager - app.kubernetes.io/created-by: spacelift-workerpool-controller - app.kubernetes.io/instance: system app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/name: namespace - app.kubernetes.io/part-of: spacelift-workerpool-controller + app.kubernetes.io/name: spacelift-workerpool-controller control-plane: controller-manager name: spacelift-worker-controller-system --- @@ -5215,12 +5211,8 @@ kind: ServiceAccount metadata: labels: - app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: spacelift-workerpool-controller - app.kubernetes.io/instance: controller-manager-sa app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/name: serviceaccount - app.kubernetes.io/part-of: spacelift-workerpool-controller + app.kubernetes.io/name: spacelift-workerpool-controller name: spacelift-worker-controllercontroller-manager namespace: spacelift-worker-controller-system --- @@ -5228,12 +5220,8 @@ kind: Role metadata: labels: - app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: spacelift-workerpool-controller - app.kubernetes.io/instance: leader-election-role - app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/name: role - app.kubernetes.io/part-of: spacelift-workerpool-controller + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: spacelift-workerpool-controller name: spacelift-worker-controllerleader-election-role namespace: spacelift-worker-controller-system rules: @@ -5325,13 +5313,24 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - labels: - app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: spacelift-workerpool-controller - app.kubernetes.io/instance: metrics-reader - app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/name: clusterrole - app.kubernetes.io/part-of: spacelift-workerpool-controller + name: spacelift-worker-controllermetrics-auth-role +rules: +- apiGroups: + - authentication.k8s.io + resources: + - tokenreviews + verbs: + - create +- apiGroups: + - authorization.k8s.io + resources: + - subjectaccessreviews + verbs: + - create +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: name: spacelift-worker-controllermetrics-reader rules: - nonResourceURLs: @@ -5343,37 +5342,108 @@ kind: ClusterRole metadata: labels: - app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: spacelift-workerpool-controller - app.kubernetes.io/instance: proxy-role app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/name: clusterrole - app.kubernetes.io/part-of: spacelift-workerpool-controller - name: spacelift-worker-controllerproxy-role + app.kubernetes.io/name: spacelift-workerpool-controller + name: spacelift-worker-controllerworker-editor-role rules: - apiGroups: - - authentication.k8s.io + - workers.spacelift.io resources: - - tokenreviews + - workers verbs: - create + - delete + - get + - list + - patch + - update + - watch - apiGroups: - - authorization.k8s.io + - workers.spacelift.io resources: - - subjectaccessreviews + - workers/status verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: spacelift-workerpool-controller + name: spacelift-worker-controllerworker-viewer-role +rules: +- apiGroups: + - workers.spacelift.io + resources: + - workers + verbs: + - get + - list + - watch +- apiGroups: + - workers.spacelift.io + resources: + - workers/status + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: spacelift-workerpool-controller + name: spacelift-worker-controllerworkerpool-editor-role +rules: +- apiGroups: + - workers.spacelift.io + resources: + - workerpools + verbs: - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - workers.spacelift.io + resources: + - workerpools/status + verbs: + - get --- apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: spacelift-workerpool-controller + name: spacelift-worker-controllerworkerpool-viewer-role +rules: +- apiGroups: + - workers.spacelift.io + resources: + - workerpools + verbs: + - get + - list + - watch +- apiGroups: + - workers.spacelift.io + resources: + - workerpools/status + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: labels: - app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: spacelift-workerpool-controller - app.kubernetes.io/instance: leader-election-rolebinding app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/name: rolebinding - app.kubernetes.io/part-of: spacelift-workerpool-controller + app.kubernetes.io/name: spacelift-workerpool-controller name: spacelift-worker-controllerleader-election-rolebinding namespace: spacelift-worker-controller-system roleRef: @@ -5389,12 +5459,8 @@ kind: ClusterRoleBinding metadata: labels: - app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: spacelift-workerpool-controller - app.kubernetes.io/instance: manager-rolebinding app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/name: clusterrolebinding - app.kubernetes.io/part-of: spacelift-workerpool-controller + app.kubernetes.io/name: spacelift-workerpool-controller name: spacelift-worker-controllermanager-rolebinding roleRef: apiGroup: rbac.authorization.k8s.io @@ -5408,18 +5474,11 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: - labels: - app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: spacelift-workerpool-controller - app.kubernetes.io/instance: proxy-rolebinding - app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/name: clusterrolebinding - app.kubernetes.io/part-of: spacelift-workerpool-controller - name: spacelift-worker-controllerproxy-rolebinding + name: spacelift-worker-controllermetrics-auth-rolebinding roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: spacelift-worker-controllerproxy-role + name: spacelift-worker-controllermetrics-auth-role subjects: - kind: ServiceAccount name: spacelift-worker-controllercontroller-manager @@ -5429,12 +5488,8 @@ kind: Service metadata: labels: - app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: spacelift-workerpool-controller - app.kubernetes.io/instance: controller-manager-metrics-service app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/name: service - app.kubernetes.io/part-of: spacelift-workerpool-controller + app.kubernetes.io/name: spacelift-workerpool-controller control-plane: controller-manager name: spacelift-worker-controllercontroller-manager-metrics-service namespace: spacelift-worker-controller-system @@ -5443,7 +5498,7 @@ - name: https port: 8443 protocol: TCP - targetPort: https + targetPort: 8443 selector: control-plane: controller-manager --- @@ -5451,12 +5506,8 @@ kind: Deployment metadata: labels: - app.kubernetes.io/component: manager - app.kubernetes.io/created-by: spacelift-workerpool-controller - app.kubernetes.io/instance: controller-manager app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/name: deployment - app.kubernetes.io/part-of: spacelift-workerpool-controller + app.kubernetes.io/name: spacelift-workerpool-controller control-plane: controller-manager name: spacelift-worker-controllercontroller-manager namespace: spacelift-worker-controller-system @@ -5488,32 +5539,7 @@ - linux containers: - args: - - --secure-listen-address=0.0.0.0:8443 - - --upstream=http://127.0.0.1:8080/ - - --logtostderr=true - - --v=0 - image: gcr.io/kubebuilder/kube-rbac-proxy:v0.14.1 - name: kube-rbac-proxy - ports: - - containerPort: 8443 - name: https - protocol: TCP - resources: - limits: - cpu: 500m - memory: 128Mi - requests: - cpu: 5m - memory: 64Mi - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - ALL - readOnlyRootFilesystem: true - - args: - - --health-probe-bind-address=:8081 - - --metrics-bind-address=127.0.0.1:8080 + - --metrics-bind-address=:8443 - --leader-elect command: - /spacelift-workerpool-controller @@ -5526,7 +5552,7 @@ periodSeconds: 20 name: manager ports: - - containerPort: 8080 + - containerPort: 8443 name: metrics - containerPort: 8081 name: health ```
- Loading branch information