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 |
Adds a peer for the claim namespace. |
|
Adds a peer per named namespace. |
|
A single |
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.