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

Add an earlier check and error for names that won't work for services. #1238

Merged
merged 1 commit into from
Sep 10, 2014

Conversation

brendandburns
Copy link
Contributor

Fixes #1013

@@ -174,6 +175,9 @@ func portsFromString(spec string) []api.Port {

// RunController creates a new replication controller named 'name' which creates 'replicas' pods running 'image'.
func RunController(image, name string, replicas int, client client.Interface, portSpec string, servicePort int) error {
if servicePort > 0 && !util.IsDNSLabel(name) {
return fmt.Errorf("Service creation requested, but an invalid name for a service was provided (%s). Service names must be valid DNS labels.")
Copy link
Member

Choose a reason for hiding this comment

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

Don't you need to pass the name for the %s?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops, fixed.

@bgrant0607 bgrant0607 self-assigned this Sep 9, 2014
@bgrant0607
Copy link
Member

LGTM

bgrant0607 added a commit that referenced this pull request Sep 10, 2014
Add an earlier check and error for names that won't work for services.
@bgrant0607 bgrant0607 merged commit fb4199c into kubernetes:master Sep 10, 2014
csrwng pushed a commit to csrwng/kubernetes that referenced this pull request Apr 13, 2022
…vileged

UPSTREAM: 109283: test/e2e/*: use restricted policy by default, default existing tests to privileged
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.

validation variances allow errors
2 participants