Skip to content

Commit

Permalink
Debugging
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 11, 2024
1 parent 233dc59 commit 4bbbdeb
Show file tree
Hide file tree
Showing 15 changed files with 41 additions and 25 deletions.
50 changes: 25 additions & 25 deletions .github/workflows/pss_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,32 +76,32 @@ jobs:
# fi
fi
done
for file in "$DIRECTORY"/*.yaml; do
KIND=$(kubectl get -f "$file" -o jsonpath='{.kind}')
NAME=$(kubectl get -f "$file" -o jsonpath='{.metadata.name}')
NAMESPACE=$(kubectl get -f "$file" -o jsonpath='{.metadata.namespace}')
kubectl get "$KIND" "$NAME" -n "$NAMESPACE" &> /dev/null
if [ $? -eq 0 ]; then
if [ "$NAME" = "oauth2-proxy" ]; then
echo "Fetching logs for pod: $NAME"
kubectl describe pod -l app.kubernetes.io/name: oauth2-proxy -n oauth2-proxy
elif [ "$NAME" = "metadata-envoy-deployment" ]; then
echo "Fetching logs for pod: $NAME"
kubectl describe pod -l 'component=metadata-envoy' -n kubeflow
elif [ "$NAME" = "metadata-grpc-deployment" ]; then
echo "Fetching logs for pod: $NAME"
kubectl describe pod -l 'component=metadata-grpc-server' -n kubeflow
elif [ "$NAME" = "profiles-deployment" -o "$NAME" = "ml-pipeline" ]; then
echo "Fetching logs for pod: $NAME"
kubectl describe pod -l 'kustomize.component=profiles' -n kubeflow
else
echo "Fetching logs for pod: $NAME"
kubectl describe pod -l app="$NAME" -n "$NAMESPACE"
fi
fi
done
# for file in "$DIRECTORY"/*.yaml; do
# KIND=$(kubectl get -f "$file" -o jsonpath='{.kind}')
# NAME=$(kubectl get -f "$file" -o jsonpath='{.metadata.name}')
# NAMESPACE=$(kubectl get -f "$file" -o jsonpath='{.metadata.namespace}')
# kubectl get "$KIND" "$NAME" -n "$NAMESPACE" &> /dev/null
# if [ $? -eq 0 ]; then
# if [ "$NAME" = "oauth2-proxy" ]; then
# echo "Fetching logs for pod: $NAME"
# kubectl describe pod -l app.kubernetes.io/name=oauth2-proxy -n oauth2-proxy
# elif [ "$NAME" = "metadata-envoy-deployment" ]; then
# echo "Fetching logs for pod: $NAME"
# kubectl describe pod -l 'component=metadata-envoy' -n kubeflow
# elif [ "$NAME" = "metadata-grpc-deployment" ]; then
# echo "Fetching logs for pod: $NAME"
# kubectl describe pod -l 'component=metadata-grpc-server' -n kubeflow
# elif [ "$NAME" = "profiles-deployment" -o "$NAME" = "ml-pipeline" ]; then
# echo "Fetching logs for pod: $NAME"
# kubectl describe pod -l 'kustomize.component=profiles' -n kubeflow
# else
# echo "Fetching logs for pod: $NAME"
# kubectl describe pod -l app="$NAME" -n "$NAMESPACE"
# fi
# fi
# done
# sleep 300
# kubectl wait --for=condition=Ready pods --all --all-namespaces --timeout=600s --field-selector=status.phase!=Succeeded
kubectl wait --for=condition=Ready pods --all --all-namespaces --timeout=600s --field-selector=status.phase!=Succeeded
- name: Apply Pod Security Standards baseline levels for static namespaces
run: ./tests/gh-actions/enable_baseline_PSS.sh
Expand Down
2 changes: 2 additions & 0 deletions contrib/security/PSS/patches/cache-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ spec:
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 0
capabilities:
drop:
- ALL
1 change: 1 addition & 0 deletions contrib/security/PSS/patches/kfam.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ spec:
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
runAsUser: 1000
capabilities:
drop:
- ALL
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ spec:
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
runAsUser: 1000
capabilities:
drop:
- ALL
1 change: 1 addition & 0 deletions contrib/security/PSS/patches/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ spec:
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
runAsUser: 1000
capabilities:
drop:
- ALL
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ spec:
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
runAsUser: 1000
capabilities:
drop:
- ALL
1 change: 1 addition & 0 deletions contrib/security/PSS/patches/metadata-grpc-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ spec:
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
runAsUser: 1000
capabilities:
drop:
- ALL
1 change: 1 addition & 0 deletions contrib/security/PSS/patches/metadata-writer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ spec:
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
runAsUser: 1000
capabilities:
drop:
- ALL
1 change: 1 addition & 0 deletions contrib/security/PSS/patches/minio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ spec:
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
runAsUser: 1000
capabilities:
drop:
- ALL
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ spec:
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 0
capabilities:
drop:
- ALL
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ spec:
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
runAsUser: 1000
capabilities:
drop:
- ALL
1 change: 1 addition & 0 deletions contrib/security/PSS/patches/ml-pipeline-ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ spec:
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
runAsUser: 1000
capabilities:
drop:
- ALL
1 change: 1 addition & 0 deletions contrib/security/PSS/patches/ml-pipeline-viewer-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ spec:
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
runAsUser: 1000
capabilities:
drop:
- ALL
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ spec:
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
runAsUser: 1000
capabilities:
drop:
- ALL
1 change: 1 addition & 0 deletions contrib/security/PSS/patches/ml-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ spec:
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
runAsUser: 1000
capabilities:
drop:
- ALL

0 comments on commit 4bbbdeb

Please sign in to comment.