Skip to content

Commit

Permalink
Commented the dynamic ns tests
Browse files Browse the repository at this point in the history
Signed-off-by: biswajit-9776 <biswajitpatt139@gmail.com>
  • Loading branch information
biswajit-9776 committed Sep 16, 2024
1 parent f3cace5 commit 2cb79fb
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/pss_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,27 +54,27 @@ jobs:
echo "Waiting for pods in auth namespace to become ready..."
kubectl wait --for=condition=Ready pods --all --timeout=180s -n auth
- name: Configure profile-controller's manager configmap with PSS restricted label
run: |
CONFIGMAP=$(kubectl get cm -n kubeflow | awk '{print $1}' | grep -e "namespace-labels-data")
kubectl get cm $CONFIGMAP -n kubeflow -o yaml > temporary.yaml
sed -i '/app.kubernetes.io\/part-of: "kubeflow-profile"/{s/.*/&\n pod-security.kubernetes.io\/enforce: "restricted"/}' temporary.yaml
kubectl apply -f temporary.yaml
rm temporary.yaml
# - name: Configure profile-controller's manager configmap with PSS restricted label

Check failure on line 57 in .github/workflows/pss_test.yaml

View workflow job for this annotation

GitHub Actions / format_YAML_files

57:89 [trailing-spaces] trailing spaces
# run: |
# CONFIGMAP=$(kubectl get cm -n kubeflow | awk '{print $1}' | grep -e "namespace-labels-data")
# kubectl get cm $CONFIGMAP -n kubeflow -o yaml > temporary.yaml
# sed -i '/app.kubernetes.io\/part-of: "kubeflow-profile"/{s/.*/&\n pod-security.kubernetes.io\/enforce: "restricted"/}' temporary.yaml
# kubectl apply -f temporary.yaml
# rm temporary.yaml

- name: Install KF Pipelines
run: ./tests/gh-actions/install_pipelines.sh

- name: Create dynamic user namespace and check for PSS labels present
run: |
kustomize build common/user-namespace/base | kubectl apply -f -
LABELS=$(kubectl get namespace kubeflow-user-example-com --show-labels | awk 'NR==2 {print $NF}')
if [[ "$LABELS" == *pod-security.kubernetes.io/enforce=restricted* ]]; then
echo "PSS restricted label is present in dynamic namespace."
else
echo "PSS restricted label is absent in dynamic namespace."
exit 1
fi
# - name: Create dynamic user namespace and check for PSS labels present
# run: |
# kustomize build common/user-namespace/base | kubectl apply -f -
# LABELS=$(kubectl get namespace kubeflow-user-example-com --show-labels | awk 'NR==2 {print $NF}')
# if [[ "$LABELS" == *pod-security.kubernetes.io/enforce=restricted* ]]; then
# echo "PSS restricted label is present in dynamic namespace."
# else
# echo "PSS restricted label is absent in dynamic namespace."
# exit 1
# fi

- name: Apply patches to clear warnings
run: |
Expand Down

0 comments on commit 2cb79fb

Please sign in to comment.