kubewarden-palindrome-policy

command module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

README

Avoid Palindrome Pod Labels Policy

This repository contains a Kubewarden policy written in Go to reject Pods with at least one label wiyh palindrome key.

More information about Kubewarden and its policies can be found in the official documentation

The policy allows the creation of this Pod:

apiVersion: v1
kind: Pod
metadata:
  name: hello-world
  labels:
    env: production
spec:
  containers:
  - name: nginx
    image: nginx

and rejects the creation of this Pod:

apiVersion: v1
kind: Pod
metadata:
  name: hello-world
  labels:
    env: production
    level: debug
spec:
  containers:
  - name: nginx
    image: nginx

Requirements:

  • Keys of one unique character shall not be consider palindrome
  • If the key has prefix (/), both the key prefix and the key name shall be considered
  • The policy shall be case insensitive
  • The policy shall apply only to Pods

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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