-
Notifications
You must be signed in to change notification settings - Fork 996
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
Allow ignoring environment config if it does not exists #3723
Comments
CC @MisterMX |
Crossplane does not currently have enough maintainers to address every issue and pull request. This issue has been automatically marked as |
/fresh |
This was addressed introducing |
Actually not, I misread the issue, this is still valid |
A workaround here in conjuction with #3981 is to use There is currently no way to make a |
What problem are you facing?
I don't know if I am using environment config the bad way but I can't figure how to ignore selection of an
EnvironmentConfig
if it does not exists.Let's say I have the following
EnvironmentConfig
resources:Then I have a XRD with an optional field
providerConfigRef.name
in specIn my composition I want to load the
default-provider-config EnvironmentConfig
ifproviderConfigRef.name
is not referenced in my XR, and the correct providerEnvironmentConfig
if it is referenced (let's sayother-provider-config EnvironmentConfig
ifproviderConfigRef.name : other-provider
).So I tried to add the following environment in the associated composition:
The problem is if
spec.providerConfigRef.name
does not exists, crossplane will fail reconciliation with the following message:cannot select environment: failed to build reference at index 1: failed to resolve value for label at index 0: spec.providerConfigRef: no such field
How could Crossplane help solve your problem?
Maybe there is a workaround to this issue, but if not it would be neat to have a way to ignore missing environment config, the same way as patches are ignored if field path does not exists
The text was updated successfully, but these errors were encountered: