diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index be33518..0fa82fe 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -50,8 +50,8 @@ rules: apiGroups: - "" resources: - - "serviceaccounts" - "services" + - "persistentvolumeclaims" - verbs: - "*" apiGroups: @@ -64,11 +64,5 @@ rules: - "networking.k8s.io" resources: - "ingresses" -- verbs: - - "*" - apiGroups: - - "" - resources: - - "persistentvolumeclaims" # +kubebuilder:scaffold:rules diff --git a/helm-charts/stage/templates/_helpers.tpl b/helm-charts/stage/templates/_helpers.tpl index 2d5ed7f..5928e10 100644 --- a/helm-charts/stage/templates/_helpers.tpl +++ b/helm-charts/stage/templates/_helpers.tpl @@ -49,14 +49,3 @@ Selector labels app.kubernetes.io/name: {{ include "stage.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "stage.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "stage.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} diff --git a/helm-charts/stage/templates/deployment.yaml b/helm-charts/stage/templates/deployment.yaml index f05d0d6..107a986 100644 --- a/helm-charts/stage/templates/deployment.yaml +++ b/helm-charts/stage/templates/deployment.yaml @@ -21,7 +21,6 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} spec: - serviceAccountName: {{ include "stage.serviceAccountName" . }} {{- with .Values.podSecurityContext }} securityContext: {{- toYaml . | nindent 8 }} diff --git a/helm-charts/stage/templates/serviceaccount.yaml b/helm-charts/stage/templates/serviceaccount.yaml deleted file mode 100644 index b9014ed..0000000 --- a/helm-charts/stage/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "stage.serviceAccountName" . }} - labels: - {{- include "stage.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -automountServiceAccountToken: {{ .Values.serviceAccount.automount }} -{{- end }} diff --git a/helm-charts/stage/values.yaml b/helm-charts/stage/values.yaml index eca0688..b2dd4bf 100644 --- a/helm-charts/stage/values.yaml +++ b/helm-charts/stage/values.yaml @@ -19,14 +19,6 @@ image: nameOverride: "" fullnameOverride: "" -# This section builds out the service account more information can be found here: https://kubernetes.io/docs/concepts/security/service-accounts/ -serviceAccount: - create: true - automount: true - annotations: {} - # If not set and create is true, a name is generated using the fullname template - name: "" - # This is for setting Kubernetes Annotations to a Pod. # For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ podAnnotations: {}