kubernetes-sigs / cluster-api-provider-aws

Kubernetes Cluster API Provider AWS provides consistent deployment and day 2 operations of "self-managed" and EKS Kubernetes clusters on AWS.
http://cluster-api-aws.sigs.k8s.io/
Apache License 2.0
644 stars 570 forks source link

Should InternalDNS names be lower-cased #5049

Open JoelSpeed opened 4 months ago

JoelSpeed commented 4 months ago

/kind bug

What steps did you take and what happened: [A clear and concise description of what the bug is.] When using custom DHCP options for a VPC, with a custom hostname that contains capital letters, the Machine status will report the InternalDNS name using both the AWS and custom hostnames for the Machine.

The custom hostname is currently reported cased exactly as it is in the AWS DHCP options, however, if you are using the AWS EC2 metadata service to pull the hostname, and using that to set the hostname of your nodes using the --hostname-override flag, then while you are passing that value through, kubelet lower cases the string since Kube object names must be lower cased.

This creates an inconsistency between the node name being lower case and the Machine status showing a mixed case value.

What did you expect to happen:

DNS names are not case sensitive anyway, but I wondered, should CAPA be lower-casing InternalDNS names to be consistent?

Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]

This may well be a won't fix, but I wanted to see what others thought to the idea of blanket lower casing DNS names.

I've looked at how other providers might do this (Azure, GCP, vSphere), but, for them, the way the names and addresses come across is all sourced from Kube naming anyway, so there cannot be an discrepancy.

Environment:

k8s-ci-robot commented 4 months ago

This issue is currently awaiting triage.

If CAPA/CAPI contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
k8s-triage-robot commented 1 month ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

JoelSpeed commented 1 month ago

/remove-lifecycle stale

This is relevant still

nrb commented 1 month ago

I think this causes issues downstream of CAPA, so that even if our systems are working, anything else that relies on hostnames (for example, certificates) might fail if the casing aren't consistent.

k8s-triage-robot commented 3 hours ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten