-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Ensure kind cluster has RFC1123 compliant name #20627
Conversation
When creating a kind cluster, we must use a cluster name that is a valid Kubernetes resource name, and by extension, a valid DNS name. If not, kind cluster provisioning can fail when kind tries to create resources with invalid names. For example, if trying to create a cluster called "a_b" (underscores are not permitted), control-plane provisioning will fail with: host 'a_b-control-plane' must be [...] a valid RFC-1123 DNS subdomain
Pinging @elastic/integrations-platforms (Team:Platforms) |
I originally requested @blakerouse for review, but it looks like Blake is taking a quick break. Would you mind taking a look, @ChrsMark? Thanks. Note: The Travis test failure is for the test |
Looks like @ChrsMark is now on vacation, but @blakerouse is back! :D |
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.
Change looks good to me, thanks for the fix!
Thanks! I'm not sure about your team's merge/backport procedure. Could you help? Cheers. |
What are the next steps for getting this merged? Thanks. |
When creating a kind cluster, we must use a cluster name that is a valid Kubernetes resource name, and by extension, a valid DNS name. If not, kind cluster provisioning can fail when kind tries to create resources with invalid names. For example, if trying to create a cluster called "a_b" (underscores are not permitted), control-plane provisioning will fail with: host 'a_b-control-plane' must be [...] a valid RFC-1123 DNS subdomain (cherry picked from commit 345e045)
@Jarpy Sorry, forgot about merging this. Merged it and created the backport PR for 7.x. |
No worries. Many thanks! |
…ne-2.0 * upstream/master: (87 commits) [packaging] Normalise GCP bucket folder structure (elastic#20903) [Metricbeat] Add billing metricset into googlecloud module (elastic#20812) Include python docs in devguide index (elastic#20917) Avoid generating incomplete configurations in autodiscover (elastic#20898) Improve docs of leaderelection configuration (elastic#20601) Document how to set the ES host and Kibana URLs in Ingest Manager (elastic#20874) docs: Update beats for APM (elastic#20881) Adding cborbeat to community beats (elastic#20884) Bump kibana version to 7.9.0 in x-pack/metricbeat (elastic#20899) Kubernetes state_daemonset metricset for Metricbeat (elastic#20649) [Filebeat][zeek] Add new x509 fields to zeek (elastic#20867) [Filebeat][Gsuite] Add note about admin in gsuite docs (elastic#20855) Ensure kind cluster has RFC1123 compliant name (elastic#20627) Setup python paths in test runner configuration (elastic#20832) docs: Add `processor.event` info to Logstash output (elastic#20721) docs: update cipher suites (elastic#20697) [ECS] Update ecs to 1.6.0 (elastic#20792) Fix path in hits docs (elastic#20447) Update filebeat azure module documentation (elastic#20815) Remove duplicate ListGroupsForUsers in aws/cloudtrail (elastic#20788) ...
When creating a kind cluster, we must use a cluster name that is a valid Kubernetes resource name, and by extension, a valid DNS name. If not, kind cluster provisioning can fail when kind tries to create resources with invalid names. For example, if trying to create a cluster called "a_b" (underscores are not permitted), control-plane provisioning will fail with: host 'a_b-control-plane' must be [...] a valid RFC-1123 DNS subdomain (cherry picked from commit 345e045) Co-authored-by: Toby McLaughlin <[email protected]>
When creating a kind cluster, we must use a cluster name that is a valid Kubernetes resource name, and by extension, a valid DNS name. If not, kind cluster provisioning can fail when kind tries to create resources with invalid names. For example, if trying to create a cluster called "a_b" (underscores are not permitted), control-plane provisioning will fail with: host 'a_b-control-plane' must be [...] a valid RFC-1123 DNS subdomain
What does this PR do?
This patch:
-
where it previously produced_
kubernetesPodName
tokubernetesClusterName
, reflecting its purposeWhy is it important?
When creating a kind cluster, we must use a cluster name that is a valid Kubernetes resource name, and by extension, a valid DNS name. If not, kind cluster provisioning can fail when kind tries to create resources with invalid names.
For example, if trying to create a cluster called "a_b" (underscores are not permitted), control-plane provisioning will fail with:
With this patch, the
kubernetes
Metricbeat module integration tests are able to run to completion on my system. Without it,kind
fails in this manner:Checklist
I have made corresponding changes to the documentationI have made corresponding change to the default configuration filesI have added tests that prove my fix is effective or that my feature worksI have added an entry inCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
Run the integ tests for the
kubernetes
Metricbeat module with Mage in verbose mode.kind
will be seen to run correctly. Without the patchkind
will fail to provision the control-plane.With Mage not in verbose mode, the
kubernetes
integ test is not run, and no output is seen (because it dies at setup time).