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

Ability to toggle service account usage #15

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,13 @@ To use an existing service account, add the following parameters to the install
--set serviceAccount.name=<ENTER_EXISTING_SERVICE_ACCOUNT> \
```

If you do not - or can not, due to permissions, etc - use service accounts, add the following parameters to the install command:

```
--set serviceAccount.enabled=false \
--set serviceAccount.create=false \
```

## Deploying Multiple Brokers In The Same Namespace

To deploy an additional broker into the same namespace as an existing broker, see the following example.
Expand Down Expand Up @@ -347,6 +354,8 @@ To use this chart behind a proxy, set the ```httpProxy``` and ```httpsProxy``` v
| `logEnableBody` | Enable Log Body | `false` |
| `image.repository` | Broker Image | `snyk/broker` |
| `deployment.container.containerPort` | Container Port (Back End) | `8000` |
| `serviceAccount.enabled` | Whether to use service accounts in deployment templates | `true` |
| `serviceAccount.create` | Whether Helm should create a new service account | `true` |
| `serviceAccount.name` | Name of service account to be created | `snyk-broker` |
| `service.port` | Front End Port for broker client | `8000` |
| `crImage` | Image Tag | `latest` |
2 changes: 2 additions & 0 deletions charts/snyk-broker/templates/broker_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ spec:
labels:
{{- include "snyk-broker.selectorLabels" . | nindent 8 }}
spec:
{{- if .Values.serviceAccount.enabled }}
serviceAccountName: {{ include "snyk-broker.serviceAccountName" . }}
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
Expand Down
2 changes: 2 additions & 0 deletions charts/snyk-broker/templates/code_agent_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ spec:
app.kubernetes.io/name: {{ .Release.Name }}-ca
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
{{- if .Values.serviceAccount.enabled }}
serviceAccountName: {{ include "snyk-broker.serviceAccountName" . }}
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
Expand Down
2 changes: 2 additions & 0 deletions charts/snyk-broker/templates/cra_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ spec:
app.kubernetes.io/name: {{ .Release.Name }}-cr
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
{{- if .Values.serviceAccount.enabled }}
serviceAccountName: {{ include "snyk-broker.serviceAccountName" . }}
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
Expand Down
6 changes: 5 additions & 1 deletion charts/snyk-broker/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,11 @@ fullnameOverride: ""
##### Service Account Values. Nothing to change here #####

serviceAccount:
# Specifies whether a service account should be created
# Specifies whether to use a service account or not
enabled: true
# Specifies whether a service account should be created.
# Note: Ensure you specify an existing service account in the name value
# if enabled == true AND create == false.
create: true
# Annotations to add to the service account
annotations: {}
Expand Down