Skip to content

pedromfcarvalho/crd-playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

crd-playground

This is a sandbox to try out various controller-gen validation markers and their effect. It uses controller-gen to generate a CRD and the deepcopy functions.

The initial skeleton was also generated using controller-gen and cleaned up to only what is needed for its purpose.

Modify the Foo struct in api/v1/foo_types.go with new fields and validation markers, modify the example foo object in foo_example.yaml, then run run.sh to delete the previous object of type foo, generate the crd and the deep copy functions, apply the crd, and create a foo object from the example.

You can also use the go api in main.go to interact with Foos, export your kube config path in KUBECONFIG for this.

You must have controller-gen installed.

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors