Skip to content

Commit

Permalink
fix: Remove cluster admin ClusterRoleBinding and ServiceAccount
Browse files Browse the repository at this point in the history
This commit removes the `ClusterRoleBinding` and `ServiceAccount` from
the helm chart. The cluster admin access is not needed by the locust
service, since it just executes locust without any need to access any
resources within the kubernetes cluster.

fixes keptn-sandbox#23
  • Loading branch information
didiladi committed Apr 21, 2021
1 parent 63604e7 commit b841482
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 46 deletions.
10 changes: 0 additions & 10 deletions helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,3 @@ app.kubernetes.io/name: {{ include "keptn-service.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "keptn-service.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "keptn-service.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "keptn-service.serviceAccountName" . }}
serviceAccountName: {{ .Values.keptnservice.serviceAccountName }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
Expand Down
30 changes: 0 additions & 30 deletions helm/templates/serviceaccount.yaml

This file was deleted.

6 changes: 1 addition & 5 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ keptnservice:
tag: "dev" # Container Tag
service:
enabled: true # Creates a Kubernetes Service for the locust-service
serviceAccountName: default

distributor:
stageFilter: "" # Sets the stage this helm service belongs to
Expand All @@ -25,11 +26,6 @@ remoteControlPlane:

imagePullSecrets: [] # Secrets to use for container registry credentials

serviceAccount:
create: true # Enables the service account creation
annotations: {} # Annotations to add to the service account
name: "" # The name of the service account to use.

podAnnotations: {} # Annotations to add to the created pods

podSecurityContext: {} # Set the pod security context (e.g. fsGroups)
Expand Down

0 comments on commit b841482

Please sign in to comment.