Rename Id and Url fields to ID and URL per convention

This commit is contained in:
Nikola Jokic
2026-01-15 19:16:07 +01:00
parent 0bb603edc8
commit ffcaa06b6a
26 changed files with 193 additions and 155 deletions

View File

@@ -16323,6 +16323,8 @@ spec:
It is used to identify which vault integration should be used to resolve secrets.
type: string
type: object
required:
- template
type: object
status:
description: AutoscalingRunnerSetStatus defines the observed state of AutoscalingRunnerSet
@@ -16338,6 +16340,10 @@ spec:
state:
type: string
type: object
required:
- metadata
- spec
- status
type: object
served: true
storage: true

View File

@@ -8271,6 +8271,10 @@ spec:
format: int64
type: integer
type: object
required:
- metadata
- spec
- status
type: object
served: true
storage: true

View File

@@ -8223,6 +8223,7 @@ spec:
description: Replicas is the number of desired EphemeralRunner resources in the k8s namespace.
type: integer
required:
- ephemeralRunnerSpec
- patchID
type: object
status:
@@ -8240,6 +8241,10 @@ spec:
required:
- currentReplicas
type: object
required:
- metadata
- spec
- status
type: object
served: true
storage: true

View File

@@ -5,6 +5,14 @@ metadata:
namespace: {{ include "autoscaling-runner-set.namespace" . | quote }}
labels:
{{- include "autoscaling-runner-set.labels" . | nindent 4 }}
annotations:
{{- $globalAnnotations := (default (dict) .Values.resource.all.metadata.annotations) }}
{{- $resourceAnnotations := (default (dict) .Values.resource.autoscalingRunnerSet.metadata.annotations) }}
{{- $annotations := mergeOverwrite $globalAnnotations $resourceAnnotations }}
{{- range $k, $v := $annotations }}
{{ $k }}: {{ $v | quote }}
{{- end }}
actions.github.com/values-hash: {{ toJson .Values | sha256sum | trunc 63 }}
spec:
githubConfigUrl: {{ required ".Values.auth.url is required" (trimSuffix "/" .Values.auth.url) | quote }}

View File

