From 4d31888e35ccb61b1decc1eadc124c45013c8f2f Mon Sep 17 00:00:00 2001 From: Keiran Price Date: Thu, 14 Mar 2024 09:04:33 +0000 Subject: [PATCH 1/8] remove busybox and infinite runner --- components/debug/busybox.yaml | 42 ---------------------------- components/debug/infinite-runner.yml | 19 ------------- 2 files changed, 61 deletions(-) delete mode 100644 components/debug/busybox.yaml delete mode 100644 components/debug/infinite-runner.yml diff --git a/components/debug/busybox.yaml b/components/debug/busybox.yaml deleted file mode 100644 index a7696aa8..00000000 --- a/components/debug/busybox.yaml +++ /dev/null @@ -1,42 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: busybox - namespace: ir - labels: - app: busybox -spec: - replicas: 1 - selector: - matchLabels: - app: busybox - template: - metadata: - name: busybox - labels: - app: busybox - spec: - containers: - - name: busybox - image: busybox:1.30.1 - imagePullPolicy: IfNotPresent - command: - - "sh" - - "-c" - - "while true; do sleep 6000; done" - volumeMounts: - - mountPath: /mnt/var - name: host-var - - mountPath: /mnt/sbin - name: sbin - restartPolicy: Always - volumes: - - name: host-var - hostPath: - type: Directory - path: /var - - name: sbin - hostPath: - path: /usr/sbin - type: Directory - \ No newline at end of file diff --git a/components/debug/infinite-runner.yml b/components/debug/infinite-runner.yml deleted file mode 100644 index a9eb64c2..00000000 --- a/components/debug/infinite-runner.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: infinite-runner - namespace: ir -spec: - selector: - matchLabels: - app: infinite-runner - template: - metadata: - labels: - app: infinite-runner - spec: - containers: - - name: infinite-runner - image: ghcr.io/interactivereduction/runner@sha256:c167f65af1a4d2e51eec468b5ac97759a353d5a963ce2f01f6a959c5d957118d - args: ["import time; time.sleep(60*60*24*365)"] From 38e41a29fad7d929c7073404a60fde010414a653 Mon Sep 17 00:00:00 2001 From: Keiran Price Date: Thu, 14 Mar 2024 09:04:53 +0000 Subject: [PATCH 2/8] Update comment --- components/rabbitmq/base/queues.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/rabbitmq/base/queues.yml b/components/rabbitmq/base/queues.yml index 00ed5293..f5d5d1a4 100644 --- a/components/rabbitmq/base/queues.yml +++ b/components/rabbitmq/base/queues.yml @@ -8,7 +8,7 @@ spec: name: watched-files # name of the queue type: quorum # without providing a queue type, rabbitmq creates a classic queue autoDelete: false - durable: true # seting 'durable' to false means this queue won't survive a server restart + durable: true # setting 'durable' to false means this queue won't survive a server restart rabbitmqClusterReference: name: rabbitmq-cluster # rabbitmqCluster must exist in the same namespace as this resource --- From f852f09af9900cc4529d0e6a4f8c7c74cd445bca Mon Sep 17 00:00:00 2001 From: Keiran Price Date: Thu, 14 Mar 2024 09:05:05 +0000 Subject: [PATCH 3/8] Add kube-linter action --- .github/workflows/lint.yml | 19 +++++++++++++++++++ .kube-linter.yml | 4 ++++ 2 files changed, 23 insertions(+) create mode 100644 .github/workflows/lint.yml create mode 100644 .kube-linter.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..89c4dc61 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,19 @@ +--- +name: Lint yaml +on: push + +jobs: + run-kube-linter: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Scan repo with kube-linter + uses: stackrox/kube-linter-action@v1.0.4 + with: + directory: yamls + config: .kube-linter/config.yaml + format: sarif + output-file: kube-linter.sarif + continue-on-error: true \ No newline at end of file diff --git a/.kube-linter.yml b/.kube-linter.yml new file mode 100644 index 00000000..a04c9711 --- /dev/null +++ b/.kube-linter.yml @@ -0,0 +1,4 @@ +--- +checks: + addAllBuiltIn: true + exclude: [] \ No newline at end of file From adf426a07158b6ecd3366a2f191c92b7e873b386 Mon Sep 17 00:00:00 2001 From: Keiran Price Date: Thu, 14 Mar 2024 09:06:59 +0000 Subject: [PATCH 4/8] Remove the example config --- .github/workflows/lint.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 89c4dc61..02e06f09 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,7 +13,6 @@ jobs: uses: stackrox/kube-linter-action@v1.0.4 with: directory: yamls - config: .kube-linter/config.yaml format: sarif output-file: kube-linter.sarif continue-on-error: true \ No newline at end of file From 227953419a99639d5e718deac58195c94fdae8cd Mon Sep 17 00:00:00 2001 From: Keiran Price Date: Thu, 14 Mar 2024 09:07:19 +0000 Subject: [PATCH 5/8] update directory --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 02e06f09..35882ab7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -12,7 +12,7 @@ jobs: - name: Scan repo with kube-linter uses: stackrox/kube-linter-action@v1.0.4 with: - directory: yamls + directory: . format: sarif output-file: kube-linter.sarif continue-on-error: true \ No newline at end of file From f8e008ca9866f89a049e256b6e860fd6a457957b Mon Sep 17 00:00:00 2001 From: Keiran Price Date: Thu, 14 Mar 2024 09:14:48 +0000 Subject: [PATCH 6/8] Temporarily remove forced 0 exit --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 35882ab7..07967bc3 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -15,4 +15,4 @@ jobs: directory: . format: sarif output-file: kube-linter.sarif - continue-on-error: true \ No newline at end of file +# continue-on-error: true \ No newline at end of file From fdb4d65732380e0cb478279054a4f9cbf32a5c03 Mon Sep 17 00:00:00 2001 From: Keiran Price Date: Thu, 14 Mar 2024 09:18:36 +0000 Subject: [PATCH 7/8] Add back forced 0 exit --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 07967bc3..35882ab7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -15,4 +15,4 @@ jobs: directory: . format: sarif output-file: kube-linter.sarif -# continue-on-error: true \ No newline at end of file + continue-on-error: true \ No newline at end of file From 61945436f6479a91c33bd5b1d7a0d0b3009a0482 Mon Sep 17 00:00:00 2001 From: Keiran Price Date: Thu, 14 Mar 2024 09:28:13 +0000 Subject: [PATCH 8/8] Remove deploy-debug --- apps/deploy-debug/deployment.yml | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 apps/deploy-debug/deployment.yml diff --git a/apps/deploy-debug/deployment.yml b/apps/deploy-debug/deployment.yml deleted file mode 100644 index 1e9632d5..00000000 --- a/apps/deploy-debug/deployment.yml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: argoproj.io/v1alpha1 -kind: Application -metadata: - name: debug - namespace: argocd -spec: - destination: - namespace: ir - name: staging - project: staging - source: - path: components/debug - repoURL: https://github.com/interactivereduction/gitops.git - targetRevision: HEAD - syncPolicy: - automated: - prune: true - selfHeal: true - syncOptions: - - CreateNamespace=true \ No newline at end of file