Skip to content

Commit

Permalink
fix: add fstrim back
Browse files Browse the repository at this point in the history
Signed-off-by: Devin Buhl <[email protected]>
  • Loading branch information
onedr0p committed Sep 29, 2024
1 parent fd78b56 commit 0ff5c13
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 0 deletions.
74 changes: 74 additions & 0 deletions kubernetes/main/apps/kube-system/fstrim/app/helmrelease.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2.schema.json
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: &app fstrim
spec:
interval: 30m
chart:
spec:
chart: app-template
version: 3.4.0
sourceRef:
kind: HelmRepository
name: bjw-s
namespace: flux-system
install:
remediation:
retries: 3
upgrade:
cleanupOnFail: true
remediation:
strategy: rollback
retries: 3
values:
controllers:
fstrim:
type: cronjob
cronjob:
schedule: "@monthly"
timeZone: &timeZone America/New_York
parallelism: 6 # Set to total number of nodes
successfulJobsHistory: 1
failedJobsHistory: 1
containers:
app:
image:
repository: ghcr.io/onedr0p/kubanetics
tag: 2024.9.2@sha256:4235f4ac14d7f4d26216d552c0b2fdc0c51a85ecdb976600fd22760f97ba07a7
env:
SCRIPT_NAME: fstrim.sh
TZ: *timeZone
resources:
requests:
cpu: 25m
limits:
memory: 128Mi
securityContext:
privileged: true
defaultPodOptions:
hostNetwork: true
hostPID: true
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
app.kubernetes.io/name: *app
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
Original file line number Diff line number Diff line change
@@ -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 changes: 21 additions & 0 deletions kubernetes/main/apps/kube-system/fstrim/ks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.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/main/apps/kube-system/fstrim/app
prune: true
sourceRef:
kind: GitRepository
name: home-kubernetes
wait: false
interval: 30m
retryInterval: 1m
timeout: 5m
1 change: 1 addition & 0 deletions kubernetes/main/apps/kube-system/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ resources:
- ./coredns/ks.yaml
- ./cilium/ks.yaml
- ./descheduler/ks.yaml
- ./fstrim/ks.yaml
- ./intel-device-plugin/ks.yaml
- ./kubelet-csr-approver/ks.yaml
- ./metrics-server/ks.yaml
Expand Down

0 comments on commit 0ff5c13

Please sign in to comment.