Skip to content

Commit

Permalink
test pss in respective tests
Browse files Browse the repository at this point in the history
Signed-off-by: Harshvir Potpose <[email protected]>
  • Loading branch information
akagami-harsh committed Mar 2, 2025
1 parent db6bd35 commit 18e9027
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/katib_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- tests/gh-actions/install_istio.sh
- tests/gh-actions/install_cert_manager.sh
- common/cert-manager/**
- contrib/security/PSS/*

jobs:
build:
Expand Down Expand Up @@ -53,3 +54,18 @@ jobs:
echo "Waiting for the Experiment to become Succeeded..."
kubectl wait --for=condition=Succeeded experiments.kubeflow.org -n kubeflow-user --all --timeout 300s
- name: Apply Pod Security Standards baseline levels
run: ./tests/gh-actions/enable_baseline_PSS.sh

- name: Unapply applied baseline labels
run: |
NAMESPACES=("istio-system" "auth" "cert-manager" "oauth2-proxy" "kubeflow")
for NAMESPACE in "${NAMESPACES[@]}"; do
if kubectl get namespace "$NAMESPACE" >/dev/null 2>&1; then
kubectl label namespace $NAMESPACE pod-security.kubernetes.io/enforce-
fi
done
- name: Applying Pod Security Standards restricted levels
run: ./tests/gh-actions/enable_restricted_PSS.sh
16 changes: 16 additions & 0 deletions .github/workflows/kserve_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- tests/gh-actions/install_knative.sh
- common/knative/**
- tests/gh-actions/install_kserve.sh
- contrib/security/PSS/**

jobs:
build:
Expand Down Expand Up @@ -60,3 +61,18 @@ jobs:
- name: Run kserve models webapp test
run: |
kubectl wait --for=condition=Available --timeout=300s -n kubeflow deployment/kserve-models-web-app
- name: Apply Pod Security Standards baseline levels
run: ./tests/gh-actions/enable_baseline_PSS.sh

- name: Unapply applied baseline labels
run: |
NAMESPACES=("istio-system" "auth" "cert-manager" "oauth2-proxy" "kubeflow")
for NAMESPACE in "${NAMESPACES[@]}"; do
if kubectl get namespace "$NAMESPACE" >/dev/null 2>&1; then
kubectl label namespace $NAMESPACE pod-security.kubernetes.io/enforce-
fi
done
- name: Applying Pod Security Standards restricted levels
run: ./tests/gh-actions/enable_restricted_PSS.sh
16 changes: 16 additions & 0 deletions .github/workflows/notebook_controller_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- apps/jupyter/notebook-controller/upstream/**
- tests/gh-actions/install_istio.sh
- common/istio*/**
- contrib/security/PSS/**

jobs:
build:
Expand All @@ -27,3 +28,18 @@ jobs:
kubectl create ns kubeflow
kustomize build overlays/kubeflow | kubectl apply -f -
kubectl wait --for=condition=Ready pods --all --all-namespaces --timeout 180s
- name: Apply Pod Security Standards baseline levels
run: ./tests/gh-actions/enable_baseline_PSS.sh

- name: Unapply applied baseline labels
run: |
NAMESPACES=("istio-system" "auth" "cert-manager" "oauth2-proxy" "kubeflow")
for NAMESPACE in "${NAMESPACES[@]}"; do
if kubectl get namespace "$NAMESPACE" >/dev/null 2>&1; then
kubectl label namespace $NAMESPACE pod-security.kubernetes.io/enforce-
fi
done
- name: Applying Pod Security Standards restricted levels
run: ./tests/gh-actions/enable_restricted_PSS.sh

0 comments on commit 18e9027

Please sign in to comment.