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

add option to create a service account and specify a default user id in securityContext #815

Merged
merged 3 commits into from
Sep 23, 2021

Conversation

AndreZiviani
Copy link
Contributor

I had two problems trying to use avhq in AWS EKS:

  • Lack of ServiceAccount in the helm chart
  • The container was running with the akhq user (uid=1000 gid=1000) but it wasn't specified in the securityContext so AWS created the token file with strict permissions (only the root user could read it)

This PR adds an option to automatically create the ServiceAccount and specify some options in the securitContext by default

Copy link
Owner

@tchiotludo tchiotludo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use the standard way to handle service account for a better readability please ?

serviceAccountName: {{ include "bla.serviceAccountName" . }}

{{/*
Create the name of the service account to use
*/}}
{{- define "bla.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "bla.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

if the user input serviceAccountName & serviceAccountCreate the yaml will be invalid

@AndreZiviani
Copy link
Contributor Author

@tchiotludo can you please review the changes?

@tchiotludo tchiotludo merged commit b93598e into tchiotludo:dev Sep 23, 2021
@AndreZiviani AndreZiviani deleted the improve-aws-support branch September 29, 2021 17:45
tchiotludo pushed a commit that referenced this pull request Oct 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants