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

[velero] Follow istio naming convention #313

Merged
merged 1 commit into from
Oct 25, 2021

Conversation

sathieu
Copy link
Contributor

@sathieu sathieu commented Oct 6, 2021

See https://istio.io/latest/docs/ops/configuration/traffic-management/protocol-selection/#explicit-protocol-selection

Special notes for your reviewer:

Checklist

  • DCO signed
  • Chart Version bumped
  • Variables are documented in the values.yaml or README.md
  • Title of the PR starts with chart name (e.g. [velero])

@jenting
Copy link
Collaborator

jenting commented Oct 6, 2021

If we do not follow the convention, will Istio + Velero not work?

@sathieu
Copy link
Contributor Author

sathieu commented Oct 7, 2021

@jenting From the docs:

Istio can automatically detect HTTP and HTTP/2 traffic. If the protocol cannot automatically be determined, traffic will be treated as plain TCP traffic.

So Istio + Velero will work out of the box. But once I got an issue with http traffic which was fixed by using istio naming convention (see kubitus-project/kubitus-installer#15 and kubitus-project/kubitus-installer!267).

@jenting
Copy link
Collaborator

jenting commented Oct 13, 2021

🤔 The current solution is like Velero favors Istio's convention.

What if the other tools favor other conventions and did not work with Istio's convention?

@jenting jenting added the velero label Oct 13, 2021
@sathieu
Copy link
Contributor Author

sathieu commented Oct 13, 2021

@jenting, there are no other conventions around. And I don't think any incompatible convention will come (at least, not for http):

Also as mentioned in the istio doc, it's also possible to use the appProtocol field (defined in the Service spec):

In Kubernetes 1.18+, by the appProtocol field: appProtocol: .

ports.appProtocol (string)

The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.

But with this PR I went for a solution compatible with pre-1.8 versions too.

What if the other tools favor other conventions and did not work with Istio's convention?

If this is the case, we'll need another value (metrics.service.portName), but I think adding this complexity for an hypothetic usecase is over-engineering.

jenting
jenting previously approved these changes Oct 13, 2021
Copy link
Collaborator

@jenting jenting left a comment

Choose a reason for hiding this comment

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

LGTM, thank you for the detailed explanation.

@dsu-igeek
Copy link

Looks like if you use the regular installer (velero install) this port is named "metrics" - I'd like to have everything be the same and I think we should discuss a little about whether this will break anything else (since Helm and the CLI installer are doing things differently, hopefully no one is dependent on the port name). Any thoughts on if linkerd will work with this as well?

@sathieu
Copy link
Contributor Author

sathieu commented Oct 14, 2021

@dsu-igeek

Any thoughts on if linkerd will work with this as well?

As said above, linkerd has protocol detection, but no way to override it. The only available setting is to mark the stream as opaque or skip it (no proxying) with an annotation. I think that istio is the only service mesh affected by port names.

@reasonerjt
Copy link
Contributor

Please rebase to resolve the conflict.

@sathieu
Copy link
Contributor Author

sathieu commented Oct 25, 2021

@reasonerjt Rebased, and resolved the merge conflict.

@dsu-igeek Is the source of the installer available. I can make a PR there.

@jenting jenting merged commit 804d9ec into vmware-tanzu:main Oct 25, 2021
@sathieu sathieu deleted the istio-port-names branch October 25, 2021 12:44
@sathieu
Copy link
Contributor Author

sathieu commented Oct 25, 2021

Thanks @jenting & @reasonerjt for approving and merging 🙏!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants