-
Notifications
You must be signed in to change notification settings - Fork 12
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
Allow to skip creating serviceaccount #144
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
{{- if .Values.serviceaccount }} | ||
{{- if .Values.serviceaccount.skipCreation }} | ||
{{- /* | ||
Skip create service account | ||
*/}} | ||
Comment on lines
+3
to
+5
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think users should be able to determine whether the resource will be created or not by themselves, so having this comment here would be too much. |
||
{{- else}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
annotations: {{ toYaml .Values.serviceaccount.annotations | nindent 4}} | ||
name: {{ .Values.serviceaccount.name | default (printf "%s-pod-service-account" .Values.name) }} | ||
{{- end}} | ||
{{- else if .Values.serviceAccount }} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -140,12 +140,14 @@ envFrom: {} | |
# - test-2-secret | ||
|
||
# Service account is used by pod. For more details on fields "serviceaccount" and "serviceAccount", please have a look on ./cronjob/templates/serviceaccount.yaml | ||
# "serviceAccount" is deprecated, please use "serviceaccount" instead. | ||
serviceaccount: {} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the following changes will make more common sense as below:
|
||
# example | ||
# serviceaccount: | ||
# annotations: | ||
# eks.amazonaws.com/role-arn: <aws-role-arn> | ||
# name: <serviceaccount-name> | ||
# skipCreation: false | ||
|
||
# This can be used to suspend the cron workflow by default, set this to true to suspend the cron workflow by default | ||
suspend: false | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
{{- if .Values.serviceaccount }} | ||
{{- if .Values.serviceaccount.skipCreation }} | ||
{{- /* | ||
Skip create service account | ||
*/}} | ||
{{- else}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
annotations: {{ toYaml .Values.serviceaccount.annotations | nindent 4}} | ||
name: {{ .Values.serviceaccount.name | default (printf "%s-pod-service-account" .Values.name) }} | ||
{{- end}} | ||
{{- end}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We usually use
create
as a switch to determine whether resources need to be generated.