-
Notifications
You must be signed in to change notification settings - Fork 399
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
feat: contact point overrides #1670
Conversation
6940ab9
to
60199a8
Compare
60199a8
to
34c71a5
Compare
for _, override := range contactPoint.Spec.ValuesFrom { | ||
val, _, err := getReferencedValue(ctx, r.Client, contactPoint, override.ValueFrom) | ||
if err != nil { | ||
return nil, fmt.Errorf("getting referenced value: %w", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if one of the overrides fail, we would also not apply any others. If we wanted that, we could log and continue
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better to fail early here to make sure we don't have a partially applied resource marked as success
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, an example would be nice
0982039
to
e50d440
Compare
Allows users to override settings using config maps or secrets.
I've intentionally not used the templating logic of data sources as IMHO this will cause more issues downstream, especially with contact point templates.
An example contact point would look like this:
which will result in:
Fixes: #1595