Add mini helm chart
This commit is contained in:
parent
720c8d3e2e
commit
883ca98a3f
4 changed files with 57 additions and 0 deletions
6
helm/alpine/Chart.yaml
Normal file
6
helm/alpine/Chart.yaml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
apiVersion: v2
|
||||
name: alpine
|
||||
description: Understanding helm with alpine Linux
|
||||
type: application
|
||||
version: 1.0.0
|
||||
appVersion: "3.22"
|
||||
36
helm/alpine/templates/deployment.yaml
Normal file
36
helm/alpine/templates/deployment.yaml
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-alpine
|
||||
labels:
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/component: alpine
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/component: alpine
|
||||
{{ if .Values.suspend }}
|
||||
replicas: 0
|
||||
{{ else }}
|
||||
replicas: 1
|
||||
{{ end }}
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/component: alpine
|
||||
spec:
|
||||
containers:
|
||||
- name: alpine
|
||||
image: alpine:{{ .Chart.AppVersion }}
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: "/data"
|
||||
subPath: alpine
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ .Release.Name }}-data
|
||||
11
helm/alpine/templates/pvc.yaml
Normal file
11
helm/alpine/templates/pvc.yaml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-data
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.pvc.size }}
|
||||
storageClassName: {{ .Values.pvc.storageClassName }}
|
||||
4
helm/alpine/values.yaml
Normal file
4
helm/alpine/values.yaml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
suspend: false
|
||||
pvc:
|
||||
size: 1Gi
|
||||
storageClassName: ""
|
||||
Loading…
Add table
Add a link
Reference in a new issue