namespace

command
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: MIT Imports: 9 Imported by: 0

README

Namespace Generator

It is a plugin for Kustomize that allows you to generate a Namespace with its access control definitions.

Using

We can start with a regular Kubernetes Namespace in its YAML format.

apiVersion: v1
kind: Namespace
metadata:
  name: my-namespace

To convert it to a file that will be processed by the plugin, we replace apiVersion: v1 with apiVersion: incognia.com/v1alpha1.

By doing this, you'll have access to the accessControl attribute. In it, you can define which groups will have read-only and read-write access to the namespace.

apiVersion: incognia.com/v1alpha1
kind: Namespace
metadata:
  name: my-namespace
accessControl:
  readOnly:
    - security:eng-0
  readWrite:
    - sre:eng-0
    - infrastructure:eng-0

Now we can specify ./namespace.yaml as a generator on kustomization.yaml:

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
generators:
  - ./namespace.yaml

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