diff --git a/.github/workflows/validate-k8s.yaml b/.github/workflows/validate-k8s.yaml new file mode 100644 index 0000000..fef2b54 --- /dev/null +++ b/.github/workflows/validate-k8s.yaml @@ -0,0 +1,31 @@ +name: kubectl-validate +# Controls when the workflow will run +on: + push: + branches: [ "v2" ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: +jobs: + k8sManifestsValidation: + runs-on: ubuntu-latest + steps: + - name: Checkout repo content + uses: actions/checkout@v3 + + - name: Setup go + uses: actions/setup-go@v4 + with: + go-version: '1.20' + + - name: Install kustomize + run: curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash + + - name: Install kubectl-validate + run: go install sigs.k8s.io/kubectl-validate@latest + + - name: Render all manifest with kustomize + run: kustomize build --enable-helm > manifests.yaml + + - name: Run kubectl-validate + run: kubectl-validate ./k8s-manifest/ --version 1.23 \ No newline at end of file diff --git a/monitoring/monitoring-config-kustomization.yaml b/monitoring/monitoring-config-kustomization.yaml deleted file mode 100644 index 61ff8aa..0000000 --- a/monitoring/monitoring-config-kustomization.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -configMapGenerator: -- name: monitoring - options: - disableNameSuffixHash: true - literals: - - "LOKI_URL=https://logs-prod-012.grafana.net/loki/api/v1/push" - - "LOKI_USERNAME=967777" - - "PROM_URL=https://prometheus-prod-24-prod-eu-west-2.grafana.net/api/prom/push" - - "PROM_USERNAME=1736103" - -secretGenerator: -- name: credentials - options: - disableNameSuffixHash: true - literals: - - "prom_password=***" - - "loki_password=***"