kakao / network-node-manager

network-node-manager is a kubernetes controller that controls the network configuration of a node to resolve network issues of kubernetes.
Apache License 2.0
108 stars 20 forks source link

Support for different network setups and UDP? #7

Closed malozanoff closed 3 years ago

malozanoff commented 3 years ago

Hi,

Thanks for building this, we have a network setup with our custom CNI plugins where we don't allocate PodCIDR per node, that means this code

    // Get Nodes's pod CIDR
    node := &corev1.Node{}
    if err := r.Client.Get(ctx, types.NamespacedName{Name: configNodeName}, node); err != nil {
        logger.Error(err, "failed to get the pod's node info from API server")
        return ctrl.Result{}, err
    }
    podCIDRs := node.Spec.PodCIDRs
    podCIDRIPv4, podCIDRIPv6 := getPodCIDR(podCIDRs)
    logger.WithValues("pod CIDR IPV4", podCIDRIPv4).WithValues("pod CIDR IPv6", podCIDRIPv6).Info("pod CIDR")

Doesn't work, it ends up with a nil point exception. I basically removed the entire block and it works.

Second question i have is, it's solving my issue with metallb on nodes without local pods, but not for UDP? I can't see why it wouldn't work from the iptables rules, but it doesn't, i have 2 services (with the same ip address thru metallb) for the same dns backend, one tcp and one udp, tcp works, udp doesn't. Any ideas why?

Thanks again!

ssup2 commented 3 years ago

@malozanoff sorry to late.

First Question : Each ipvs-node-controller existing in each node must perform DNAT only for packets transmitted from pods in the same node. So ipvs-node-controller have to know the each node's CIDR info. How dose your custom CNI allocate IP address for pods??

Second Question : Please show your service manifest files.