Skip to content

Commit

Permalink
ServiceAccount and Port set to optional
Browse files Browse the repository at this point in the history
  • Loading branch information
OleksandrUA committed Apr 25, 2023
1 parent 8f6febc commit 54e1431
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions charts/common/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.0.2
version: 0.0.3

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.0.2"
appVersion: "0.0.3"
icon: https://cncf-branding.netlify.app/img/projects/helm/horizontal/color/helm-horizontal-color.png
4 changes: 4 additions & 0 deletions charts/common/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.serviceAccount.create -}}
serviceAccountName: {{ include "common.serviceAccountName" . }}
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
Expand All @@ -34,10 +36,12 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.service.containerPort }}
ports:
- name: http
containerPort: {{ .Values.service.containerPort }}
protocol: TCP
{{- end -}}
env:
{{- range $k, $v := .Values.env }}
- name: {{ $k | quote }}
Expand Down

0 comments on commit 54e1431

Please sign in to comment.