Skip to content

Commit

Permalink
Adjust extension chart
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-goetz committed Nov 18, 2024
1 parent 2ee2bdf commit e1d5f7d
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 0 deletions.
10 changes: 10 additions & 0 deletions charts/gardener-extension-provider-gcp/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ spec:
networking.resources.gardener.cloud/to-all-shoots-kube-apiserver-tcp-443: allowed
{{ include "labels" . | indent 8 }}
spec:
{{- if .Values.gardener.runtimeCluster.enabled }}
priorityClassName: {{ .Values.gardener.runtimeCluster.priorityClassName }}
{{- else }}
priorityClassName: gardener-system-900
{{- end }}
serviceAccountName: {{ include "name" . }}
containers:
- name: {{ include "name" . }}
Expand All @@ -64,8 +68,14 @@ spec:
- --webhook-config-namespace={{ .Release.Namespace }}
- --webhook-config-service-port={{ .Values.webhookConfig.servicePort }}
- --webhook-config-server-port={{ .Values.webhookConfig.serverPort }}
{{- if .Values.gardener.runtimeCluster.enabled }}
- --disable-controllers=backupentry,bastion,controlplane,infrastructure,worker,healthcheck
- --disable-webhooks="*"
- --extension-class=garden
{{- else }}
- --disable-controllers={{ .Values.disableControllers | join "," }}
- --disable-webhooks={{ .Values.disableWebhooks | join "," }}
{{- end }}
{{- if .Values.metricsPort }}
- --metrics-bind-address=:{{ .Values.metricsPort }}
{{- end }}
Expand Down
69 changes: 69 additions & 0 deletions charts/gardener-extension-provider-gcp/templates/rbac-runtime.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{{ if .Values.gardener.runtimeCluster.enabled }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "name" . }}-runtime
labels:
{{ include "labels" . | indent 4 }}
rules:
- apiGroups:
- extensions.gardener.cloud
resources:
- backupbuckets
- backupbuckets/status
- dnsrecords
- dnsrecords/status
verbs:
- get
- list
- watch
- patch
- update
- apiGroups:
- resources.gardener.cloud
resources:
- managedresources
verbs:
- "*"
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- create
- list
- watch
- apiGroups:
- coordination.k8s.io
resources:
- leases
resourceNames:
- provider-gcp-leader-election
- gardener-extension-heartbeat
verbs:
- get
- update
- apiGroups:
- ""
resources:
- secrets
- events
verbs:
- "*"
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "name" . }}-runtime
labels:
{{ include "labels" . | indent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ include "name" . }}-runtime
subjects:
- kind: ServiceAccount
name: {{ include "name" . }}
namespace: {{ .Release.Namespace }}
{{- end}}
2 changes: 2 additions & 0 deletions charts/gardener-extension-provider-gcp/templates/rbac.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ if not .Values.gardener.runtimeCluster.enabled }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down Expand Up @@ -128,3 +129,4 @@ subjects:
- kind: ServiceAccount
name: {{ include "name" . }}
namespace: {{ .Release.Namespace }}
{{- end }}
3 changes: 3 additions & 0 deletions charts/gardener-extension-provider-gcp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,6 @@ gardener:
settings:
topologyAwareRouting:
enabled: true
runtimeCluster:
enabled: false
# priorityClassName: gardener-garden-system-200

0 comments on commit e1d5f7d

Please sign in to comment.