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

Deployment templates presume existence of service account #14

Open
cjchand opened this issue Jul 21, 2022 · 1 comment · May be fixed by #15
Open

Deployment templates presume existence of service account #14

cjchand opened this issue Jul 21, 2022 · 1 comment · May be fixed by #15

Comments

@cjchand
Copy link

cjchand commented Jul 21, 2022

The Deployment templates (broker_deployment.yaml, code_agent_deployment.yaml, and cra_deployment.yaml) all assume the presence - whether existing or created by the Helm chart itself - of a Kubernetes service account. In our environment, end users are not permitted to create service accounts, thus pod creation fails with the chart as-is.

While there is a serviceAccount.create value, that only disables creation of the service account.

Expected Behavior

Users have the ability to disable use of Kubernetes service accounts in the chart

Current Behavior

No such option exists.

Possible Solution

Ideally, there should be an additional value to denote whether use of a service account is enabled or not.

Steps to Reproduce

  1. Run charts against an environment where Kubernetes service account creation is disabled. Alternatively, set .Values.serviceAccount.create to false.
  2. Run kubectl get events --sort-by=.metadata.creationTimestamp -n <your_namespace>
  3. Observe an error similar to:
5m40s       Warning   FailedCreate        replicaset/github-com-broker-69bd75c5c    Error creating: pods "github-com-broker-69bd75c5c-" is forbidden: error looking up service account my-snyk-namespace/snyk-broker: serviceaccount "snyk-broker" not found

Context (Environment)

This is primarily an issue when either service accounts cannot be created or the user chooses not to create one via .Values.serviceAccount.create

Detailed Description

  1. A new value .Values.serviceAccount.enabled should be added
  2. The serviceAccountName properties of the deployment spec should be wrapped in a conditional to see if .Values.serviceAccount.enabled is set to true

Possible Implementation

Will submit a PR to implement this

@cjchand cjchand linked a pull request Jul 21, 2022 that will close this issue
@aarlaud
Copy link
Contributor

aarlaud commented Jan 26, 2023

Apologies for the delay.
ACK, will review shortly.

@soniqua soniqua linked a pull request Jul 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants