Initial commit
Some checks failed
Publish to helm repo / deploy (push) Failing after 8s

This commit is contained in:
Georg K 2024-09-28 00:23:33 +03:00
commit 4eb7b062be
7 changed files with 61 additions and 0 deletions

View 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
View File

@ -0,0 +1 @@
.idea/

3
.kube/Chart.yaml Normal file
View File

@ -0,0 +1,3 @@
apiVersion: v2
name: local-storage
version: 1.0.1

26
.kube/templates/pv.yaml Normal file
View 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 }}

View 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
View File

@ -0,0 +1,2 @@
request: 30Gi
localPathBase: "local-storage"

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# local-storage
Local storage (https://kubernetes.io/blog/2019/04/04/kubernetes-1.14-local-persistent-volumes-ga/)