Name: aqua-test-5dc9c Namespace: aqua Priority: 0 Service Account: aqua-enforcer-sa Node: ip-10-0-188-107.us-west-2.compute.internal/10.0.188.107 Start Time: Thu, 14 Mar 2024 17:34:57 +0000 Labels: batch.kubernetes.io/controller-uid=b94c5b36-6f2f-4b88-9e44-676cdfc15b2e batch.kubernetes.io/job-name=aqua-test controller-uid=b94c5b36-6f2f-4b88-9e44-676cdfc15b2e job-name=aqua-test Annotations: kubearmor-policy: enabled kubearmor-visibility: process,file,network,capabilities Status: Failed IP: 10.0.162.62 IPs: IP: 10.0.162.62 Controlled By: Job/aqua-test Containers: test-aqua-enforcer: Container ID: containerd://3e732a3a097ebab9c3ad164f969cd238b760f406a5113bf19f8a9b2b839b162a Image: alpine/k8s:1.26.2 Image ID: docker.io/alpine/k8s@sha256:b6980881cf440a3ae78dfa9c021aaa9bb66fc3c27b7120cfa2b2fa1c35ceaa20 Port: Host Port: Command: /bin/bash Args: -c echo "Checking Aqua Enforcer"; sleep 5; timeout_seconds=420; retry_interval=30; max_retry_attempts=10; start_time=$(date +%s); aqua_enforcer_pods=($(kubectl get pods -n aqua -l app=aqua-enforcer-ds --field-selector=status.phase==Running -o jsonpath="{.items[*].metadata.name}")); for aqua_enforcer_pod in "${aqua_enforcer_pods[@]}"; do while true; do current_time=$(date +%s); elapsed_time=$((current_time - start_time)); if [ $elapsed_time -ge $timeout_seconds ]; then echo "Error: Timeout reached while waiting for Aqua Enforcer pods to be ready."; exit 1; fi; aqua_enforcer_pod_status=$(kubectl get pod $aqua_enforcer_pod -n aqua -o jsonpath="{.status.phase}"); if [[ $aqua_enforcer_pod_status != "Running" ]]; then echo "LOG: Pod $aqua_enforcer_pod, $aqua_enforcer_pod_status"; sleep 15; else echo "LOG: Pod $aqua_enforcer_pod, Running"; break; fi; done; done; for aqua_enforcer_pod in "${aqua_enforcer_pods[@]}"; do kubectl exec -n aqua $aqua_enforcer_pod -- /opt/aquasec/./slk status > /dev/null 2>&1; status_command_exit_code=$?; if [ $status_command_exit_code -eq 0 ]; then echo "Aqua Enforcer pod $aqua_enforcer_pod is running and connected"; else echo "Error: status command failed for pod $aqua_enforcer_pod."; echo "Retrying for 5 minutes."; start_time_retry=$(date +%s); retry_elapsed_time=0; while [ $retry_elapsed_time -lt $((retry_interval * max_retry_attempts)) ]; do kubectl exec -n aqua $aqua_enforcer_pod -- /opt/aquasec/./slk status > /dev/null 2>&1; status_command_exit_code=$?; if [ $status_command_exit_code -eq 0 ]; then echo "status command executed successfully for pod $aqua_enforcer_pod."; break; else echo "Retry: status command failed. Retrying in 30 seconds."; sleep $retry_interval; retry_elapsed_time=$((retry_elapsed_time + retry_interval)); fi; done; if [ $status_command_exit_code -ne 0 ]; then echo "Error: Retry limit reached. status command still not successful for pod $aqua_enforcer_pod."; exit 1; fi; fi; done; echo "Job completed successfully for all Aqua Enforcer pods."; exit 0; State: Terminated Reason: Error Exit Code: 1 Started: Thu, 14 Mar 2024 17:34:59 +0000 Finished: Thu, 14 Mar 2024 17:40:07 +0000 Ready: False Restart Count: 0 Environment: Mounts: /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-bhv5c (ro) Conditions: Type Status Initialized True Ready False ContainersReady False PodScheduled True Volumes: kube-api-access-bhv5c: Type: Projected (a volume that contains injected data from multiple sources) TokenExpirationSeconds: 3607 ConfigMapName: kube-root-ca.crt ConfigMapOptional: DownwardAPI: true QoS Class: BestEffort Node-Selectors: Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s node.kubernetes.io/unreachable:NoExecute op=Exists for 300s Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 5m26s default-scheduler Successfully assigned aqua/aqua-test-5dc9c to ip-10-0-188-107.us-west-2.compute.internal Normal Pulling 5m25s kubelet Pulling image "alpine/k8s:1.26.2" Normal Pulled 5m24s kubelet Successfully pulled image "alpine/k8s:1.26.2" in 587ms (587ms including waiting) Normal Created 5m24s kubelet Created container test-aqua-enforcer Normal Started 5m24s kubelet Started container test-aqua-enforcer