Skip to content

Commit

Permalink
add k8s validate
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreBesson committed Oct 11, 2024
1 parent 811f712 commit fcf6e97
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 20 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/validate-k8s.yaml
Original file line number Diff line number Diff line change
@@ -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
20 changes: 0 additions & 20 deletions monitoring/monitoring-config-kustomization.yaml

This file was deleted.

0 comments on commit fcf6e97

Please sign in to comment.