Skip to content

Commit

Permalink
fix the templating errors in the chart due to broke if
Browse files Browse the repository at this point in the history
  • Loading branch information
jessebot committed Jul 10, 2024
1 parent 7ef73b0 commit 165282a
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 25 deletions.
2 changes: 1 addition & 1 deletion charts/onboardme/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ 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.1.0
version: 0.1.1

# 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
Expand Down
4 changes: 4 additions & 0 deletions charts/onboardme/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
{{- end }}

You did it! You installed onboardme! You can access your container with:

kubectl exec -it $POD_NAME -- /bin/bash
20 changes: 15 additions & 5 deletions charts/onboardme/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,34 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "onboardme.serviceAccountName" . }}
{{- with .Values.podSecurityContext }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
{{- with .Values.securityContext }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
{{- toYaml . | nindent 12 }}
{{- end }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.service.port }}
protocol: TCP
{{- with .Values.livenessProbe }}
livenessProbe:
{{- toYaml .Values.livenessProbe | nindent 12 }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.readinessProbeEnabled }}
readinessProbe:
{{- toYaml .Values.readinessProbe | nindent 12 }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.resources }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 12 }}
Expand Down
38 changes: 19 additions & 19 deletions charts/onboardme/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ podSecurityContext:
securityContext:
capabilities:
drop:
- ALL
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 1000
Expand All @@ -63,24 +63,24 @@ ingress:
# - chart-example.local

resources: {}
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi

livenessProbe:
enabled: false
httpGet:
path: /
port: http

readinessProbe:
enabled: false
httpGet:
path: /
port: http
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi

leadinessProbeEnabled: false
livenessProbe: {}
# httpGet:
# path: /
# port: http

readinessProbeEnabled: false
readinessProbe: {}
# httpGet:
# path: /
# port: http

autoscaling:
enabled: false
Expand Down

0 comments on commit 165282a

Please sign in to comment.