Skip to content

Commit

Permalink
add helloworld
Browse files Browse the repository at this point in the history
  • Loading branch information
pyaephyohein committed Mar 11, 2024
1 parent ec498f8 commit 7f3f55a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
8 changes: 8 additions & 0 deletions Charts/helloworld/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
- mountPath: /usr/share/nginx/html/index.html
subPath: index.html
name: index
ports:
- name: http
containerPort: {{ .Values.service.port }}
Expand All @@ -47,6 +51,10 @@ spec:
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumes:
- name: index
configMap:
name: {{ include "helloworld.fullname" . }}-index
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
7 changes: 7 additions & 0 deletions Charts/helloworld/templates/index-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: ConfigMap
apiVersion: v1
metadata:
name: {{ include "helloworld.fullname" . }}-index
data:
index.html: |-
{{ .Values.nginx.index| indent 4 }}
6 changes: 5 additions & 1 deletion Charts/helloworld/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ image:
repository: nginx
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
tag: "latest"

imagePullSecrets: []
nameOverride: ""
Expand Down Expand Up @@ -80,3 +80,7 @@ nodeSelector: {}
tolerations: []

affinity: {}

nginx:
index: |-
<h1> Hello from Webserver <h1>

0 comments on commit 7f3f55a

Please sign in to comment.