-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clusterctl init --infrastructure aws --list-images returns an error when env variables are not defined #2516
Comments
/assign @fabriziopandini |
@detiber @vincepri this is tricky because there is no guarantee that a YAML without env variables is a valid YAML. e.g nothing prevents that the variable is the image repository or the image tag In other words, from a clusterctl PoV only a fully compiled YAML can be input for further processing, like e.g. inspecting images. |
Has this been fixed? |
I'm getting the same issue too: #2990 |
@vincepri no this is not fixed. @wfernandes wdyt about making clusterctl init tolerate missing variable only when invoked with the --list-variables flag? |
/milestone v0.3.6 |
Yeah..this is interesting.
I agree with @fabriziopandini that ideally, we should be inspecting the images once a yaml is fully processed. Because if provider components can also be templated then the images themselves could be variables that require processing.
@fabriziopandini Did you mean |
|
I believe
However, I've come across this exact statement before. cluster-api/cmd/clusterctl/cmd/init.go Lines 110 to 112 in 23a9ec3
IMO we should deprecate this flag entirely and not substitute it with anything. |
The
I mean that in case of |
@fabriziopandini Thanks for the context about the need for I'm fine with adding the skip variables bool in the call for InitImages. Did we want to move it to a separate sub-command or can we do that as part of a separate issue? |
@wfernandes I'm in favor of keeping it simple and only changing the behavior of --list-images (without creating a new command). But I defer this to @vincepri |
/assign |
/lifecycle active |
What steps did you take and what happened:
clusterctl init --infrastructure aws --list-images
without setting the AWS_B64ENCODED_CREDENTIALS env varError: failed to get provider components for the "aws" provider: failed to perform variable substitution: value for variables [AWS_B64ENCODED_CREDENTIALS] is not set. Please set the value using os environment variables or the clusterctl config file
What did you expect to happen:
Environment:
master
kind v0.6.1
kubectl version
):v1.16.7
/etc/os-release
): Fedora 31/kind bug
The text was updated successfully, but these errors were encountered: