Minor improvements for runner groups

- Add group in runners columns
- Add constant for runner group and labels
This commit is contained in:
Felipe Galindo Sanchez 2022-07-12 15:48:46 -07:00 committed by Yusuke Kuoka
parent df9592dc99
commit 584745b67d
4 changed files with 11 additions and 2 deletions

View File

@ -309,6 +309,7 @@ func (w *WorkVolumeClaimTemplate) V1VolumeMount(mountPath string) corev1.VolumeM
// +kubebuilder:printcolumn:JSONPath=".spec.enterprise",name=Enterprise,type=string
// +kubebuilder:printcolumn:JSONPath=".spec.organization",name=Organization,type=string
// +kubebuilder:printcolumn:JSONPath=".spec.repository",name=Repository,type=string
// +kubebuilder:printcolumn:JSONPath=".spec.group",name=Group,type=string
// +kubebuilder:printcolumn:JSONPath=".spec.labels",name=Labels,type=string
// +kubebuilder:printcolumn:JSONPath=".status.phase",name=Status,type=string
// +kubebuilder:printcolumn:JSONPath=".status.message",name=Message,type=string

View File

@ -24,6 +24,9 @@ spec:
- jsonPath: .spec.repository
name: Repository
type: string
- jsonPath: .spec.group
name: Group
type: string
- jsonPath: .spec.labels
name: Labels
type: string

View File

@ -24,6 +24,9 @@ spec:
- jsonPath: .spec.repository
name: Repository
type: string
- jsonPath: .spec.group
name: Group
type: string
- jsonPath: .spec.labels
name: Labels
type: string

View File

@ -52,6 +52,8 @@ const (
EnvVarOrg = "RUNNER_ORG"
EnvVarRepo = "RUNNER_REPO"
EnvVarGroup = "RUNNER_GROUP"
EnvVarLabels = "RUNNER_LABELS"
EnvVarEnterprise = "RUNNER_ENTERPRISE"
EnvVarEphemeral = "RUNNER_EPHEMERAL"
EnvVarTrue = "true"
@ -772,11 +774,11 @@ func newRunnerPodWithContainerMode(containerMode string, template corev1.Pod, ru
Value: runnerSpec.Enterprise,
},
{
Name: "RUNNER_LABELS",
Name: EnvVarLabels,
Value: strings.Join(runnerSpec.Labels, ","),
},
{
Name: "RUNNER_GROUP",
Name: EnvVarGroup,
Value: runnerSpec.Group,
},
{