Skip to content

Commit

Permalink
Validate only v1. prefix from cert manager container tag
Browse files Browse the repository at this point in the history
Starting from v1.7.0 the v1alpha2 version of the custom resource definitions
was removed from cert manager project.
  • Loading branch information
Rafal Korepta committed Feb 8, 2023
1 parent 38f010d commit 34f4a9b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/verify/certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package verify
import (
"context"
"fmt"
"github.com/sirupsen/logrus"
"strings"

"github.com/sirupsen/logrus"

"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
Expand Down Expand Up @@ -52,7 +53,7 @@ func WaitForTestCertificate(ctx context.Context, dynamicClient dynamic.Interface
}

func getGroupVersion(cmVersion string) (string, string) {
if strings.HasPrefix(cmVersion, "v1.0") {
if strings.HasPrefix(cmVersion, "v1.") {
return defaultGroup, defaultVersion
} else {
return defaultGroup, "v1alpha2"
Expand Down

0 comments on commit 34f4a9b

Please sign in to comment.