feat: added longhorn addon (#1204)
* added longhorn addon * enabled longhorn in the tests * fix: move longhorn to longhorn-system namespace Signed-off-by: Devin Buhl <devin@buhl.casa> * fix: move longhorn to longhorn-system namespace Signed-off-by: Devin Buhl <devin@buhl.casa> * fix: move longhorn to longhorn-system namespace Signed-off-by: Devin Buhl <devin@buhl.casa> * fix: move longhorn to longhorn-system namespace Signed-off-by: Devin Buhl <devin@buhl.casa> --------- Signed-off-by: Devin Buhl <devin@buhl.casa> Co-authored-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
1 parent
965bfcdcb9
commit
8a840e1f2e
12 files changed
+148
-1
No files matched your search
@@ -0,0 +1,8 @@
|
||||
#% if longhorn.enabled | default(false) %#
|
||||
---
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./namespace.yaml
|
||||
- ./longhorn/ks.yaml
|
||||
#% endif %#
|
||||
@@ -0,0 +1,48 @@
|
||||
#% if longhorn.enabled | default(false) %#
|
||||
---
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2beta2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: longhorn
|
||||
spec:
|
||||
interval: 30m
|
||||
chart:
|
||||
spec:
|
||||
chart: longhorn
|
||||
version: 1.5.3
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: longhorn
|
||||
namespace: flux-system
|
||||
install:
|
||||
remediation:
|
||||
retries: 3
|
||||
upgrade:
|
||||
cleanupOnFail: true
|
||||
remediation:
|
||||
retries: 3
|
||||
uninstall:
|
||||
keepHistory: false
|
||||
values:
|
||||
monitoring:
|
||||
enabled: true
|
||||
createPrometheusRules: true
|
||||
defaultSettings:
|
||||
defaultReplicaCount: 3
|
||||
backupstorePollInterval: 0
|
||||
createDefaultDiskLabeledNodes: true
|
||||
restoreVolumeRecurringJobs: true
|
||||
storageOverProvisioningPercentage: 100
|
||||
storageMinimalAvailablePercentage: 1
|
||||
guaranteedEngineManagerCPU: 20
|
||||
guaranteedReplicaManagerCPU: 20
|
||||
orphanAutoDeletion: true
|
||||
concurrentAutomaticEngineUpgradePerNodeLimit: 3
|
||||
defaultLonghornStaticStorageClass: longhorn
|
||||
nodeDownPodDeletionPolicy: delete-both-statefulset-and-deployment-pod
|
||||
ingress:
|
||||
enabled: true
|
||||
ingressClassName: internal
|
||||
host: longhorn.${SECRET_DOMAIN}
|
||||
tls: true
|
||||
#% endif %#
|
||||
@@ -0,0 +1,8 @@
|
||||
#% if longhorn.enabled | default(false) %#
|
||||
---
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./helmrelease.yaml
|
||||
- ./snapshot.yaml
|
||||
#% endif %#
|
||||
@@ -0,0 +1,16 @@
|
||||
#% if longhorn.enabled | default(false) %#
|
||||
---
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
reclaimPolicy: Delete
|
||||
provisioner: driver.longhorn.io
|
||||
parameters:
|
||||
dataLocality: disabled
|
||||
numberOfReplicas: "1" # Faster restores from the snapshotclass
|
||||
replicaAutoBalance: best-effort
|
||||
staleReplicaTimeout: "30"
|
||||
allowVolumeExpansion: true
|
||||
volumeBindingMode: Immediate
|
||||
metadata:
|
||||
name: longhorn-snapshot
|
||||
#% endif %#
|
||||
@@ -0,0 +1,22 @@
|
||||
#% if longhorn.enabled | default(false) %#
|
||||
---
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: &app longhorn
|
||||
namespace: flux-system
|
||||
spec:
|
||||
targetNamespace: longhorn-system
|
||||
commonMetadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: *app
|
||||
path: ./kubernetes/apps/longhorn-system/longhorn/app
|
||||
prune: true
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: home-kubernetes
|
||||
wait: false
|
||||
interval: 30m
|
||||
retryInterval: 1m
|
||||
timeout: 5m
|
||||
#% endif %#
|
||||
@@ -0,0 +1,9 @@
|
||||
#% if longhorn.enabled | default(false) %#
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: longhorn-system
|
||||
labels:
|
||||
kustomize.toolkit.fluxcd.io/prune: disabled
|
||||
#% endif %#
|
||||
@@ -10,6 +10,10 @@ spec:
|
||||
commonMetadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: *app
|
||||
#% if longhorn.enabled | default(false) %#
|
||||
dependsOn:
|
||||
- name: longhorn
|
||||
#% endif %#
|
||||
path: ./kubernetes/apps/storage/volsync/snapshot-controller
|
||||
prune: true
|
||||
sourceRef:
|
||||
|
||||
+11
@@ -27,6 +27,17 @@ spec:
|
||||
keepHistory: false
|
||||
values:
|
||||
controller:
|
||||
#% if longhorn.enabled | default(false) %#
|
||||
volumeSnapshotClasses:
|
||||
- name: longhorn-snapclass
|
||||
annotations:
|
||||
snapshot.storage.kubernetes.io/is-default-class: "true"
|
||||
driver: driver.longhorn.io
|
||||
deletionPolicy: Delete
|
||||
# Ref: https://github.com/longhorn/longhorn/issues/2534#issuecomment-1010508714
|
||||
parameters:
|
||||
type: snap
|
||||
#% endif %#
|
||||
serviceMonitor:
|
||||
create: true
|
||||
webhook:
|
||||
|
||||
Reference in new issue
Block a user