You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[release/v1.45] Refactor handling of kubeconfig for kubevirt (#1358)
* Refactor handling of kubeconfig for kubevirt
Signed-off-by: Marcin Franczyk <[email protected]>
* fix test KubeVirt MachineDeployment object
change storage class to longhorn and remove
hardcoded KubeVirt registry IP
Signed-off-by: Marcin Franczyk <[email protected]>
// An error here means that this is not a valid base64 string
145
+
// We can be more explicit here with the error for visibility. Webhook will return this error if we hit this scenario.
146
+
returnnil, nil, fmt.Errorf("failed to decode base64 encoded kubeconfig. Expected value is a base64 encoded Kubeconfig in JSON or YAML format: %w", err)
147
+
}
148
+
config.Kubeconfig=string(val)
149
+
} else {
150
+
// Environment variable or secret reference was used for providing the value of kubeconfig
151
+
// We have to be lenient in this case and allow unencoded values as well.
0 commit comments