Skip to content

Commit d543d2c

Browse files
fix(kubectl): bypass wakeUp ping for active in-cluster devspace executions
1 parent a7864e5 commit d543d2c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/devspace/kubectl/client.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,13 @@ func wakeUpAndPing(ctx context.Context, client Client, log log.Logger) error {
364364
}
365365

366366
func wakeUp(ctx context.Context, client Client, log log.Logger) error {
367+
// If DevSpace is executing from natively inside the cluster environment (e.g. CI pipeline),
368+
// the target namespace is implicitly already awake. This correctly short-circuits the Kubernetes
369+
// ping against clusters lacking basic RBAC permissions (e.g. self-hosted runners using inCluster: false).
370+
if client.IsInCluster() {
371+
return nil
372+
}
373+
367374
// check if environment is sleeping
368375
var isSleeping bool
369376
isSleepingConfig := rest.CopyConfig(client.RestConfig())

0 commit comments

Comments
 (0)