github.com/openshift/dpu-operator@v0.0.0-20240502153209-3af840d137c2/README.md (about) 1 # dpu-operator 2 3 This operator will manage and configure data processing unit (DPUs) to be used in accelerating/offloading k8s networking functions 4 5 ## Description 6 // TODO(user): An in-depth paragraph about your project and overview of use. 7 8 ## Getting Started 9 You’ll 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. 10 **Note:** Your controller will automatically use the current context in your kubeconfig file (i.e. whatever cluster `kubectl cluster-info` shows). 11 12 ### Running on the cluster 13 1. Install Instances of Custom Resources: 14 15 ```sh 16 kubectl apply -f config/samples/ 17 ``` 18 19 2. Build and push your image to the location specified by `IMG`: 20 21 ```sh 22 make docker-build docker-push IMG=<some-registry>/dpu-operator:tag 23 ``` 24 25 3. Deploy the controller to the cluster with the image specified by `IMG`: 26 27 ```sh 28 make deploy IMG=<some-registry>/dpu-operator:tag 29 ``` 30 31 ### Uninstall CRDs 32 To delete the CRDs from the cluster: 33 34 ```sh 35 make uninstall 36 ``` 37 38 ### Undeploy controller 39 UnDeploy the controller from the cluster: 40 41 ```sh 42 make undeploy 43 ``` 44 45 ## Local development 46 First, set up a registry on the local host to which you can push and from which you can pull in the cluster. Then, build, push and use local-deploy to deploy in your cluster. 47 48 ```sh 49 make images-build 50 make images-push 51 make local-deploy 52 ``` 53 54 ## Contributing 55 // TODO(user): Add detailed information on how you would like others to contribute to this project 56 57 ### How it works 58 This project aims to follow the Kubernetes [Operator pattern](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/). 59 60 It uses [Controllers](https://kubernetes.io/docs/concepts/architecture/controller/), 61 which provide a reconcile function responsible for synchronizing resources until the desired state is reached on the cluster. 62 63 ### Test It Out 64 1. Install the CRDs into the cluster: 65 66 ```sh 67 make install 68 ``` 69 70 2. Run your controller (this will run in the foreground, so switch to a new terminal if you want to leave it running): 71 72 ```sh 73 make run 74 ``` 75 76 **NOTE:** You can also run this in one step by running: `make install run` 77 78 ### Modifying the API definitions 79 If you are editing the API definitions, generate the manifests such as CRs or CRDs using: 80 81 ```sh 82 make manifests 83 ``` 84 85 **NOTE:** Run `make --help` for more information on all potential `make` targets 86 87 More information can be found via the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html) 88 89 ## License 90 91 Copyright 2024. 92 93 Licensed under the Apache License, Version 2.0 (the "License"); 94 you may not use this file except in compliance with the License. 95 You may obtain a copy of the License at 96 97 http://www.apache.org/licenses/LICENSE-2.0 98 99 Unless required by applicable law or agreed to in writing, software 100 distributed under the License is distributed on an "AS IS" BASIS, 101 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 102 See the License for the specific language governing permissions and 103 limitations under the License.