-
Notifications
You must be signed in to change notification settings - Fork 169
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
Helmraiser creates naming conflicts. #361
Comments
Issue-Label Bot is automatically applying the label Links: app homepage, dashboard and code for this bot. |
I can also work around this particular case by postprocessing the jsonnet and making copies of the object in question, but that isn't a great solution long term. |
@captncraig A thought I had while reviewing Helmraiser was that it should not hardcode the name format at all, but accept it from Jsonnet, possibly as a Go template the same way the export filename works.
In special ones like yours, you can use a different template. You then also know exactly how things will turn out, which makes it clear how to mixin. wdyt? |
I like that on the surface. But my concern is that this is a particularly well hidden kind of bug. I didn't think about json keys until like 4 levels of debugging why my objects were not getting created in the cluster. The json keys are pretty low level, and you aren't going to know you need to change them until you have a problem that is frustrating you and you dig down into The json keys are an intermediate step between executing a helm template and creating k8s objects. Perhaps your solution would be feasable, but we should certainly show a super helpful error message if we still encounter a conflict. |
Shouldn't be too hard to just abort the helmraiser code in case this naming conflict manifests |
I am playing with helmraiser with the flux chart which creates a
role
namedflux
in each namespace I ask it to run flux against. When I runtk eval
I see that there is only a single object namedflux_role
in the evaluated json.This is because resources get added to the json with only
$NAME_$KIND
as the key. Code here.This leads to a few competing concerns:
Possible solutions:
$NAME_$KIND_$NAMESPACE
.In any case, I'd vote that an error would be preferable to silently overwriting objects.
The text was updated successfully, but these errors were encountered: