Avoid overwriting default IPFamily of services - #3084
Merged
charith-elastic merged 1 commit intoMay 15, 2020
Conversation
sebgl
approved these changes
May 15, 2020
Contributor
There was a problem hiding this comment.
LGTM
Just to make sure I get this right: with this PR we ensure that a K8s cluster with IPv6DualStack enabled does not lead to errors in our service reconciliation.
Which does not mean we correctly support ipv6 or dual stack, as this is something we did not test (yet). Am I right?
Contributor
Author
|
Yes, this just fixes the reconciliation bug reported in #3074. There's no guarantee that IPv6 would work OOTB with ECK as it is hard to test that easily with existing tools. |
charith-elastic
added a commit
to charith-elastic/cloud-on-k8s
that referenced
this pull request
May 18, 2020
charith-elastic
added a commit
that referenced
this pull request
May 18, 2020
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In dual-stack clusters, the
IPFamilyof the service is not empty. Our reconciliation function compares theSpecof the expected against reconciled and considers this to be a difference that requires an update. However, as theipFamilyis an immutable field, the update operation will always fail with the following error message:This PR does the following:
ipFamilyis not defined in the service spec, it will be defaulted to theipFamilyof the reconciled service. This prevents spurious updates that result in the above error.ipFamilyis explicitly specified by the user in the service spec and it differs from the current value, it will trigger a re-create operation to delete and create the service again.Testing this is difficult as currently there are no cloud providers with support for dual-stack clusters. Kind is yet to support it as well. However, as the behaviour is triggered by the mere presence of the dual-stack feature gate, it is possible to configure Minikube to trigger the bug as follows:
Fixes #3074