-
Notifications
You must be signed in to change notification settings - Fork 729
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
Make ECK IPv6 compatible #3654
Merged
Merged
Make ECK IPv6 compatible #3654
Changes from 15 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
1875fe8
Support IPv6 in discovery configuration
pebrc 8679497
Allow IPv6 in CSR (no tests)
pebrc fcdb4b9
experimental bracketing
pebrc ad05b50
experimental DNS based network.publish_host
pebrc 7f79e5d
experimental addition of pods DNS name to certs DNSNames
pebrc e71bea3
fix unit tests
pebrc d55c409
remove IPv4 form from validations
pebrc bbb183d
Autodetect IP family and use for Kibana and Enterprise Search
pebrc b161280
update readiness probes to use correct loopback address
pebrc ecc9ed6
fix missing fieldRef in manifest-generator
pebrc cb550f5
turn globbing off in readiness script to allow for unescaped brackets
pebrc 8a9b1e8
turn globbing off in readiness script to allow for unescaped brackets
pebrc 6861f42
test fixes and test additions
pebrc 283aa79
test IPv6 path in Kibana config
pebrc 59c217f
Move discovery to DNS names
pebrc e59e3aa
workaround Enteprise Search IPv6 issue
pebrc d481ca5
Revert "Move discovery to DNS names"
pebrc c169ac4
Add ip-family flag
pebrc eb3d488
Reorg imports
pebrc 19af6d6
Merge remote-tracking branch 'upstream/master' into ipv6
pebrc 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 |
---|---|---|
|
@@ -27,20 +27,14 @@ var ( | |
f = false | ||
) | ||
|
||
// HeadlessServiceName returns the name of the headless service for the given StatefulSet. | ||
func HeadlessServiceName(ssetName string) string { | ||
// just use the sset name | ||
return ssetName | ||
} | ||
|
||
// HeadlessService returns a headless service for the given StatefulSet | ||
func HeadlessService(es *esv1.Elasticsearch, ssetName string) corev1.Service { | ||
nsn := k8s.ExtractNamespacedName(es) | ||
|
||
return corev1.Service{ | ||
ObjectMeta: metav1.ObjectMeta{ | ||
Namespace: nsn.Namespace, | ||
Name: HeadlessServiceName(ssetName), | ||
Name: sset.HeadlessServiceName(ssetName), | ||
Labels: label.NewStatefulSetLabels(nsn, ssetName), | ||
}, | ||
Spec: corev1.ServiceSpec{ | ||
|
@@ -54,6 +48,8 @@ func HeadlessService(es *esv1.Elasticsearch, ssetName string) corev1.Service { | |
Port: network.HTTPPort, | ||
}, | ||
}, | ||
// allow nodes to discover themselves via DNS while they are booting up ie. are not ready yet | ||
PublishNotReadyAddresses: true, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we will want to flag this in the release notes since it could cause issues if people were relying on the old behavior |
||
}, | ||
} | ||
} | ||
|
@@ -113,7 +109,7 @@ func BuildStatefulSet( | |
// use default revision history limit | ||
RevisionHistoryLimit: nil, | ||
// build a headless service per StatefulSet, matching the StatefulSet labels | ||
ServiceName: HeadlessServiceName(statefulSetName), | ||
ServiceName: sset.HeadlessServiceName(statefulSetName), | ||
Selector: &metav1.LabelSelector{ | ||
MatchLabels: ssetSelector, | ||
}, | ||
|
This file contains 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 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 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 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 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
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'm wondering if we should include that as an operator config setting, that defaults to autodetect if empty.
eg.
--ip-family=ipv4|ipv6|""
So users can override it if for some reasons the IP family of the operator is not the ip family they want to use for the managed workload.
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 thought this would be a future addition. But I think you are right it would be good to have an escape hatch right from the start. Will add it.