Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a role to handle the resources created by the test CRD #418

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion scripts/delete-test-crds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@ SCRIPT_DIR=$(dirname "$0")
# shellcheck disable=SC1091 # Not following.
source "$SCRIPT_DIR"/init-env.sh

# Delete test deployment
# Delete role
oc delete role crdexample-role -n "${TNF_EXAMPLE_CNF_NAMESPACE}" --ignore-not-found=true

# Delete CRD
oc delete crd crdexamples.test-network-function.com --ignore-not-found=true
10 changes: 10 additions & 0 deletions test-target/local-crd-under-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,13 @@ spec:
- name: Age
jsonPath: .metadata.creationTimestamp
type: date
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
namespace: tnf
name: crdexample-role
rules:
- apiGroups: ["test-network-function.com"]
resources: ["crdexamples"]
verbs: ["get", "watch", "list"]
Loading