From 517955523a7bdda0b0036dc9bad790cc1dc42d2f Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Wed, 9 Oct 2024 13:07:48 -0700 Subject: [PATCH 1/5] OpenEBS for Hybrid Node storage --- .../Core/storage-driver/kustomization.yaml | 4 +++ .../storage-driver/openebs/helm-release.yaml | 19 +++++++++++ .../storage-driver/openebs/helm-repo.yaml | 10 ++++++ .../storage-driver/openebs/kustomization.yaml | 6 ++++ .../storage-driver/openebs/namespace.yaml | 4 +++ .../Core/storage-driver/storage-driver.yaml | 14 ++++++++ .../Addons/Partner/Sample/manifestJob.yaml | 34 +++++++++---------- 7 files changed, 74 insertions(+), 17 deletions(-) create mode 100644 eks-anywhere-hybrid/Addons/Core/storage-driver/kustomization.yaml create mode 100644 eks-anywhere-hybrid/Addons/Core/storage-driver/openebs/helm-release.yaml create mode 100644 eks-anywhere-hybrid/Addons/Core/storage-driver/openebs/helm-repo.yaml create mode 100644 eks-anywhere-hybrid/Addons/Core/storage-driver/openebs/kustomization.yaml create mode 100644 eks-anywhere-hybrid/Addons/Core/storage-driver/openebs/namespace.yaml create mode 100644 eks-anywhere-hybrid/Addons/Core/storage-driver/storage-driver.yaml diff --git a/eks-anywhere-hybrid/Addons/Core/storage-driver/kustomization.yaml b/eks-anywhere-hybrid/Addons/Core/storage-driver/kustomization.yaml new file mode 100644 index 00000000..62f97ebf --- /dev/null +++ b/eks-anywhere-hybrid/Addons/Core/storage-driver/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - storage-driver.yaml \ No newline at end of file diff --git a/eks-anywhere-hybrid/Addons/Core/storage-driver/openebs/helm-release.yaml b/eks-anywhere-hybrid/Addons/Core/storage-driver/openebs/helm-release.yaml new file mode 100644 index 00000000..58dee1e2 --- /dev/null +++ b/eks-anywhere-hybrid/Addons/Core/storage-driver/openebs/helm-release.yaml @@ -0,0 +1,19 @@ +--- +apiVersion: helm.toolkit.fluxcd.io/v2beta1 +kind: HelmRelease +metadata: + name: openebs + namespace: openebs +spec: + chart: + spec: + chart: openebs + reconcileStrategy: ChartVersion + sourceRef: + kind: HelmRepository + name: openebs + namespace: openebs + version: "3.3.0" + interval: 60s + targetNamespace: openebs + diff --git a/eks-anywhere-hybrid/Addons/Core/storage-driver/openebs/helm-repo.yaml b/eks-anywhere-hybrid/Addons/Core/storage-driver/openebs/helm-repo.yaml new file mode 100644 index 00000000..d9665841 --- /dev/null +++ b/eks-anywhere-hybrid/Addons/Core/storage-driver/openebs/helm-repo.yaml @@ -0,0 +1,10 @@ +--- +apiVersion: source.toolkit.fluxcd.io/v1beta2 +kind: HelmRepository +metadata: + name: openebs + namespace: openebs +spec: + interval: 30s + url: https://openebs.github.io/charts + diff --git a/eks-anywhere-hybrid/Addons/Core/storage-driver/openebs/kustomization.yaml b/eks-anywhere-hybrid/Addons/Core/storage-driver/openebs/kustomization.yaml new file mode 100644 index 00000000..de9f0a84 --- /dev/null +++ b/eks-anywhere-hybrid/Addons/Core/storage-driver/openebs/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - namespace.yaml + - helm-repo.yaml + - helm-release.yaml \ No newline at end of file diff --git a/eks-anywhere-hybrid/Addons/Core/storage-driver/openebs/namespace.yaml b/eks-anywhere-hybrid/Addons/Core/storage-driver/openebs/namespace.yaml new file mode 100644 index 00000000..21752858 --- /dev/null +++ b/eks-anywhere-hybrid/Addons/Core/storage-driver/openebs/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: openebs \ No newline at end of file diff --git a/eks-anywhere-hybrid/Addons/Core/storage-driver/storage-driver.yaml b/eks-anywhere-hybrid/Addons/Core/storage-driver/storage-driver.yaml new file mode 100644 index 00000000..a99b4deb --- /dev/null +++ b/eks-anywhere-hybrid/Addons/Core/storage-driver/storage-driver.yaml @@ -0,0 +1,14 @@ +apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 +kind: Kustomization +metadata: + name: openebs + namespace: flux-system +spec: + path: "./eks-anywhere-hybrid/Addons/Core/storage-driver/openebs" + sourceRef: + kind: GitRepository + name: addons + namespace: flux-system + interval: 5m0s + prune: true +--- diff --git a/eks-anywhere-hybrid/Addons/Partner/Sample/manifestJob.yaml b/eks-anywhere-hybrid/Addons/Partner/Sample/manifestJob.yaml index 20e448a6..d8af2e88 100644 --- a/eks-anywhere-hybrid/Addons/Partner/Sample/manifestJob.yaml +++ b/eks-anywhere-hybrid/Addons/Partner/Sample/manifestJob.yaml @@ -1,17 +1,17 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: sample-hybrid-manifestjob - namespace: default -spec: - backoffLimit: 1 - template: - spec: - containers: - - name: job - image: busybox - args: - - /bin/sh - - -c - - date; echo sleeping....; sleep 5s; exit 1; - restartPolicy: Never +# apiVersion: batch/v1 +# kind: Job +# metadata: +# name: sample-hybrid-manifestjob +# namespace: default +# spec: +# backoffLimit: 1 +# template: +# spec: +# containers: +# - name: job +# image: busybox +# args: +# - /bin/sh +# - -c +# - date; echo sleeping....; sleep 5s; exit 1; +# restartPolicy: Never From fbe9f576f0e0deaa8cb11dfb14e6066d3b74494c Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Wed, 9 Oct 2024 13:40:05 -0700 Subject: [PATCH 2/5] Pull Sysdig --- .../Testers/Sysdig/sysdig-testJob.yaml | 33 ------------------- 1 file changed, 33 deletions(-) delete mode 100644 eks-anywhere-common/Testers/Sysdig/sysdig-testJob.yaml diff --git a/eks-anywhere-common/Testers/Sysdig/sysdig-testJob.yaml b/eks-anywhere-common/Testers/Sysdig/sysdig-testJob.yaml deleted file mode 100644 index 0121c4d1..00000000 --- a/eks-anywhere-common/Testers/Sysdig/sysdig-testJob.yaml +++ /dev/null @@ -1,33 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: sysdig-agent-tester - namespace: sysdig -spec: - template: - spec: - serviceAccountName: 'sysdig-agent' - containers: - - name: test-sysdig-agent - image: 'alpine/k8s:1.26.2' - imagePullPolicy: Always - command: - - /bin/bash - args: - - '-c' - - >- - echo 1. Checking readiness probe - sysdig_pod="..."; - while [[ "$sysdig_pod" != "sysdig-agent-"* ]]; - do sysdig_pod=`kubectl get pod -n sysdig -l app=sysdig-agent --field-selector=status.phase==Running -o jsonpath="{.items[0].metadata.name}"` && echo Waiting; - sleep 15; - done; - echo 2. Checking audit port - sysdig_audit="..."; - while [[ "$sysdig_audit" != *"Connected"* ]]; - do sysdig_audit=`curl -ksv --connect-timeout 4 telnet://sysdig-agent.sysdig.svc.cluster.local:7765 2>&1` && echo Connecting; - sleep 2; - done; - echo Success; - restartPolicy: Never - backoffLimit: 1 From 22c43e9f3c244ed87243a63bf75e628808612c4b Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Wed, 9 Oct 2024 14:21:17 -0700 Subject: [PATCH 3/5] Local hostpath SC update --- .../storage-driver/openebs/local-hostpath-sc.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 eks-anywhere-hybrid/Addons/Core/storage-driver/openebs/local-hostpath-sc.yaml diff --git a/eks-anywhere-hybrid/Addons/Core/storage-driver/openebs/local-hostpath-sc.yaml b/eks-anywhere-hybrid/Addons/Core/storage-driver/openebs/local-hostpath-sc.yaml new file mode 100644 index 00000000..f372f4c1 --- /dev/null +++ b/eks-anywhere-hybrid/Addons/Core/storage-driver/openebs/local-hostpath-sc.yaml @@ -0,0 +1,14 @@ +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: local-hostpath + annotations: + openebs.io/cas-type: local + cas.openebs.io/config: | + - name: StorageType + value: hostpath + - name: BasePath + value: /mnt/lpv +provisioner: openebs.io/local +reclaimPolicy: Delete +volumeBindingMode: WaitForFirstConsumer \ No newline at end of file From 78468b53842d2c6d6bc677f1fa9179fcba0741d3 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Wed, 9 Oct 2024 14:26:59 -0700 Subject: [PATCH 4/5] Local hostpath SC update --- .../Addons/Core/storage-driver/openebs/kustomization.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eks-anywhere-hybrid/Addons/Core/storage-driver/openebs/kustomization.yaml b/eks-anywhere-hybrid/Addons/Core/storage-driver/openebs/kustomization.yaml index de9f0a84..1ce94f6b 100644 --- a/eks-anywhere-hybrid/Addons/Core/storage-driver/openebs/kustomization.yaml +++ b/eks-anywhere-hybrid/Addons/Core/storage-driver/openebs/kustomization.yaml @@ -3,4 +3,5 @@ kind: Kustomization resources: - namespace.yaml - helm-repo.yaml - - helm-release.yaml \ No newline at end of file + - helm-release.yaml + - local-hostpath-sc.yaml \ No newline at end of file From 9c871d7534dbd067cf35d0400394bd961f010c1b Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Wed, 9 Oct 2024 14:29:49 -0700 Subject: [PATCH 5/5] Local hostpath SC update --- .../Addons/Core/storage-driver/openebs/local-hostpath-sc.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/eks-anywhere-hybrid/Addons/Core/storage-driver/openebs/local-hostpath-sc.yaml b/eks-anywhere-hybrid/Addons/Core/storage-driver/openebs/local-hostpath-sc.yaml index f372f4c1..291593cb 100644 --- a/eks-anywhere-hybrid/Addons/Core/storage-driver/openebs/local-hostpath-sc.yaml +++ b/eks-anywhere-hybrid/Addons/Core/storage-driver/openebs/local-hostpath-sc.yaml @@ -3,6 +3,7 @@ kind: StorageClass metadata: name: local-hostpath annotations: + storageclass.kubernetes.io/is-default-class: true openebs.io/cas-type: local cas.openebs.io/config: | - name: StorageType