UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • big-bang/product/packages/kyverno-policies
  • 90-cos/iac/kyverno-policies
2 results
Show changes
Commits on Source (2)
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
Format: [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) Format: [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
--- ---
## [1.1.0-bb.4] - 2023-03-29
### Changed
- modified enabled policy test to only run on package pipelines
## [1.1.0-bb.3] - 2023-03-04 ## [1.1.0-bb.3] - 2023-03-04
### Changed ### Changed
- ironbank/opensource/kubernetes/kubectl updated from v1.26.1 to v1.26.2 - ironbank/opensource/kubernetes/kubectl updated from v1.26.1 to v1.26.2
......
# kyverno-policies # kyverno-policies
![Version: 1.1.0-bb.3](https://img.shields.io/badge/Version-1.1.0--bb.3-informational?style=flat-square) ![AppVersion: 1.1.0](https://img.shields.io/badge/AppVersion-1.1.0-informational?style=flat-square) ![Version: 1.1.0-bb.4](https://img.shields.io/badge/Version-1.1.0--bb.4-informational?style=flat-square) ![AppVersion: 1.1.0](https://img.shields.io/badge/AppVersion-1.1.0-informational?style=flat-square)
Collection of Kyverno security and best-practice policies for Kyverno Collection of Kyverno security and best-practice policies for Kyverno
......
apiVersion: v2 apiVersion: v2
name: kyverno-policies name: kyverno-policies
version: 1.1.0-bb.3 version: 1.1.0-bb.4
appVersion: 1.1.0 appVersion: 1.1.0
icon: https://github.com/kyverno/kyverno/raw/main/img/logo.png icon: https://github.com/kyverno/kyverno/raw/main/img/logo.png
description: Collection of Kyverno security and best-practice policies for Kyverno description: Collection of Kyverno security and best-practice policies for Kyverno
......
...@@ -16,19 +16,21 @@ POLICIES=($ENABLED_POLICIES) ...@@ -16,19 +16,21 @@ POLICIES=($ENABLED_POLICIES)
####################################### #######################################
# Test for disabled cluster policies # Test for disabled cluster policies for package level only
echo -e "${CYN}Test: Disabled cluster policies are not deployed${NC}" if [[ $PACKAGE_LEVEL_TEST == "true" ]]; then
echo -n "- enabled policies >= deployed policies: " echo -e "${CYN}Test: Disabled cluster policies are not deployed${NC}"
DEPLOYED_POLICIES=( $(kubectl get cpol --no-headers -o custom-columns=":metadata.name") ) echo -n "- enabled policies >= deployed policies: "
# Get deployed policies that are not in our enabled policies list DEPLOYED_POLICIES=( $(kubectl get cpol --no-headers -o custom-columns=":metadata.name") )
DELTA=( $(echo ${POLICIES[@]} ${POLICIES[@]} ${DEPLOYED_POLICIES[@]} | tr ' ' '\n' | sort | uniq -u) ) # Get deployed policies that are not in our enabled policies list
if [ -z $DELTA ]; then DELTA=( $(echo ${POLICIES[@]} ${POLICIES[@]} ${DEPLOYED_POLICIES[@]} | tr ' ' '\n' | sort | uniq -u) )
echo -e "${GRN}PASS${NC}" if [ -z $DELTA ]; then
((PASS+=1)) echo -e "${GRN}PASS${NC}"
else ((PASS+=1))
echo -e "${RED}FAIL${NC}" else
echo "Policies causing failure: ${DELTA[@]}" echo -e "${RED}FAIL${NC}"
((FAIL+=1)) echo "Policies causing failure: ${DELTA[@]}"
((FAIL+=1))
fi
fi fi
####################################### #######################################
......
bbtests: bbtests:
enabled: true enabled: true
scripts:
envs:
PACKAGE_LEVEL_TEST: "true"
waitforready: waitforready:
imagePullSecrets: imagePullSecrets:
- name: private-registry - name: private-registry
......