Skip to content
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

ServiceAccount can't be found when used as a subchart #128

Closed
chris922 opened this issue Dec 19, 2023 · 1 comment · Fixed by #131
Closed

ServiceAccount can't be found when used as a subchart #128

chris922 opened this issue Dec 19, 2023 · 1 comment · Fixed by #131
Assignees
Labels

Comments

@chris922
Copy link

chris922 commented Dec 19, 2023

Affected version

23.11.0

Current and expected behavior

I am using the listener-operator within a subchart that is named stackable-operators. Unfortunately I am getting the following error:

error looking up service account stackable-system/stackable-operators-serviceaccount: serviceaccount "stackable-operators-serviceaccount" not found

I expect that using the listener-operator within a subchart is working.

Possible solution

The listener-operator chart creates a ServiceAccount:

kind: ServiceAccount
metadata:
name: {{ include "operator.fullname" . }}-serviceaccount

The name is built like: {{ include "operator.fullname" . }}-serviceaccount

Having a look at the deployment this one is building the name out of a different pattern {{ .Release.Name }}-serviceaccount:

serviceAccountName: {{ .Release.Name }}-serviceaccount

I think the .Release.Name should not be used here and the same approach should be used to derive the service account name.

Besides that I noticed that the deployment name is also derived from the .Release.Name, this should be changed as well. In other Helm charts the deployment names will not be derived from the release-name, see for example here: https://github.com/stackabletech/commons-operator/blob/main/deploy/helm/commons-operator/templates/deployment.yaml#L5

Right now my deployment is named stackable-operators-controller-deployment cause my main chart is named stackable-operators that contains the listener-operator as a subchart.

Additional context

No response

Environment

No response

Would you like to work on fixing this bug?

None

@nightkr
Copy link
Member

nightkr commented Dec 19, 2023

Hey, looks like you're right, stackabletech/operator-templating@2b73b32 wasn't replicated correctly here. We should also check whether secret-op has the same issue.

@sbernauer sbernauer moved this to Ready for Development in Stackable Engineering Dec 19, 2023
@razvan razvan self-assigned this Jan 2, 2024
@razvan razvan moved this from Ready for Development to Development: In Progress in Stackable Engineering Jan 2, 2024
@razvan razvan moved this from Development: In Progress to Development: Done in Stackable Engineering Jan 3, 2024
@lfrancke lfrancke moved this from Development: Done to Done in Stackable Engineering Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants