-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
None
-
None
-
Quality / Stability / Reliability
-
False
-
-
False
-
-
-
Moderate
Description of problem:
Failed to get metrics when install security profiles operator to a non-default namespace. TargetDown alert was fired for the security-profiles-operator. The alert details showed: "100% of the metrics/metrics targets in NS security-profiles-operator namespace have been unreachable for more than 15 minutes. This may be a symptom of network connectivity issues, down nodes, or failures within these components. Assess the health of the infrastructure and nodes running these targets and then contact support."
Version-Release number of selected component (if applicable):
4.12.0-rc.6 + security-profiles-operator-bundle-container-0.5.0-62
How reproducible:
Alwayso
Steps to Reproduce:
1.Install security profiles operator to a namespace called security-profiles-operator 2. Create a seccompprofile: $ oc apply -f -<<EOF
apiVersion: security-profiles-operator.x-k8s.io/v1beta1 kind: SeccompProfile metadata: name: sleep-sh-pod Namespace: security-profiles-operator spec: defaultAction: SCMP_ACT_ERRNO architectures: - SCMP_ARCH_X86_64 syscalls: - action: SCMP_ACT_ALLOW names: - arch_prctl - brk - capget - capset - chdir - clone - close - dup3 - epoll_ctl - epoll_pwait - execve - exit_group - fchdir - fchown - fcntl - fstat - fstatfs - futex - getcwd - getdents64 - getpid - getppid - getuid - ioctl - lseek - mmap - mount - mprotect - nanosleep - newfstatat - open - openat - pivot_root - prctl - read - rt_sigaction - rt_sigprocmask - rt_sigreturn - set_tid_address - setgid - setgroups - sethostname - setuid - stat - statfs - tgkill - time - umask - umount2 - wait4 - write - mkdir - mkdirat EOF 3. Check the metrics through CMDLine and GUI
Actual results:
The metrics couldn't show for CMLine nor GUI. $ oc run --rm -i --restart=Never --image=registry.fedoraproject.org/fedora-minimal:latest -n security-profiles-operator metrics-test -- bash -c 'curl -ks -H "Authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" https://metrics.security-profiles-operator/metrics-spod' Forbidden (user=system:serviceaccount:security-profiles-operator:default, verb=get, resource=, subresource=) pod "metrics-test" deleted In GUI, click Observe > alert, the targetDown alert was fired for the security-profiles-operator namespace. The alert details showed: "100% of the metrics/metrics targets in NS security-profiles-operator namespace have been unreachable for more than 15 minutes. This may be a symptom of network connectivity issues, down nodes, or failures within these components. Assess the health of the infrastructure and nodes running these targets and then contact support." In GUI, click Observe > Metrics, run query "security_profiles_operator_seccomp_profile_total", it will prompt "No datapoints found".
Expected results:
The metrics could show both for CMLine and GUI.
Additional info:
The metrics works when inatll security profiles operator into the default openshift-security-profiles operator namespace