Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Latest commit

 

History

History
42 lines (29 loc) · 1.23 KB

README.md

File metadata and controls

42 lines (29 loc) · 1.23 KB

Moose Example

This is a small sample application using most of the features krator and krator_derive have to offer.

Run example

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

Run without 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 

Run with webhook

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