forked from cloud-ark/kubeprovenance
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for live audit data (and misc changes)
In order to see live changes to the kube-apiserver-audit.log file, I mounted a volume with the File that is constantly being updates by Kubernetes, upon changes to a custom resource. Furthermore, to support live audit data, I made changes so that the project can be run on minikube. However, since minikube does not officially support audit logging, I am using a sample minikube audit log that I have generated using a Postgres custom resource and applying a few functions to generate the log. Now, the project continuously rebuilds its provenance history when it is on Kubernetes but not minikube since auditing is not supported(it doesn'nt need torebuild). To check if I am on minikube or kubernetes I use status.hostIP in rc.yaml.
- Loading branch information
Showing
8 changed files
with
159 additions
and
111 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
File renamed without changes.
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,19 +1,17 @@ | ||
#!/bin/bash | ||
|
||
#export GOOS=linux; go build . | ||
#cp kubeprovenance ./artifacts/simple-image/kube-provenance-apiserver | ||
#docker build -t kube-provenance-apiserver:latest ./artifacts/simple-image | ||
#kubernetes/cluster/kubectl.sh should be in your PATH env var | ||
#for kubernetes local installation uncomment these: | ||
#kubectl.sh delete ns provenance | ||
#kubectl.sh delete -f artifacts/example/auth-delegator.yaml -n kube-system | ||
#kubectl.sh delete -f artifacts/example/auth-reader.yaml -n kube-system | ||
#kubectl.sh delete -f artifacts/example/apiservice.yaml | ||
#kubectl.sh delete -f artifacts/example/grant-cluster-admin.yaml | ||
|
||
#cluster/kubectl.sh should be in your PATH env var | ||
kubectl.sh delete ns provenance | ||
kubectl.sh delete -f artifacts/example/auth-delegator.yaml -n kube-system | ||
kubectl.sh delete -f artifacts/example/auth-reader.yaml -n kube-system | ||
kubectl.sh delete -f artifacts/example/apiservice.yaml | ||
kubectl.sh delete -f artifacts/example/grant-cluster-admin.yaml | ||
#FOR MINIKUBE UNCOMMENT THESE: | ||
#kubectl delete ns provenance | ||
#kubectl delete -f artifacts/example/auth-delegator.yaml -n kube-system | ||
#kubectl delete -f artifacts/example/auth-reader.yaml -n kube-system | ||
#kubectl delete -f artifacts/example/apiservice.yaml | ||
#kubectl delete -f artifacts/example/grant-cluster-admin.yaml | ||
kubectl delete ns provenance | ||
kubectl delete -f artifacts/example/auth-delegator.yaml -n kube-system | ||
kubectl delete -f artifacts/example/auth-reader.yaml -n kube-system | ||
kubectl delete -f artifacts/example/apiservice.yaml | ||
kubectl delete -f artifacts/example/grant-cluster-admin.yaml | ||
|
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,22 +1,22 @@ | ||
#!/bin/bash | ||
|
||
kubectl.sh create -f artifacts/example/ns.yaml | ||
kubectl.sh create configmap -n provenance kind-compositions-config-map --from-file=kind_compositions.yaml | ||
kubectl.sh create -f artifacts/example/sa.yaml -n provenance | ||
kubectl.sh create -f artifacts/example/auth-delegator.yaml -n kube-system | ||
kubectl.sh create -f artifacts/example/auth-reader.yaml -n kube-system | ||
kubectl.sh create -f artifacts/example/grant-cluster-admin.yaml | ||
kubectl.sh create -f artifacts/example/rc.yaml -n provenance | ||
kubectl.sh create -f artifacts/example/service.yaml -n provenance | ||
kubectl.sh create -f artifacts/example/apiservice.yaml | ||
#kubectl.sh create -f artifacts/example/ns.yaml | ||
#kubectl.sh create configmap -n provenance kind-compositions-config-map --from-file=kind_compositions.yaml | ||
#kubectl.sh create -f artifacts/example/sa.yaml -n provenance | ||
#kubectl.sh create -f artifacts/example/auth-delegator.yaml -n kube-system | ||
#kubectl.sh create -f artifacts/example/auth-reader.yaml -n kube-system | ||
#kubectl.sh create -f artifacts/example/grant-cluster-admin.yaml | ||
#kubectl.sh create -f artifacts/example/rc.yaml -n provenance | ||
#kubectl.sh create -f artifacts/example/service.yaml -n provenance | ||
#kubectl.sh create -f artifacts/example/apiservice.yaml | ||
#FOR MINIKUBE UNCOMMENT THESE: todo: code to automate this | ||
#kubectl create -f artifacts/example/ns.yaml | ||
#kubectl create configmap -n provenance kind-compositions-config-map --from-file=kind_compositions.yaml | ||
#kubectl create -f artifacts/example/sa.yaml -n provenance | ||
#kubectl create -f artifacts/example/auth-delegator.yaml -n kube-system | ||
#kubectl create -f artifacts/example/auth-reader.yaml -n kube-system | ||
#kubectl create -f artifacts/example/grant-cluster-admin.yaml | ||
#kubectl create -f artifacts/example/rc.yaml -n provenance | ||
#kubectl create -f artifacts/example/service.yaml -n provenance | ||
#kubectl create -f artifacts/example/apiservice.yaml | ||
kubectl create -f artifacts/example/ns.yaml | ||
kubectl create configmap -n provenance kind-compositions-config-map --from-file=kind_compositions.yaml | ||
kubectl create -f artifacts/example/sa.yaml -n provenance | ||
kubectl create -f artifacts/example/auth-delegator.yaml -n kube-system | ||
kubectl create -f artifacts/example/auth-reader.yaml -n kube-system | ||
kubectl create -f artifacts/example/grant-cluster-admin.yaml | ||
kubectl create -f artifacts/example/rc.yaml -n provenance | ||
kubectl create -f artifacts/example/service.yaml -n provenance | ||
kubectl create -f artifacts/example/apiservice.yaml | ||
|
Oops, something went wrong.