This is a small sample application using most of the features krator
and
krator_derive
have to offer.
In order to use all features from the moose example, compile it with
admission-webhook
, derive
and krator-derive/admission-webhook
features
enabled -- this is reflected through the aggregate feature
derive-admission-webhook
Install crd
RUST_LOG=moose=info,krator=info cargo run --example=moose --features=derive-admission-webhook -- --output-crd | kubectl apply -f-
Run operator
# w/o admission webhook
RUST_LOG=moose=info,krator=info cargo run --example=moose --features=derive
Install crd and webhook resources into a namespace
NAMESPACE=default
RUST_LOG=moose=info,krator=info cargo run --example=moose --features=derive-admission-webhook -- --output-crd | kubectl apply -f-
RUST_LOG=moose=info,krator=info cargo run --example=moose --features=derive-admission-webhook -- --output-webhook-resources-for-namespace $NAMESPACE | kubectl apply -f-
Run operator and follow the instructions that are printed
RUST_LOG=moose=info,krator=info cargo run --example=moose --features=derive-admission-webhook