Upcoming k8s versions have an additional extra field in the CSR response

- failure due to https://github.com/kubernetes/kubernetes/pull/125634
This commit is contained in:
Joshua Casey
2024-09-04 11:23:11 -05:00
parent d165899870
commit c87f091a44
2 changed files with 58 additions and 43 deletions
@@ -32,6 +32,15 @@ func KubeServerSupportsCertificatesV1API(t *testing.T, discoveryClient discovery
return false
}
func PrintKubeServerVersion(t *testing.T, discoveryClient discovery.DiscoveryInterface) {
t.Helper()
version, err := discoveryClient.ServerVersion()
require.NoError(t, err)
t.Logf("K8s server version: %s\n%+v", version, version)
}
func KubeServerMinorVersionAtLeastInclusive(t *testing.T, discoveryClient discovery.DiscoveryInterface, min int) bool {
return !KubeServerMinorVersionInBetweenInclusive(t, discoveryClient, 0, min-1)
}