Open smuda opened 1 year ago
There is something more happening than just the resourceName in the role, because even when I add both smuda-tls
and cert-manager-approver-policy-tls
to the role, it won't start but seems get longer. But if I remove resourceNames totally (giving access to all secrets) it starts.
In playing around, I've just run into this issue, too. The issue appears to be here:
The application hard-codes the name of the Secret
. Adding permission to access doesn't help, as the Helm Chart didn't create the resource to access. Either the name needs to be dynamically generated based on the deployment name, or the Helm Chart needs to fix the name of the Secret
being created.
I don't know which would be preferred here.
Thanks for looking into this @jonathanio! This needs to be fixed! Which fix would you personally prefer?
Setting nameOverride
or fullnameOverride
typically means that you're running concurrent resources inside the same namespace (maybe with different sets of permissions). However, that doesn't make much sense as the policies control what can and cannot be done inside a namespace with read-only access.
Also, defining it based on the deployment name feels hidden and implicit. I think it should be a configuration option within the application, which can then be overridden, as needed, by the deployment if nameOverride
is set through the Helm Chart?
Thanks! I will bring this issue into our stand-up on Tuesday next week - to discuss the options here. We might also take a look at cert-manager? I would assume we should choose the same approach, at least if it makes sense.
Yeah, agreed.
Thank you for looking into this.
Description
When setting helm parameter
.Values.nameOverride
to anything else than it's default valuecert-manager-approver-policy
the approver fails to generate it's tls certificate during startup.The role allows access to one secret with a specific name which (when
.Values.nameOverride
is set to smuda) would be smuda-tls. However, inpkg/internal/webhook/tls/tls.go
the name of the secret seems hard coded tocert-manager-approver-policy-tls
.To reproduce:
Expected result
That the approver pod would startup and respond happily to the readiness-probe.
Result
The approver pod looks for and tries to update secret
cert-manager-approver-policy-tls
while the role allowssmuda-tls
. The pod is unhappy.The created role
smuda
: