Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

Bug 1797153: pkg/certagent: add support for passing escaped IPv6 addresses #31

Merged
merged 1 commit into from Jan 31, 2020

Conversation

hexfusion
Copy link
Member

This PR adds the ability for kube-client-agent to unescape IPv6 addresses. For example passing --ipaddrs=[::1] would currently fail as this is not a valid IPv6 address. The reason we want this ability is to simplify IPv6 validation as we do not need to worry about changing the format of the address before passing it to the agent. If the underlying IPv6 address is valid kube-client-agent will do the right thing and handle unescaping for free.

/cc @retroflexer @russellb @alaypatel07

Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
@hexfusion
Copy link
Member Author

/cc @abhinavdahiya

hexfusion referenced this pull request in openshift/cluster-etcd-operator Jan 3, 2020
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
@retroflexer
Copy link

retroflexer commented Jan 3, 2020

Looks good to me. Although it may be useful to move the UnescapeIPV6Address() function to some common utils or netutils package such as kubernetes/utils/net/net.go.

@hexfusion
Copy link
Member Author

Yeah at some point the logic will exist where it can be useful for other projects but for now this is the path of least resistance.

@retroflexer
Copy link

/lgtm

@hexfusion
Copy link
Member Author

/cc @abhinavdahiya

Copy link
Contributor

@abhinavdahiya abhinavdahiya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@abhinavdahiya abhinavdahiya merged commit ab5a23a into coreos:master Jan 31, 2020
@hexfusion hexfusion changed the title pkg/certagent: add support for passing escaped IPv6 addresses Bug 1797153: pkg/certagent: add support for passing escaped IPv6 addresses Feb 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants