Skip to content
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

Configurable job/pod name #166

Open
calvinbui opened this issue May 2, 2023 · 3 comments
Open

Configurable job/pod name #166

calvinbui opened this issue May 2, 2023 · 3 comments

Comments

@calvinbui
Copy link

All job and pod names are configured to be buildkite-%s

return fmt.Sprintf("buildkite-%s", uuid)
)

return fmt.Sprintf("buildkite-%s", job.Uuid)

We have multiple environments, so it'll be easier to identify where jobs are run if this value was configurable.

image

@triarius
Copy link
Contributor

triarius commented May 8, 2023

Hi @calvinbui, thanks for using agent-stack-k8s! This is certainly something we could implement, but there are a few choices for what to put there.

Some that I can think of are:

  • The helm release name (agent-stack-k8s in the examples we give)
  • The k8s namespace (buildkite in the examples we give)
  • Some new config value in the agent-stack-k8s config, exposed in the helm chart (not as big a fan of this, by I could be convinced)
  • the step label or key normalised in some way
  • the hostname of the node that the pod ran on

It also should be noted that knowing where the jobs are run is a few clicks away in the job's timeline tab. There you can find a link to the agent, who's tags will make it clear it was run on Kubernetes (and some of the option for the choice above). But I completely agree that having it in the place in your screenshot is a lot more user-friendly.

Let me know what you think.

@calvinbui
Copy link
Author

Hi @calvinbui, thanks for using agent-stack-k8s! This is certainly something we could implement, but there are a few choices for what to put there.

Some that I can think of are:

  • The helm release name (agent-stack-k8s in the examples we give)
  • The k8s namespace (buildkite in the examples we give)
  • Some new config value in the agent-stack-k8s config, exposed in the helm chart (not as big a fan of this, by I could be convinced)
  • the step label or key normalised in some way
  • the hostname of the node that the pod ran on

It also should be noted that knowing where the jobs are run is a few clicks away in the job's timeline tab. There you can find a link to the agent, who's tags will make it clear it was run on Kubernetes (and some of the option for the choice above). But I completely agree that having it in the place in your screenshot is a lot more user-friendly.

Let me know what you think.

the easiest is probably respecting the BUILDKITE_AGENT_NAME env var. I've tried adding that onto the podSpec but wasn't being used.

@agates4
Copy link

agates4 commented Sep 12, 2023

Looks like these two lines of code need to be updated with the actual agent name:

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

No branches or pull requests

3 participants