Skip to content
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

Set kube-apiserver service external traffic policy to local so that a… #187

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
96b9f16
update to g/g 1.18.x
majst01 May 4, 2021
09c1387
Merge branch 'master' of https://github.com/metal-stack/gardener-exte…
majst01 May 11, 2021
e0ad0c4
Merge branch 'master' of https://github.com/metal-stack/gardener-exte…
majst01 May 12, 2021
939ea95
Merge branch 'master' of https://github.com/metal-stack/gardener-exte…
majst01 May 12, 2021
28f67a4
duros controller uses leases now for coordination
majst01 May 12, 2021
4928907
add snapshot related crds required to make duros v2.2 be able to prov…
majst01 May 14, 2021
f3a3881
regenerate controller registration
majst01 May 14, 2021
772b05e
Set kube-apiserver service external traffic policy to local so that a…
mreiger May 28, 2021
4d921c5
merge duros-rbac branch so we can test this in dev
mreiger May 28, 2021
4e633fd
Regenerated controller registration
mreiger May 28, 2021
06725ee
Add cluster name to log output for clarity
mreiger May 28, 2021
94f5fae
More logging to see why reconcile fails now
mreiger May 28, 2021
f234d28
Copy healthCheckNodePort over from the old service so that the new se…
mreiger May 28, 2021
0ea1f92
Add logging to healthCheckNodePort
mreiger May 28, 2021
cc0e713
It is possible that no old kube-apiserver service version exists
mreiger May 31, 2021
4144a12
Move apiserver service mutation from controlplaneexposure to controlp…
mreiger May 31, 2021
de4e231
Apparently apiserver service can only be modified from controlplaneex…
mreiger Jun 1, 2021
f51cb55
Merge branch 'master' of github.com:metal-stack/gardener-extension-pr…
mreiger Jun 8, 2021
6f9141f
Generated controller registration
mreiger Jun 8, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions example/controller-registration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
deployment:
type: helm
providerConfig:
chart: H4sIAAAAAAAAA+0ca2/bOLKf9SsI9xbYPZwlv+IWAnq4bJvdzV2bGEmuxeFwKGiJtlXLopaSkni7/e83fEiiZMmykjbZdjUIEIniDIfkzHBmSHqJmUsCwvrkNiZB5NGgHzJ67blQtCEx9q0n94YBwLOjI/EfoPxfPA/Hk+HoaDSd8vLhdDyYPEFH92+6GZIoxgyhJ4zSeF+9pu9fKSwb5//lCrPY3OKNf9c2muZ/NCnN/2gwGg+eoMHn7Ggd/MnnH4feW8L4vNvoemjgMMxfB+Zwaj43XBI5zAtjUXiMfiH+BjlcKNCCMhSvCPpZCRF6wyUGzZQAoUymjABviI0ahc24Ljf+2OPzrUOz/rvUMZf0Pm006f/RqGz/n00Gnf4/CFjWktpLLgE4Jsg0Lfi7JoFLmbX04lUyNx26sVIpyR9W2FlbKV7foUHMqO+D0DCy9KIYSkGUzGiFitKETNXG25OLy9PzM/VGbvEm9IlVR4evPuil/DjzcUBsSe00WDAMtRInTlha+I6yNWHyxTAsC82AV7wkymiRAM99EiG931EShlQZNFXoBUth2xzKGHFilLOGCqwZoU79q7NXzfofE5gaGKTozp5ga/9vNBgPRp3/9xDQZv7fr4gfwgJtxmErX7Bh/oej0bQ0/6Np5/89DHz82EcuWXgBQT3upPVQ/9Mno9lR43iwTIjahk7Ex3PiRyY4kuaabCU58ZLMCQsIyJHpUYs3VaBRQ+Ia+4ni6eNH5AWOn7gZpyZSiHsY2cUtM8ip2KimhmpftLTbCy8A4QkcItDNC+ITHBHzDJir5CxjzdvAgiE5Q4h/8RZohaMZg++3qBet8OhoakOzb3nz0BSvb8Z4iTKMkHlBvEC976J/fBeVazIS0siLKdvuIwF9JFUE7TsThM5q/S5PiEtCn243JIiVl58JR2RB6KEP12NrxZ8H2th/cIEW3nKDw76Y/GtwiyjrU5jNG+bFpDZH0LT+T6bjkv1/NplOO/v/EKCsT0Gr34qJP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bGYaeZrfR0MiDQfTho2Fop0DUda8sSSdz8KWTLTY6MlApPbenokzQ7aNUd0DHRgvsR8Qwdg+k2Oi//zNKx0tEGYT4VTuc/AQ637/11A2ep9peZ4iTSJ6FEcckDLnPK4foQp+g/Kd58k1f/XHu07m1wdxlsuaJ57uWIG3JM9L8SJeRbrNrVOWsLyld+uRdfkRO4vbxxp1OFJqY6d7YHPRUQfa7XUNzODRvv+5eDXd61fv7c96zkfxgmqZhFHxC25CnItKjLdzDNJzsU/U9wKpbgDgUCsIrWe8jGqSymt/Iq6wh7soNB3KzWl1kG475a/G+GJdL/cJX6cpCftkrLUivb0nChRtZ2X0sI904371jZdRfG8ruQ0jNEvv2lZd6KipW3MuRPau+PZPdnVHvIgrIepg9Ea1UXviQc1e+7LXDUH6Jq4LX8vWrzGrGosAoTULh1khl17XbHdxo1tyoqLtPYWQ/7iJllihJSNlSt2c7v6uDDjrooIMOOuiggw466KCDDjrooIMOOuiggw466KCDDjrooIMOOuiggw6+fPg/EJcBKQB4AAA=
values:
image:
tag: v0.16.8
tag: v0.16.10
23 changes: 23 additions & 0 deletions pkg/webhook/controlplaneexposure/ensurer.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,29 @@ func (e *ensurer) InjectClient(client client.Client) error {

// EnsureKubeAPIServerService ensures that the kube-apiserver service conforms to the provider requirements.
func (e *ensurer) EnsureKubeAPIServerService(ctx context.Context, gctx gcontext.GardenContext, new, old *corev1.Service) error {
cluster, _ := gctx.GetCluster(ctx)

if old != nil {
e.logger.Info("kube-apiserver service externalTrafficPolicy of", "shoot", cluster.ObjectMeta.Name, "old", old.Spec.ExternalTrafficPolicy, "new", new.Spec.ExternalTrafficPolicy)
e.logger.Info("kube-apiserver service healthCheckNodePort of", "shoot", cluster.ObjectMeta.Name, "old", old.Spec.HealthCheckNodePort, "new", new.Spec.HealthCheckNodePort)
} else {
e.logger.Info("kube-apiserver service externalTrafficPolicy of", "shoot", cluster.ObjectMeta.Name, "old", "nil", "new", new.Spec.ExternalTrafficPolicy)
e.logger.Info("kube-apiserver service healthCheckNodePort of", "shoot", cluster.ObjectMeta.Name, "old", "nil", "new", new.Spec.HealthCheckNodePort)
}
// We ensure that the externalTrafficPolicy of the kube-apiserver service is Local, and that the healthCheckNodePort is preserved.
if new.Spec.ExternalTrafficPolicy != corev1.ServiceExternalTrafficPolicyType("Local") {
e.logger.Info("kube-apiserver service externalTrafficPolicy of", "shoot", cluster.ObjectMeta.Name, "now", new.Spec.ExternalTrafficPolicy, "changing to", corev1.ServiceExternalTrafficPolicyType("Local"))
new.Spec.ExternalTrafficPolicy = corev1.ServiceExternalTrafficPolicyType("Local")
}
if new.Spec.HealthCheckNodePort == 0 {
if old != nil {
e.logger.Info("kube-apiserver service healthCheckNodePort of", "shoot", cluster.ObjectMeta.Name, "now", new.Spec.HealthCheckNodePort, "changing to", old.Spec.HealthCheckNodePort)
new.Spec.HealthCheckNodePort = old.Spec.HealthCheckNodePort
} else {
e.logger.Info("new kube-apiserver service healthCheckNodePort is 0, can not set it because there is no old kube-apiserver service (nil). Hope that's okay.")
}
}

return nil
}

Expand Down