mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +00:00
5e07ecc5f3
* add report in cli * policy report crd added * policy report added * configmap added * added jobs * added jobs * bug fixed * added logic for cli * common function added * sub command added for policy report * subcommand added for report * common package changed * configmap added * added logic for kyverno cli * added logic for jobs * added logic for jobs * added logic for jobs * added logic for cli * buf fix * cli changes * count bug fix * docs added for command * go fmt * refactor codebase * remove policy controller for policyreport * policy report removed * bug fixes * bug fixes * added job trigger if needed * job deletation logic added * build failed fix * fixed e2e test * remove hard coded variables * packages adde * improvment added in jobs sheduler * policy report yaml added * cronjob added * small fixes * remove background sync * documentation added for report command * remove extra log * small improvement * tested policy report * revert hardcoded changes * changes for demo * demo changes * resource aggrigation added * More changes * More changes * - resolve PR comments; - refactor jobs controller * set rbac for jobs * add clean up in job controller * add short names * remove application scope for policyreport * move job controller to policyreport * add report logic in command apply * - update policy report types; - upgrade k8s library; - update code gen * temporarily comment out code to pass CI build * generate / update policyreport to cluster * add unit test for CLI report * add test for apply - generate policy report * fix unit test * - remove job controller; - remove in-memory configmap; - clean up kustomize manifest * remove dependency * add reportRequest / clusterReportRequest * clean up policy report * generate report request * update crd clusterReportRequest * - update json tag of report summary; - update definition manifests; - fix dclient creation * aggregate reportRequest into policy report * fix unit tests * - update report summary to optional; - generate clusterPolicyReport; - remove reportRequests after merged to report * remove * generate reportRequest in kyverno namespace * update resource filter in helm chart * - rename reportRequest to reportChangeRequest; -rename clusterReportRequest to clusterReportChangeRequest * generate policy report in background scan * skip generating report change request if there's entry results * fix results entry removal when policy / rule gets deleted * rename apiversion from policy.kubernetes.io to policy.k8s.io * update summary.* to lower case * move reportChangeRequest to kyverno.io/v1alpha1 * remove policy report flag * fix report update * clean up policy violation CRD * remove violation CRD from manifest * clean up policy violation code - remove pvGenerator * change severity fields to lower case * update import library * set report category Co-authored-by: Yuvraj <yuvraj.yad001@gmail.com> Co-authored-by: Yuvraj <10830562+evalsocket@users.noreply.github.com> Co-authored-by: Jim Bugwadia <jim@nirmata.com>
29 lines
788 B
Bash
Executable file
29 lines
788 B
Bash
Executable file
#!/bin/bash
|
|
set -o errexit
|
|
set -o nounset
|
|
set -o pipefail
|
|
|
|
case "$(uname -s)" in
|
|
Linux*) linkutil=readlink;;
|
|
Darwin*) linkutil=greadlink;;
|
|
*) machine="UNKNOWN:${unameOut}"
|
|
esac
|
|
|
|
# get nirmata root
|
|
NIRMATA_DIR=$(dirname ${BASH_SOURCE})/..
|
|
NIRMATA_ROOT=$(${linkutil} -f ${NIRMATA_DIR})
|
|
|
|
# instructions to build project https://github.com/kyverno/kyverno/wiki/Building
|
|
|
|
# get relative path to code generation script
|
|
CODEGEN_PKG="${GOPATH}/src/k8s.io/code-generator"
|
|
|
|
# get relative path of nirmata
|
|
NIRMATA_PKG=${NIRMATA_ROOT#"${GOPATH}/src/"}
|
|
|
|
# perform code generation
|
|
${CODEGEN_PKG}/generate-groups.sh \
|
|
"deepcopy,client,informer,lister" \
|
|
${NIRMATA_PKG}/pkg/client \
|
|
${NIRMATA_PKG}/pkg/api \
|
|
"kyverno:v1 policyreport:v1alpha1 kyverno:v1alpha1"
|