https://github.com/ContainerSolutions/operator-workshop
https://github.com/ContainerSolutions/operator-workshop
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ContainerSolutions/operator-workshop
- Owner: ContainerSolutions
- Created: 2019-09-10T14:27:37.000Z (almost 7 years ago)
- Default Branch: exercise-1
- Last Pushed: 2019-09-11T12:48:10.000Z (almost 7 years ago)
- Last Synced: 2025-06-27T00:45:19.660Z (12 months ago)
- Language: Go
- Size: 17.5 MB
- Stars: 3
- Watchers: 9
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Solution for Exercise-1
In the [generated operator](https://github.com/ContainerSolutions/operator-workshop/blob/exercise-1/pkg/controller/exampleworkshop/exampleworkshop_controller.go) there is a default, hardcoded specification for the container and your role is to:
* [Extend the api structure](https://github.com/ContainerSolutions/operator-workshop/blob/71cdfa9bbb7649405fbf900bfc349d471bfdcdf5/pkg/apis/app/v1alpha1/exampleworkshop_types.go#L16)
* Regenerate the api `operator-sdk generate k8s` and `operator-sdk generate openapi"`
* [Define in the resource definition](https://github.com/ContainerSolutions/operator-workshop/blob/exercise-1/deploy/crds/app_v1alpha1_exampleworkshop_cr.yaml)
* [Write the required go code to reflect your changes inside your controller file](https://github.com/ContainerSolutions/operator-workshop/blob/71cdfa9bbb7649405fbf900bfc349d471bfdcdf5/pkg/controller/exampleworkshop/exampleworkshop_controller.go#L133)
* Deploy your operator `operator-sdk up local --namespace=default`