@@ -42,7 +42,7 @@ import (
4242
4343 . "github.com/onsi/ginkgo/v2"
4444 . "github.com/onsi/gomega"
45- certificatesv1alpha1 "k8s.io/api/certificates/v1beta1"
45+ certificatesv1beta1 "k8s.io/api/certificates/v1beta1"
4646 corev1 "k8s.io/api/core/v1"
4747 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
4848 "sigs.k8s.io/controller-runtime/pkg/client"
@@ -369,8 +369,8 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() {
369369 Eventually (actualTrust , "30s" , "5s" ).Should (trustCerts (Equal (2 ), Not (BeEmpty ())), actualTrust .diagnose ())
370370
371371 By ("updating ClusterTrustBundle with 1 cert" )
372- ctbUpdate (combinedCtb , func (bundle * certificatesv1alpha1 .ClusterTrustBundle ) {
373- bundle .Spec = certificatesv1alpha1 .ClusterTrustBundleSpec {
372+ ctbUpdate (combinedCtb , func (bundle * certificatesv1beta1 .ClusterTrustBundle ) {
373+ bundle .Spec = certificatesv1beta1 .ClusterTrustBundleSpec {
374374 SignerName : bundle .Spec .SignerName ,
375375 TrustBundle : getCACert ("github.com" ),
376376 }
@@ -459,7 +459,7 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() {
459459 })
460460})
461461
462- func ctbUpdate (obj * certificatesv1alpha1 .ClusterTrustBundle , modify func (* certificatesv1alpha1 .ClusterTrustBundle )) {
462+ func ctbUpdate (obj * certificatesv1beta1 .ClusterTrustBundle , modify func (* certificatesv1beta1 .ClusterTrustBundle )) {
463463 err := retry .RetryOnConflict (retry .DefaultRetry , func () error {
464464 // Retrieve the latest version of the object
465465 err := k8sClient .Get (context .Background (), client .ObjectKeyFromObject (obj ), obj )
@@ -487,7 +487,7 @@ func argoCDSpec(ns *corev1.Namespace, repoSpec argov1beta1api.ArgoCDRepoSpec) *a
487487}
488488
489489func detectClusterTrustBundleSupport (k8sClient client.Client , ctx context.Context ) bool {
490- err := k8sClient .List (ctx , & certificatesv1alpha1 .ClusterTrustBundleList {})
490+ err := k8sClient .List (ctx , & certificatesv1beta1 .ClusterTrustBundleList {})
491491 if _ , ok := err .(* apiutil.ErrResourceDiscoveryFailed ); ok {
492492 return false
493493 }
@@ -626,19 +626,19 @@ func createPluginApp(ns *corev1.Namespace, url string) *appv1alpha1.Application
626626 }
627627}
628628
629- func createCtbFromCerts (bundle ... string ) * certificatesv1alpha1 .ClusterTrustBundle {
630- return & certificatesv1alpha1 .ClusterTrustBundle {
629+ func createCtbFromCerts (bundle ... string ) * certificatesv1beta1 .ClusterTrustBundle {
630+ return & certificatesv1beta1 .ClusterTrustBundle {
631631 TypeMeta : metav1.TypeMeta {
632632 Kind : "ClusterTrustBundle" ,
633- APIVersion : "certificates.k8s.io/v1alpha1 " ,
633+ APIVersion : "certificates.k8s.io/v1beta1 " ,
634634 },
635635 ObjectMeta : metav1.ObjectMeta {
636636 Name : "repo-server-system-ca-trust" ,
637637 Labels : map [string ]string {
638638 "argocd-operator-test" : "repo_server_system_ca_trust" ,
639639 },
640640 },
641- Spec : certificatesv1alpha1 .ClusterTrustBundleSpec {
641+ Spec : certificatesv1beta1 .ClusterTrustBundleSpec {
642642 TrustBundle : strings .Join (bundle , "\n " ),
643643 },
644644 }
@@ -855,6 +855,6 @@ func verifyCorrectlyConfiguredTrust(ns *corev1.Namespace) {
855855func purgeCtbs () {
856856 if clusterSupportsClusterTrustBundles {
857857 expr := client.MatchingLabels {"argocd-operator-test" : "repo_server_system_ca_trust" }
858- Expect (k8sClient .DeleteAllOf (ctx , & certificatesv1alpha1 .ClusterTrustBundle {}, expr )).To (Succeed ())
858+ Expect (k8sClient .DeleteAllOf (ctx , & certificatesv1beta1 .ClusterTrustBundle {}, expr )).To (Succeed ())
859859 }
860860}
0 commit comments