From 43390b3a571bb33f017195d8a230c17c41b36844 Mon Sep 17 00:00:00 2001 From: mikemcd3912 Date: Thu, 21 Nov 2024 14:48:12 -0800 Subject: [PATCH] Removing Komodor Workload until open deployment issue is resolved --- .../Partner/Komodor/external-secret.yaml | 21 ---- .../Partner/Komodor/komodor-source.yaml | 10 -- .../Addons/Partner/Komodor/komodor.yaml | 40 -------- .../Addons/Partner/Komodor/namespace.yaml | 8 -- .../Testers/Komodor/komodor-testjob.yaml | 98 ------------------- 5 files changed, 177 deletions(-) delete mode 100644 eks-anywhere-common/Addons/Partner/Komodor/external-secret.yaml delete mode 100644 eks-anywhere-common/Addons/Partner/Komodor/komodor-source.yaml delete mode 100644 eks-anywhere-common/Addons/Partner/Komodor/komodor.yaml delete mode 100644 eks-anywhere-common/Addons/Partner/Komodor/namespace.yaml delete mode 100644 eks-anywhere-common/Testers/Komodor/komodor-testjob.yaml diff --git a/eks-anywhere-common/Addons/Partner/Komodor/external-secret.yaml b/eks-anywhere-common/Addons/Partner/Komodor/external-secret.yaml deleted file mode 100644 index e8f9149f..00000000 --- a/eks-anywhere-common/Addons/Partner/Komodor/external-secret.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: external-secrets.io/v1beta1 -kind: ExternalSecret -metadata: - name: komodor-external-secret - namespace: komodor -spec: - refreshInterval: 1m - secretStoreRef: - name: eksa-secret-store - kind: ClusterSecretStore - target: - name: k8s-watcher-secret-flux - data: - - secretKey: k8s-watcher-apiKey - remoteRef: - key: komodor-secrets - property: k8s-watcher-apiKey - - secretKey: k8s-watcher-clusterName - remoteRef: - key: komodor-secrets - property: k8s-watcher-clusterName \ No newline at end of file diff --git a/eks-anywhere-common/Addons/Partner/Komodor/komodor-source.yaml b/eks-anywhere-common/Addons/Partner/Komodor/komodor-source.yaml deleted file mode 100644 index 35f0f323..00000000 --- a/eks-anywhere-common/Addons/Partner/Komodor/komodor-source.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -apiVersion: source.toolkit.fluxcd.io/v1beta2 -kind: HelmRepository -metadata: - name: komodor-charts - namespace: flux-system -spec: - interval: 30s - url: https://helm-charts.komodor.io - diff --git a/eks-anywhere-common/Addons/Partner/Komodor/komodor.yaml b/eks-anywhere-common/Addons/Partner/Komodor/komodor.yaml deleted file mode 100644 index 69b04a22..00000000 --- a/eks-anywhere-common/Addons/Partner/Komodor/komodor.yaml +++ /dev/null @@ -1,40 +0,0 @@ ---- -apiVersion: helm.toolkit.fluxcd.io/v2beta1 -kind: HelmRelease -metadata: - name: k8s-watcher - namespace: komodor -spec: - chart: - spec: - chart: k8s-watcher - reconcileStrategy: ChartVersion - sourceRef: - kind: HelmRepository - name: komodor-charts - namespace: flux-system - version: 1.15.5 - interval: 1m0s - targetNamespace: komodor - values: - global: - thanos: - enabled: false - createNamespace: false - daemon: - tolerations: - - key: node-role.eks-local.amazonaws.com/control-plane - operator: Equal - effect: NoExecute - tolerationSeconds: 0 - valuesFrom: - - kind: Secret - name: k8s-watcher-secret-flux - valuesKey: k8s-watcher-apiKey - targetPath: apiKey - - kind: Secret - name: k8s-watcher-secret-flux - valuesKey: k8s-watcher-clusterName - targetPath: watcher.clusterName - - \ No newline at end of file diff --git a/eks-anywhere-common/Addons/Partner/Komodor/namespace.yaml b/eks-anywhere-common/Addons/Partner/Komodor/namespace.yaml deleted file mode 100644 index 46611c56..00000000 --- a/eks-anywhere-common/Addons/Partner/Komodor/namespace.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: komodor - labels: - aws.conformance.vendor: komodor - aws.conformance.vendor-solution: k8s-watcher - aws.conformance.vendor-solution-version: 1.15.5 \ No newline at end of file diff --git a/eks-anywhere-common/Testers/Komodor/komodor-testjob.yaml b/eks-anywhere-common/Testers/Komodor/komodor-testjob.yaml deleted file mode 100644 index 20615878..00000000 --- a/eks-anywhere-common/Testers/Komodor/komodor-testjob.yaml +++ /dev/null @@ -1,98 +0,0 @@ -apiVersion: batch/v1 -kind: CronJob -metadata: - name: komodor-tester-cron - namespace: komodor -spec: - schedule: "10 10 * * *" - jobTemplate: - spec: - template: - spec: - containers: - - name: job - image: 'alpine/k8s:1.26.2' - env: - - name: KOMOKW_API_KEY - valueFrom: - secretKeyRef: - name: k8s-watcher-secret-flux - key: k8s-watcher-apiKey - - name: KOMOKW_CLUSTER_NAME - valueFrom: - secretKeyRef: - name: k8s-watcher-secret-flux - key: k8s-watcher-clusterName - imagePullPolicy: Always - command: ["/bin/bash", "-c"] - args: - - | - #!/bin/bash - echo 1. Checking readiness probe for watcher - k8s_watcher_pod="..." - while [[ "$k8s_watcher_pod" != "komodor-k8s-watcher-"* ]]; do - k8s_watcher_pod=$(kubectl get pod -n komodor -l app.kubernetes.io/name=k8s-watcher --field-selector=status.phase==Running -o jsonpath="{.items[0].metadata.name}") && echo Waiting - echo Found watcher pod: $k8s_watcher_pod - sleep 5 - done - - echo 2. Creating test configmap - epoc_timestamp=$(date +%s) - echo $epoc_timestamp > epoc_timestamp - kubectl delete configmap -n komodor komodor-test-configmap --ignore-not-found=true - kubectl create configmap -n komodor komodor-test-configmap --from-file=epoc_timestamp - - echo 3. Checking if komodor identified the configmap - komodor_value_for_configmap="..." - count=0 - maximum_count=10 - while [ $count -lt $maximum_count ]; do - sleep 60 - - komodor_value_for_configmap=$(curl -s --location --request GET "https://app.komodor.com/resources/api/v1/configurations/config-maps/events/search?komodorUids=configmap|$KOMOKW_CLUSTER_NAME|komodor|komodor-test-configmap&limit=1&fields=newData&order=DESC" \ - --header "Accept: application/json" \ - --header "x-api-key: $KOMOKW_API_KEY" | jq -r '.data[0].newData.data | try to_entries[0].value') - - if [[ "$komodor_value_for_configmap" == "$epoc_timestamp" ]]; then - echo "Configmap value matches the desired timestamp. Exiting with code 0." - exit 0 - fi - - echo "Waiting for Komodor to identify the configmap" - echo "Current latest value in komodor = $komodor_value_for_configmap" - echo "Desired timestamp in configmap = $epoc_timestamp" - ((count++)) - done - - echo "Faild to find the configmap in Komodor. Exiting" - exit 1 - restartPolicy: Never - successfulJobsHistoryLimit: 3 - failedJobsHistoryLimit: 1 ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: test-role - namespace: komodor -rules: -- apiGroups: [""] - resources: ["pods"] - verbs: ["list"] -- apiGroups: [""] - resources: ["configmaps"] - verbs: ["create", "get", "list", "update", "delete"] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: test-rolebinding - namespace: komodor -subjects: -- kind: ServiceAccount - name: default - namespace: komodor -roleRef: - kind: Role - name: test-role - apiGroup: rbac.authorization.k8s.io \ No newline at end of file