@@ -403,7 +403,7 @@ func TestTemplateRenderedAutoScalingRunnerSet(t *testing.T) {
assert.Equal(t, "autoscaling-runner-set", ars.Labels["app.kubernetes.io/component"])
assert.NotEmpty(t, ars.Labels["app.kubernetes.io/version"])
assert.Equal(t, "https://github.com/actions", ars.Spec.GitHubConfigUrl)
assert.Equal(t, "https://github.com/actions", ars.Spec.GitHubConfigURL)
assert.Equal(t, "test-runners-gha-rs-github-secret", ars.Spec.GitHubConfigSecret)
assert.Empty(t, ars.Spec.RunnerGroup, "RunnerGroup should be empty")
@@ -456,7 +456,7 @@ func TestTemplateRenderedAutoScalingRunnerSet_RunnerScaleSetName(t *testing.T) {
assert.Equal(t, nameOverride, ars.Labels["actions.github.com/scale-set-name"])
assert.Equal(t, namespaceName, ars.Labels["actions.github.com/scale-set-namespace"])
assert.Equal(t, "gha-rs", ars.Labels["app.kubernetes.io/part-of"])
assert.Equal(t, "https://github.com/actions", ars.Spec.GitHubConfigUrl)
assert.Equal(t, "https://github.com/actions", ars.Spec.GitHubConfigURL)
assert.Equal(t, nameOverride+"-gha-rs-github-secret", ars.Spec.GitHubConfigSecret)
assert.Equal(t, "test-runner-scale-set-name", ars.Spec.RunnerScaleSetName)
@@ -913,7 +913,7 @@ func TestTemplateRenderedAutoScalingRunnerSet_EnableDinD(t *testing.T) {
assert.Equal(t, "test-runners", ars.Labels["app.kubernetes.io/name"])
assert.Equal(t, "test-runners", ars.Labels["app.kubernetes.io/instance"])
assert.Equal(t, "https://github.com/actions", ars.Spec.GitHubConfigUrl)
assert.Equal(t, "https://github.com/actions", ars.Spec.GitHubConfigURL)
assert.Equal(t, "test-runners-gha-rs-github-secret", ars.Spec.GitHubConfigSecret)
assert.Empty(t, ars.Spec.RunnerGroup, "RunnerGroup should be empty")
@@ -1000,7 +1000,7 @@ func TestTemplateRenderedAutoScalingRunnerSet_EnableKubernetesMode(t *testing.T)
assert.Equal(t, "test-runners", ars.Labels["app.kubernetes.io/name"])
assert.Equal(t, "test-runners", ars.Labels["app.kubernetes.io/instance"])
assert.Equal(t, "https://github.com/actions", ars.Spec.GitHubConfigUrl)
assert.Equal(t, "https://github.com/actions", ars.Spec.GitHubConfigURL)
assert.Equal(t, "test-runners-gha-rs-github-secret", ars.Spec.GitHubConfigSecret)
assert.Empty(t, ars.Spec.RunnerGroup, "RunnerGroup should be empty")
@@ -1058,7 +1058,7 @@ func TestTemplateRenderedAutoScalingRunnerSet_EnableKubernetesModeNoVolume(t *te
assert.Equal(t, "test-runners", ars.Labels["app.kubernetes.io/name"])
assert.Equal(t, "test-runners", ars.Labels["app.kubernetes.io/instance"])
assert.Equal(t, "https://github.com/actions", ars.Spec.GitHubConfigUrl)
assert.Equal(t, "https://github.com/actions", ars.Spec.GitHubConfigURL)
assert.Equal(t, "test-runners-gha-rs-github-secret", ars.Spec.GitHubConfigSecret)
assert.Empty(t, ars.Spec.RunnerGroup, "RunnerGroup should be empty")
@@ -1160,7 +1160,7 @@ func TestTemplateRenderedAutoScalingRunnerSet_UsePredefinedSecret(t *testing.T)
assert.Equal(t, "test-runners", ars.Labels["app.kubernetes.io/name"])
assert.Equal(t, "test-runners", ars.Labels["app.kubernetes.io/instance"])
assert.Equal(t, "https://github.com/actions", ars.Spec.GitHubConfigUrl)
assert.Equal(t, "https://github.com/actions", ars.Spec.GitHubConfigURL)
assert.Equal(t, "pre-defined-secrets", ars.Spec.GitHubConfigSecret)
}
@@ -1224,11 +1224,11 @@ func TestTemplateRenderedWithProxy(t *testing.T) {
require.NotNil(t, ars.Spec.Proxy)
require.NotNil(t, ars.Spec.Proxy.HTTP)
assert.Equal(t, "http://proxy.example.com", ars.Spec.Proxy.HTTP.Url)
assert.Equal(t, "http://proxy.example.com", ars.Spec.Proxy.HTTP.URL)
assert.Equal(t, "http-secret", ars.Spec.Proxy.HTTP.CredentialSecretRef)
require.NotNil(t, ars.Spec.Proxy.HTTPS)
assert.Equal(t, "https://proxy.example.com", ars.Spec.Proxy.HTTPS.Url)
assert.Equal(t, "https://proxy.example.com", ars.Spec.Proxy.HTTPS.URL)
assert.Equal(t, "https-secret", ars.Spec.Proxy.HTTPS.CredentialSecretRef)
require.NotNil(t, ars.Spec.Proxy.NoProxy)
@@ -1803,7 +1803,7 @@ func TestTemplateRenderedGitHubConfigUrlEndsWIthSlash(t *testing.T) {
assert.Equal(t, namespaceName, ars.Namespace)
assert.Equal(t, "test-runners", ars.Name)
assert.Equal(t, "https://github.com/actions", ars.Spec.GitHubConfigUrl)
assert.Equal(t, "https://github.com/actions", ars.Spec.GitHubConfigURL)
}
func TestTemplate_CreateManagerRole(t *testing.T) {