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 |
blakerouse
left a comment
There was a problem hiding this comment.
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 <toby@jarpy.net>
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_kubernetesPodNametokubernetesClusterName, 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
kubernetesMetricbeat module integration tests are able to run to completion on my system. Without it,kindfails 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.asciidocorCHANGELOG-developer.next.asciidoc.How to test this PR locally
Run the integ tests for the
kubernetesMetricbeat module with Mage in verbose mode.kindwill be seen to run correctly. Without the patchkindwill fail to provision the control-plane.With Mage not in verbose mode, the
kubernetesinteg test is not run, and no output is seen (because it dies at setup time).