-
Notifications
You must be signed in to change notification settings - Fork 19
support extension on Garden resource
#280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
hown3d
wants to merge
16
commits into
main
Choose a base branch
from
garden-extension
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
21cd4dc
controller
hown3d 09dbe34
watch managedseed shoots
hown3d 40818e5
different managed resource name for garden extension
hown3d ca7d23a
healthcheck garden managed resource
hown3d 68f84e5
tests
hown3d fa05bb5
delete managed resource of garden extension
hown3d f07f6dd
fix deployment manifest for controller
hown3d 1e06ecc
move garden specific allowed cidrs into own file
hown3d 3c5eef7
comment why to add node and pod cidr of runtime cluster to allowed
hown3d 15c7bb8
move rbac for extension classes into separate files
hown3d 81a4804
drop uneeded permissions
hown3d a534fad
restrict garden permissions to garden namespace
hown3d 88f7687
kustomization for garden resources
hown3d a9ecb17
helper function to check if garden extension
hown3d 470001b
requeue if no advertised addresses
hown3d f1d8cf0
drop special findIstioNamespace logic for garden extension
hown3d File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,32 @@ | ||
| {{- if .Values.gardener.runtimeCluster.enabled }} | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: ClusterRole | ||
| metadata: | ||
| name: {{ include "name" . }}:garden | ||
| labels: | ||
| {{ include "labels" . | indent 4 }} | ||
| rules: | ||
| - apiGroups: | ||
| - operator.gardener.cloud | ||
| resources: | ||
| - gardens | ||
| verbs: | ||
| - get | ||
| - list | ||
| - watch | ||
| --- | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: ClusterRoleBinding | ||
| metadata: | ||
| name: {{ include "name" . }}:garden | ||
| labels: | ||
| {{ include "labels" . | indent 4 }} | ||
| roleRef: | ||
| apiGroup: rbac.authorization.k8s.io | ||
| kind: ClusterRole | ||
| name: {{ include "name" . }}:garden | ||
| subjects: | ||
| - kind: ServiceAccount | ||
| name: {{ include "name" . }} | ||
| namespace: {{ .Release.Namespace }} | ||
| {{- end }} |
This file contains hidden or 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,42 @@ | ||
| {{- if not .Values.gardener.runtimeCluster.enabled }} | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: ClusterRole | ||
| metadata: | ||
| name: {{ include "name" . }}:shoot | ||
| labels: | ||
| {{ include "labels" . | indent 4 }} | ||
| rules: | ||
| - apiGroups: | ||
| - extensions.gardener.cloud | ||
| resources: | ||
| - clusters | ||
| - dnsrecords | ||
| - infrastructures | ||
| verbs: | ||
| - get | ||
| - list | ||
| - watch | ||
| - apiGroups: | ||
| - "" | ||
| resources: | ||
| - services | ||
| verbs: | ||
| - get | ||
| - list | ||
| - watch | ||
| --- | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: ClusterRoleBinding | ||
| metadata: | ||
| name: {{ include "name" . }}:shoot | ||
| labels: | ||
| {{ include "labels" . | indent 4 }} | ||
| roleRef: | ||
| apiGroup: rbac.authorization.k8s.io | ||
| kind: ClusterRole | ||
| name: {{ include "name" . }}:shoot | ||
| subjects: | ||
| - kind: ServiceAccount | ||
| name: {{ include "name" . }} | ||
| namespace: {{ .Release.Namespace }} | ||
| {{- end }} |
This file contains hidden or 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 hidden or 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,30 @@ | ||
| apiVersion: v1 | ||
| kind: Secret | ||
| type: Opaque | ||
| metadata: | ||
| annotations: | ||
| serviceaccount.resources.gardener.cloud/name: extension-acl | ||
| serviceaccount.resources.gardener.cloud/inject-ca-bundle: "true" | ||
| serviceaccount.resources.gardener.cloud/labels: '{"extension": "acl"}' | ||
| labels: | ||
| resources.gardener.cloud/class: garden | ||
| resources.gardener.cloud/purpose: token-requestor | ||
| name: garden-kubeconfig | ||
| namespace: {{ .Release.Namespace }} | ||
| stringData: | ||
| kubeconfig: | | ||
| apiVersion: v1 | ||
| clusters: | ||
| - cluster: | ||
| server: https://virtual-garden-kube-apiserver.garden.svc.cluster.local | ||
| name: default | ||
| contexts: | ||
| - context: | ||
| cluster: default | ||
| user: token | ||
| name: default | ||
| current-context: default | ||
| kind: Config | ||
| users: | ||
| - name: token | ||
| user: {} | ||
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -38,3 +38,6 @@ additionalAllowedCidrs: [] | |
|
|
||
| gardener: | ||
| version: "" | ||
| runtimeCluster: | ||
| enabled: false | ||
| priorityClassName: "" | ||
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,8 +1,10 @@ | ||
| {{- if .Values.httpProxyEnvoyFilterSpec }} | ||
| apiVersion: networking.istio.io/v1alpha3 | ||
| kind: EnvoyFilter | ||
| metadata: | ||
| name: acl-http-proxy-{{ .Values.shootName }} | ||
| name: acl-http-proxy-{{ .Values.suffix }} | ||
| namespace: {{ .Values.targetNamespace }} | ||
| labels: | ||
| {{- include "gardener-extension.labels" . | nindent 4 }} | ||
| spec: {{- .Values.httpProxyEnvoyFilterSpec | toYaml | nindent 2 }} | ||
| {{- end }} |
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,8 +1,10 @@ | ||
| {{- if .Values.vpnEnvoyFilterSpec }} | ||
| apiVersion: networking.istio.io/v1alpha3 | ||
| kind: EnvoyFilter | ||
| metadata: | ||
| name: acl-vpn-{{ .Values.shootName }} | ||
| name: acl-vpn-{{ .Values.suffix }} | ||
| namespace: {{ .Values.targetNamespace }} | ||
| labels: | ||
| {{- include "gardener-extension.labels" . | nindent 4 }} | ||
| spec: {{- .Values.vpnEnvoyFilterSpec | toYaml | nindent 2 }} | ||
| {{- end }} |
This file contains hidden or 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 |
|---|---|---|
| @@ -1 +1,3 @@ | ||
| # TODO | ||
| suffix: "" | ||
| targetNamespace: "" | ||
|
|
This file contains hidden or 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 hidden or 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: kustomize.config.k8s.io/v1beta1 | ||
| kind: Kustomization | ||
| resources: | ||
| - rbac.yaml |
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add a simple |
This file contains hidden or 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,26 @@ | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: Role | ||
| metadata: | ||
| name: extensions.gardener.cloud:acl:managedseeds | ||
| namespace: garden | ||
| annotations: | ||
| authorization.gardener.cloud/extensions-serviceaccount-selector: '{"matchLabels":{"extension":"acl"}}' | ||
| labels: | ||
| authorization.gardener.cloud/custom-extensions-permissions: "true" | ||
| rules: | ||
| - apiGroups: | ||
| - seedmanagement.gardener.cloud | ||
| resources: | ||
| - managedseeds | ||
| verbs: | ||
| - get | ||
| - list | ||
| - watch | ||
| - apiGroups: | ||
| - core.gardener.cloud | ||
| resources: | ||
| - shoots | ||
| verbs: | ||
| - get | ||
| - list | ||
| - watch |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume that you're creating this "by hand" because gardener-operator doesn't create this by default. Should we add this feature, similarly to https://github.com/gardener/gardener/blob/master/docs/extensions/garden-api-access.md?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would love to see this available in g/g. However as of the time creating this PR it was not possible to do