kubernetes-sigs / ingress-controller-conformance

Repository for a compliance specification of ingress-controllers.
Apache License 2.0
43 stars 36 forks source link

load-balancing conformance test fails expecting 10 pods, but it only deploys 1 replica #99

Closed rperper closed 1 year ago

rperper commented 2 years ago

I am working through certification for our Kubernetes Ingress LoadBalancer and it passes all tests except for the load-balancing test. In that test it runs 1000 HTTP GET requests and expects to get responses from 10 different pods using the echo server image. However, when we run the test with the command line:

./ingress-controller-conformance -ingress-class=lslbd -enable-http-debug=true -enable-output-yaml-definitions=true -test.failfast=true

It appears that the load-balancing test creates the following Ingress, Service and Deployment:

apiVersion: apps/v1
kind: Deployment
metadata:
  creationTimestamp: null
  name: load-balancing-echo-service
spec:
  replicas: 1
  selector:
    matchLabels:
      app: load-balancing-echo-service
  strategy:
    type: RollingUpdate
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: load-balancing-echo-service
    spec:
      containers:
      - env:
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: INGRESS_NAME
          value: load-balancing
        - name: SERVICE_NAME
          value: echo-service
        image: k8s.gcr.io/ingressconformance/echoserver:v0.0.1@sha256:9b34b17f391f87fb2155f01da2f2f90b7a4a5c1110ed84cb5379faa4f570dc52
        livenessProbe:
          failureThreshold: 10
          httpGet:
            path: /health
            port: 3000
            scheme: HTTP
          initialDelaySeconds: 1
          periodSeconds: 1
          successThreshold: 1
          timeoutSeconds: 1
        name: ingress-conformance-echo
        ports:
        - containerPort: 3000
        readinessProbe:
          failureThreshold: 10
          httpGet:
            path: /health
            port: 3000
            scheme: HTTP
          initialDelaySeconds: 1
          periodSeconds: 1
          successThreshold: 1
          timeoutSeconds: 1
        resources: {}
status: {}

---
apiVersion: v1
kind: Service
metadata:
  creationTimestamp: null
  name: echo-service
spec:
  ports:
  - port: 8080
    targetPort: 3000
  selector:
    app: load-balancing-echo-service
  type: NodePort
status:
  loadBalancer: {}

---
metadata:
  creationTimestamp: null
  name: load-balancing
  namespace: ingress-conformance-xbv4s
spec:
  defaultBackend:
    service:
      name: echo-service
      port:
        number: 8080
  ingressClassName: lslbd
status:
  loadBalancer: {}

All of which works to go to the backend, but since there's only one replica deployed, it will always use the same one pod deployed, thus failing the test expected 10 different POD IP addresses/FQDN for status code 200 but 1 was returned. Am I misunderstanding something or doing something wrong? Thanks!

kundan2707 commented 2 years ago

@rperper yes as number of replica is one so there will be only one pod active at a time.

kundan2707 commented 2 years ago

/kind support

k8s-triage-robot commented 1 year ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 1 year ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot commented 1 year ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-ci-robot commented 1 year ago

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to [this](https://github.com/kubernetes-sigs/ingress-controller-conformance/issues/99#issuecomment-1510245406): >The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. > >This bot triages issues according to the following rules: >- After 90d of inactivity, `lifecycle/stale` is applied >- After 30d of inactivity since `lifecycle/stale` was applied, `lifecycle/rotten` is applied >- After 30d of inactivity since `lifecycle/rotten` was applied, the issue is closed > >You can: >- Reopen this issue with `/reopen` >- Mark this issue as fresh with `/remove-lifecycle rotten` >- Offer to help out with [Issue Triage][1] > >Please send feedback to sig-contributor-experience at [kubernetes/community](https://github.com/kubernetes/community). > >/close not-planned > >[1]: https://www.kubernetes.dev/docs/guide/issue-triage/ Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.