From e1224a3836f60f8fe60354c40e6481317233aa47 Mon Sep 17 00:00:00 2001 From: Mateus Oliveira Date: Tue, 23 Apr 2024 10:13:12 -0300 Subject: [PATCH] fixup! fix: Add contribution documenation to project Signed-off-by: Mateus Oliveira --- docs/CONTRIBUTING.md | 14 ++++++++++++++ docs/architecture.md | 8 +------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 3654465..4e7cb89 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -6,6 +6,8 @@ If your changes involve controller logic, please test it prior to submitting, by If your changes involve code, please check [code quality and standardization section](#code-quality-and-standardization). +If your changes involve Kubernetes objects (`config/` folder), please follow [Kubernetes objects changes section](#kubernetes-objects-changes). + If you are upgrading project's kubebuilder version, please follow [upgrade kubebuilder version section](#upgrade-kubebuilder-version). > **NOTE:** Run `make help` for more information on all potential `make` targets @@ -94,6 +96,18 @@ make check-generate make check-manifests ``` +## Kubernetes objects changes + +If NAC Kubernetes objects are changed, like CRDs, RBACs, etc, follow this workflow: +- create branch in NAC repository and make the necessary changes +- create branch in OADP operator repository and run `make update-non-admin-manifests` command, pointing to previously created NAC branch. Example: + ```sh + NON_ADMIN_CONTROLLER_PATH=/home/user/oadp-non-admin make update-non-admin-manifests + ``` +- create pull requests both in NAC and OADP operator repositories (OADP operator repository pull request must be merged first) + +[More information](architecture.md#oadp-integration). + ## Upgrade kubebuilder version To upgrade kubebuilder version, create kubebuilder structure using the current kubebuilder version and the upgrade version, using the same commands presented in [kubebuilder architecture documentation](architecture.md#kubebuilder), in two different folders. Then generate a `diff` file from the two folders and apply changes to project code. diff --git a/docs/architecture.md b/docs/architecture.md index e55d25c..2a8bfc3 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -6,13 +6,7 @@ Normally, to ship a controller to users, the project would present the file crea > **NOTE:** If needed, you can test NAC alone by running `make build-installer` and `oc apply -f ./dist/install.yaml`. You may want to customize namespace (`openshift-adp-system`) and container image (`quay.io/konveyor/oadp-non-admin:latest`) in that file prior to deploying it to your cluster. -NAC objects are included in OADP operator through `make update-non-admin-manifests` command, which is run in OADP operator repository. The workflow for updating NAC objects: -- create branch in NAC repository and make the necessary changes -- create branch in OADP operator repository and run `make update-non-admin-manifests` command, pointing to previously created NAC branch. Example: - ```sh - NON_ADMIN_CONTROLLER_PATH=/home/user/oadp-non-admin make update-non-admin-manifests - ``` -- create pull requests both in NAC and OADP operator repositories (OADP operator repository pull request must be merged first) +NAC objects are included in OADP operator through `make update-non-admin-manifests` command, which is run in OADP operator repository. > **NOTE:** Manual steps required in OADP operator repository branch prior to implementation of `make update-non-admin-manifests` command: > - `RELATED_IMAGE_NON_ADMIN_CONTROLLER` must be already set in `config/manager/manager.yaml` file