-
-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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>
- Loading branch information
Showing
12 changed files
with
148 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,3 +35,6 @@ volsync: | |
|
||
spegel: | ||
enabled: true | ||
|
||
longhorn: | ||
enabled: true |
8 changes: 8 additions & 0 deletions
8
bootstrap/templates/kubernetes/apps/longhorn-system/kustomization.yaml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#% if longhorn.enabled | default(false) %# | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- ./namespace.yaml | ||
- ./longhorn/ks.yaml | ||
#% endif %# |
48 changes: 48 additions & 0 deletions
48
bootstrap/templates/kubernetes/apps/longhorn-system/longhorn/app/helmrelease.yaml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 %# |
8 changes: 8 additions & 0 deletions
8
bootstrap/templates/kubernetes/apps/longhorn-system/longhorn/app/kustomization.yaml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#% if longhorn.enabled | default(false) %# | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- ./helmrelease.yaml | ||
- ./snapshot.yaml | ||
#% endif %# |
16 changes: 16 additions & 0 deletions
16
bootstrap/templates/kubernetes/apps/longhorn-system/longhorn/app/snapshot.yaml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 %# |
22 changes: 22 additions & 0 deletions
22
bootstrap/templates/kubernetes/apps/longhorn-system/longhorn/ks.yaml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 %# |
9 changes: 9 additions & 0 deletions
9
bootstrap/templates/kubernetes/apps/longhorn-system/namespace.yaml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 %# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
bootstrap/templates/kubernetes/flux/repositories/helm/longhorn.yaml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
apiVersion: source.toolkit.fluxcd.io/v1beta2 | ||
kind: HelmRepository | ||
metadata: | ||
name: longhorn | ||
namespace: flux-system | ||
spec: | ||
interval: 1h | ||
url: https://charts.longhorn.io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters