Skip to content

fix(kubectl): bypass wakeUp ping for active in-cluster devspace executions (#3179)#3190

Open
Mallikarjunadevops wants to merge 3 commits intodevspace-sh:mainfrom
Mallikarjunadevops:fix/issue-3179-incluster-ping
Open

fix(kubectl): bypass wakeUp ping for active in-cluster devspace executions (#3179)#3190
Mallikarjunadevops wants to merge 3 commits intodevspace-sh:mainfrom
Mallikarjunadevops:fix/issue-3179-incluster-ping

Conversation

@Mallikarjunadevops
Copy link
Copy Markdown

Fixes #3179.

This Pull Request adds a native short-circuit to the kubectl.wakeUp verification block.

If a developer runs devspace build inside a self-hosted Kubernetes runner (e.g. GitHub Actions executing inside a Pod), DevSpace explicitly flags IsInCluster() as true via rest.InClusterConfig().

Since the native namespace is fundamentally alive and active (it is actively running the CI builder Pod), executing an intrusive API ping (kubectl get pods) to 'wake up' the cluster is logically unnecessary. More importantly, because GitHub Action runners are typically securely scoped without broad RBAC (inCluster: false), this ping routinely threw an unprotected Forbidden crash effectively locking them out of standard builds.

By short-circuiting the ping when IsInCluster() returns true, DevSpace now flawlessly builds CI Docker pipelines without aggressive RBAC demands.

Tested successfully via go test -v ./pkg/devspace/kubectl/... and go build ./... locally.

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 28, 2026

Deploy Preview for devspace-docs canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit 164455e
🔍 Latest deploy log https://app.netlify.com/projects/devspace-docs/deploys/69c7545e58ac790008da7302

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.

Not setting buildKit.inCluster does not prevent in-cluster detection

1 participant