Skip to content

fix: incorrect kubeconfig file path set in cloud config - #996

Merged
adrianriobo merged 1 commit into
redhat-developer:mainfrom
ryankwilliams:fix-aws-kind-cloud-init
Dec 2, 2026
Merged

adrianriobo merged 1 commit into
redhat-developer:mainfrom
ryankwilliams:fix-aws-kind-cloud-init

Conversation

@ryankwilliams

Copy link
Copy Markdown
Contributor

Summary

This PR fixes a bug where aws kind clusters are failing waiting for the control plane pods to be ready (exceeds the 5 minute timeout). The issue is the kubeconfig file path is empty. Resulting in kubectl commands unable to locate the cluster.

Brings the following:

  1. Fixes the kubeconfig file path
  2. Rewrite the cluster API endpoint to allow kubectl commands to verify certificate normally over needing to provide --insecure-skip-tls-verify for each command

Before this fix

[  103.802848] cloud-init[704]: Waiting for control-plane pods to reach Ready state...
[  405.935076] cloud-init[704]: ERROR: control-plane readiness timeout after 300s
[  405.938868] cloud-init[704]: 2026-12-01 16:48:19,539 - cc_scripts_user.py[WARNING]: Failed to run module scripts_user (scripts in /var/lib/cloud/instance/

After this fix

[   78.654792] cloud-init[757]: Waiting for control-plane pods to reach Ready state...
[   96.228901] cloud-init[757]: All control-plane pods are Ready (18s)
[   96.229058] cloud-init[757]: Waiting for kubelet lease...
[   96.262602] cloud-init[757]: Kubelet lease exists (18s)
[   96.262699] cloud-init[757]: Waiting for default ServiceAccount...
[   96.295350] cloud-init[757]: Default ServiceAccount exists (18s)
[   96.295437] cloud-init[757]: Verifying API server consistency...
[   96.392911] cloud-init[757]: Control-plane fully stable (18s)

This commit fixes a bug where aws kind clusters are failing waiting for
the control plane pods to be ready (exceeds the 5 minute timeout). The
issue is the kubeconfig file path is empty. Resulting in kubectl
commands unable to locate the cluster.

Updates the kubeconfig file path to the valid location where the
kubeconfig file was initially written too.

Signed-off-by: Ryan Williams <3375653+ryankwilliams@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Bug Fixes
    • Corrected Kubernetes API endpoint configuration to use the local loopback address.
    • Updated control-plane readiness checks to use the configured kubeconfig path.

Both cloud-config scripts rewrite the kubeconfig API endpoint from 0.0.0.0 to 127.0.0.1. Their control-plane checks now use /kubeconfig instead of /root/kubeconfig.

Changes: Kubeconfig endpoint and checks

Layer / File(s) Summary
Update kubeconfig and control-plane checks
pkg/provider/ibmcloud/action/kind/cloud-config, pkg/target/service/kind/cloud-config
Both scripts rewrite the API endpoint in /kubeconfig and set KUBECONFIG to /kubeconfig for control-plane checks.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: adrianriobo

Merge Risk: Minimal · up to ba6d2

This change fixes the kubeconfig path and endpoint used by the in-VM control-plane readiness checks. No concrete merge-blocking defect was established, so merge risk is low.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the cloud config now sets the correct kubeconfig file path. The raw summary confirms the path change from /root/kubeconfig to /kubeconfig in the kind cloud-config file…
Description check Passed The description states the bug (empty kubeconfig path causing control-plane readiness timeouts on AWS kind clusters). It lists the fix (corrected kubeconfig path and rewritten API endpoint to 127.0.0.…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the cloud config now sets the correct kubeconfig file path. The raw summary confirms the path change from /root/kubeconfig to /kubeconfig in the kind cloud-config files. The title is short, specific, and follows the fix: prefix convention.

Full details: Description check

Explanation

The description states the bug (empty kubeconfig path causing control-plane readiness timeouts on AWS kind clusters). It lists the fix (corrected kubeconfig path and rewritten API endpoint to 127.0.0.1) and gives before and after logs. This matches the raw summary's changes.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 64a06f34-8e6f-4803-a070-ed28f29b4d49
Commits

Reviewing files that changed from the base of the PR and between 5a70cbd and ba6d254.

Files selected for processing: 2

  • pkg/provider/ibmcloud/action/kind/cloud-config
  • pkg/target/service/kind/cloud-config

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@goneri

goneri commented Dec 1, 2026

Copy link
Copy Markdown

This resolves #997

Dannyb48 added a commit to Dannyb48/tekton-integration-catalog that referenced this pull request Dec 1, 2026
mapt v0.14.7 aborts every AWS Kind provisioning. The control-plane
readiness block added upstream reads /root/kubeconfig while the
provisioning script writes the kubeconfig to a relative path, so the
cloud-init runcmd script fails, mapt's `cloud-init status --long --wait`
guard exits 1 and provisioning aborts after the 300s readiness timeout.

Every E2E run that used the 0.14.7 image failed in provision-kind-cluster
at ~7m40s with `scripts_user: Runparts: 1 failures (runcmd)`; the same
task passes on 0.14.6.

Revert the bump from c05ae23 and put both halves of the AWS Kind
lifecycle on 0.14.6: provisioning was already there, teardown moves up
from its stale 0.14.5 pin, so the pair stays aligned without dropping
below the last known-good provisioning version. Teardown on 0.14.5
already destroyed 0.14.7-created stacks successfully in those failed E2E
runs, so 0.14.6 is safe for incident-window resources.

The IBM tags quoting fix from c05ae23 is unrelated and stays.

Upstream issue: redhat-developer/mapt#997
Pending fix:   redhat-developer/mapt#996

Re-bump provision and deprovision together once a release carrying the
fix is published.

Signed-off-by: Danny Baez <dbaez@redhat.com>
Dannyb48 added a commit to Dannyb48/tekton-integration-catalog that referenced this pull request Dec 1, 2026
mapt v0.14.7 aborts every AWS Kind provisioning. The control-plane
readiness block added upstream reads /root/kubeconfig while the
provisioning script writes the kubeconfig to a relative path, so the
cloud-init runcmd script fails, mapt's `cloud-init status --long --wait`
guard exits 1 and provisioning aborts after the 300s readiness timeout.

Every E2E run that used the 0.14.7 image failed in provision-kind-cluster
at ~7m40s with `scripts_user: Runparts: 1 failures (runcmd)`; the same
task passes on 0.14.6.

Revert the bump from c05ae23 and put both halves of the AWS Kind
lifecycle on 0.14.6: provisioning was already there, teardown moves up
from its stale 0.14.5 pin, so the pair stays aligned without dropping
below the last known-good provisioning version. Teardown on 0.14.5
already destroyed 0.14.7-created stacks successfully in those failed E2E
runs, so 0.14.6 is safe for incident-window resources.

The IBM tags quoting fix from c05ae23 is unrelated and stays.

Upstream issue: redhat-developer/mapt#997
Pending fix:   redhat-developer/mapt#996

Re-bump provision and deprovision together once a release carrying the
fix is published.

Signed-off-by: Danny Baez <dbaez@redhat.com>
@Dannyb48 Dannyb48 reopened this Dec 1, 2026

@adrianriobo adrianriobo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@adrianriobo
adrianriobo merged commit d6de37f into redhat-developer:main Dec 2, 2026
17 checks passed
kasemAlem pushed a commit to kasemAlem/tekton-integration-catalog that referenced this pull request Dec 2, 2026
mapt v0.14.7 aborts every AWS Kind provisioning. The control-plane
readiness block added upstream reads `/root/kubeconfig` while the
provisioning script writes the kubeconfig to a relative path, so the
cloud-init `runcmd` script fails, mapt's `cloud-init status --long
--wait` guard exits 1, and provisioning aborts after the 300s readiness
timeout.

Evidence: every E2E run that used the 0.14.7 image failed in
`provision-kind-cluster` at ~7m40s with `scripts_user: Runparts: 1
failures (runcmd)`; the same task passes on 0.14.6.

This reverts the image bump from konflux-ci#363 (`c05ae23`) and puts both halves
of the AWS Kind lifecycle on 0.14.6 — provisioning was already there,
teardown moves up from its stale 0.14.5 pin, so the pair stays aligned
without dropping below the last known-good provisioning version.
Teardown on 0.14.5 already destroyed 0.14.7-created stacks successfully
in those failed E2E runs, so 0.14.6 is safe for incident-window
resources.

The IBM `tags` quoting fix from that PR is unrelated and stays.

- Upstream issue: redhat-developer/mapt#997
- Pending upstream fix: redhat-developer/mapt#996

Re-bump provision and deprovision together once a release carrying the
fix is published.

Signed-off-by: Danny Baez <dbaez@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants