Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Release-1.27] - ServiceLB return ingress address list in alphabetical order, instead of sorted by address family #8849

Closed
brandond opened this issue Nov 14, 2023 · 1 comment
Assignees

Comments

@brandond
Copy link
Member

Backport fix for ServiceLB return ingress address list in alphabetical order, instead of sorted by address family

@mdrahman-suse
Copy link

Validated on release-1.27 branch with commit e3ea0ae

Environment Details

Infrastructure

  • Cloud
  • Hosted

Node(s) CPU architecture, OS, and Version:

Linux 5.19.0-1025-aws #26~22.04.1-Ubuntu SMP Mon Apr 24 01:58:15 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
PRETTY_NAME="Ubuntu 22.04.2 LTS"
VERSION_ID="22.04"

Cluster Configuration:

1 server

Config.yaml:

write-kubeconfig-mode: "0644"
tls-san:
  - fake.fqdn.value
cluster-init: true
node-name: server1
cluster-cidr: 2001:cafe:42:0::/56,10.42.0.0/16
service-cidr: 2001:cafe:43:0::/112,10.43.0.0/16
token: <token>
node-ip: <IPv6>,<PRIVATE IPv4>

Testing Steps

  1. Copy config.yaml
$ sudo mkdir -p /etc/rancher/k3s && sudo cp config.yaml /etc/rancher/k3s
  1. Install k3s
  2. Check status.loadBalancer.ingress IPs sorting matches spec.ipFamilies using command:
    • kubectl get svc traefik -n kube-system -o yaml

Replication Results:

  • k3s version used for replication:
k3s version v1.27.7+k3s2 (575bce76)
go version go1.20.10
$ kubectl get svc traefik -n kube-system -o yaml
apiVersion: v1
kind: Service
metadata:
  annotations:
    meta.helm.sh/release-name: traefik
    meta.helm.sh/release-namespace: kube-system
...
spec:
  allocateLoadBalancerNodePorts: true
  clusterIP: 2001:cafe:43::3c9f
  clusterIPs:
  - 2001:cafe:43::3c9f
  - 10.43.223.142
  externalTrafficPolicy: Cluster
  internalTrafficPolicy: Cluster
  ipFamilies:
  - IPv6
  - IPv4
  ipFamilyPolicy: PreferDualStack
...
status:
  loadBalancer:
    ingress:
    - ip: <PRIVATE IPv4>
    - ip: <IPv6>

Validation Results:

  • k3s version used for validation:
k3s version v1.27.7+k3s-e3ea0ae9 (e3ea0ae9)
go version go1.20.10
$ kubectl get svc traefik -n kube-system -o yaml
apiVersion: v1
kind: Service
metadata:
  annotations:
    meta.helm.sh/release-name: traefik
    meta.helm.sh/release-namespace: kube-system
...
spec:
  allocateLoadBalancerNodePorts: true
  clusterIP: 2001:cafe:43::9f46
  clusterIPs:
  - 2001:cafe:43::9f46
  - 10.43.56.68
  externalTrafficPolicy: Cluster
  internalTrafficPolicy: Cluster
  ipFamilies:
  - IPv6
  - IPv4
  ipFamilyPolicy: PreferDualStack
...
status:
  loadBalancer:
    ingress:
    - ip: <IPv6>
    - ip: <PRIVATE IPv4>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants