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

feat(pkger): enforce metadata.name dns name compliance #17941

Merged
merged 1 commit into from
May 4, 2020

Conversation

jsteenb2
Copy link
Contributor

@jsteenb2 jsteenb2 commented May 3, 2020

closes: #17940

@jsteenb2 jsteenb2 requested a review from a team as a code owner May 3, 2020 17:35
@jsteenb2 jsteenb2 requested review from imogenkinsman and removed request for a team May 3, 2020 17:35
@jsteenb2 jsteenb2 force-pushed the 17940/pkger_name_dns_compliance branch from 9af4d50 to e4299ce Compare May 3, 2020 17:43
@rawkode
Copy link
Contributor

rawkode commented May 4, 2020

The Kubernetes naming conventions are a little more strict than this, based on RFC1123:

DNS Label Names
Some resource types require their names to follow the DNS label standard as defined in RFC 1123. This means the name must:

contain at most 63 characters
contain only lowercase alphanumeric characters or ‘-’
start with an alphanumeric character
end with an alphanumeric character

https://kubernetes.io/docs/concepts/overview/working-with-objects/names/

Copy link
Contributor

@hoorayimhelping hoorayimhelping left a comment

Choose a reason for hiding this comment

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

I love that 95% of this is changing tests! left a nitpick comment on variable names, your call on whether you want to change it

cmd/influxd/launcher/pkger_test.go Outdated Show resolved Hide resolved
pkger/parser.go Outdated Show resolved Hide resolved
pkger/parser.go Outdated Show resolved Hide resolved
@jsteenb2
Copy link
Contributor Author

jsteenb2 commented May 4, 2020

@rawkode sweet, thanks for the heads up

this PR includes a lot of small changes to names in existing test pkgs.
the tests are updated to follow suit.

closes: #17940
@jsteenb2 jsteenb2 force-pushed the 17940/pkger_name_dns_compliance branch from e4299ce to 3dc3440 Compare May 4, 2020 19:07
@jsteenb2 jsteenb2 merged commit 784b222 into master May 4, 2020
@jsteenb2 jsteenb2 deleted the 17940/pkger_name_dns_compliance branch May 4, 2020 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pkger enforce resource metadata.name field is dns compliant
4 participants