Install and try it

Against a kind (or any) cluster:

kubectl apply -k config/crd
kubectl label namespace default chrysopoeia.io/instance=
just run          # in a second terminal
kubectl apply -k config/samples
kubectl get network configs -w   # PHASE -> Ready
kubectl get networkpolicy allow-service-access -o yaml

The sample creates a NetworkConfig named sample that allows ingress from some-namespace and asks for one TCP exposure. The controller writes a NetworkPolicy named allow-service-access into the network config’s namespace and sets the phase to Ready once the exposure is ready.

Ingress peers come from three places:

Source Effect

The chrysopoeia.io/claim-namespace annotation on the network config’s own namespace

Adds a peer for the claim namespace.

spec.allowedNamespaces

Adds a peer per named namespace.

spec.allowAllNamespaces: true

A single namespaceSelector: {} peer, matching every namespace in the cluster. Overrides the other two. Traffic from outside the cluster stays blocked.

With no annotation and an empty allowedNamespaces, no policy is written at all, so an incomplete spec can’t turn into an accidental allow-all. Set allowAllNamespaces when you actually want one.

config/default deploys RBAC and the manager, but not the CRDs. Install the CRDs separately from config/crd first:

kubectl apply -k config/crd
kubectl apply -k config/default

Keep leader election on when you run more than one replica. It is on by default. With --leader-elect=false, two replicas hand out the same port to different exposures.