-
Notifications
You must be signed in to change notification settings - Fork 15
Allow egress ips on managedseeds #207
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
base: main
Are you sure you want to change the base?
Allow egress ips on managedseeds #207
Conversation
Signed-off-by: Justin Lamp <[email protected]>
hown3d
left a comment
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.
Thanks for the contribution!
I'd like to propose some changes.
9ec0e20 to
99cacca
Compare
|
I was just thinking about wether we should add a check to only add the seed CIDR if the blackbox exporter is actually deployed. @timebertt WDYT? |
99cacca to
4fc2342
Compare
I would not know how to implement this. How would I get a hold of the gardenlet configuration to check it? |
|
I'm curious: Can you outline your setup in detail?
|
|
We use a MangedSeetSet with Cilium as the CNI and we let cilium replace kube-proxy. This is the seeds shoot config: spec:
kubernetes:
kubeProxy:
mode: IPTables
enabled: false
networking:
type: cilium
providerConfig:
bpfSocketLBHostnsOnly:
enabled: true
hubble:
enabled: true
overlay:
enabled: true
tunnel: geneveapiVersion: v1
kind: Service
metadata:
annotations:
loadbalancer.openstack.org/load-balancer-address: 1.1.1.1
loadbalancer.openstack.org/proxy-protocol: "true"
networking.resources.gardener.cloud/from-all-seed-scrape-targets-allowed-ports: '[{"port":15022,"protocol":"TCP"}]'
networking.resources.gardener.cloud/from-world-to-ports: '[{"port":8132,"protocol":"TCP"},{"port":8443,"protocol":"TCP"},{"port":9443,"protocol":"TCP"}]'
networking.resources.gardener.cloud/namespace-selectors: '[{"matchLabels":{"gardener.cloud/role":"extension"}},{"matchLabels":{"gardener.cloud/role":"shoot"}},{"matchLabels":{"kubernetes.io/metadata.name":"garden"}}]'
networking.resources.gardener.cloud/pod-label-selector-namespace-alias: all-istio-ingresses
resources.gardener.cloud/description: |-
DO NOT EDIT - This resource is managed by gardener-resource-manager.
Any modifications are discarded and the resource is returned to the original state.
resources.gardener.cloud/origin: istio-system/istio
labels:
app: istio-ingressgateway
app.kubernetes.io/version: 1.27.1
istio: ingressgateway
resources.gardener.cloud/managed-by: gardener
name: istio-ingressgateway
namespace: istio-ingress
spec:
allocateLoadBalancerNodePorts: true
externalTrafficPolicy: Cluster
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
ipFamilyPolicy: SingleStack
ports:
- name: tcp
port: 443
protocol: TCP
targetPort: 9443
- name: tls-tunnel
port: 8132
protocol: TCP
targetPort: 8132
selector:
app: istio-ingressgateway
istio: ingressgateway
sessionAffinity: None
type: LoadBalancer
status:
loadBalancer:
ingress:
- ip: 1.1.1.1
ipMode: Proxy |
|
Got it, thanks for outlining your use case. In that case, you do need this particular change in the ACL extension 👍 |
Signed-off-by: Justin Lamp <[email protected]>
4fc2342 to
17d4bc0
Compare
|
I see, should we make this configurable per shoot then? If it's only necessary on these special cases I believe we shouldn't punch in another hole by default. |
|
It feels a bit hacky, but I could also check whether the |
We can check all of that in the shoot itself, no need to check for some ConfigMaps. I think there are some options we can do:
|
But this would then only check if the child Shoot is using Cilium and not the Seed cluster, which is what actually matters. Or did I misunderstand you? |
|
It is possible for extension to get a garden client to read shoots directly from the garden. This way it would be possible to get the configuration of the Seeds Shoot. |
What this PR does / why we need it:
With this PR the Controller will automatically allow the egress IPs of the ManagedSeed. This will fix the blackbox exporter check that tries to externally access the shoots API.
Special notes for your reviewer:
The ConfigMap called
shoot-infowill be present in Seed clusters that are itself shoots. So it will only work on ManagedSeed(-Sets).