-
Notifications
You must be signed in to change notification settings - Fork 18
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
Open
hown3d
wants to merge
25
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.
Open
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
8c43259
controller
hown3d ddad90c
watch managedseed shoots
hown3d 9818012
different managed resource name for garden extension
hown3d 7f25339
healthcheck garden managed resource
hown3d 2ed9821
tests
hown3d 5cdd131
delete managed resource of garden extension
hown3d 615cee1
fix deployment manifest for controller
hown3d 943c5de
move garden specific allowed cidrs into own file
hown3d 204a8a4
comment why to add node and pod cidr of runtime cluster to allowed
hown3d ecd08d1
move rbac for extension classes into separate files
hown3d e67326f
drop uneeded permissions
hown3d 2be0db3
restrict garden permissions to garden namespace
hown3d d114a2a
kustomization for garden resources
hown3d c9ab15b
helper function to check if garden extension
hown3d f279d50
requeue if no advertised addresses
hown3d c1e6340
drop special findIstioNamespace logic for garden extension
hown3d 659ced4
tidy
hown3d d21eac8
clusterCompability in extension
hown3d 0210f9e
move gardencluster setup to app.go
hown3d e544c2d
format
hown3d 2a6d363
generate
hown3d 8fd4a43
adapt tests to gardener version
hown3d 78038ca
downgrade kubernetes packages to 1.35
hown3d b38c4ac
adapt tests to include proxy tests
hown3d fe2b7ed
rebase
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: "" | ||
|
|
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