Skip to content

Commit c68ae49

Browse files
authored
gateway: do not fail to startup when alpha BackendTLSPolicy is installed (istio#57834)
This fixes a gap on the 1.4 upgrade. We need to mirror what we did when GRPCRoute was promoted. Today, we detect if a CRD exists and watch it only if it does. However, this needs to be version aware, so the presence of the alpha-only CRD does not mean we should attempt to read v1, since it doesn't exist. A known and intended risk of this is a user has alpha policies, upgrades Istio without installing v1, and they stop working. THIS IS INTENDED and known; this is exactly why we make users explicitly opt-in to the experimental support for alpha.
1 parent d599f1c commit c68ae49

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pilot/pkg/config/kube/gateway/conversion_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ func setupClientCRDs(t *testing.T, kc kube.CLIClient) {
795795
gvr.InferencePool,
796796
} {
797797
clienttest.MakeCRDWithAnnotations(t, kc, crd, map[string]string{
798-
consts.BundleVersionAnnotation: "v1.1.0",
798+
consts.BundleVersionAnnotation: consts.BundleVersion,
799799
})
800800
}
801801
}

pkg/kube/kclient/crdwatcher.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ func newCrdWatcher(client kube.Client) kubetypes.CrdWatcher {
6464
}
6565

6666
var minimumCRDVersions = map[string]*semver.Version{
67-
"grpcroutes.gateway.networking.k8s.io": semver.New(1, 1, 0, "", ""),
67+
"grpcroutes.gateway.networking.k8s.io": semver.New(1, 1, 0, "", ""),
68+
"backendtlspolicies.gateway.networking.k8s.io": semver.New(1, 4, 0, "", ""),
6869
}
6970

7071
// minimumVersionFilter filters CRDs that do not meet a minimum "version".

0 commit comments

Comments
 (0)