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.25] - ServiceLB return ingress address list in alphabetical order, instead of sorted by address family #8851

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.25 branch with commit 9d1d824

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.25.15+k3s2 (e4c55af2)
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::b897
  clusterIPs:
  - 2001:cafe:43::b897
  - 10.43.242.162
  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.25.15+k3s-9d1d824a (9d1d824a)
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::c5fc
  clusterIPs:
  - 2001:cafe:43::c5fc
  - 10.43.147.196
  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