-
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
24
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
24 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 6522f24
tests
hown3d 553aa9d
delete managed resource of garden extension
hown3d ae5ef6f
fix deployment manifest for controller
hown3d 5d4b22b
move garden specific allowed cidrs into own file
hown3d bda0db1
comment why to add node and pod cidr of runtime cluster to allowed
hown3d 9c7f2a6
move rbac for extension classes into separate files
hown3d 48adcea
drop uneeded permissions
hown3d f7aca85
restrict garden permissions to garden namespace
hown3d 387f6a8
kustomization for garden resources
hown3d d740b47
helper function to check if garden extension
hown3d 5c37da1
requeue if no advertised addresses
hown3d 58b7670
drop special findIstioNamespace logic for garden extension
hown3d ef2259b
tidy
hown3d 87c17fb
clusterCompability in extension
hown3d 2febe5a
move gardencluster setup to app.go
hown3d 2f02ba8
format
hown3d d1252f6
generate
hown3d f2167af
adapt tests to gardener version
hown3d ef8f968
downgrade kubernetes packages to 1.35
hown3d 0e64847
adapt tests to include proxy tests
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