From cc2b9e569781e0d581a462b2075e8012eacefc5d Mon Sep 17 00:00:00 2001 From: Conformitron Bot Date: Thu, 9 May 2024 22:02:31 +0000 Subject: [PATCH] Revert "Adding new and changed files for testing of PR_41" This reverts commit adace778d353b5fad3bf3eecf9f986b6475eab73. --- .../Partner/TestPartner2/config-map-41.yml | 13 ---- .../Partner/TestPartner2/external-secret.yaml | 16 ---- .../Partner/TestPartner2/kubecost-source.yaml | 10 --- .../Addons/Partner/TestPartner2/kubecost.yaml | 23 ------ .../Partner/TestPartner2/namespace.yaml | 8 -- .../TestPartner2/kubecost-testJob.yaml | 77 ------------------- 6 files changed, 147 deletions(-) delete mode 100644 eks-anywhere-common/Addons/Partner/TestPartner2/config-map-41.yml delete mode 100644 eks-anywhere-common/Addons/Partner/TestPartner2/external-secret.yaml delete mode 100644 eks-anywhere-common/Addons/Partner/TestPartner2/kubecost-source.yaml delete mode 100644 eks-anywhere-common/Addons/Partner/TestPartner2/kubecost.yaml delete mode 100644 eks-anywhere-common/Addons/Partner/TestPartner2/namespace.yaml delete mode 100644 eks-anywhere-common/Testers/TestPartner2/kubecost-testJob.yaml diff --git a/eks-anywhere-common/Addons/Partner/TestPartner2/config-map-41.yml b/eks-anywhere-common/Addons/Partner/TestPartner2/config-map-41.yml deleted file mode 100644 index 657aa835..00000000 --- a/eks-anywhere-common/Addons/Partner/TestPartner2/config-map-41.yml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: kubecost-configmap - namespace: kubecost - labels: - bot: conformitron -data: - Namespace: kubecost - prNumber: "41" - commitHash: c832c057a0fa9991fdc11135c8b62b1a2973ba27 - deployed: "1715291930" - env: common diff --git a/eks-anywhere-common/Addons/Partner/TestPartner2/external-secret.yaml b/eks-anywhere-common/Addons/Partner/TestPartner2/external-secret.yaml deleted file mode 100644 index 55733372..00000000 --- a/eks-anywhere-common/Addons/Partner/TestPartner2/external-secret.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: external-secrets.io/v1beta1 -kind: ExternalSecret -metadata: - name: kubecost-external-secret - namespace: kubecost -spec: - refreshInterval: 1m - secretStoreRef: - name: eksa-secret-store #The secret store name we have just created. - kind: ClusterSecretStore - target: - name: kubecost-secret # Secret name in k8s - data: - - secretKey: kubecost-token # which key it's going to be stored - remoteRef: - key: kubecost-token # Our secret-name goes here \ No newline at end of file diff --git a/eks-anywhere-common/Addons/Partner/TestPartner2/kubecost-source.yaml b/eks-anywhere-common/Addons/Partner/TestPartner2/kubecost-source.yaml deleted file mode 100644 index 6b42612f..00000000 --- a/eks-anywhere-common/Addons/Partner/TestPartner2/kubecost-source.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -apiVersion: source.toolkit.fluxcd.io/v1beta2 -kind: HelmRepository -metadata: - name: kubecost-charts - namespace: flux-system -spec: - interval: 30s - url: https://kubecost.github.io/cost-analyzer/ - diff --git a/eks-anywhere-common/Addons/Partner/TestPartner2/kubecost.yaml b/eks-anywhere-common/Addons/Partner/TestPartner2/kubecost.yaml deleted file mode 100644 index 67b4cccd..00000000 --- a/eks-anywhere-common/Addons/Partner/TestPartner2/kubecost.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -apiVersion: helm.toolkit.fluxcd.io/v2beta1 -kind: HelmRelease -metadata: - name: kubecost - namespace: kubecost -spec: - chart: - spec: - chart: cost-analyzer - reconcileStrategy: ChartVersion - sourceRef: - kind: HelmRepository - name: kubecost-charts - namespace: flux-system - version: 2.1.0 - interval: 1m0s - targetNamespace: kubecost - valuesFrom: - - kind: Secret - name: kubecost-secret - valuesKey: kubecost-token - targetPath: kubecostToken diff --git a/eks-anywhere-common/Addons/Partner/TestPartner2/namespace.yaml b/eks-anywhere-common/Addons/Partner/TestPartner2/namespace.yaml deleted file mode 100644 index e1ae7ba0..00000000 --- a/eks-anywhere-common/Addons/Partner/TestPartner2/namespace.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: kubecost - labels: - aws.conformance.vendor: kubecost - aws.conformance.vendor-solution: cost-analyzer - aws.conformance.vendor-solution-version: 2.1.0 \ No newline at end of file diff --git a/eks-anywhere-common/Testers/TestPartner2/kubecost-testJob.yaml b/eks-anywhere-common/Testers/TestPartner2/kubecost-testJob.yaml deleted file mode 100644 index a6cfbdd9..00000000 --- a/eks-anywhere-common/Testers/TestPartner2/kubecost-testJob.yaml +++ /dev/null @@ -1,77 +0,0 @@ -apiVersion: batch/v1 -kind: CronJob -metadata: - name: kubecost-healthtest - namespace: kubecost -spec: - schedule: "*/10 * * * *" - jobTemplate: - spec: - template: - spec: - securityContext: - seccompProfile: - type: RuntimeDefault - runAsNonRoot: true - runAsUser: 1000 - runAsGroup: 3000 - fsGroup: 2000 - serviceAccountName: tester - containers: - - name: test-kubecost - image: alpine/k8s:1.26.9 - securityContext: - privileged: false - capabilities: - drop: - - ALL - allowPrivilegeEscalation: false - readOnlyRootFilesystem: true - command: - - /bin/sh - args: - - -c - - >- - svc=$(kubectl get --raw /api/v1/namespaces/kubecost/services | jq -r '.items[] | select(.metadata.name | test("cost-analyzer$")).metadata.name'); - echo Getting current Kubecost state.; - response=$(curl -sL http://${svc}:9090/model/getConfigs); - code=$(echo ${response} | jq .code); - if [ "$code" -eq 200 ]; then - echo "Got Kubecost working configuration. Successful." - exit 0 - else - echo "Failed to fetch Kubecost configuration. Response was $response" - exit 1 - fi - restartPolicy: Never - backoffLimit: 1 ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: test-role - namespace: kubecost -rules: -- apiGroups: [""] - resources: ["services"] - verbs: ["list"] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: test-rolebinding - namespace: kubecost -subjects: -- kind: ServiceAccount - name: tester - namespace: kubecost -roleRef: - kind: Role - name: test-role - apiGroup: rbac.authorization.k8s.io ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: tester - namespace: kubecost \ No newline at end of file