Install the operator chart:
helm upgrade --install ctf-operator ./helm/ctf-operator \
--namespace ctf-operator \
--create-namespace \
--set watchNamespaces[0]=ctf \
--set instanceNamespacePrefix=ctf-inst-Install with additional watched namespaces:
helm upgrade --install ctf-operator ./helm/ctf-operator \
--namespace ctf-operator \
--create-namespace \
--set watchNamespaces[0]=ctf \
--set watchNamespaces[1]=ctf-admin \
--set instanceNamespacePrefix=ctf-inst-Disable CRD install from this chart release:
helm upgrade --install ctf-operator ./helm/ctf-operator \
--namespace ctf-operator \
--create-namespace \
--set crds.install=falseDefault security hardening in chart:
runAsNonRootwith non-root UID/GIDseccompProfile: RuntimeDefaultallowPrivilegeEscalation: false- dropped Linux capabilities
readOnlyRootFilesystem: true
The service account is cluster-scoped via ClusterRole + ClusterRoleBinding to allow dynamic namespace creation and instance provisioning in new namespaces.
Namespace safety is enforced in operator logic using:
watchNamespaces: explicit namespacesinstanceNamespacePrefix: prefix used for per-instance runtime namespaces created by operator
Resources in namespaces that are not watchNamespaces (for CRD control plane) and not instanceNamespacePrefix* (for provisioned runtime resources) are ignored by reconcilers.
Permissions include:
- operator CRDs (
ctfs,challenges,flags,instances,portclaims,reservationsets) - status/finalizer updates
- creating/updating/deleting
DeploymentsandServices - namespace creation for dynamically provisioned instance namespaces
The CLI now includes a local cluster bootstrap flow using kind.
cargo run -p ctf-cli -- cluster createWhat it does:
- creates a local
kindcluster (default name:ctf) - optionally installs Cilium when
--ciliumis set - builds
ctf-operator:localimage and loads it into kind - installs the operator from
./helm/ctf-operator - optionally applies a CTF and all referenced challenges
Default behavior is without Cilium. Use --cilium to enable it.
Example with CTF apply:
cargo run -p ctf-cli -- cluster create --ctf ./examples/ctf.yamlExample with multiple watched namespaces:
cargo run -p ctf-cli -- cluster create \
--namespace ctf,ctf-admin \
--instance-namespace-prefix ctf-inst- \
--operator-replicas 1operator-replicas defaults to 1 because leader election/lease coordination is not yet implemented.
To install Helm/CRDs but keep the in-cluster operator scaled to zero (for local manual operator runs), use:
cargo run -p ctf-cli -- cluster create ./examples/ctf.yaml --no-operatorInstall the Helm unittest plugin:
helm plugin install https://github.com/helm-unittest/helm-unittestRun chart unit tests:
helm unittest helm/ctf-operator