validate-kubernetes-deployment

command module
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2019 License: MIT Imports: 12 Imported by: 0

README

validate-kubernetes-deployment

Validates kubernetes deployments and (optional) sends message to slack, exits with a non-zero status code if the deployment is not valid

Github Action

You can either pass in a path to your KUBECONFIG (Tipp: Save it in your repo and encrypt it with git-crypt)

action "Validate K8s Deployment" {
  uses = "docker://steffenmllr/validate-kubernetes-deployment:latest"
  secrets = ["SLACK_HOOK_URL"]
  env = {
    KUBECONFIG  = "/path/to/KUBECONFIG/within/workspace",
    NAMESPACE   = "staging",
    DEPLOYMENTS = "backend,frontend"
  }
}

Or you can pass in KUBE_CONFIG_DATA via SECRETS as base64 encoded like in the aws action example

action "Validate K8s Deployment" {
  uses = "docker://steffenmllr/validate-kubernetes-deployment:latest"
  secrets = ["SLACK_HOOK_URL", "KUBE_CONFIG_DATA]
  env = {
    NAMESPACE   = "staging",
    DEPLOYMENTS = "backend,frontend"
  }
}

Docker Usage
docker run -it \
-v path/to/kubeconfig.conf:/kubeconfig.conf \
-e KUBECONFIG=/kubeconfig.conf \
-e NAME="steffenmllr/validate-kubernetes-deployment v1.1.10" \
-e SLACK_HOOK_URL="https://hooks.slack.com/services/XXXX" \
-e NAMESPACE=staging \
-e DEPLOYMENTS=backend,frontend \
steffenmllr/validate-kubernetes-deployment:latest
Local Usage
make setup
make

NAME="steffenmllr/validate-kubernetes-deployment v1.1.10" \
SLACK_HOOK_URL="https://hooks.slack.com/services/XXXX" \
NAMESPACE=staging \
DEPLOYMENTS=backend,frontend \
./validate

Preview

Preview

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
borrwed from https://github.com/apex/actions/blob/master/slack/slack.go
borrwed from https://github.com/apex/actions/blob/master/slack/slack.go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL