Last active
June 8, 2020 05:21
-
-
Save makocchi-git/e4b3e1478ef16566561f9ac3879f5221 to your computer and use it in GitHub Desktop.
Validate your Kubernetes manifests with Conftest in the GitHub Actions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import data.lib.kubernetes | |
violation[msg] { | |
kubernetes.containers[container] | |
[image_name, "latest"] = kubernetes.split_image(container.image) | |
msg = kubernetes.format(sprintf("%s in the %s %s has an image, %s, using the latest tag", [container.name, kubernetes.kind, image_name, kubernetes.name])) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment