kubevious / rules-library

Library of common community driven rules for Kubevious

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Codefresh build status

Kubevious Rules Library

This repository represents a library of rules for Kubevious CLI project to validate errors (typos, conflicts, misconfigurations) and violations of compliance and security best practices in Kubernetes and related cloud-native projects.

Kubevious rules are expressed in a domain-specific language called Kubik.

Kubevious CLI Video

Library Contents

Total Rules: 33

Locations:

Rules:

πŸ“‚ ARGO-ROLLOUT

πŸ“œ Validate Argo Rollout to Analysis Template reference.

  • 🏷️ argo 🏷️ rollout 🏷️ analysis 🏷️ reference

πŸ“‚ CERT-MANAGER

πŸ“œ Validate CertManager Certificate to Issuer reference.

  • 🏷️ cert-manager 🏷️ certificate 🏷️ issuer 🏷️ reference

πŸ“œ Validate Ingress to CertManager Issuer reference.

  • 🏷️ cert-manager 🏷️ ingress 🏷️ issuer 🏷️ reference

πŸ“‚ ISTIO

πŸ“œ Validate Istio VirtualService to IstioGateway reference.

  • 🏷️ istio 🏷️ virtual-service 🏷️ istio-gateway 🏷️ reference

πŸ“‚ K8S/CONTAINER

πŸ“œ Validate ContainerSpec environment variable ConfigMap reference.

  • 🏷️ k8s 🏷️ container 🏷️ environment-variable 🏷️ config-map 🏷️ reference

πŸ“œ Validate ContainerSpec envFrom variables projection ConfigMap reference.

  • 🏷️ k8s 🏷️ container 🏷️ environment-variable 🏷️ config-map 🏷️ reference

πŸ“œ Validate ContainerSpec envFrom variables projection Secret reference.

  • 🏷️ k8s 🏷️ container 🏷️ environment-variable 🏷️ secret 🏷️ reference

πŸ“œ Validate ContainerSpec environment variable Secret reference.

  • 🏷️ k8s 🏷️ container 🏷️ environment-variable 🏷️ secret 🏷️ reference

πŸ“œ Validate ContainerSpec image to have non latest tag.

  • 🏷️ k8s 🏷️ container 🏷️ image 🏷️ latest

πŸ“œ Validate ContainerSpec resource requests to be less or equal to the limits.

  • 🏷️ k8s 🏷️ container 🏷️ resources 🏷️ cpu 🏷️ memory 🏷️ request 🏷️ limit

πŸ“œ Validate ContainerSpec volume mount to PodSpec volume reference.

  • 🏷️ k8s 🏷️ container 🏷️ volume 🏷️ volume-mount 🏷️ reference

πŸ“‚ K8S/GATEWAY-API/GATEWAY

πŸ“œ Validate Gateway to Certificate Secret reference.

  • 🏷️ k8s 🏷️ gateway-api 🏷️ gateway 🏷️ certificate 🏷️ reference

πŸ“œ Validate Gateway to GatewayClass reference.

  • 🏷️ k8s 🏷️ gateway-api 🏷️ gateway 🏷️ gateway-class 🏷️ reference

πŸ“œ Validate Gateway to have unique listeners.

  • 🏷️ k8s 🏷️ gateway-api 🏷️ gateway 🏷️ unique-listeners

πŸ“‚ K8S/GATEWAY-API/HTTP-ROUTE

πŸ“œ Validate HTTPRoute to Backend reference.

  • 🏷️ k8s 🏷️ gateway-api 🏷️ http-route 🏷️ backend 🏷️ reference

πŸ“œ Validate HTTPRoute to Gateway reference.

  • 🏷️ k8s 🏷️ gateway-api 🏷️ http-route 🏷️ gateway 🏷️ reference

πŸ“‚ K8S/HPA

πŸ“œ Validate HorizontalPodAutoscaler to scale target reference.

  • 🏷️ k8s 🏷️ hpa 🏷️ target 🏷️ reference

πŸ“‚ K8S/INGRESS

πŸ“œ Validate Ingress (extension) to Service reference.

  • 🏷️ k8s 🏷️ ingress 🏷️ ingress-extension 🏷️ service 🏷️ reference

πŸ“œ Validate Ingress to Service reference.

  • 🏷️ k8s 🏷️ ingress 🏷️ service 🏷️ reference

πŸ“œ Validate Ingress TLS and rule domain match.

  • 🏷️ k8s 🏷️ ingress 🏷️ ingress-extension 🏷️ tls 🏷️ domain

πŸ“œ Validate Ingresses to have unique routing rules.

  • 🏷️ k8s 🏷️ ingress 🏷️ ingress-extension 🏷️ unique-route

πŸ“œ Validate IngressClasses to have at most only one default.

  • 🏷️ k8s 🏷️ ingress-class 🏷️ unique-default

πŸ“‚ K8S/NETWORK-POLICY

πŸ“œ Validate NetworkPolicy to PodSpec reference.

  • 🏷️ k8s 🏷️ network-policy 🏷️ pod-spec 🏷️ reference

πŸ“‚ K8S/POD-SPEC

πŸ“œ Validate PodSpec to ServiceAccount reference.

  • 🏷️ k8s 🏷️ pod-spec 🏷️ service-account 🏷️ reference

πŸ“œ Validate PodSpec volume mount ConfigMap reference.

  • 🏷️ k8s 🏷️ pod-spec 🏷️ config-map 🏷️ volume 🏷️ reference

πŸ“œ Validate PodSpec volume mount PersistentVolumeClaim reference.

  • 🏷️ k8s 🏷️ pod-spec 🏷️ pvc 🏷️ volume 🏷️ reference

πŸ“œ Validate PodSpec volume mount Secret reference.

  • 🏷️ k8s 🏷️ pod-spec 🏷️ secret 🏷️ volume 🏷️ reference

πŸ“‚ K8S/RBAC

πŸ“œ Validate RoleBinding and ClusterRoleBinding to Role and ClusterRole reference.

  • 🏷️ k8s 🏷️ rbac 🏷️ binding 🏷️ role 🏷️ reference

πŸ“œ Validate RoleBinding and ClusterRoleBinding to ServiceAccount subject reference.

  • 🏷️ k8s 🏷️ rbac 🏷️ binding 🏷️ service-account 🏷️ reference

πŸ“‚ K8S/SERVICE

πŸ“œ Validate Service to PodSpec label selector reference.

  • 🏷️ k8s 🏷️ service 🏷️ pod-spec 🏷️ reference

πŸ“‚ K8S/WORKLOAD

πŸ“œ Checks Deployments to have min/max replicas - with or without HPAs.

  • 🏷️ k8s 🏷️ deployment 🏷️ replica-count

πŸ“‚ KONG

πŸ“œ Validate KongConsumer to Credential Secret reference.

  • 🏷️ kong 🏷️ consumer 🏷️ credential 🏷️ secret 🏷️ reference

πŸ“œ Validate Ingress and Service to Kong Plugin reference

  • 🏷️ kong 🏷️ ingress 🏷️ service 🏷️ plugin 🏷️ reference

Contributing

To submit your rules to the library follow the steps:

  1. Find the right place for the rule under root directory.
  2. Index the library using:
$ kubevious index-library .
  1. Submit a pull request.

About

Library of common community driven rules for Kubevious

License:Apache License 2.0


Languages

Language:Shell 100.0%