-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(RHTAPWATCH-817): Missing resource permissions
Add resource access permissions needed to run the reconcile loop. Also add instructions for how to test the controller on CRC. Signed-off-by: Barak Korren <bkorren@redhat.com>
- Loading branch information
Showing
6 changed files
with
103 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Contributing to this project | ||
|
||
## Manual testing with CRC | ||
|
||
Login to CRC as *kubeadmin*. The password would be displayed when bringing up | ||
CRC. | ||
|
||
oc login -u kubeadmin https://api.crc.testing:6443 | ||
|
||
Add the Application and Controller CRDs to the cluster by cloning the | ||
[application-api repository][api]. Then load the CRDs to the cluster: | ||
|
||
oc apply -f $PATH_TO_APPLICATION_API/config/crd/bases/appstudio.redhat.com_applications.yaml | ||
oc apply -f $PATH_TO_APPLICATION_API/config/crd/bases/appstudio.redhat.com_components.yaml | ||
|
||
[api]: https://github.com/redhat-appstudio/application-api/ | ||
|
||
Create the `project-controller-system` namespace and go into it: | ||
|
||
oc create namespace project-controller-system | ||
oc project project-controller-system | ||
|
||
Create an image stream for the controller image, then build and push it to the | ||
cluster: | ||
|
||
oc create imagestream project-controller | ||
make docker-build \ | ||
IMG=default-route-openshift-image-registry.apps-crc.testing/project-controller-system/project-controller | ||
docker push --tls-verify=false \ | ||
default-route-openshift-image-registry.apps-crc.testing/project-controller-system/project-controller | ||
|
||
Deploy the controller: | ||
|
||
make deploy \ | ||
IMG=default-route-openshift-image-registry.apps-crc.testing/project-controller-system/project-controller | ||
|
||
Start viewing the controller logs: | ||
|
||
oc logs -n project-controller-system -l control-plane=controller-manager -f | ||
|
||
Create a namespace to test the controller with: | ||
|
||
oc create namespace testns | ||
oc project testns | ||
|
||
Create a project, a template and a development stream: | ||
|
||
oc apply -f config/samples/projctl_v1beta1_project.yaml | ||
oc apply -f config/samples/projctl_v1beta1_projectdevelopmentstreamtemplate.yaml | ||
|
||
Monitor the logs to see if the controller reconcile loop runs successfully. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
resources: | ||
- manager.yaml | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
images: | ||
- name: controller | ||
newName: default-route-openshift-image-registry.apps-crc.testing/project-controller-system/project-controller |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters