Skip to content

Mutating webhook that maps namespaces to Rancher projects, and also offers permit/deny of namespace creation based on regex rules.

Notifications You must be signed in to change notification settings

ebauman/rancher-project-mapper

Repository files navigation

Rancher Project Mapper

A mutating webhook server that adds a project annotation to a namespace depending on regex rules. It also helps you allow or deny creation of namespaces based on regex rules.

Components

Webhook Server

This code here.

go get && go build to get it built.

Arguments:

-v                      Log level (klog)
--namespace             Namespace containing the ConfigMap
--config-map            Name of the ConfigMap
--kubeconfig            The location of kubeconfig. Implies out-of-cluster.
--tls-cert-file         File that contains the TLS certificate for this server. PEM format.
--tls-private-key-file  File that contains the TLS key for this server. PEM format.

Can run inside the cluster or outside.

If running inside the cluster, the service account needs to be able to get a configmap called rancher-project-mapper from the cattle-system namespace.

If running outside the cluster, a kubeconfig file is required. The server will attempt to intuit the location of your kubeconfig file (typically, $HOME/.kube/config), but may require manual specification.

About

Mutating webhook that maps namespaces to Rancher projects, and also offers permit/deny of namespace creation based on regex rules.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published