-
Notifications
You must be signed in to change notification settings - Fork 789
feat: adding driver to export to disk #3832
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
Merged
JaydipGabani
merged 39 commits into
open-policy-agent:master
from
JaydipGabani:disk-driver
May 6, 2025
Merged
Changes from 32 commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
a64a5f1
adding driver to export to disk
JaydipGabani 6178055
fixing lint
JaydipGabani eeac8e8
fixing disk export workflow name
JaydipGabani 83169e5
fixing disk export tests
JaydipGabani 758396a
fixing disk-export test
JaydipGabani c73ed2b
fixing disk-export test
JaydipGabani 1f1c1ea
fixing disk-export test
JaydipGabani f0b06fe
adding docs for disk driver
JaydipGabani 9ddd781
cleaning up disk driver
JaydipGabani 08f0a70
adding reader dockerfile to dependabot config
JaydipGabani e4bf31e
updating dockerfile for fake-reader
JaydipGabani 2a52f44
addressing feedback and cleaning up code
JaydipGabani 4750879
fixing lint
JaydipGabani b56f99d
fixing error msg
JaydipGabani ab3412f
splitting via error type to make sure types of errors stored are dete…
JaydipGabani 5754afe
updating docs
JaydipGabani 185eb5b
updating docs
JaydipGabani 80409b9
adding sidecar to helmcharts
JaydipGabani 087da56
updating logs and fixing indent error
JaydipGabani 319b942
fixing audit helm charts to include volumes and sidecar
JaydipGabani 2460997
updating docs, addressing nites
JaydipGabani 5926e7a
putting audit start/end message export behind export flag
JaydipGabani da118f5
adding connection config for disk export to helm charts
JaydipGabani 1f1cd52
cleaning up disk driver and fixing permission issue
JaydipGabani 601095b
fixing tests
JaydipGabani e4402e7
updating docs, adding default sidecar values in charts
JaydipGabani 567ec39
updating tests
JaydipGabani 4812780
fixing tests
JaydipGabani 2aae258
fixing export test ci
JaydipGabani 3041793
updating docs to use published fake-reader image
JaydipGabani d367c32
Merge branch 'master' into disk-driver
JaydipGabani 02a6fc1
Merge branch 'master' into disk-driver
JaydipGabani 6e58ee2
Merge branch 'master' into disk-driver
JaydipGabani 19ffcd6
updating actions to latest versions, updating docs
JaydipGabani ad3c19d
addressing feedbacks
JaydipGabani 86059e9
Merge branch 'master' into disk-driver
JaydipGabani ab3d310
updating docs
JaydipGabani 584c249
Merge branch 'master' into disk-driver
JaydipGabani f5d9bdc
Merge branch 'master' into disk-driver
ritazh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,61 @@ | ||
name: disk-export | ||
on: | ||
push: | ||
paths: | ||
- "pkg/export/dapr" | ||
- "pkg/export/disk" | ||
- "test/export/**" | ||
pull_request: | ||
paths: | ||
- "pkg/export/dapr" | ||
- "pkg/export/disk" | ||
- "test/export/**" | ||
permissions: read-all | ||
|
||
jobs: | ||
disk_test: | ||
name: "Disk export test" | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 15 | ||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 | ||
with: | ||
egress-policy: audit | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
||
- name: Bootstrap e2e | ||
run: | | ||
mkdir -p $GITHUB_WORKSPACE/bin | ||
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH | ||
make e2e-bootstrap | ||
|
||
- name: Run e2e | ||
run: | | ||
make docker-buildx IMG=gatekeeper-e2e:latest | ||
make e2e-build-load-externaldata-image | ||
make e2e-reader-build-image | ||
make docker-buildx-crds CRD_IMG=gatekeeper-crds:latest | ||
kind load docker-image --name kind gatekeeper-e2e:latest fake-reader:latest gatekeeper-crds:latest | ||
kubectl create ns gatekeeper-system | ||
|
||
make e2e-helm-deploy HELM_REPO=gatekeeper-e2e HELM_CRD_REPO=gatekeeper-crds HELM_RELEASE=latest ENABLE_EXPORT=true LOG_LEVEL=DEBUG EXPORT_BACKEND=disk FAKE_READER_IMAGE_PULL_POLICY=Never AUDIT_CONNECTION=audit-connection AUDIT_CHANNEL=audit-channel EXPORT_DISK_PATH=/tmp/violations MAX_AUDIT_RESULTS=3 FAKE_READER_IMAGE=fake-reader:latest | ||
|
||
make test-e2e ENABLE_EXPORT_TESTS=1 EXPORT_BACKEND=disk | ||
|
||
- name: Save logs | ||
if: ${{ always() }} | ||
run: | | ||
kubectl logs -n gatekeeper-system -l control-plane=audit-controller -c manager --tail=-1 > logs-audit-manager.json | ||
kubectl logs -n gatekeeper-system -l control-plane=audit-controller -c reader --tail=-1 > logs-audit-export.json | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 | ||
if: ${{ always() }} | ||
with: | ||
name: export-logs | ||
path: | | ||
logs-*.json | ||
|
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please double check these GitHub action versions to ensure they are the latest