diff --git a/dataclients/kubernetes/testdata/ingressV1/service-ports-endpointslices/foo.eskip b/dataclients/kubernetes/testdata/ingressV1/service-ports-endpointslices/foo.eskip new file mode 100644 index 0000000000..d2eacf5f9d --- /dev/null +++ b/dataclients/kubernetes/testdata/ingressV1/service-ports-endpointslices/foo.eskip @@ -0,0 +1,5 @@ +// Endpoints logic produces endpoints with port 3000 therefore +// this test case fails because endpointslices logic produces endpoints with port 0 +kube_myapp_ns__myapp_ingress__example_org____myapp_service: + Host("^(example[.]org[.]?(:[0-9]+)?)$") + -> ; diff --git a/dataclients/kubernetes/testdata/ingressV1/service-ports-endpointslices/foo.kube b/dataclients/kubernetes/testdata/ingressV1/service-ports-endpointslices/foo.kube new file mode 100644 index 0000000000..6ea07500ed --- /dev/null +++ b/dataclients/kubernetes/testdata/ingressV1/service-ports-endpointslices/foo.kube @@ -0,0 +1,4 @@ +# +# Passes with false but fails with true +# +enable-kubernetes-endpointslices: true diff --git a/dataclients/kubernetes/testdata/ingressV1/service-ports-endpointslices/foo.yaml b/dataclients/kubernetes/testdata/ingressV1/service-ports-endpointslices/foo.yaml new file mode 100644 index 0000000000..62b1a07695 --- /dev/null +++ b/dataclients/kubernetes/testdata/ingressV1/service-ports-endpointslices/foo.yaml @@ -0,0 +1,87 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + labels: + app: myapp + name: myapp-ingress + namespace: myapp-ns +spec: + rules: + - host: example.org + http: + paths: + - backend: + service: + name: myapp-service + port: + number: 80 + pathType: ImplementationSpecific +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: myapp + name: myapp-service + namespace: myapp-ns +spec: + clusterIP: 10.5.69.228 + clusterIPs: + - 10.5.69.228 + internalTrafficPolicy: Cluster + ipFamilies: + - IPv4 + ipFamilyPolicy: SingleStack + ports: + - port: 80 + protocol: TCP + targetPort: http-grafana + selector: + app: myapp + sessionAffinity: None + type: ClusterIP +--- +kind: EndpointSlice +metadata: + labels: + app: myapp + kubernetes.io/service-name: myapp-service + name: myapp-service-foo + namespace: myapp-ns +addressType: IPv4 +apiVersion: discovery.k8s.io/v1 +endpoints: + - addresses: + - 10.2.0.162 + conditions: + ready: true + serving: true + terminating: false + zone: eu-central-1a + - addresses: + - 10.2.72.100 + conditions: + ready: true + serving: true + terminating: false + zone: eu-central-1c +ports: + - name: "" + port: 3000 + protocol: TCP +--- +# Endpoints for comparison +apiVersion: v1 +kind: Endpoints +metadata: + labels: + app: myapp + name: myapp-service + namespace: myapp-ns +subsets: + - addresses: + - ip: 10.2.0.162 + - ip: 10.2.72.100 + ports: + - port: 3000 + protocol: TCP