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

salt: Support 127.0.0.1 hostPort #3396

Merged
merged 1 commit into from
May 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# CHANGELOG

## Release 2.9.3 (in development)
## Enhancements
- Allow hostPort on 127.0.0.1
(PR[#3396](https://github.com/scality/metalk8s/pull/3396))

## Release 2.9.2
### Bug fixes
Expand Down
2 changes: 1 addition & 1 deletion salt/metalk8s/kubernetes/cni/calico/configured.sls
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Create CNI calico configuration file:
snat: true
capabilities:
portMappings: true
conditionsV4: ["-d", "{{ grains.metalk8s.workload_plane_ip }}/32"]
conditionsV4: ["-d", "{{ grains.metalk8s.workload_plane_ip }}/32,127.0.0.1/32"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't it be on the whole 127.0.0.0/8 network ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hmmm I'm not sure, to me here we only want localhost and not any other "loopback" addresses used for .... whatelse
I think but not sure

Copy link
Contributor

Choose a reason for hiding this comment

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

IIUC, what we want is "all host-local addresses except control plane", no?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

To me, we want workload plane IP and that's it (just we add 127.0.0.1 as it's needed for conformance tests and does not hurt anyway)

Copy link
Contributor

@alexandre-allard alexandre-allard May 26, 2021

Choose a reason for hiding this comment

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

I don't really know what we should do either and I'm not even sure that's really important.
We can merge your changes as that's only what's requested by the K8s conformance tests.
But I don't see any valid reason to restrict to only 127.0.0.1/32 instead of 127.0.0.0/8

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Agree 👍,
Maybe we will want to make it configurable at some point also, but for the moment let's not bother about it 😃

Copy link
Contributor

Choose a reason for hiding this comment

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

Likely, yes.

Copy link
Contributor

Choose a reason for hiding this comment

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

Though, maybe the current change is sufficient. It passes conformance, so it's supposed to be conformant. I'm not sure where it's said a K8s cluster must expose NodePorts on 127.0.0.0/8. If this is the case, maybe we should widen things up further.

# Note: Calico upstream enables the `bandwidth` CNI plugin by default.
# However, this plugin (executable) is not available in the CNI RPM
# package we currently install. Hence, not enabling this functionality
Expand Down