https://github.com/stackrox/fake-compliance-operator
fake-compliance-operator
https://github.com/stackrox/fake-compliance-operator
Last synced: 6 months ago
JSON representation
fake-compliance-operator
- Host: GitHub
- URL: https://github.com/stackrox/fake-compliance-operator
- Owner: stackrox
- Created: 2024-03-07T10:08:05.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-03-12T12:40:01.000Z (almost 2 years ago)
- Last Synced: 2025-01-13T04:40:13.022Z (about 1 year ago)
- Language: Shell
- Size: 437 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Fake Compliance Operator
Import compliance operator resource into your local cluster for development purposes.
## Import
1. Create a local cluster via colima, kind or similar.
2. Install StackRox
3. Initialize compliance-operator resources `./apply.sh init`, this mimicks an installation of compliance operator
5. Create a compliance scan schedule in Central with the name `compliance-scan-schedule`
6. Execute `./apply.sh scan` imports scan results
7. View results in the UI
## Export & Run original operator on an infra cluster
- Create an Openshift 4.x cluster from https://infra.rox.systems/
- Once that is started download the artifacts `infractl artifacts --download-dir `.
- Set the kubeconfig `KUBECONFIG /kubeconfig`.
- Clone compliance operator repository and install compliance operator.
```
git clone https://github.com/ComplianceAsCode/compliance-operator
cd compliance-operator
oc create -f config/catalog/catalog-source.yaml
oc get catalogsource -n openshift-marketplace
oc create -f config/ns/ns.yaml
oc create -f config/catalog/operator-group.yaml
oc create -f config/catalog/subscription.yaml
```
- Deploy StackRox
- Create a compliance v2 scan schedule
- Wait until the compliance results are reported in the StackRox UI
- Execute `./dump-compliance-operator.sh`