bcgov / bcgov/AppAssessment

Usage command in README does not work

Open
#41 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
7
Forks
3
PR merge metrics
No merged PRs in 30d

Description

The following command given in the README does not work as intended:
```
oc process -f https://raw.githubusercontent.com/bcgov/AppAssessment/main/template/appassessment-template.yaml -p LICENSE_PLATE= -p CLUSTER_NAME="" -p APP_ASSESSMENT_IMAGE=image-registry.openshift-image-registry.svc:5000/bcgov/app-assessment | oc apply -f -
```

When used after filling in the correct parameters, the following error occurs:
```
error: unable to process template: the namespace of the provided object does not match the namespace sent on the request
error: no objects passed to apply
```

As noted in a RocketChat post, by adding the flag `--local=true` to the `oc process` part of the command, this issue is resolved. The fixed command looks as such:
```
oc process -f https://raw.githubusercontent.com/bcgov/AppAssessment/main/template/appassessment-template.yaml -p LICENSE_PLATE= -p CLUSTER_NAME="" -p APP_ASSESSMENT_IMAGE=image-registry.openshift-image-registry.svc:5000/bcgov/app-assessment --local=true | oc apply -f -
```

Additionally, it should be noted somewhere in the README that this requires admin privileges to the namespace in OpenShift, as if you try to run the fixed command without them, you get the following error after creating a few of the objects:

```
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "rbac.authorization.k8s.io/v1, Resource=rolebindings", GroupVersionKind: "rbac.authorization.k8s.io/v1, Kind=RoleBinding"
Name: "appassessment-view", Namespace: "-tools"
from server for: "STDIN": rolebindings.rbac.authorization.k8s.io "appassessment-view" is forbidden: User "" cannot get resource "rolebindings" in API group "rbac.authorization.k8s.io" in the namespace "-tools"
```

I cannot create a PR for this as I do not have rights to publish to this repository, but I will leave it here for anyone trying to diagnose these issues in the future.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.