This commit is contained in:
commit
4eb7b062be
19
.gitea/workflows/push.yaml
Normal file
19
.gitea/workflows/push.yaml
Normal file
@ -0,0 +1,19 @@
|
||||
name: Publish to helm repo
|
||||
run-name: ${{ gitea.actor }} is runs ci pipeline
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
name: deploy
|
||||
runs-on: helm
|
||||
|
||||
steps:
|
||||
- name: add gitea repo
|
||||
run: helm repo add --username ${{ secrets.REPO_USER }} --password ${{ secrets.REPO_PASS }} gitea https://git.ahax86.ru/api/packages/pub/helm
|
||||
- name: update repo
|
||||
run: helm repo update
|
||||
- name: push to helm repo
|
||||
run: helm push .kube/ gitea
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.idea/
|
3
.kube/Chart.yaml
Normal file
3
.kube/Chart.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
apiVersion: v2
|
||||
name: local-storage
|
||||
version: 1.0.1
|
26
.kube/templates/pv.yaml
Normal file
26
.kube/templates/pv.yaml
Normal file
@ -0,0 +1,26 @@
|
||||
{{- range $index, $node := (lookup "v1" "Node" "" "").items }}
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: "{{ $.Release.Name }}-{{ $index }}"
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
capacity:
|
||||
storage: {{ $.Values.request }}
|
||||
volumeMode: Filesystem
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
storageClassName: {{ $.Release.Name }}
|
||||
local:
|
||||
path: /{{$.Values.localPathBase}}/{{$.Release.Name}}
|
||||
nodeAffinity:
|
||||
required:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: kubernetes.io/hostname
|
||||
operator: In
|
||||
values:
|
||||
- "{{ ($node).metadata.name }}"
|
||||
---
|
||||
{{- end }}
|
7
.kube/templates/storage_class.yaml
Normal file
7
.kube/templates/storage_class.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: {{ .Release.Name }}
|
||||
provisioner: kubernetes.io/no-provisioner
|
||||
volumeBindingMode: WaitForFirstConsumer
|
||||
reclaimPolicy: Retain
|
2
.kube/values.yaml
Normal file
2
.kube/values.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
request: 30Gi
|
||||
localPathBase: "local-storage"
|
Loading…
x
Reference in New Issue
Block a user