Skip to content

GetList only returns metadata also for virtual CRDs #527

GetList only returns metadata also for virtual CRDs

GetList only returns metadata also for virtual CRDs #527

Triggered via pull request January 6, 2025 14:01
@matthyxmatthyx
synchronize #183
list
Status Cancelled
Total duration 2m 18s
Artifacts

pr-created.yaml

on: pull_request
pr-created  /  ...  /  check if secrets are set
0s
pr-created / test / check if secrets are set
pr-created  /  ...  /  Create cross-platform build
2m 7s
pr-created / test / Create cross-platform build
pr-created  /  ...  /  Basic-Test
0s
pr-created / test / Basic-Test
Fit to window
Zoom out
Zoom in

Annotations

9 errors and 1 warning
pr-created / test / Create cross-platform build
Canceling since a higher priority waiting request for 'pull_request_created-refs/pull/183/merge' exists
pr-created / test / Create cross-platform build
The operation was canceled.
relevancy_golang: results_xml_format/relevancy_golang.xml#L1
not all SBOMs were verified
network_policy: configurations/system/__pycache__/network_policy.cpython-38.pyc#L22
validate_expected_backend_results, timeout: 2 minutes, error: in validate_network_policy_entry: verified_entries is not equal, actual: 2, expected: 3. kwargs: '{'cluster': 'kind-systets-e600087a-587a-44a0-b225-dc22168595c1', 'namespace': 'systest-ns-cw3x', 'expected_workloads_list': [{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'wikijs', 'labels': {'app': 'wikijs'}}, 'spec': {'selector': {'matchLabels': {'app': 'wikijs'}}, 'template': {'metadata': {'labels': {'app': 'wikijs'}}, 'spec': {'containers': [{'name': 'wikijs', 'image': 'requarks/wiki@sha256:dd83fff15e77843ff934b25c28c865ac000edf7653e5d11adad1dd51df87439d', 'imagePullPolicy': 'Always', 'env': [{'name': 'DB_TYPE', 'value': 'mariadb'}, {'name': 'DB_HOST', 'value': 'mariadb'}, {'name': 'DB_PORT', 'value': '3306'}, {'name': 'DB_NAME', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'DATABASE'}}}, {'name': 'DB_USER', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'USER'}}}, {'name': 'DB_PASS', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'PASSWORD'}}}, {'name': 'ARMO_TEST_NAME', 'value': 'network_policy'}, {'name': 'CAA_ENABLE_CRASH_REPORTER', 'value': '1'}], 'ports': [{'containerPort': 3000, 'name': 'http'}]}]}}}}, {'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'nginx'}, 'spec': {'selector': {'matchLabels': {'app': 'nginx'}}, 'replicas': 1, 'template': {'metadata': {'labels': {'app': 'nginx'}}, 'spec': {'containers': [{'name': 'nginx', 'image': 'nginx@sha256:aa0afebbb3cfa473099a62c4b32e9b3fb73ed23f2a75a65ce1d4b4f55a5c2ef2', 'ports': [{'containerPort': 80}], 'volumeMounts': [{'mountPath': '/etc/nginx', 'readOnly': True, 'name': 'nginx-conf'}], 'env': [{'name': 'ARMO_TEST_NAME', 'value': 'network_policy'}, {'name': 'CAA_ENABLE_CRASH_REPORTER', 'value': '1'}]}], 'volumes': [{'name': 'nginx-conf', 'configMap': {'name': 'nginx-conf', 'items': [{'key': 'nginx.conf', 'path': 'nginx.conf'}]}}]}}}}, {'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mariadb', 'labels': {'app': 'mariadb'}}, 'spec': {'selector': {'matchLabels': {'app': 'mariadb'}}, 'template': {'metadata': {'labels': {'app': 'mariadb'}}, 'spec': {'containers': [{'name': 'mariadb', 'image': 'mariadb@sha256:821d0411208eaa88f9e1f0daccd1d534f88d19baf724eb9a2777cbedb10b6c66', 'env': [{'name': 'MYSQL_ROOT_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'ROOT_PASSWORD'}}}, {'name': 'MYSQL_DATABASE', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'DATABASE'}}}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'USER'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'PASSWORD'}}}, {'name': 'ARMO_TEST_NAME', 'value': 'network_policy'}, {'name': 'CAA_ENABLE_CRASH_REPORTER', 'value': '1'}], 'ports': [{'containerPort': 3306, 'name': 'mysql'}], 'volumeMounts': [{'name': 'mariadb-storage', 'mountPath': '/var/lib/mysql'}]}], 'volumes': [{'name': 'mariadb-storage', 'emptyDir': {}}]}}}}], 'expected_network_neighborhood_list': [{'kind': 'NetworkNeighborhood', 'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'metadata': {'name': 'deployment-wikijs', 'namespace': 'systest-ns-j1m4', 'uid': '571e146a-600f-4893-9b7a-ea48c8f5c953', 'resourceVersion': '1', 'creationTimestamp': '2024-07-03T15:50:07Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'wikijs'}, 'annotations': {'kubescape.io/completion': 'complete', 'kubescape.io/status': 'ready'}}, 'spec': {'containers': [{'name': 'wikijs', 'egress': [{'identifier': '5ad9341e6dde8c3207c811b3304d1e18601c56151f02dfeb6ec20f4f7b6dfb47', 'type': 'external', 'dns': 'wikipedia.org.', 'dnsNames': ['wikipedia.org.'], 'ports': [{'name': 'TCP-443', 'protocol': 'TCP', 'port': 443}], 'podSelector': None, 'namespaceSelector': None, 'ipAddress': '185.15.58.224'}, {'identifier': '66c89b9fd8bd51e9c16c2eb568c64285e1bf89a98e5eb878c7cfb123246857a6', 'type': 'external', 'dns': 'google.com.', 'dnsNames': ['google.com.'], 'ports': [{'name': 'TCP-443', 'protocol': 'TCP', 'port': 443}], 'podSelector': None, 'namespaceSelector': None, 'ipAddress': '142.250.179.78'}, {'identifier': 'e5e8ca3d76f701a19b7478fdc1c8c24ccc6cef9902b52c8c7e015439e2a1ddf3', 'type': 'internal', 'dns': '', 'ports': [{'name': 'UDP-53', 'protocol': 'UDP', 'port': 53}], 'podSelector': {'matchLabels': {'k8s-app': 'kube-dns'}}, 'namespaceSelector': {'matchLabels': {'kubernetes.io/metadata.name': 'kube-system'}}, 'ipAddress': ''}, {'identifier': '9230d773194d84ea09e198e98b8aaa1dd71fd6f406314796f234240bb5111425', 'type': 'internal', 'dns': '', 'ports': [{'name': 'TCP-3306', 'protocol': 'TCP', 'port': 3306}], 'podSelector': {'matchLabels': {'app': 'mariadb'}}, 'namespaceSelector': None, 'ipAddress': ''}], 'ingress': []}], 'matchLabels': {'app': 'wikijs'}}}, {'kind': 'NetworkNeighborhood', 'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'metadata': {'name': 'deployment-mariadb', 'namespace': 'systest-ns-j1m4', 'uid': '14375c2f-c5c9-49e7-b5e2-d7f76728b0e4', 'resourceVersion': '1', 'creationTimestamp': '2024-07-03T15:50:06Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'mariadb'}, 'annotations': {'kubescape.io/completion': 'complete', 'kubescape.io/status': 'ready'}}, 'spec': {'containers': [{'name': 'mariadb', 'egress': [], 'ingress': [{'identifier': 'ee5c5b2f07834fa64174c3d2ad0505366e4b26777174906b91e83dcd163f8ec2', 'type': 'internal', 'dns': '', 'ports': [{'name': 'TCP-3306', 'protocol': 'TCP', 'port': 3306}], 'podSelector': {'matchLabels': {'app': 'wikijs'}}, 'namespaceSelector': None, 'ipAddress': ''}]}], 'matchLabels': {'app': 'mariadb'}}}, {'kind': 'NetworkNeighborhood', 'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'metadata': {'name': 'deployment-nginx', 'namespace': 'systest-ns-j1m4', 'uid': 'e415ac32-19de-4744-9700-61c773e080ca', 'resourceVersion': '1', 'creationTimestamp': '2024-07-03T15:50:06Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'nginx'}, 'annotations': {'kubescape.io/completion': 'complete', 'kubescape.io/status': 'ready'}}, 'spec': {'containers': [{'name': 'nginx', 'egress': [], 'ingress': []}], 'matchLabels': {'app': 'nginx'}}}], 'expected_generated_network_policy_list': [{'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'kind': 'GeneratedNetworkPolicy', 'metadata': {'creationTimestamp': '2023-12-14T09:22:59Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'wikijs'}, 'name': 'deployment-wikijs', 'namespace': 'systest-ns-pjqm'}, 'policyRef': [{'dns': 'google.com.', 'ipBlock': '108.177.120.100/32', 'name': '', 'originalIP': '108.177.120.100', 'server': ''}, {'dns': 'wikipedia.org.', 'ipBlock': '208.80.154.224/32', 'name': '', 'originalIP': '208.80.154.224', 'server': ''}], 'spec': {'apiVersion': 'networking.k8s.io/v1', 'kind': 'NetworkPolicy', 'metadata': {'annotations': {'generated-by': 'kubescape'}, 'creationTimestamp': None, 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'wikijs'}, 'name': 'deployment-wikijs', 'namespace': 'systest-ns-pjqm'}, 'spec': {'egress': [{'ports': [{'port': 443, 'protocol': 'TCP'}], 'to': [{'ipBlock': {'cidr': '108.177.120.100/32'}}, {'ipBlock': {'cidr': '208.80.154.224/32'}}]}, {'ports': [{'port': 53, 'protocol': 'UDP'}], 'to': [{'namespaceSelector': {'matchLabels': {'kubernetes.io/metadata.name': 'kube-system'}}, 'podSelector': {'matchLabels': {'k8s-app': 'kube-dns'}}}]}, {'ports': [{'port': 3306, 'protocol': 'TCP'}], 'to': [{'podSelector': {'matchLabels': {'app': 'mariadb'}}}]}], 'podSelector': {'matchLabels': {'app': 'wikijs'}}, 'policyTypes': ['Egress']}}}, {'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'kind': 'GeneratedNetworkPolicy', 'metadata': {'creationTimestamp': '2023-12-14T09:24:41Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'mariadb'}, 'name': 'deployment-mariadb', 'namespace': 'systest-ns-pjqm'}, 'policyRef': [], 'spec': {'apiVersion': 'networking.k8s.io/v1', 'kind': 'NetworkPolicy', 'metadata': {'annotations': {'generated-by': 'kubescape'}, 'creationTimestamp': None, 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'mariadb'}, 'name': 'deployment-mariadb', 'namespace': 'systest-ns-pjqm'}, 'spec': {'ingress': [{'from': [{'podSelector': {'matchLabels': {'app': 'wikijs'}}}], 'ports': [{'port': 3306, 'protocol': 'TCP'}]}], 'podSelector': {'matchLabels': {'app': 'mariadb'}}, 'policyTypes': ['Ingress']}}}, {'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'kind': 'GeneratedNetworkPolicy', 'metadata': {'creationTimestamp': '2023-12-14T09:25:02Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'nginx'}, 'name': 'deployment-nginx', 'namespace': 'systest-ns-pjqm'}, 'policyRef': [], 'spec': {'apiVersion': 'networking.k8s.io/v1', 'kind': 'NetworkPolicy', 'metadata': {'annotations': {'generated-by': 'kubescape'}, 'creationTimestamp': None, 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'nginx'}, 'name': 'deployment-nginx', 'namespace': 'systest-ns-pjqm'}, 'spec': {'egress': [], 'podSelector': {'matchLabels': {'app': 'nginx'}}, 'policyTypes': ['Egress']}}}]}'
network_policy_data_appended: results_xml_format/network_policy_data_appended.xml#L50
validate_expected_backend_results, timeout: 2 minutes, error: network policies workloads list is 0 'CyberArmorTests' (code: 200, message: {"total":{"value":0,"relation":"eq"},"response":[],"cursor":""} ). kwargs: '{'cluster': 'kind-systets-63e3c995-a1dd-41b7-ae2b-2be5cb3ee0bc', 'namespace': 'systest-ns-c4iy', 'expected_workloads_list': [{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'wikijs', 'labels': {'app': 'wikijs'}}, 'spec': {'selector': {'matchLabels': {'app': 'wikijs'}}, 'template': {'metadata': {'labels': {'app': 'wikijs'}}, 'spec': {'containers': [{'name': 'wikijs', 'image': 'requarks/wiki@sha256:dd83fff15e77843ff934b25c28c865ac000edf7653e5d11adad1dd51df87439d', 'imagePullPolicy': 'Always', 'env': [{'name': 'DB_TYPE', 'value': 'mariadb'}, {'name': 'DB_HOST', 'value': 'mariadb'}, {'name': 'DB_PORT', 'value': '3306'}, {'name': 'DB_NAME', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'DATABASE'}}}, {'name': 'DB_USER', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'USER'}}}, {'name': 'DB_PASS', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'PASSWORD'}}}, {'name': 'ARMO_TEST_NAME', 'value': 'network_policy_data_appended'}, {'name': 'CAA_ENABLE_CRASH_REPORTER', 'value': '1'}], 'ports': [{'containerPort': 3000, 'name': 'http'}]}]}}}}, {'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'nginx'}, 'spec': {'selector': {'matchLabels': {'app': 'nginx'}}, 'replicas': 1, 'template': {'metadata': {'labels': {'app': 'nginx'}}, 'spec': {'containers': [{'name': 'nginx', 'image': 'nginx@sha256:aa0afebbb3cfa473099a62c4b32e9b3fb73ed23f2a75a65ce1d4b4f55a5c2ef2', 'ports': [{'containerPort': 80}], 'volumeMounts': [{'mountPath': '/etc/nginx', 'readOnly': True, 'name': 'nginx-conf'}], 'env': [{'name': 'ARMO_TEST_NAME', 'value': 'network_policy_data_appended'}, {'name': 'CAA_ENABLE_CRASH_REPORTER', 'value': '1'}]}], 'volumes': [{'name': 'nginx-conf', 'configMap': {'name': 'nginx-conf', 'items': [{'key': 'nginx.conf', 'path': 'nginx.conf'}]}}]}}}}, {'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mariadb', 'labels': {'app': 'mariadb'}}, 'spec': {'selector': {'matchLabels': {'app': 'mariadb'}}, 'template': {'metadata': {'labels': {'app': 'mariadb'}}, 'spec': {'containers': [{'name': 'mariadb', 'image': 'mariadb@sha256:821d0411208eaa88f9e1f0daccd1d534f88d19baf724eb9a2777cbedb10b6c66', 'env': [{'name': 'MYSQL_ROOT_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'ROOT_PASSWORD'}}}, {'name': 'MYSQL_DATABASE', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'DATABASE'}}}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'USER'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'PASSWORD'}}}, {'name': 'ARMO_TEST_NAME', 'value': 'network_policy_data_appended'}, {'name': 'CAA_ENABLE_CRASH_REPORTER', 'value': '1'}], 'ports': [{'containerPort': 3306, 'name': 'mysql'}], 'volumeMounts': [{'name': 'mariadb-storage', 'mountPath': '/var/lib/mysql'}]}], 'volumes': [{'name': 'mariadb-storage', 'emptyDir': {}}]}}}}], 'expected_network_neighborhood_list': [{'kind': 'NetworkNeighborhood', 'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'metadata': {'name': 'deployment-wikijs', 'namespace': 'systest-ns-j1m4', 'uid': '571e146a-600f-4893-9b7a-ea48c8f5c953', 'resourceVersion': '1', 'creationTimestamp': '2024-07-03T15:50:07Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'wikijs'}, 'annotations': {'kubescape.io/completion': 'complete', 'kubescape.io/status': 'ready'}}, 'spec': {'containers': [{'name': 'wikijs', 'egress': [{'identifier': '5ad9341e6dde8c3207c811b3304d1e18601c56151f02dfeb6ec20f4f7b6dfb47', 'type': 'external', 'dns': 'wikipedia.org.', 'dnsNames': ['wikipedia.org.'], 'ports': [{'name': 'TCP-443', 'protocol': 'TCP', 'port': 443}], 'podSelector': None, 'namespaceSelector': None, 'ipAddress': '185.15.58.224'}, {'identifier': '66c89b9fd8bd51e9c16c2eb568c64285e1bf89a98e5eb878c7cfb123246857a6', 'type': 'external', 'dns': 'google.com.', 'dnsNames': ['google.com.'], 'ports': [{'name': 'TCP-443', 'protocol': 'TCP', 'port': 443}], 'podSelector': None, 'namespaceSelector': None, 'ipAddress': '142.250.179.78'}, {'identifier': 'e5e8ca3d76f701a19b7478fdc1c8c24ccc6cef9902b52c8c7e015439e2a1ddf3', 'type': 'internal', 'dns': '', 'ports': [{'name': 'UDP-53', 'protocol': 'UDP', 'port': 53}], 'podSelector': {'matchLabels': {'k8s-app': 'kube-dns'}}, 'namespaceSelector': {'matchLabels': {'kubernetes.io/metadata.name': 'kube-system'}}, 'ipAddress': ''}, {'identifier': '9230d773194d84ea09e198e98b8aaa1dd71fd6f406314796f234240bb5111425', 'type': 'internal', 'dns': '', 'ports': [{'name': 'TCP-3306', 'protocol': 'TCP', 'port': 3306}], 'podSelector': {'matchLabels': {'app': 'mariadb'}}, 'namespaceSelector': None, 'ipAddress': ''}], 'ingress': []}], 'matchLabels': {'app': 'wikijs'}}}, {'kind': 'NetworkNeighborhood', 'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'metadata': {'name': 'deployment-mariadb', 'namespace': 'systest-ns-j1m4', 'uid': '14375c2f-c5c9-49e7-b5e2-d7f76728b0e4', 'resourceVersion': '1', 'creationTimestamp': '2024-07-03T15:50:06Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'mariadb'}, 'annotations': {'kubescape.io/completion': 'complete', 'kubescape.io/status': 'ready'}}, 'spec': {'containers': [{'name': 'mariadb', 'egress': [], 'ingress': [{'identifier': 'ee5c5b2f07834fa64174c3d2ad0505366e4b26777174906b91e83dcd163f8ec2', 'type': 'internal', 'dns': '', 'ports': [{'name': 'TCP-3306', 'protocol': 'TCP', 'port': 3306}], 'podSelector': {'matchLabels': {'app': 'wikijs'}}, 'namespaceSelector': None, 'ipAddress': ''}]}], 'matchLabels': {'app': 'mariadb'}}}, {'kind': 'NetworkNeighborhood', 'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'metadata': {'name': 'deployment-nginx', 'namespace': 'systest-ns-j1m4', 'uid': 'e415ac32-19de-4744-9700-61c773e080ca', 'resourceVersion': '1', 'creationTimestamp': '2024-07-03T15:50:06Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'nginx'}, 'annotations': {'kubescape.io/completion': 'complete', 'kubescape.io/status': 'ready'}}, 'spec': {'containers': [{'name': 'nginx', 'egress': [], 'ingress': []}], 'matchLabels': {'app': 'nginx'}}}], 'expected_generated_network_policy_list': [{'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'kind': 'GeneratedNetworkPolicy', 'metadata': {'creationTimestamp': '2023-12-14T09:22:59Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'wikijs'}, 'name': 'deployment-wikijs', 'namespace': 'systest-ns-pjqm'}, 'policyRef': [{'dns': 'google.com.', 'ipBlock': '108.177.120.100/32', 'name': '', 'originalIP': '108.177.120.100', 'server': ''}, {'dns': 'wikipedia.org.', 'ipBlock': '208.80.154.224/32', 'name': '', 'originalIP': '208.80.154.224', 'server': ''}], 'spec': {'apiVersion': 'networking.k8s.io/v1', 'kind': 'NetworkPolicy', 'metadata': {'annotations': {'generated-by': 'kubescape'}, 'creationTimestamp': None, 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'wikijs'}, 'name': 'deployment-wikijs', 'namespace': 'systest-ns-pjqm'}, 'spec': {'egress': [{'ports': [{'port': 443, 'protocol': 'TCP'}], 'to': [{'ipBlock': {'cidr': '108.177.120.100/32'}}, {'ipBlock': {'cidr': '208.80.154.224/32'}}]}, {'ports': [{'port': 53, 'protocol': 'UDP'}], 'to': [{'namespaceSelector': {'matchLabels': {'kubernetes.io/metadata.name': 'kube-system'}}, 'podSelector': {'matchLabels': {'k8s-app': 'kube-dns'}}}]}, {'ports': [{'port': 3306, 'protocol': 'TCP'}], 'to': [{'podSelector': {'matchLabels': {'app': 'mariadb'}}}]}], 'podSelector': {'matchLabels': {'app': 'wikijs'}}, 'policyTypes': ['Egress']}}}, {'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'kind': 'GeneratedNetworkPolicy', 'metadata': {'creationTimestamp': '2023-12-14T09:24:41Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'mariadb'}, 'name': 'deployment-mariadb', 'namespace': 'systest-ns-pjqm'}, 'policyRef': [], 'spec': {'apiVersion': 'networking.k8s.io/v1', 'kind': 'NetworkPolicy', 'metadata': {'annotations': {'generated-by': 'kubescape'}, 'creationTimestamp': None, 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'mariadb'}, 'name': 'deployment-mariadb', 'namespace': 'systest-ns-pjqm'}, 'spec': {'ingress': [{'from': [{'podSelector': {'matchLabels': {'app': 'wikijs'}}}], 'ports': [{'port': 3306, 'protocol': 'TCP'}]}], 'podSelector': {'matchLabels': {'app': 'mariadb'}}, 'policyTypes': ['Ingress']}}}, {'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'kind': 'GeneratedNetworkPolicy', 'metadata': {'creationTimestamp': '2023-12-14T09:25:02Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'nginx'}, 'name': 'deployment-nginx', 'namespace': 'systest-ns-pjqm'}, 'policyRef': [], 'spec': {'apiVersion': 'networking.k8s.io/v1', 'kind': 'NetworkPolicy', 'metadata': {'annotations': {'generated-by': 'kubescape'}, 'creationTimestamp': None, 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'nginx'}, 'name': 'deployment-nginx', 'namespace': 'systest-ns-pjqm'}, 'spec': {'egress': [], 'podSelector': {'matchLabels': {'app': 'nginx'}}, 'policyTypes': ['Egress']}}}]}'
network_policy_pod_restarted: results_xml_format/network_policy_pod_restarted.xml#L42
validate_expected_backend_results, timeout: 4 minutes, error: object of type 'NoneType' has no len(). kwargs: '{'cluster': 'kind-systets-1b94cd73-f5c0-42ca-8d03-1409fe64d113', 'namespace': 'systest-ns-ozjt', 'expected_workloads_list': [{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'wikijs', 'labels': {'app': 'wikijs'}}, 'spec': {'selector': {'matchLabels': {'app': 'wikijs'}}, 'template': {'metadata': {'labels': {'app': 'wikijs'}}, 'spec': {'containers': [{'name': 'wikijs', 'image': 'requarks/wiki@sha256:dd83fff15e77843ff934b25c28c865ac000edf7653e5d11adad1dd51df87439d', 'imagePullPolicy': 'Always', 'env': [{'name': 'DB_TYPE', 'value': 'mariadb'}, {'name': 'DB_HOST', 'value': 'mariadb'}, {'name': 'DB_PORT', 'value': '3306'}, {'name': 'DB_NAME', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'DATABASE'}}}, {'name': 'DB_USER', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'USER'}}}, {'name': 'DB_PASS', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'PASSWORD'}}}, {'name': 'ARMO_TEST_NAME', 'value': 'network_policy_pod_restarted'}, {'name': 'CAA_ENABLE_CRASH_REPORTER', 'value': '1'}], 'ports': [{'containerPort': 3000, 'name': 'http'}]}]}}}}, {'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'nginx'}, 'spec': {'selector': {'matchLabels': {'app': 'nginx'}}, 'replicas': 1, 'template': {'metadata': {'labels': {'app': 'nginx'}}, 'spec': {'containers': [{'name': 'nginx', 'image': 'nginx@sha256:aa0afebbb3cfa473099a62c4b32e9b3fb73ed23f2a75a65ce1d4b4f55a5c2ef2', 'ports': [{'containerPort': 80}], 'volumeMounts': [{'mountPath': '/etc/nginx', 'readOnly': True, 'name': 'nginx-conf'}], 'env': [{'name': 'ARMO_TEST_NAME', 'value': 'network_policy_pod_restarted'}, {'name': 'CAA_ENABLE_CRASH_REPORTER', 'value': '1'}]}], 'volumes': [{'name': 'nginx-conf', 'configMap': {'name': 'nginx-conf', 'items': [{'key': 'nginx.conf', 'path': 'nginx.conf'}]}}]}}}}, {'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mariadb', 'labels': {'app': 'mariadb'}}, 'spec': {'selector': {'matchLabels': {'app': 'mariadb'}}, 'template': {'metadata': {'labels': {'app': 'mariadb'}}, 'spec': {'containers': [{'name': 'mariadb', 'image': 'mariadb@sha256:821d0411208eaa88f9e1f0daccd1d534f88d19baf724eb9a2777cbedb10b6c66', 'env': [{'name': 'MYSQL_ROOT_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'ROOT_PASSWORD'}}}, {'name': 'MYSQL_DATABASE', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'DATABASE'}}}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'USER'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'PASSWORD'}}}, {'name': 'ARMO_TEST_NAME', 'value': 'network_policy_pod_restarted'}, {'name': 'CAA_ENABLE_CRASH_REPORTER', 'value': '1'}], 'ports': [{'containerPort': 3306, 'name': 'mysql'}], 'volumeMounts': [{'name': 'mariadb-storage', 'mountPath': '/var/lib/mysql'}]}], 'volumes': [{'name': 'mariadb-storage', 'emptyDir': {}}]}}}}], 'expected_network_neighborhood_list': [{'kind': 'NetworkNeighborhood', 'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'metadata': {'name': 'deployment-wikijs', 'namespace': 'systest-ns-hvt7', 'uid': '6601c441-3774-42c8-8350-39770c6021ea', 'resourceVersion': '1', 'creationTimestamp': '2024-07-03T15:42:52Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'wikijs'}, 'annotations': {'kubescape.io/completion': 'complete', 'kubescape.io/status': 'ready'}}, 'spec': {'matchLabels': {'app': 'wikijs'}, 'containers': [{'name': 'wikijs', 'ingress': [], 'egress': [{'identifier': 'e5e8ca3d76f701a19b7478fdc1c8c24ccc6cef9902b52c8c7e015439e2a1ddf3', 'type': 'internal', 'dns': '', 'ports': [{'name': 'UDP-53', 'protocol': 'UDP', 'port': 53}], 'podSelector': {'matchLabels': {'k8s-app': 'kube-dns'}}, 'namespaceSelector': {'matchLabels': {'kubernetes.io/metadata.name': 'kube-system'}}, 'ipAddress': ''}, {'identifier': '9230d773194d84ea09e198e98b8aaa1dd71fd6f406314796f234240bb5111425', 'type': 'internal', 'dns': '', 'ports': [{'name': 'TCP-3306', 'protocol': 'TCP', 'port': 3306}], 'podSelector': {'matchLabels': {'app': 'mariadb'}}, 'namespaceSelector': None, 'ipAddress': ''}]}]}}, {'kind': 'NetworkNeighborhood', 'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'metadata': {'name': 'deployment-mariadb', 'namespace': 'systest-ns-hvt7', 'uid': '45a5f0df-855b-423d-b5d1-bea710fd2cbf', 'resourceVersion': '1', 'creationTimestamp': '2024-07-03T15:42:50Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'mariadb'}, 'annotations': {'kubescape.io/completion': 'complete', 'kubescape.io/status': 'ready'}}, 'spec': {'matchLabels': {'app': 'mariadb'}, 'containers': [{'name': 'mariadb', 'ingress': [{'identifier': 'ee5c5b2f07834fa64174c3d2ad0505366e4b26777174906b91e83dcd163f8ec2', 'type': 'internal', 'dns': '', 'ports': [{'name': 'TCP-3306', 'protocol': 'TCP', 'port': 3306}], 'podSelector': {'matchLabels': {'app': 'wikijs'}}, 'namespaceSelector': None, 'ipAddress': ''}], 'egress': []}]}}, {'kind': 'NetworkNeighborhood', 'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'metadata': {'name': 'deployment-nginx', 'namespace': 'systest-ns-hvt7', 'uid': '389bed91-3f2d-464d-9b70-7d29309162a5', 'resourceVersion': '1', 'creationTimestamp': '2024-07-03T15:42:51Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'nginx'}, 'annotations': {'kubescape.io/completion': 'complete', 'kubescape.io/status': 'ready'}}, 'spec': {'matchLabels': {'app': 'nginx'}, 'containers': [{'name': 'nginx', 'ingress': [], 'egress': [{'identifier': 'e5e8ca3d76f701a19b7478fdc1c8c24ccc6cef9902b52c8c7e015439e2a1ddf3', 'type': 'internal', 'dns': '', 'ports': [{'name': 'UDP-53', 'protocol': 'UDP', 'port': 53}], 'podSelector': {'matchLabels': {'k8s-app': 'kube-dns'}}, 'namespaceSelector': {'matchLabels': {'kubernetes.io/metadata.name': 'kube-system'}}, 'ipAddress': ''}]}]}}], 'expected_generated_network_policy_list': [{'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'kind': 'GeneratedNetworkPolicy', 'metadata': {'creationTimestamp': '2023-12-14T09:22:59Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'wikijs'}, 'name': 'deployment-wikijs', 'namespace': 'systest-ns-pjqm'}, 'policyRef': [], 'spec': {'apiVersion': 'networking.k8s.io/v1', 'kind': 'NetworkPolicy', 'metadata': {'annotations': {'generated-by': 'kubescape'}, 'creationTimestamp': None, 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'wikijs'}, 'name': 'deployment-wikijs', 'namespace': 'systest-ns-pjqm'}, 'spec': {'egress': [{'ports': [{'port': 53, 'protocol': 'UDP'}], 'to': [{'namespaceSelector': {'matchLabels': {'kubernetes.io/metadata.name': 'kube-system'}}, 'podSelector': {'matchLabels': {'k8s-app': 'kube-dns'}}}]}, {'ports': [{'port': 3306, 'protocol': 'TCP'}], 'to': [{'podSelector': {'matchLabels': {'app': 'mariadb'}}}]}], 'podSelector': {'matchLabels': {'app': 'wikijs'}}, 'policyTypes': ['Egress']}}}, {'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'kind': 'GeneratedNetworkPolicy', 'metadata': {'creationTimestamp': '2023-12-14T09:24:41Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'mariadb'}, 'name': 'deployment-mariadb', 'namespace': 'systest-ns-pjqm'}, 'policyRef': [], 'spec': {'apiVersion': 'networking.k8s.io/v1', 'kind': 'NetworkPolicy', 'metadata': {'annotations': {'generated-by': 'kubescape'}, 'creationTimestamp': None, 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'mariadb'}, 'name': 'deployment-mariadb', 'namespace': 'systest-ns-pjqm'}, 'spec': {'ingress': [{'from': [{'podSelector': {'matchLabels': {'app': 'wikijs'}}}], 'ports': [{'port': 3306, 'protocol': 'TCP'}]}], 'podSelector': {'matchLabels': {'app': 'mariadb'}}, 'policyTypes': ['Ingress']}}}, {'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'kind': 'GeneratedNetworkPolicy', 'metadata': {'creationTimestamp': '2023-12-14T09:25:02Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'nginx'}, 'name': 'deployment-nginx', 'namespace': 'systest-ns-pjqm'}, 'policyRef': [], 'spec': {'apiVersion': 'networking.k8s.io/v1', 'kind': 'NetworkPolicy', 'metadata': {'annotations': {'generated-by': 'kubescape'}, 'creationTimestamp': None, 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'nginx'}, 'name': 'deployment-nginx', 'namespace': 'systest-ns-pjqm'}, 'spec': {'egress': [], 'podSelector': {'matchLabels': {'app': 'nginx'}}, 'policyTypes': ['Egress']}}}]}'
network_policy_data_appended: results_xml_format/network_policy_data_appended.xml#L1
expected_entries length is not lower or equal to actual_entries length, actual: 0, expected: 2
network_policy: configurations/system/__pycache__/network_policy.cpython-38.pyc#L22
validate_expected_backend_results, timeout: 2 minutes, error: network policies workloads list is 0 'CyberArmorTests' (code: 200, message: {"total":{"value":0,"relation":"eq"},"response":[],"cursor":""} ). kwargs: '{'cluster': 'kind-systets-4224d844-e7ee-4752-92fb-d769cafbb01a', 'namespace': 'systest-ns-pjzq', 'expected_workloads_list': [{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'wikijs', 'labels': {'app': 'wikijs'}}, 'spec': {'selector': {'matchLabels': {'app': 'wikijs'}}, 'template': {'metadata': {'labels': {'app': 'wikijs'}}, 'spec': {'containers': [{'name': 'wikijs', 'image': 'requarks/wiki@sha256:dd83fff15e77843ff934b25c28c865ac000edf7653e5d11adad1dd51df87439d', 'imagePullPolicy': 'Always', 'env': [{'name': 'DB_TYPE', 'value': 'mariadb'}, {'name': 'DB_HOST', 'value': 'mariadb'}, {'name': 'DB_PORT', 'value': '3306'}, {'name': 'DB_NAME', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'DATABASE'}}}, {'name': 'DB_USER', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'USER'}}}, {'name': 'DB_PASS', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'PASSWORD'}}}, {'name': 'ARMO_TEST_NAME', 'value': 'network_policy'}, {'name': 'CAA_ENABLE_CRASH_REPORTER', 'value': '1'}], 'ports': [{'containerPort': 3000, 'name': 'http'}]}]}}}}, {'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'nginx'}, 'spec': {'selector': {'matchLabels': {'app': 'nginx'}}, 'replicas': 1, 'template': {'metadata': {'labels': {'app': 'nginx'}}, 'spec': {'containers': [{'name': 'nginx', 'image': 'nginx@sha256:aa0afebbb3cfa473099a62c4b32e9b3fb73ed23f2a75a65ce1d4b4f55a5c2ef2', 'ports': [{'containerPort': 80}], 'volumeMounts': [{'mountPath': '/etc/nginx', 'readOnly': True, 'name': 'nginx-conf'}], 'env': [{'name': 'ARMO_TEST_NAME', 'value': 'network_policy'}, {'name': 'CAA_ENABLE_CRASH_REPORTER', 'value': '1'}]}], 'volumes': [{'name': 'nginx-conf', 'configMap': {'name': 'nginx-conf', 'items': [{'key': 'nginx.conf', 'path': 'nginx.conf'}]}}]}}}}, {'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mariadb', 'labels': {'app': 'mariadb'}}, 'spec': {'selector': {'matchLabels': {'app': 'mariadb'}}, 'template': {'metadata': {'labels': {'app': 'mariadb'}}, 'spec': {'containers': [{'name': 'mariadb', 'image': 'mariadb@sha256:821d0411208eaa88f9e1f0daccd1d534f88d19baf724eb9a2777cbedb10b6c66', 'env': [{'name': 'MYSQL_ROOT_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'ROOT_PASSWORD'}}}, {'name': 'MYSQL_DATABASE', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'DATABASE'}}}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'USER'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'PASSWORD'}}}, {'name': 'ARMO_TEST_NAME', 'value': 'network_policy'}, {'name': 'CAA_ENABLE_CRASH_REPORTER', 'value': '1'}], 'ports': [{'containerPort': 3306, 'name': 'mysql'}], 'volumeMounts': [{'name': 'mariadb-storage', 'mountPath': '/var/lib/mysql'}]}], 'volumes': [{'name': 'mariadb-storage', 'emptyDir': {}}]}}}}], 'expected_network_neighborhood_list': [{'kind': 'NetworkNeighborhood', 'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'metadata': {'name': 'deployment-wikijs', 'namespace': 'systest-ns-j1m4', 'uid': '571e146a-600f-4893-9b7a-ea48c8f5c953', 'resourceVersion': '1', 'creationTimestamp': '2024-07-03T15:50:07Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'wikijs'}, 'annotations': {'kubescape.io/completion': 'complete', 'kubescape.io/status': 'ready'}}, 'spec': {'containers': [{'name': 'wikijs', 'egress': [{'identifier': '5ad9341e6dde8c3207c811b3304d1e18601c56151f02dfeb6ec20f4f7b6dfb47', 'type': 'external', 'dns': 'wikipedia.org.', 'dnsNames': ['wikipedia.org.'], 'ports': [{'name': 'TCP-443', 'protocol': 'TCP', 'port': 443}], 'podSelector': None, 'namespaceSelector': None, 'ipAddress': '185.15.58.224'}, {'identifier': '66c89b9fd8bd51e9c16c2eb568c64285e1bf89a98e5eb878c7cfb123246857a6', 'type': 'external', 'dns': 'google.com.', 'dnsNames': ['google.com.'], 'ports': [{'name': 'TCP-443', 'protocol': 'TCP', 'port': 443}], 'podSelector': None, 'namespaceSelector': None, 'ipAddress': '142.250.179.78'}, {'identifier': 'e5e8ca3d76f701a19b7478fdc1c8c24ccc6cef9902b52c8c7e015439e2a1ddf3', 'type': 'internal', 'dns': '', 'ports': [{'name': 'UDP-53', 'protocol': 'UDP', 'port': 53}], 'podSelector': {'matchLabels': {'k8s-app': 'kube-dns'}}, 'namespaceSelector': {'matchLabels': {'kubernetes.io/metadata.name': 'kube-system'}}, 'ipAddress': ''}, {'identifier': '9230d773194d84ea09e198e98b8aaa1dd71fd6f406314796f234240bb5111425', 'type': 'internal', 'dns': '', 'ports': [{'name': 'TCP-3306', 'protocol': 'TCP', 'port': 3306}], 'podSelector': {'matchLabels': {'app': 'mariadb'}}, 'namespaceSelector': None, 'ipAddress': ''}], 'ingress': []}], 'matchLabels': {'app': 'wikijs'}}}, {'kind': 'NetworkNeighborhood', 'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'metadata': {'name': 'deployment-mariadb', 'namespace': 'systest-ns-j1m4', 'uid': '14375c2f-c5c9-49e7-b5e2-d7f76728b0e4', 'resourceVersion': '1', 'creationTimestamp': '2024-07-03T15:50:06Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'mariadb'}, 'annotations': {'kubescape.io/completion': 'complete', 'kubescape.io/status': 'ready'}}, 'spec': {'containers': [{'name': 'mariadb', 'egress': [], 'ingress': [{'identifier': 'ee5c5b2f07834fa64174c3d2ad0505366e4b26777174906b91e83dcd163f8ec2', 'type': 'internal', 'dns': '', 'ports': [{'name': 'TCP-3306', 'protocol': 'TCP', 'port': 3306}], 'podSelector': {'matchLabels': {'app': 'wikijs'}}, 'namespaceSelector': None, 'ipAddress': ''}]}], 'matchLabels': {'app': 'mariadb'}}}, {'kind': 'NetworkNeighborhood', 'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'metadata': {'name': 'deployment-nginx', 'namespace': 'systest-ns-j1m4', 'uid': 'e415ac32-19de-4744-9700-61c773e080ca', 'resourceVersion': '1', 'creationTimestamp': '2024-07-03T15:50:06Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'nginx'}, 'annotations': {'kubescape.io/completion': 'complete', 'kubescape.io/status': 'ready'}}, 'spec': {'containers': [{'name': 'nginx', 'egress': [], 'ingress': []}], 'matchLabels': {'app': 'nginx'}}}], 'expected_generated_network_policy_list': [{'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'kind': 'GeneratedNetworkPolicy', 'metadata': {'creationTimestamp': '2023-12-14T09:22:59Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'wikijs'}, 'name': 'deployment-wikijs', 'namespace': 'systest-ns-pjqm'}, 'policyRef': [{'dns': 'google.com.', 'ipBlock': '108.177.120.100/32', 'name': '', 'originalIP': '108.177.120.100', 'server': ''}, {'dns': 'wikipedia.org.', 'ipBlock': '208.80.154.224/32', 'name': '', 'originalIP': '208.80.154.224', 'server': ''}], 'spec': {'apiVersion': 'networking.k8s.io/v1', 'kind': 'NetworkPolicy', 'metadata': {'annotations': {'generated-by': 'kubescape'}, 'creationTimestamp': None, 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'wikijs'}, 'name': 'deployment-wikijs', 'namespace': 'systest-ns-pjqm'}, 'spec': {'egress': [{'ports': [{'port': 443, 'protocol': 'TCP'}], 'to': [{'ipBlock': {'cidr': '108.177.120.100/32'}}, {'ipBlock': {'cidr': '208.80.154.224/32'}}]}, {'ports': [{'port': 53, 'protocol': 'UDP'}], 'to': [{'namespaceSelector': {'matchLabels': {'kubernetes.io/metadata.name': 'kube-system'}}, 'podSelector': {'matchLabels': {'k8s-app': 'kube-dns'}}}]}, {'ports': [{'port': 3306, 'protocol': 'TCP'}], 'to': [{'podSelector': {'matchLabels': {'app': 'mariadb'}}}]}], 'podSelector': {'matchLabels': {'app': 'wikijs'}}, 'policyTypes': ['Egress']}}}, {'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'kind': 'GeneratedNetworkPolicy', 'metadata': {'creationTimestamp': '2023-12-14T09:24:41Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'mariadb'}, 'name': 'deployment-mariadb', 'namespace': 'systest-ns-pjqm'}, 'policyRef': [], 'spec': {'apiVersion': 'networking.k8s.io/v1', 'kind': 'NetworkPolicy', 'metadata': {'annotations': {'generated-by': 'kubescape'}, 'creationTimestamp': None, 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'mariadb'}, 'name': 'deployment-mariadb', 'namespace': 'systest-ns-pjqm'}, 'spec': {'ingress': [{'from': [{'podSelector': {'matchLabels': {'app': 'wikijs'}}}], 'ports': [{'port': 3306, 'protocol': 'TCP'}]}], 'podSelector': {'matchLabels': {'app': 'mariadb'}}, 'policyTypes': ['Ingress']}}}, {'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'kind': 'GeneratedNetworkPolicy', 'metadata': {'creationTimestamp': '2023-12-14T09:25:02Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'nginx'}, 'name': 'deployment-nginx', 'namespace': 'systest-ns-pjqm'}, 'policyRef': [], 'spec': {'apiVersion': 'networking.k8s.io/v1', 'kind': 'NetworkPolicy', 'metadata': {'annotations': {'generated-by': 'kubescape'}, 'creationTimestamp': None, 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'nginx'}, 'name': 'deployment-nginx', 'namespace': 'systest-ns-pjqm'}, 'spec': {'egress': [], 'podSelector': {'matchLabels': {'app': 'nginx'}}, 'policyTypes': ['Egress']}}}]}'
network_policy_pod_restarted: results_xml_format/network_policy_pod_restarted.xml#L42
validate_expected_backend_results, timeout: 4 minutes, error: network policies workloads list is 0 'CyberArmorTests' (code: 200, message: {"total":{"value":0,"relation":"eq"},"response":[],"cursor":""} ). kwargs: '{'cluster': 'kind-systets-47c5b952-215e-4c7b-9d33-b7bd76553071', 'namespace': 'systest-ns-wnrn', 'expected_workloads_list': [{'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'wikijs', 'labels': {'app': 'wikijs'}}, 'spec': {'selector': {'matchLabels': {'app': 'wikijs'}}, 'template': {'metadata': {'labels': {'app': 'wikijs'}}, 'spec': {'containers': [{'name': 'wikijs', 'image': 'requarks/wiki@sha256:dd83fff15e77843ff934b25c28c865ac000edf7653e5d11adad1dd51df87439d', 'imagePullPolicy': 'Always', 'env': [{'name': 'DB_TYPE', 'value': 'mariadb'}, {'name': 'DB_HOST', 'value': 'mariadb'}, {'name': 'DB_PORT', 'value': '3306'}, {'name': 'DB_NAME', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'DATABASE'}}}, {'name': 'DB_USER', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'USER'}}}, {'name': 'DB_PASS', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'PASSWORD'}}}, {'name': 'ARMO_TEST_NAME', 'value': 'network_policy_pod_restarted'}, {'name': 'CAA_ENABLE_CRASH_REPORTER', 'value': '1'}], 'ports': [{'containerPort': 3000, 'name': 'http'}]}]}}}}, {'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'nginx'}, 'spec': {'selector': {'matchLabels': {'app': 'nginx'}}, 'replicas': 1, 'template': {'metadata': {'labels': {'app': 'nginx'}}, 'spec': {'containers': [{'name': 'nginx', 'image': 'nginx@sha256:aa0afebbb3cfa473099a62c4b32e9b3fb73ed23f2a75a65ce1d4b4f55a5c2ef2', 'ports': [{'containerPort': 80}], 'volumeMounts': [{'mountPath': '/etc/nginx', 'readOnly': True, 'name': 'nginx-conf'}], 'env': [{'name': 'ARMO_TEST_NAME', 'value': 'network_policy_pod_restarted'}, {'name': 'CAA_ENABLE_CRASH_REPORTER', 'value': '1'}]}], 'volumes': [{'name': 'nginx-conf', 'configMap': {'name': 'nginx-conf', 'items': [{'key': 'nginx.conf', 'path': 'nginx.conf'}]}}]}}}}, {'apiVersion': 'apps/v1', 'kind': 'Deployment', 'metadata': {'name': 'mariadb', 'labels': {'app': 'mariadb'}}, 'spec': {'selector': {'matchLabels': {'app': 'mariadb'}}, 'template': {'metadata': {'labels': {'app': 'mariadb'}}, 'spec': {'containers': [{'name': 'mariadb', 'image': 'mariadb@sha256:821d0411208eaa88f9e1f0daccd1d534f88d19baf724eb9a2777cbedb10b6c66', 'env': [{'name': 'MYSQL_ROOT_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'ROOT_PASSWORD'}}}, {'name': 'MYSQL_DATABASE', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'DATABASE'}}}, {'name': 'MYSQL_USER', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'USER'}}}, {'name': 'MYSQL_PASSWORD', 'valueFrom': {'secretKeyRef': {'name': 'mariadb-real-secret', 'key': 'PASSWORD'}}}, {'name': 'ARMO_TEST_NAME', 'value': 'network_policy_pod_restarted'}, {'name': 'CAA_ENABLE_CRASH_REPORTER', 'value': '1'}], 'ports': [{'containerPort': 3306, 'name': 'mysql'}], 'volumeMounts': [{'name': 'mariadb-storage', 'mountPath': '/var/lib/mysql'}]}], 'volumes': [{'name': 'mariadb-storage', 'emptyDir': {}}]}}}}], 'expected_network_neighborhood_list': [{'kind': 'NetworkNeighborhood', 'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'metadata': {'name': 'deployment-wikijs', 'namespace': 'systest-ns-hvt7', 'uid': '6601c441-3774-42c8-8350-39770c6021ea', 'resourceVersion': '1', 'creationTimestamp': '2024-07-03T15:42:52Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'wikijs'}, 'annotations': {'kubescape.io/completion': 'complete', 'kubescape.io/status': 'ready'}}, 'spec': {'matchLabels': {'app': 'wikijs'}, 'containers': [{'name': 'wikijs', 'ingress': [], 'egress': [{'identifier': 'e5e8ca3d76f701a19b7478fdc1c8c24ccc6cef9902b52c8c7e015439e2a1ddf3', 'type': 'internal', 'dns': '', 'ports': [{'name': 'UDP-53', 'protocol': 'UDP', 'port': 53}], 'podSelector': {'matchLabels': {'k8s-app': 'kube-dns'}}, 'namespaceSelector': {'matchLabels': {'kubernetes.io/metadata.name': 'kube-system'}}, 'ipAddress': ''}, {'identifier': '9230d773194d84ea09e198e98b8aaa1dd71fd6f406314796f234240bb5111425', 'type': 'internal', 'dns': '', 'ports': [{'name': 'TCP-3306', 'protocol': 'TCP', 'port': 3306}], 'podSelector': {'matchLabels': {'app': 'mariadb'}}, 'namespaceSelector': None, 'ipAddress': ''}]}]}}, {'kind': 'NetworkNeighborhood', 'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'metadata': {'name': 'deployment-mariadb', 'namespace': 'systest-ns-hvt7', 'uid': '45a5f0df-855b-423d-b5d1-bea710fd2cbf', 'resourceVersion': '1', 'creationTimestamp': '2024-07-03T15:42:50Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'mariadb'}, 'annotations': {'kubescape.io/completion': 'complete', 'kubescape.io/status': 'ready'}}, 'spec': {'matchLabels': {'app': 'mariadb'}, 'containers': [{'name': 'mariadb', 'ingress': [{'identifier': 'ee5c5b2f07834fa64174c3d2ad0505366e4b26777174906b91e83dcd163f8ec2', 'type': 'internal', 'dns': '', 'ports': [{'name': 'TCP-3306', 'protocol': 'TCP', 'port': 3306}], 'podSelector': {'matchLabels': {'app': 'wikijs'}}, 'namespaceSelector': None, 'ipAddress': ''}], 'egress': []}]}}, {'kind': 'NetworkNeighborhood', 'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'metadata': {'name': 'deployment-nginx', 'namespace': 'systest-ns-hvt7', 'uid': '389bed91-3f2d-464d-9b70-7d29309162a5', 'resourceVersion': '1', 'creationTimestamp': '2024-07-03T15:42:51Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'nginx'}, 'annotations': {'kubescape.io/completion': 'complete', 'kubescape.io/status': 'ready'}}, 'spec': {'matchLabels': {'app': 'nginx'}, 'containers': [{'name': 'nginx', 'ingress': [], 'egress': [{'identifier': 'e5e8ca3d76f701a19b7478fdc1c8c24ccc6cef9902b52c8c7e015439e2a1ddf3', 'type': 'internal', 'dns': '', 'ports': [{'name': 'UDP-53', 'protocol': 'UDP', 'port': 53}], 'podSelector': {'matchLabels': {'k8s-app': 'kube-dns'}}, 'namespaceSelector': {'matchLabels': {'kubernetes.io/metadata.name': 'kube-system'}}, 'ipAddress': ''}]}]}}], 'expected_generated_network_policy_list': [{'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'kind': 'GeneratedNetworkPolicy', 'metadata': {'creationTimestamp': '2023-12-14T09:22:59Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'wikijs'}, 'name': 'deployment-wikijs', 'namespace': 'systest-ns-pjqm'}, 'policyRef': [], 'spec': {'apiVersion': 'networking.k8s.io/v1', 'kind': 'NetworkPolicy', 'metadata': {'annotations': {'generated-by': 'kubescape'}, 'creationTimestamp': None, 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'wikijs'}, 'name': 'deployment-wikijs', 'namespace': 'systest-ns-pjqm'}, 'spec': {'egress': [{'ports': [{'port': 53, 'protocol': 'UDP'}], 'to': [{'namespaceSelector': {'matchLabels': {'kubernetes.io/metadata.name': 'kube-system'}}, 'podSelector': {'matchLabels': {'k8s-app': 'kube-dns'}}}]}, {'ports': [{'port': 3306, 'protocol': 'TCP'}], 'to': [{'podSelector': {'matchLabels': {'app': 'mariadb'}}}]}], 'podSelector': {'matchLabels': {'app': 'wikijs'}}, 'policyTypes': ['Egress']}}}, {'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'kind': 'GeneratedNetworkPolicy', 'metadata': {'creationTimestamp': '2023-12-14T09:24:41Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'mariadb'}, 'name': 'deployment-mariadb', 'namespace': 'systest-ns-pjqm'}, 'policyRef': [], 'spec': {'apiVersion': 'networking.k8s.io/v1', 'kind': 'NetworkPolicy', 'metadata': {'annotations': {'generated-by': 'kubescape'}, 'creationTimestamp': None, 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'mariadb'}, 'name': 'deployment-mariadb', 'namespace': 'systest-ns-pjqm'}, 'spec': {'ingress': [{'from': [{'podSelector': {'matchLabels': {'app': 'wikijs'}}}], 'ports': [{'port': 3306, 'protocol': 'TCP'}]}], 'podSelector': {'matchLabels': {'app': 'mariadb'}}, 'policyTypes': ['Ingress']}}}, {'apiVersion': 'spdx.softwarecomposition.kubescape.io/v1beta1', 'kind': 'GeneratedNetworkPolicy', 'metadata': {'creationTimestamp': '2023-12-14T09:25:02Z', 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'nginx'}, 'name': 'deployment-nginx', 'namespace': 'systest-ns-pjqm'}, 'policyRef': [], 'spec': {'apiVersion': 'networking.k8s.io/v1', 'kind': 'NetworkPolicy', 'metadata': {'annotations': {'generated-by': 'kubescape'}, 'creationTimestamp': None, 'labels': {'kubescape.io/workload-api-group': 'apps', 'kubescape.io/workload-api-version': 'v1', 'kubescape.io/workload-kind': 'Deployment', 'kubescape.io/workload-name': 'nginx'}, 'name': 'deployment-nginx', 'namespace': 'systest-ns-pjqm'}, 'spec': {'egress': [], 'podSelector': {'matchLabels': {'app': 'nginx'}}, 'policyTypes': ['Egress']}}}]}'
pr-created / test / check if secrets are set
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636