Skip to content

Commit

Permalink
fixup! fix: Add contribution documenation to project
Browse files Browse the repository at this point in the history
Signed-off-by: Mateus Oliveira <[email protected]>
  • Loading branch information
mateusoliveira43 committed Apr 23, 2024
1 parent 335010c commit e1224a3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
14 changes: 14 additions & 0 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
8 changes: 1 addition & 7 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e1224a3

Please sign in to comment.