blob: e1a5d6bbfc388ac610f4604068aae1b97dcd5acb [file] [log] [blame] [view]
Giorgi Lekveishvilib591eae2023-06-16 12:31:49 +04001# resource-renderer
2// TODO(user): Add simple overview of use/purpose
3
4## Description
5// TODO(user): An in-depth paragraph about your project and overview of use
6
7## Getting Started
8Youll need a Kubernetes cluster to run against. You can use [KIND](https://sigs.k8s.io/kind) to get a local cluster for testing, or run against a remote cluster.
9**Note:** Your controller will automatically use the current context in your kubeconfig file (i.e. whatever cluster `kubectl cluster-info` shows).
10
11### Running on the cluster
121. Install Instances of Custom Resources:
13
14```sh
15kubectl apply -f config/samples/
16```
17
182. Build and push your image to the location specified by `IMG`:
19
20```sh
21make docker-build docker-push IMG=<some-registry>/resource-renderer:tag
22```
23
243. Deploy the controller to the cluster with the image specified by `IMG`:
25
26```sh
27make deploy IMG=<some-registry>/resource-renderer:tag
28```
29
30### Uninstall CRDs
31To delete the CRDs from the cluster:
32
33```sh
34make uninstall
35```
36
37### Undeploy controller
38UnDeploy the controller to the cluster:
39
40```sh
41make undeploy
42```
43
44## Contributing
45// TODO(user): Add detailed information on how you would like others to contribute to this project
46
47### How it works
48This project aims to follow the Kubernetes [Operator pattern](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/)
49
50It uses [Controllers](https://kubernetes.io/docs/concepts/architecture/controller/)
51which provides a reconcile function responsible for synchronizing resources untile the desired state is reached on the cluster
52
53### Test It Out
541. Install the CRDs into the cluster:
55
56```sh
57make install
58```
59
602. Run your controller (this will run in the foreground, so switch to a new terminal if you want to leave it running):
61
62```sh
63make run
64```
65
66**NOTE:** You can also run this in one step by running: `make install run`
67
68### Modifying the API definitions
69If you are editing the API definitions, generate the manifests such as CRs or CRDs using:
70
71```sh
72make manifests
73```
74
75**NOTE:** Run `make --help` for more information on all potential `make` targets
76
77More information can be found via the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html)
78
79## License
80
81Copyright 2023.
82
83Licensed under the Apache License, Version 2.0 (the "License");
84you may not use this file except in compliance with the License.
85You may obtain a copy of the License at
86
87 http://www.apache.org/licenses/LICENSE-2.0
88
89Unless required by applicable law or agreed to in writing, software
90distributed under the License is distributed on an "AS IS" BASIS,
91WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
92See the License for the specific language governing permissions and
93limitations under the License.
94