Skip to content
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 52 additions & 35 deletions .github/workflows/gha-e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ jobs:
default-setup:
runs-on: ubuntu-latest
timeout-minutes: 20
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id
if: github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.id == github.repository_id
steps:
- uses: actions/checkout@v6
with:
Expand All @@ -52,7 +53,8 @@ jobs:
default-setup-v2:
runs-on: ubuntu-latest
timeout-minutes: 20
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id
if: github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.id == github.repository_id
steps:
- uses: actions/checkout@v6
with:
Expand All @@ -74,7 +76,8 @@ jobs:
single-namespace-setup:
runs-on: ubuntu-latest
timeout-minutes: 20
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id
if: github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.id == github.repository_id
steps:
- uses: actions/checkout@v6
with:
Expand All @@ -96,7 +99,8 @@ jobs:
single-namespace-setup-v2:
runs-on: ubuntu-latest
timeout-minutes: 20
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id
if: github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.id == github.repository_id
steps:
- uses: actions/checkout@v6
with:
Expand All @@ -118,7 +122,8 @@ jobs:
dind-mode-setup:
runs-on: ubuntu-latest
timeout-minutes: 20
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id
if: github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.id == github.repository_id
steps:
- uses: actions/checkout@v6
with:
Expand All @@ -132,15 +137,16 @@ jobs:
application_private_key: ${{ secrets.E2E_TESTS_ACCESS_PK }}
organization: ${{ env.TARGET_ORG }}
- name: Run dind mode setup test
run: hack/e2e-test.sh dind-mode-setup-v2
run: hack/e2e-test.sh dind-mode-setup
env:
GITHUB_TOKEN: "${{steps.config-token.outputs.token}}"
shell: bash

dind-mode-setup-v2:
runs-on: ubuntu-latest
timeout-minutes: 20
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id
if: github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.id == github.repository_id
steps:
- uses: actions/checkout@v6
with:
Expand All @@ -154,15 +160,16 @@ jobs:
application_private_key: ${{ secrets.E2E_TESTS_ACCESS_PK }}
organization: ${{ env.TARGET_ORG }}
- name: Run dind mode setup test
run: hack/e2e-test.sh dind-mode-setup
run: hack/e2e-test.sh dind-mode-setup-v2
env:
GITHUB_TOKEN: "${{steps.config-token.outputs.token}}"
shell: bash

kubernetes-mode-setup:
runs-on: ubuntu-latest
timeout-minutes: 20
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id
if: github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.id == github.repository_id
steps:
- uses: actions/checkout@v6
with:
Expand All @@ -176,15 +183,16 @@ jobs:
application_private_key: ${{ secrets.E2E_TESTS_ACCESS_PK }}
organization: ${{ env.TARGET_ORG }}
- name: Run kubernetes mode setup test
run: hack/e2e-test.sh kubernetes-mode-setup-v2
run: hack/e2e-test.sh kubernetes-mode-setup
env:
GITHUB_TOKEN: "${{steps.config-token.outputs.token}}"
shell: bash

kubernetes-mode-setup-v2:
runs-on: ubuntu-latest
timeout-minutes: 20
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id
if: github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.id == github.repository_id
steps:
- uses: actions/checkout@v6
with:
Expand All @@ -198,15 +206,16 @@ jobs:
application_private_key: ${{ secrets.E2E_TESTS_ACCESS_PK }}
organization: ${{ env.TARGET_ORG }}
- name: Run kubernetes mode setup test
run: hack/e2e-test.sh kubernetes-mode-setup
run: hack/e2e-test.sh kubernetes-mode-setup-v2
env:
GITHUB_TOKEN: "${{steps.config-token.outputs.token}}"
shell: bash

auth-proxy-setup:
runs-on: ubuntu-latest
timeout-minutes: 20
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id
if: github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.id == github.repository_id
steps:
- uses: actions/checkout@v6
with:
Expand All @@ -220,15 +229,16 @@ jobs:
application_private_key: ${{ secrets.E2E_TESTS_ACCESS_PK }}
organization: ${{ env.TARGET_ORG }}
- name: Run single namespace setup test
run: hack/e2e-test.sh single-namespace-setup-v2
run: hack/e2e-test.sh single-namespace-setup
env:
GITHUB_TOKEN: "${{steps.config-token.outputs.token}}"
shell: bash

auth-proxy-setup-v2:
runs-on: ubuntu-latest
timeout-minutes: 20
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id
if: github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.id == github.repository_id
steps:
- uses: actions/checkout@v6
with:
Expand All @@ -242,15 +252,16 @@ jobs:
application_private_key: ${{ secrets.E2E_TESTS_ACCESS_PK }}
organization: ${{ env.TARGET_ORG }}
- name: Run single namespace setup test
run: hack/e2e-test.sh single-namespace-setup
run: hack/e2e-test.sh single-namespace-setup-v2
env:
GITHUB_TOKEN: "${{steps.config-token.outputs.token}}"
shell: bash

anonymous-proxy-setup:
runs-on: ubuntu-latest
timeout-minutes: 20
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id
if: github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.id == github.repository_id
steps:
- uses: actions/checkout@v6
with:
Expand All @@ -264,15 +275,16 @@ jobs:
application_private_key: ${{ secrets.E2E_TESTS_ACCESS_PK }}
organization: ${{ env.TARGET_ORG }}
- name: Run anonymous proxy setup test
run: hack/e2e-test.sh anonymous-proxy-setup-v2
run: hack/e2e-test.sh anonymous-proxy-setup
env:
GITHUB_TOKEN: "${{steps.config-token.outputs.token}}"
shell: bash

anonymous-proxy-setup-v2:
runs-on: ubuntu-latest
timeout-minutes: 20
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id
if: github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.id == github.repository_id
steps:
- uses: actions/checkout@v6
with:
Expand All @@ -286,15 +298,16 @@ jobs:
application_private_key: ${{ secrets.E2E_TESTS_ACCESS_PK }}
organization: ${{ env.TARGET_ORG }}
- name: Run anonymous proxy setup test
run: hack/e2e-test.sh anonymous-proxy-setup
run: hack/e2e-test.sh anonymous-proxy-setup-v2
env:
GITHUB_TOKEN: "${{steps.config-token.outputs.token}}"
shell: bash

self-signed-ca-setup:
runs-on: ubuntu-latest
timeout-minutes: 20
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id
if: github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.id == github.repository_id
steps:
- uses: actions/checkout@v6
with:
Expand All @@ -308,15 +321,16 @@ jobs:
application_private_key: ${{ secrets.E2E_TESTS_ACCESS_PK }}
organization: ${{ env.TARGET_ORG }}
- name: Run self signed CA setup test
run: hack/e2e-test.sh self-signed-ca-setup-v2
run: hack/e2e-test.sh self-signed-ca-setup
env:
GITHUB_TOKEN: "${{steps.config-token.outputs.token}}"
shell: bash

self-signed-ca-setup-v2:
runs-on: ubuntu-latest
timeout-minutes: 20
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id
if: github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.id == github.repository_id
steps:
- uses: actions/checkout@v6
with:
Expand All @@ -330,15 +344,16 @@ jobs:
application_private_key: ${{ secrets.E2E_TESTS_ACCESS_PK }}
organization: ${{ env.TARGET_ORG }}
- name: Run self signed CA setup test
run: hack/e2e-test.sh self-signed-ca-setup
run: hack/e2e-test.sh self-signed-ca-setup-v2
env:
GITHUB_TOKEN: "${{steps.config-token.outputs.token}}"
shell: bash

update-strategy-tests:
update-gha-runner-scale-set-tests:
runs-on: ubuntu-latest
timeout-minutes: 20
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id
if: github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.id == github.repository_id
steps:
- uses: actions/checkout@v6
with:
Expand All @@ -352,15 +367,16 @@ jobs:
application_private_key: ${{ secrets.E2E_TESTS_ACCESS_PK }}
organization: ${{ env.TARGET_ORG }}
- name: Run update strategy test
run: hack/e2e-test.sh update-strategy-v2
run: hack/e2e-test.sh update-gha-runner-scale-set
env:
GITHUB_TOKEN: "${{steps.config-token.outputs.token}}"
shell: bash

update-strategy-tests-v2:
update-gha-runner-scale-set-tests-v2:
runs-on: ubuntu-latest
timeout-minutes: 20
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id
if: github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.id == github.repository_id
steps:
- uses: actions/checkout@v6
with:
Expand All @@ -374,15 +390,16 @@ jobs:
application_private_key: ${{ secrets.E2E_TESTS_ACCESS_PK }}
organization: ${{ env.TARGET_ORG }}
- name: Run update strategy test
run: hack/e2e-test.sh update-strategy
run: hack/e2e-test.sh update-gha-runner-scale-set-v2
env:
GITHUB_TOKEN: "${{steps.config-token.outputs.token}}"
shell: bash

