forked from gardener/gardener
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Basic component config API * Basic main entrypoint * Basic operator API * Basic garden controller * Deploy CRD for `ManagedResource`s in `resourcemanager` package * Garden controller reconciles VPA CRD and `gardener-resource-manager` * Garden controller reconciles VPA components * Introduce garden-specific `PriorityClass`es similar to seeds and shoots * Garden controller maintains `Reconciled` condition * Helm chart * Skaffold config * Integration test * E2E test * Documentation * Make `kutil.IsNamespaceInUse` more generic * `gardenlet` checks if seed cluster is garden cluster at the same time * Address PR review feedback * Address PR review feedback * Address PR review feedback * Address PR review feedback
- Loading branch information
Showing
190 changed files
with
6,504 additions
and
497 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: v1 | ||
description: A Helm chart to deploy the Gardener Operator | ||
name: gardener-operator | ||
version: 0.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../utils-templates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
{{- define "operator.kubeconfig.data" -}} | ||
kubeconfig: {{ .Values.config.runtimeClientConnection.kubeconfig | b64enc }} | ||
{{- end -}} | ||
|
||
{{- define "operator.kubeconfig.name" -}} | ||
gardener-operator-kubeconfig-{{ include "operator.kubeconfig.data" . | sha256sum | trunc 8 }} | ||
{{- end -}} | ||
|
||
{{- define "operator.imagevector-overwrite.data" -}} | ||
images_overwrite.yaml: | | ||
{{ .Values.imageVectorOverwrite | indent 2 }} | ||
{{- end -}} | ||
|
||
{{- define "operator.imagevector-overwrite.name" -}} | ||
gardener-operator-imagevector-overwrite-{{ include "operator.imagevector-overwrite.data" . | sha256sum | trunc 8 }} | ||
{{- end -}} | ||
|
||
{{- define "operator.imagevector-overwrite-components.data" -}} | ||
components.yaml: | | ||
{{ .Values.componentImageVectorOverwrites | indent 2 }} | ||
{{- end -}} | ||
|
||
{{- define "operator.imagevector-overwrite-components.name" -}} | ||
gardener-operator-imagevector-overwrite-components-{{ include "operator.imagevector-overwrite-components.data" . | sha256sum | trunc 8 }} | ||
{{- end -}} | ||
|
||
{{- define "operator.config.data" -}} | ||
config.yaml: | | ||
--- | ||
apiVersion: operator.config.gardener.cloud/v1alpha1 | ||
kind: OperatorConfiguration | ||
runtimeClientConnection: | ||
qps: {{ .Values.config.runtimeClientConnection.qps }} | ||
burst: {{ .Values.config.runtimeClientConnection.burst }} | ||
{{- if .Values.config.runtimeClientConnection.kubeconfig }} | ||
kubeconfig: /etc/gardener-operator/kubeconfig/kubeconfig | ||
{{- end }} | ||
leaderElection: | ||
leaderElect: {{ .Values.config.leaderElection.leaderElect }} | ||
leaseDuration: {{ .Values.config.leaderElection.leaseDuration }} | ||
renewDeadline: {{ .Values.config.leaderElection.renewDeadline }} | ||
retryPeriod: {{ .Values.config.leaderElection.retryPeriod }} | ||
resourceLock: {{ .Values.config.leaderElection.resourceLock }} | ||
resourceName: {{ .Values.config.leaderElection.resourceName }} | ||
resourceNamespace: {{ .Release.Namespace }} | ||
logLevel: {{ .Values.config.logLevel | default "info" }} | ||
logFormat: {{ .Values.config.logFormat | default "json" }} | ||
server: | ||
healthProbes: | ||
bindAddress: {{ .Values.config.server.healthProbes.bindAddress }} | ||
port: {{ .Values.config.server.healthProbes.port }} | ||
metrics: | ||
bindAddress: {{ .Values.config.server.metrics.bindAddress }} | ||
port: {{ .Values.config.server.metrics.port }} | ||
{{- if .Values.config.debugging }} | ||
debugging: | ||
enableProfiling: {{ .Values.config.debugging.enableProfiling }} | ||
enableContentionProfiling: {{ .Values.config.debugging.enableContentionProfiling }} | ||
{{- end }} | ||
featureGates: | ||
{{ toYaml .Values.config.featureGates | indent 4 }} | ||
controllers: | ||
garden: | ||
{{- if .Values.config.controllers.garden.concurrentSyncs }} | ||
concurrentSyncs: {{ .Values.config.controllers.garden.concurrentSyncs }} | ||
{{- end }} | ||
{{- if .Values.config.controllers.garden.syncPeriod }} | ||
syncPeriod: {{ .Values.config.controllers.garden.syncPeriod }} | ||
{{- end }} | ||
{{- end -}} | ||
|
||
{{- define "operator.config.name" -}} | ||
gardener-operator-configmap-{{ include "operator.config.data" . | sha256sum | trunc 8 }} | ||
{{- end -}} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: gardener.cloud:system:gardener-operator | ||
labels: | ||
app: gardener | ||
role: operator | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" | ||
release: "{{ .Release.Name }}" | ||
heritage: "{{ .Release.Service }}" | ||
rules: | ||
- apiGroups: | ||
- operator.gardener.cloud | ||
resources: | ||
- gardens | ||
- gardens/status | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- patch | ||
- update | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- namespaces | ||
verbs: | ||
- create | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- namespaces | ||
resourceNames: | ||
- {{ .Release.Namespace }} | ||
verbs: | ||
- update | ||
- patch | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- events | ||
verbs: | ||
- create | ||
- patch | ||
- update | ||
- apiGroups: | ||
- admissionregistration.k8s.io | ||
resources: | ||
- mutatingwebhookconfigurations | ||
- validatingwebhookconfigurations | ||
verbs: | ||
- create | ||
- delete | ||
- deletecollection | ||
- get | ||
- list | ||
- watch | ||
- patch | ||
- update | ||
- apiGroups: | ||
- apiextensions.k8s.io | ||
resources: | ||
- customresourcedefinitions | ||
verbs: | ||
- create | ||
- get | ||
- list | ||
- watch | ||
- patch | ||
- update | ||
- delete | ||
- apiGroups: | ||
- rbac.authorization.k8s.io | ||
resources: | ||
- clusterrolebindings | ||
- clusterroles | ||
verbs: | ||
- create | ||
- delete | ||
- deletecollection | ||
- get | ||
- list | ||
- watch | ||
- patch | ||
- update | ||
# gardener-operator deploys other components like gardener-resource-manager which might have elevated privileges, so | ||
# let's allow both 'bind' and 'escalate' verbs for now. | ||
- apiGroups: | ||
- rbac.authorization.k8s.io | ||
resources: | ||
- clusterroles | ||
verbs: | ||
- bind | ||
- escalate |
19 changes: 19 additions & 0 deletions
19
charts/gardener/operator/templates/clusterrolebinding.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: gardener.cloud:system:gardener-operator | ||
labels: | ||
app: gardener | ||
role: operator | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" | ||
release: "{{ .Release.Name }}" | ||
heritage: "{{ .Release.Service }}" | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: gardener.cloud:system:gardener-operator | ||
subjects: | ||
- kind: ServiceAccount | ||
name: "{{ required ".Values.serviceAccountName is required" .Values.serviceAccountName }}" | ||
namespace: {{ .Release.Namespace }} |
Oops, something went wrong.