kubernetes-sigs / cluster-api-provider-vsphere

Apache License 2.0
367 stars 292 forks source link

Fail to assign static ipv6 address to cluster vm #765

Closed luniHw closed 1 year ago

luniHw commented 4 years ago

/kind bug

What steps did you take and what happened: Static ipv6 address is not assigned to cluster vm when creating photon k8s cluster.

What did you expect to happen: Succeed to create k8s cluster with an all-IPv6 topology

Anything else you would like to add:

Environment:

yastij commented 4 years ago

@luniHw - do you have any logs, especially ones of cloud init ?

yastij commented 4 years ago

see #756

luniHw commented 4 years ago

see #756 @yastij in capv 0.5.5, use can customize the device name in manifests?

yastij commented 4 years ago

you should be able to configure the following on the vsphereMachine:

type NetworkDeviceSpec struct {
    // NetworkName is the name of the vSphere network to which the device
    // will be connected.
    NetworkName string `json:"networkName"`

    // DHCP4 is a flag that indicates whether or not to use DHCP for IPv4
    // on this device.
    // If true then IPAddrs should not contain any IPv4 addresses.
    // +optional
    DHCP4 bool `json:"dhcp4,omitempty"`

    // DHCP6 is a flag that indicates whether or not to use DHCP for IPv6
    // on this device.
    // If true then IPAddrs should not contain any IPv6 addresses.
    // +optional
    DHCP6 bool `json:"dhcp6,omitempty"`

    // Gateway4 is the IPv4 gateway used by this device.
    // Required when DHCP4 is false.
    // +optional
    Gateway4 string `json:"gateway4,omitempty"`

    // Gateway4 is the IPv4 gateway used by this device.
    // Required when DHCP6 is false.
    // +optional
    Gateway6 string `json:"gateway6,omitempty"`

    // IPAddrs is a list of one or more IPv4 and/or IPv6 addresses to assign
    // to this device.
    // Required when DHCP4 and DHCP6 are both false.
    // +optional
    IPAddrs []string `json:"ipAddrs,omitempty"`

    // MTU is the device’s Maximum Transmission Unit size in bytes.
    // +optional
    MTU *int64 `json:"mtu,omitempty"`

    // MACAddr is the MAC address used by this device.
    // It is generally a good idea to omit this field and allow a MAC address
    // to be generated.
    // Please note that this value must use the VMware OUI to work with the
    // in-tree vSphere cloud provider.
    // +optional
    MACAddr string `json:"macAddr,omitempty"`

    // Nameservers is a list of IPv4 and/or IPv6 addresses used as DNS
    // nameservers.
    // Please note that Linux allows only three nameservers (https://linux.die.net/man/5/resolv.conf).
    // +optional
    Nameservers []string `json:"nameservers,omitempty"`

    // Routes is a list of optional, static routes applied to the device.
    // +optional
    Routes []NetworkRouteSpec `json:"routes,omitempty"`

    // SearchDomains is a list of search domains used when resolving IP
    // addresses with DNS.
    // +optional
    SearchDomains []string `json:"searchDomains,omitempty"`
}
fejta-bot commented 4 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale

randomvariable commented 1 year ago

/assign @lubronzhan

can you confirm this works these days so we can close this out?

lubronzhan commented 1 year ago

Yeah this works now. Please close it

sbueringer commented 1 year ago

Thx!

/close

k8s-ci-robot commented 1 year ago

@sbueringer: Closing this issue.

In response to [this](https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/issues/765#issuecomment-1665077297): >Thx! > >/close 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.