Kong / Kong/kubernetes-testing-framework

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

Open
#534 0 comments 1 reaction 0 assignees View on GitHub
area/feature
Dominant language
Go
Stars
44
Forks
11
PR merge metrics
No merged PRs in 30d

Description

### Is there an existing issue for this?

- [X] 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

https://github.com/Kong/kubernetes-testing-framework/blob/4a62d991875f24677537615c811543cbbf052d2a/pkg/clusters/types/gke/builder.go#L129-L132

### 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.

Contributor guide

Open the contributing guide

Research direction

Start with pkg/clusters/types/gke/builder.go around lines 129-132, where the existing ktf_created_by label is applied. Trace how ktf is launched in GitHub Actions versus locally and identify the GKE cluster and node creation paths. Done means GitHub Actions-created GKE clusters expose predefined labels containing repository, pull request, and branch metadata.

Written by the indexing model from the issue text.

Assessment

Tech stack
gcp, github-actions, go, kubernetes
Domain
cloud, devops, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.