Skip to content

Conversation

@jsharpe
Copy link

@jsharpe jsharpe commented Apr 25, 2019

Submitter checklist

  • Change is code complete and matches issue description.
  • Change is covered by existing or new tests.

Description

Fixes the case that the cluster name is a FQDN which then ends up with a short name ending in a dot which forms an invalid name used for creating the vault service account

Special notes for the reviewer(s)

Which issue this PR fixes

fixes #3755

@jenkins-x-bot
Copy link
Contributor

Hi @jsharpe. Thanks for your PR.

I'm waiting for a jenkins-x member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jsharpe
Copy link
Author

jsharpe commented Apr 25, 2019

/assign @dwnusbaum

@jsharpe
Copy link
Author

jsharpe commented Apr 25, 2019

/hold
This doesn't quite work - the ShortName needs to fulfil the criteria from the error message:

a DNS-1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc', regex used for validation is 'a-z0-9?')

Apache Spark had a similar issue: https://issues.apache.org/jira/browse/SPARK-24894 their fix was apache/spark#23781

@jsharpe jsharpe force-pushed the master branch 3 times, most recently from e68a891 to bb876a0 Compare April 26, 2019 09:04
@jsharpe
Copy link
Author

jsharpe commented Apr 26, 2019

/hold cancel
Added a revised version that replaces any . with a -

@pmuir
Copy link
Contributor

pmuir commented Apr 26, 2019

/ok-to-test

@jsharpe
Copy link
Author

jsharpe commented Apr 26, 2019

/retest

@amoussawi
Copy link

check this #3755 (comment)

@jsharpe
Copy link
Author

jsharpe commented Apr 30, 2019

check this #3755 (comment)

Yes I saw this comment but I shouldn't have to work around it in this way. The code is broken.

@jtnord
Copy link

jtnord commented May 1, 2019

see #2864 and #3795 for why just truncating was a bad idea to begin with.

@jsharpe
Copy link
Author

jsharpe commented May 3, 2019

see #2864 and #3795 for why just truncating was a bad idea to begin with.

Can we merge this anyway as it fixes the install for clusters that are created using kops? The issue of duplicate names from the truncation can be handled later?

@jsharpe
Copy link
Author

jsharpe commented May 3, 2019

check this #3755 (comment)

Note that if you make this change it breaks the kops tooling as it needs the name in kube config with the dots if that is how it was created.

@hferentschik
Copy link

Can we merge this anyway as it fixes the install for clusters that are created using kops? The issue of duplicate names from the truncation can be handled later?

@jtnord Is this not correct? This change does not address #2864 and #3795, but kube.ToValidNameTruncated seems to provide the better name shortening than ShortClusterName

As next step, one could concatenate the truncated string with a truncated hash of the original name (eg n characters of the sha-1 hash)

@jtnord
Copy link

jtnord commented May 8, 2019

/lgtm

@jenkins-x-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jtnord

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jenkins-x-bot jenkins-x-bot merged commit da717ac into jenkins-x:master May 8, 2019
highlyunavailable pushed a commit to highlyunavailable/jx that referenced this pull request May 13, 2019
daveconde pushed a commit to daveconde/jx that referenced this pull request Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

jx install --ng on AWS fails when creating system vault with FQDN cluster name

7 participants