Add fstrim.
This commit is contained in:
parent
aadaaa1704
commit
9700f92998
4 changed files with 109 additions and 0 deletions
81
kubernetes/apps/kube-system/fstrim/app/helmrelease.yaml
Normal file
81
kubernetes/apps/kube-system/fstrim/app/helmrelease.yaml
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
---
|
||||||
|
# yaml-language-server: $schema=https://ks.hsn.dev/helm.toolkit.fluxcd.io/helmrelease_v2beta2.json
|
||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2beta2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: &app fstrim
|
||||||
|
spec:
|
||||||
|
interval: 30m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: app-template
|
||||||
|
version: 2.6.0
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: bjw-s
|
||||||
|
namespace: flux-system
|
||||||
|
install:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
upgrade:
|
||||||
|
cleanupOnFail: true
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
uninstall:
|
||||||
|
keepHistory: false
|
||||||
|
values:
|
||||||
|
controllers:
|
||||||
|
main:
|
||||||
|
type: cronjob
|
||||||
|
cronjob:
|
||||||
|
schedule: "@weekly"
|
||||||
|
parallelism: 6 # Set to my total number of nodes
|
||||||
|
containers:
|
||||||
|
main:
|
||||||
|
image:
|
||||||
|
repository: ghcr.io/onedr0p/kubanetics
|
||||||
|
tag: 2024.2.5@sha256:2a080371b9e49a365229e86f19450d596e48e43fd7213a00a0ca39fb2f76dfd5
|
||||||
|
env:
|
||||||
|
SCRIPT_NAME: fstrim.sh
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
enabled: false
|
||||||
|
readiness:
|
||||||
|
enabled: false
|
||||||
|
startup:
|
||||||
|
enabled: false
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 25m
|
||||||
|
limits:
|
||||||
|
memory: 128Mi
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
pod:
|
||||||
|
hostNetwork: true
|
||||||
|
hostPID: true
|
||||||
|
topologySpreadConstraints:
|
||||||
|
- maxSkew: 1
|
||||||
|
topologyKey: kubernetes.io/hostname
|
||||||
|
whenUnsatisfiable: DoNotSchedule
|
||||||
|
labelSelector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: *app
|
||||||
|
service:
|
||||||
|
main:
|
||||||
|
enabled: false
|
||||||
|
persistence:
|
||||||
|
procfs:
|
||||||
|
type: hostPath
|
||||||
|
hostPath: /proc
|
||||||
|
hostPathType: Directory
|
||||||
|
globalMounts:
|
||||||
|
- path: /host/proc
|
||||||
|
readOnly: true
|
||||||
|
netfs:
|
||||||
|
type: hostPath
|
||||||
|
hostPath: /sys
|
||||||
|
hostPathType: Directory
|
||||||
|
globalMounts:
|
||||||
|
- path: /host/net
|
||||||
|
readOnly: true
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- ./helmrelease.yaml
|
21
kubernetes/apps/kube-system/fstrim/ks.yaml
Normal file
21
kubernetes/apps/kube-system/fstrim/ks.yaml
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
---
|
||||||
|
# yaml-language-server: $schema=https://ks.hsn.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
|
||||||
|
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||||
|
kind: Kustomization
|
||||||
|
metadata:
|
||||||
|
name: &app fstrim
|
||||||
|
namespace: flux-system
|
||||||
|
spec:
|
||||||
|
targetNamespace: kube-system
|
||||||
|
commonMetadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: *app
|
||||||
|
path: ./kubernetes/apps/kube-system/fstrim/app
|
||||||
|
prune: true
|
||||||
|
sourceRef:
|
||||||
|
kind: GitRepository
|
||||||
|
name: homelab
|
||||||
|
wait: false
|
||||||
|
interval: 30m
|
||||||
|
retryInterval: 1m
|
||||||
|
timeout: 5m
|
|
@ -8,6 +8,7 @@ resources:
|
||||||
# Flux-Kustomizations
|
# Flux-Kustomizations
|
||||||
# - ./cilium/ks.yaml
|
# - ./cilium/ks.yaml
|
||||||
- ./descheduler/ks.yaml
|
- ./descheduler/ks.yaml
|
||||||
|
- ./fstrim/ks.yaml
|
||||||
- ./metrics-server/ks.yaml
|
- ./metrics-server/ks.yaml
|
||||||
- ./node-feature-discovery/ks.yaml
|
- ./node-feature-discovery/ks.yaml
|
||||||
- ./reloader/ks.yaml
|
- ./reloader/ks.yaml
|
||||||
|
|
Loading…
Reference in a new issue