@@ -21,7 +21,7 @@ import (
21
21
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
22
22
"k8s.io/apimachinery/pkg/types"
23
23
24
- actionsv1alpha1 "github.com/actions/actions-runner-controller/apis/actions.github.com/v1alpha1"
24
+ "github.com/actions/actions-runner-controller/apis/actions.github.com/v1alpha1"
25
25
)
26
26
27
27
const (
@@ -34,9 +34,9 @@ var _ = Describe("Test AutoScalingListener controller", func() {
34
34
var ctx context.Context
35
35
var mgr ctrl.Manager
36
36
var autoscalingNS * corev1.Namespace
37
- var autoscalingRunnerSet * actionsv1alpha1 .AutoscalingRunnerSet
37
+ var autoscalingRunnerSet * v1alpha1 .AutoscalingRunnerSet
38
38
var configSecret * corev1.Secret
39
- var autoscalingListener * actionsv1alpha1 .AutoscalingListener
39
+ var autoscalingListener * v1alpha1 .AutoscalingListener
40
40
41
41
BeforeEach (func () {
42
42
ctx = context .Background ()
@@ -53,12 +53,12 @@ var _ = Describe("Test AutoScalingListener controller", func() {
53
53
54
54
min := 1
55
55
max := 10
56
- autoscalingRunnerSet = & actionsv1alpha1 .AutoscalingRunnerSet {
56
+ autoscalingRunnerSet = & v1alpha1 .AutoscalingRunnerSet {
57
57
ObjectMeta : metav1.ObjectMeta {
58
58
Name : "test-asrs" ,
59
59
Namespace : autoscalingNS .Name ,
60
60
},
61
- Spec : actionsv1alpha1 .AutoscalingRunnerSetSpec {
61
+ Spec : v1alpha1 .AutoscalingRunnerSetSpec {
62
62
GitHubConfigUrl : "https://github.com/owner/repo" ,
63
63
GitHubConfigSecret : configSecret .Name ,
64
64
MaxRunners : & max ,
@@ -79,12 +79,12 @@ var _ = Describe("Test AutoScalingListener controller", func() {
79
79
err = k8sClient .Create (ctx , autoscalingRunnerSet )
80
80
Expect (err ).NotTo (HaveOccurred (), "failed to create AutoScalingRunnerSet" )
81
81
82
- autoscalingListener = & actionsv1alpha1 .AutoscalingListener {
82
+ autoscalingListener = & v1alpha1 .AutoscalingListener {
83
83
ObjectMeta : metav1.ObjectMeta {
84
84
Name : "test-asl" ,
85
85
Namespace : autoscalingNS .Name ,
86
86
},
87
- Spec : actionsv1alpha1 .AutoscalingListenerSpec {
87
+ Spec : v1alpha1 .AutoscalingListenerSpec {
88
88
GitHubConfigUrl : "https://github.com/owner/repo" ,
89
89
GitHubConfigSecret : configSecret .Name ,
90
90
RunnerScaleSetId : 1 ,
@@ -119,7 +119,7 @@ var _ = Describe("Test AutoScalingListener controller", func() {
119
119
).Should (Succeed (), "Config secret should be created" )
120
120
121
121
// Check if finalizer is added
122
- created := new (actionsv1alpha1 .AutoscalingListener )
122
+ created := new (v1alpha1 .AutoscalingListener )
123
123
Eventually (
124
124
func () (string , error ) {
125
125
err := k8sClient .Get (ctx , client.ObjectKey {Name : autoscalingListener .Name , Namespace : autoscalingListener .Namespace }, created )
@@ -298,7 +298,7 @@ var _ = Describe("Test AutoScalingListener controller", func() {
298
298
// The AutoScalingListener should be deleted
299
299
Eventually (
300
300
func () error {
301
- listenerList := new (actionsv1alpha1 .AutoscalingListenerList )
301
+ listenerList := new (v1alpha1 .AutoscalingListenerList )
302
302
err := k8sClient .List (ctx , listenerList , client .InNamespace (autoscalingListener .Namespace ), client.MatchingFields {".metadata.name" : autoscalingListener .Name })
303
303
if err != nil {
304
304
return err
@@ -415,9 +415,9 @@ var _ = Describe("Test AutoScalingListener customization", func() {
415
415
var ctx context.Context
416
416
var mgr ctrl.Manager
417
417
var autoscalingNS * corev1.Namespace
418
- var autoscalingRunnerSet * actionsv1alpha1 .AutoscalingRunnerSet
418
+ var autoscalingRunnerSet * v1alpha1 .AutoscalingRunnerSet
419
419
var configSecret * corev1.Secret
420
- var autoscalingListener * actionsv1alpha1 .AutoscalingListener
420
+ var autoscalingListener * v1alpha1 .AutoscalingListener
421
421
422
422
var runAsUser int64 = 1001
423
423
@@ -458,12 +458,12 @@ var _ = Describe("Test AutoScalingListener customization", func() {
458
458
459
459
min := 1
460
460
max := 10
461
- autoscalingRunnerSet = & actionsv1alpha1 .AutoscalingRunnerSet {
461
+ autoscalingRunnerSet = & v1alpha1 .AutoscalingRunnerSet {
462
462
ObjectMeta : metav1.ObjectMeta {
463
463
Name : "test-asrs" ,
464
464
Namespace : autoscalingNS .Name ,
465
465
},
466
- Spec : actionsv1alpha1 .AutoscalingRunnerSetSpec {
466
+ Spec : v1alpha1 .AutoscalingRunnerSetSpec {
467
467
GitHubConfigUrl : "https://github.com/owner/repo" ,
468
468
GitHubConfigSecret : configSecret .Name ,
469
469
MaxRunners : & max ,
@@ -484,12 +484,12 @@ var _ = Describe("Test AutoScalingListener customization", func() {
484
484
err = k8sClient .Create (ctx , autoscalingRunnerSet )
485
485
Expect (err ).NotTo (HaveOccurred (), "failed to create AutoScalingRunnerSet" )
486
486
487
- autoscalingListener = & actionsv1alpha1 .AutoscalingListener {
487
+ autoscalingListener = & v1alpha1 .AutoscalingListener {
488
488
ObjectMeta : metav1.ObjectMeta {
489
489
Name : "test-asltest" ,
490
490
Namespace : autoscalingNS .Name ,
491
491
},
492
- Spec : actionsv1alpha1 .AutoscalingListenerSpec {
492
+ Spec : v1alpha1 .AutoscalingListenerSpec {
493
493
GitHubConfigUrl : "https://github.com/owner/repo" ,
494
494
GitHubConfigSecret : configSecret .Name ,
495
495
RunnerScaleSetId : 1 ,
@@ -512,7 +512,7 @@ var _ = Describe("Test AutoScalingListener customization", func() {
512
512
Context ("When creating a new AutoScalingListener" , func () {
513
513
It ("It should create customized pod with applied configuration" , func () {
514
514
// Check if finalizer is added
515
- created := new (actionsv1alpha1 .AutoscalingListener )
515
+ created := new (v1alpha1 .AutoscalingListener )
516
516
Eventually (
517
517
func () (string , error ) {
518
518
err := k8sClient .Get (ctx , client.ObjectKey {Name : autoscalingListener .Name , Namespace : autoscalingListener .Namespace }, created )
@@ -570,19 +570,19 @@ var _ = Describe("Test AutoScalingListener controller with proxy", func() {
570
570
var ctx context.Context
571
571
var mgr ctrl.Manager
572
572
var autoscalingNS * corev1.Namespace
573
- var autoscalingRunnerSet * actionsv1alpha1 .AutoscalingRunnerSet
573
+ var autoscalingRunnerSet * v1alpha1 .AutoscalingRunnerSet
574
574
var configSecret * corev1.Secret
575
- var autoscalingListener * actionsv1alpha1 .AutoscalingListener
575
+ var autoscalingListener * v1alpha1 .AutoscalingListener
576
576
577
- createRunnerSetAndListener := func (proxy * actionsv1alpha1 .ProxyConfig ) {
577
+ createRunnerSetAndListener := func (proxy * v1alpha1 .ProxyConfig ) {
578
578
min := 1
579
579
max := 10
580
- autoscalingRunnerSet = & actionsv1alpha1 .AutoscalingRunnerSet {
580
+ autoscalingRunnerSet = & v1alpha1 .AutoscalingRunnerSet {
581
581
ObjectMeta : metav1.ObjectMeta {
582
582
Name : "test-asrs" ,
583
583
Namespace : autoscalingNS .Name ,
584
584
},
585
- Spec : actionsv1alpha1 .AutoscalingRunnerSetSpec {
585
+ Spec : v1alpha1 .AutoscalingRunnerSetSpec {
586
586
GitHubConfigUrl : "https://github.com/owner/repo" ,
587
587
GitHubConfigSecret : configSecret .Name ,
588
588
MaxRunners : & max ,
@@ -604,12 +604,12 @@ var _ = Describe("Test AutoScalingListener controller with proxy", func() {
604
604
err := k8sClient .Create (ctx , autoscalingRunnerSet )
605
605
Expect (err ).NotTo (HaveOccurred (), "failed to create AutoScalingRunnerSet" )
606
606
607
- autoscalingListener = & actionsv1alpha1 .AutoscalingListener {
607
+ autoscalingListener = & v1alpha1 .AutoscalingListener {
608
608
ObjectMeta : metav1.ObjectMeta {
609
609
Name : "test-asl" ,
610
610
Namespace : autoscalingNS .Name ,
611
611
},
612
- Spec : actionsv1alpha1 .AutoscalingListenerSpec {
612
+ Spec : v1alpha1 .AutoscalingListenerSpec {
613
613
GitHubConfigUrl : "https://github.com/owner/repo" ,
614
614
GitHubConfigSecret : configSecret .Name ,
615
615
RunnerScaleSetId : 1 ,
@@ -658,12 +658,12 @@ var _ = Describe("Test AutoScalingListener controller with proxy", func() {
658
658
err := k8sClient .Create (ctx , proxyCredentials )
659
659
Expect (err ).NotTo (HaveOccurred (), "failed to create proxy credentials secret" )
660
660
661
- proxy := & actionsv1alpha1 .ProxyConfig {
662
- HTTP : & actionsv1alpha1 .ProxyServerConfig {
661
+ proxy := & v1alpha1 .ProxyConfig {
662
+ HTTP : & v1alpha1 .ProxyServerConfig {
663
663
Url : "http://localhost:8080" ,
664
664
CredentialSecretRef : "proxy-credentials" ,
665
665
},
666
- HTTPS : & actionsv1alpha1 .ProxyServerConfig {
666
+ HTTPS : & v1alpha1 .ProxyServerConfig {
667
667
Url : "https://localhost:8443" ,
668
668
CredentialSecretRef : "proxy-credentials" ,
669
669
},
@@ -766,19 +766,19 @@ var _ = Describe("Test AutoScalingListener controller with template modification
766
766
var ctx context.Context
767
767
var mgr ctrl.Manager
768
768
var autoscalingNS * corev1.Namespace
769
- var autoscalingRunnerSet * actionsv1alpha1 .AutoscalingRunnerSet
769
+ var autoscalingRunnerSet * v1alpha1 .AutoscalingRunnerSet
770
770
var configSecret * corev1.Secret
771
- var autoscalingListener * actionsv1alpha1 .AutoscalingListener
771
+ var autoscalingListener * v1alpha1 .AutoscalingListener
772
772
773
773
createRunnerSetAndListener := func (listenerTemplate * corev1.PodTemplateSpec ) {
774
774
min := 1
775
775
max := 10
776
- autoscalingRunnerSet = & actionsv1alpha1 .AutoscalingRunnerSet {
776
+ autoscalingRunnerSet = & v1alpha1 .AutoscalingRunnerSet {
777
777
ObjectMeta : metav1.ObjectMeta {
778
778
Name : "test-asrs" ,
779
779
Namespace : autoscalingNS .Name ,
780
780
},
781
- Spec : actionsv1alpha1 .AutoscalingRunnerSetSpec {
781
+ Spec : v1alpha1 .AutoscalingRunnerSetSpec {
782
782
GitHubConfigUrl : "https://github.com/owner/repo" ,
783
783
GitHubConfigSecret : configSecret .Name ,
784
784
MaxRunners : & max ,
@@ -800,12 +800,12 @@ var _ = Describe("Test AutoScalingListener controller with template modification
800
800
err := k8sClient .Create (ctx , autoscalingRunnerSet )
801
801
Expect (err ).NotTo (HaveOccurred (), "failed to create AutoScalingRunnerSet" )
802
802
803
- autoscalingListener = & actionsv1alpha1 .AutoscalingListener {
803
+ autoscalingListener = & v1alpha1 .AutoscalingListener {
804
804
ObjectMeta : metav1.ObjectMeta {
805
805
Name : "test-asl" ,
806
806
Namespace : autoscalingNS .Name ,
807
807
},
808
- Spec : actionsv1alpha1 .AutoscalingListenerSpec {
808
+ Spec : v1alpha1 .AutoscalingListenerSpec {
809
809
GitHubConfigUrl : "https://github.com/owner/repo" ,
810
810
GitHubConfigSecret : configSecret .Name ,
811
811
RunnerScaleSetId : 1 ,
@@ -915,9 +915,9 @@ var _ = Describe("Test GitHub Server TLS configuration", func() {
915
915
var ctx context.Context
916
916
var mgr ctrl.Manager
917
917
var autoscalingNS * corev1.Namespace
918
- var autoscalingRunnerSet * actionsv1alpha1 .AutoscalingRunnerSet
918
+ var autoscalingRunnerSet * v1alpha1 .AutoscalingRunnerSet
919
919
var configSecret * corev1.Secret
920
- var autoscalingListener * actionsv1alpha1 .AutoscalingListener
920
+ var autoscalingListener * v1alpha1 .AutoscalingListener
921
921
var rootCAConfigMap * corev1.ConfigMap
922
922
923
923
BeforeEach (func () {
@@ -955,16 +955,16 @@ var _ = Describe("Test GitHub Server TLS configuration", func() {
955
955
956
956
min := 1
957
957
max := 10
958
- autoscalingRunnerSet = & actionsv1alpha1 .AutoscalingRunnerSet {
958
+ autoscalingRunnerSet = & v1alpha1 .AutoscalingRunnerSet {
959
959
ObjectMeta : metav1.ObjectMeta {
960
960
Name : "test-asrs" ,
961
961
Namespace : autoscalingNS .Name ,
962
962
},
963
- Spec : actionsv1alpha1 .AutoscalingRunnerSetSpec {
963
+ Spec : v1alpha1 .AutoscalingRunnerSetSpec {
964
964
GitHubConfigUrl : "https://github.com/owner/repo" ,
965
965
GitHubConfigSecret : configSecret .Name ,
966
- GitHubServerTLS : & actionsv1alpha1 .GitHubServerTLSConfig {
967
- CertificateFrom : & actionsv1alpha1 .TLSCertificateSource {
966
+ GitHubServerTLS : & v1alpha1 .GitHubServerTLSConfig {
967
+ CertificateFrom : & v1alpha1 .TLSCertificateSource {
968
968
ConfigMapKeyRef : & corev1.ConfigMapKeySelector {
969
969
LocalObjectReference : corev1.LocalObjectReference {
970
970
Name : rootCAConfigMap .Name ,
@@ -991,16 +991,16 @@ var _ = Describe("Test GitHub Server TLS configuration", func() {
991
991
err = k8sClient .Create (ctx , autoscalingRunnerSet )
992
992
Expect (err ).NotTo (HaveOccurred (), "failed to create AutoScalingRunnerSet" )
993
993
994
- autoscalingListener = & actionsv1alpha1 .AutoscalingListener {
994
+ autoscalingListener = & v1alpha1 .AutoscalingListener {
995
995
ObjectMeta : metav1.ObjectMeta {
996
996
Name : "test-asl" ,
997
997
Namespace : autoscalingNS .Name ,
998
998
},
999
- Spec : actionsv1alpha1 .AutoscalingListenerSpec {
999
+ Spec : v1alpha1 .AutoscalingListenerSpec {
1000
1000
GitHubConfigUrl : "https://github.com/owner/repo" ,
1001
1001
GitHubConfigSecret : configSecret .Name ,
1002
- GitHubServerTLS : & actionsv1alpha1 .GitHubServerTLSConfig {
1003
- CertificateFrom : & actionsv1alpha1 .TLSCertificateSource {
1002
+ GitHubServerTLS : & v1alpha1 .GitHubServerTLSConfig {
1003
+ CertificateFrom : & v1alpha1 .TLSCertificateSource {
1004
1004
ConfigMapKeyRef : & corev1.ConfigMapKeySelector {
1005
1005
LocalObjectReference : corev1.LocalObjectReference {
1006
1006
Name : rootCAConfigMap .Name ,
0 commit comments