Comments (9)
Yeah that makes sense. Sure will submit a PR.
from digitalocean-cloud-controller-manager.
👋
the CCM implementation fetches v4 addresses only at this point. It should be fairly easy to include v6 ones from the DO API / the droplet struct we're working on already as well here.
The one part I'm not absolutely sure about is how those addresses would need to be reflected in the []v1.NodeAddress
slice. Does it suffice to add another set of items of types v1.NodeInternalIP
and v1.NodeExternalIP
, respectively, to put the v6 addresses in? That is, is Kubernetes able to distinguish the address protocols without any additional tagging in the struct (for which I currently don't see a way to do it, i.e., there's no v1.NodeInternalIPv6
type or something equivalent).
This may need some discovery.
from digitalocean-cloud-controller-manager.
(And yeah, additional binary flags might be needed too.)
from digitalocean-cloud-controller-manager.
@timoreimann it can be appended to existing []v1.NodeAddress, no need of new type for IPv6.
Also what is the additional flag? is it to enable IPv6 in DO CCM?
from digitalocean-cloud-controller-manager.
I might be wrong and we don't necessarily need a new flag. (CCMs like ours mostly inherit flags from kube-controller-manager, so we could check there for any IPv6-ish options.)
I think we'd want a flag or environment variable though to control which IP addresses should be collected (IPv4 as today or IPv4 and IPv6) to make sure that clients expecting the node address fields to be IPv4-populated only do not break.
from digitalocean-cloud-controller-manager.
@timoreimann In godo.DropletCreateRequest
there is a IPv6 bool
, but I think it is for node creation. May be an environment variable or cloud-config ??
from digitalocean-cloud-controller-manager.
@sachintiptur CCM does not create VM / droplets but reads IP information from droplets retrieved via the public API. As such, we'd probably want to look at the PublicIPv6()
method.
from digitalocean-cloud-controller-manager.
@timoreimann Yeah I got that point, I meant or under assumption that the ipv6 config would be present in droplet while node creation and its being propagated to ccm. Otherwise even I thought about checking for presence of IPv6 Address in Network field.
I tried that change locally and it works.
diff --git a/cloud-controller-manager/do/common.go b/cloud-controller-manager/do/common.go
index 1e0538c6..843bed05 100644
--- a/cloud-controller-manager/do/common.go
+++ b/cloud-controller-manager/do/common.go
@@ -141,5 +141,11 @@ func nodeAddresses(droplet *godo.Droplet) ([]v1.NodeAddress, error) {
}
addresses = append(addresses, v1.NodeAddress{Type: v1.NodeExternalIP, Address: publicIP})
+ publicIPv6, err := droplet.PublicIPv6()
+ if err != nil || publicIPv6 == "" {
+ return nil, fmt.Errorf("could not get public ipv6: %v", err)
+ }
+ addresses = append(addresses, v1.NodeAddress{Type: v1.NodeExternalIP, Address: publicIPv6})
+
return addresses, nil
}
from digitalocean-cloud-controller-manager.
Oh gotcha @sachintiptur.
Glad to hear it's working for you. Feel free to submit a PR that adds the logic gated behind an environment variable, e.g., IP_ADDR_PROTOS
which defines the IP protocol versions to fetch addresses for and could be a comma-separated list with values 4
and/or 6
(where the empty value defaults to IPv4 still).
Let me know what you think.
from digitalocean-cloud-controller-manager.
Related Issues (20)
- do-loadbalancer-protocol: 'http2' results in 'http2' --> 'http' HOT 4
- Extending Loadbalancer timeout duration HOT 1
- Misconfigured cloud-controller-manager.yml (HA deployment that uses daemonset) HOT 1
- Change release pipeline to promote dev manifests
- Protect load balancer from being deleted HOT 8
- udp loadbalancer failing to create HOT 8
- Controller manual mode HOT 17
- Allow the region to be explicitly specified instead of using the Region metadata API HOT 5
- K8 annotations for load balancer name / id do not work as expected HOT 4
- Typos in README.md
- Prevent duplicate do-loadbalancer-name annotation from changing LB ownership
- do-loadbalancer should accept a certificate name as an alternative to the certificate ID HOT 1
- Wrong validation regex for service.beta.kubernetes.io/do-loadbalancer-allow-rules HOT 2
- Feature Request: Create a Helm chart for DO CCM HOT 1
- Cloud Controller Manager doesn't add droplets to Load Balancer HOT 9
- `k8s.gcr.io` is no longer used HOT 2
- CI: Bypass branch protection on release workflow execution
- do-loadbalancer-allow-rules doesn't work (firewall is not configured) HOT 1
- Confusion with do-loadbalancer-hostname HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from digitalocean-cloud-controller-manager.