spidernet-io/egressgateway

ignore defined EgressPolicy ipv4

Closed this issue · 1 comments

I've the following configuration:

---
apiVersion: egressgateway.spidernet.io/v1beta1
kind: EgressGateway
metadata:
  name: internal
spec:
  ippools:
    ipv4:
      - "172.29.39.111-172.29.39.121"
    ipv4DefaultEIP: 172.29.39.121
  nodeSelector:
    selector:
      matchLabels:
        egressgateway: "true"
---
apiVersion: egressgateway.spidernet.io/v1beta1
kind: EgressPolicy
metadata:
  name: aaxoracle
  namespace: default
spec:
  egressGatewayName: internal
  egressIP:
    ipv4: 172.29.39.111
  appliedTo:
    podSelector:
      matchLabels:
        egress: "db"
---
apiVersion: egressgateway.spidernet.io/v1beta1
kind: EgressPolicy
metadata:
  name: aaxjboss
  namespace: default
spec:
  egressGatewayName: internal
  egressIP:
    ipv4: 172.29.39.112
  appliedTo:
    podSelector:
      matchLabels:
        egress: "jboss"

but that's the result:

spec:
  appliedTo:
    podSelector:
      matchLabels:
        egress: db
  egressGatewayName: internal
  egressIP:
    allocatorPolicy: default
    ipv4: 172.29.39.111
    useNodeIP: false
status:
  eip:
    ipv4: 172.29.39.121

and

spec:
  appliedTo:
    podSelector:
      matchLabels:
        egress: aaxoracle
  egressGatewayName: internal
  egressIP:
    allocatorPolicy: default
    ipv4: 172.29.39.111
    useNodeIP: false
status:
  eip:
    ipv4: 172.29.39.121

both label work now with the default pool ip. I think that's not correct or am I wrong?

Thanks you report this bug, it is will fix in #1410, and release in this month.