Skip to content

Instantly share code, notes, and snippets.

@RoseSecurity
Created February 23, 2024 20:12
Show Gist options
  • Save RoseSecurity/21fee084416cfd1d1088a5088de52507 to your computer and use it in GitHub Desktop.
Save RoseSecurity/21fee084416cfd1d1088a5088de52507 to your computer and use it in GitHub Desktop.
A GitLab CI Pipeline for discovering deprecated Kubernetes APIs inside of repository manifest files
kubernetes-api-deprecation:
image:
name: golang:1.22-bookworm
variables:
KUBERNETES_TARGET_VERSION: "1.27"
before_script:
- apt-get update && apt-get install -y git
script:
- git clone https://github.com/doitintl/kube-no-trouble.git
- cd kube-no-trouble/
- go build -o bin/kubent cmd/kubent/main.go
- FILES=($(find . -type f -name '*.yaml')); bin/kubent ${FILES[@]/#/-f} --helm3=false -c=false --target-version=${KUBERNETES_TARGET_VERSION}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment