Skip to content

Detect environment in which ktf is launched and add dynamic labels/annotations to created clusters/nodes #534

Open
@pmalek

Description

Is there an existing issue for this?

  • I have searched the existing issues

Problem Statement

When running in Github Actions or locally it would be beneficial to dynamically add labels/annotations to created clusters for easier reasoning what was created where.

For example: when running in Github Actions environments let's add some metadata about repo, PR number, branch etc to cluster labels as we already do it with ktf_created_by label

ResourceLabels: lo.Assign(
map[string]string{GKECreateLabel: createdByID},
b.labels,
),

Proposed Solution

No response

Additional information

No response

Acceptance Criteria

  • When ktf creates a GKE cluster on Github Actions CI I can easily find it by labels in GKE dashboard using some predefined labels that will contain metadata about the repo it was run in, PR number and branch name.

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions