-
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
Cherry-pick #20627 to 7.x: Ensure kind cluster has RFC1123 compliant name #20893
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 (cherry picked from commit 345e045)
Pinging @elastic/integrations-platforms (Team:Platforms) |
💔 Tests FailedExpand to view the summary
Build stats
Test stats 🧪
Test errorsExpand to view the tests failures
Steps errorsExpand to view the steps failures
Log outputExpand to view the last 100 lines of log output
|
CI failures are un-related to this backport. |
Cherry-pick of PR #20627 to 7.x branch. Original message:
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).