Skip to content

Conversation

@zhming0
Copy link
Contributor

@zhming0 zhming0 commented Jul 17, 2025

Description

Allow kubernetes-bootstrap's connection step timeout to be configurable via a --kubernetes-bootstrap-connection-timeout integer flag.

This is helpful in network unstable environment.

Context

part of PS-906

Testing

  • Tests have run locally (with go test ./...). Buildkite employees may check this if the pipeline has run automatically.
  • Code is formatted (with go fmt ./...)

Comment on lines 118 to 125
KubernetesBootstrapConnectionTimeoutFlag = cli.IntFlag{
Name: "kubernetes-bootstrap-connection-timeout",
Usage: "This is intended to be used only by the Buildkite k8s stack " +
"(github.com/buildkite/agent-stack-k8s); it set the max time a container will wait " +
"to connect Agent.",
EnvVar: "BUILDKITE_KUBERNETES_BOOTSTRAP_CONNECTION_TIMEOUT",
}

Copy link
Contributor

Choose a reason for hiding this comment

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

We've generally not put command-specific flags in global.go. KubernetesContainerIDFlag is currently shared with bootstrap.go and kubernetes_bootstrap.go which is why it's here.

(At some point we should remove the legacy kubernetes-exec support from within bootstrap.go.)

}

KubernetesBootstrapConnectionTimeoutFlag = cli.IntFlag{
Name: "kubernetes-bootstrap-connection-timeout",
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this in seconds?

Should this be a cli.DurationFlag?

@duckalini
Copy link
Contributor

CI is failing because the updated pipeline.yml from main is missing - merge in main and CI should pass again.

@zhming0 zhming0 merged commit c974f84 into main Jul 21, 2025
1 check passed
@zhming0 zhming0 deleted the ming/ps-906 branch July 21, 2025 06:16
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.

4 participants