Update client.authentication.k8s.io api version for kubeconfig
The v1alpha1 version is removed in kubernetes 1.24. v1beta1 was added in Kubernetes 1.11 and should be supported through existing versions. Change-Id: I446b8c1c9b46fb8d70317f271a6a650d2a1bbefa
This commit is contained in:
@@ -238,7 +238,7 @@ def _config_cluster_kubernetes(cluster, cluster_template, cfg_dir,
|
|||||||
" user:\n"
|
" user:\n"
|
||||||
" exec:\n"
|
" exec:\n"
|
||||||
" command: /bin/bash\n"
|
" command: /bin/bash\n"
|
||||||
" apiVersion: client.authentication.k8s.io/v1alpha1\n"
|
" apiVersion: client.authentication.k8s.io/v1beta1\n"
|
||||||
" args:\n"
|
" args:\n"
|
||||||
" - -c\n"
|
" - -c\n"
|
||||||
" - >\n"
|
" - >\n"
|
||||||
@@ -246,7 +246,7 @@ def _config_cluster_kubernetes(cluster, cluster_template, cfg_dir,
|
|||||||
" echo 'Error: Missing OpenStack credential from environment variable $OS_TOKEN' > /dev/stderr\n" # noqa
|
" echo 'Error: Missing OpenStack credential from environment variable $OS_TOKEN' > /dev/stderr\n" # noqa
|
||||||
" exit 1\n"
|
" exit 1\n"
|
||||||
" else\n"
|
" else\n"
|
||||||
" echo '{ \"apiVersion\": \"client.authentication.k8s.io/v1alpha1\", \"kind\": \"ExecCredential\", \"status\": { \"token\": \"'\"${OS_TOKEN}\"'\"}}'\n" # noqa
|
" echo '{ \"apiVersion\": \"client.authentication.k8s.io/v1beta1\", \"kind\": \"ExecCredential\", \"status\": { \"token\": \"'\"${OS_TOKEN}\"'\"}}'\n" # noqa
|
||||||
" fi\n"
|
" fi\n"
|
||||||
% {'name': cluster.name,
|
% {'name': cluster.name,
|
||||||
'api_address': cluster.api_address,
|
'api_address': cluster.api_address,
|
||||||
|
Reference in New Issue
Block a user