init-with-min-runners:
runs-on: ubuntu-latest
timeout-minutes: 20
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id
if: github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.id == github.repository_id
steps:
- uses: actions/checkout@v6
with:
Expand All @@ -396,15 +413,16 @@ jobs:
application_private_key: ${{ secrets.E2E_TESTS_ACCESS_PK }}
organization: ${{ env.TARGET_ORG }}
- name: Run init with min runners test
run: hack/e2e-test.sh init-with-min-runners-v2
run: hack/e2e-test.sh init-with-min-runners
env:
GITHUB_TOKEN: "${{steps.config-token.outputs.token}}"
shell: bash

init-with-min-runners-v2:
runs-on: ubuntu-latest
timeout-minutes: 20
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id
if: github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.id == github.repository_id
steps:
- uses: actions/checkout@v6
with:
Expand All @@ -418,8 +436,7 @@ jobs:
application_private_key: ${{ secrets.E2E_TESTS_ACCESS_PK }}
organization: ${{ env.TARGET_ORG }}
- name: Run init with min runners test
run: hack/e2e-test.sh init-with-min-runners
run: hack/e2e-test.sh init-with-min-runners-v2
env:
GITHUB_TOKEN: "${{steps.config-token.outputs.token}}"
shell: bash

Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,21 @@ limitations under the License.
package v1alpha1

import (
"github.com/actions/actions-runner-controller/hash"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// AutoscalingListenerSpec defines the desired state of AutoscalingListener
type AutoscalingListenerSpec struct {
// Required
GitHubConfigUrl string `json:"githubConfigUrl,omitempty"`
GitHubConfigURL string `json:"githubConfigUrl,omitempty"`

// Required
GitHubConfigSecret string `json:"githubConfigSecret,omitempty"`

// Required
RunnerScaleSetId int `json:"runnerScaleSetId,omitempty"`
RunnerScaleSetID int `json:"runnerScaleSetId,omitempty"`

// Required
AutoscalingRunnerSetNamespace string `json:"autoscalingRunnerSetNamespace,omitempty"`
Expand Down Expand Up @@ -83,6 +84,10 @@ type AutoscalingListenerSpec struct {
RoleBindingMetadata *ResourceMeta `json:"roleBindingMetadata,omitempty"`
}

func (s *AutoscalingListenerSpec) Hash() string {
return hash.ComputeTemplateHash(s)
}

// AutoscalingListenerStatus defines the observed state of AutoscalingListener
type AutoscalingListenerStatus struct{}

Expand Down
9 changes: 7 additions & 2 deletions apis/actions.github.com/v1alpha1/ephemeralrunner_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ limitations under the License.
package v1alpha1

import (
"github.com/actions/actions-runner-controller/hash"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
Expand Down Expand Up @@ -77,7 +78,7 @@ func (er *EphemeralRunner) GitHubConfigSecret() string {
}

func (er *EphemeralRunner) GitHubConfigUrl() string {
return er.Spec.GitHubConfigUrl
return er.Spec.GitHubConfigURL
}

func (er *EphemeralRunner) GitHubProxy() *ProxyConfig {
Expand All @@ -102,7 +103,7 @@ func (er *EphemeralRunner) VaultProxy() *ProxyConfig {
// EphemeralRunnerSpec defines the desired state of EphemeralRunner
type EphemeralRunnerSpec struct {
// +required
GitHubConfigUrl string `json:"githubConfigUrl,omitempty"`
GitHubConfigURL string `json:"githubConfigUrl,omitempty"`

// +required
GitHubConfigSecret string `json:"githubConfigSecret,omitempty"`
Expand All @@ -128,6 +129,10 @@ type EphemeralRunnerSpec struct {
corev1.PodTemplateSpec `json:",inline"`
}

func (s *EphemeralRunnerSpec) Hash() string {
return hash.ComputeTemplateHash(s)
}

// EphemeralRunnerStatus defines the observed state of EphemeralRunner
type EphemeralRunnerStatus struct {
// Turns true only if the runner is online.
Expand Down
Loading
Loading