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

Unable to create Dapr sidecar service when AppID is long #2068

Closed
tcnghia opened this issue Sep 17, 2020 · 2 comments · Fixed by #2241
Closed

Unable to create Dapr sidecar service when AppID is long #2068

tcnghia opened this issue Sep 17, 2020 · 2 comments · Fixed by #2241
Assignees
Labels
area/k8s-operator kind/bug Something isn't working kind/documentation Improvements or additions to documentation P1

Comments

@tcnghia
Copy link
Member

tcnghia commented Sep 17, 2020

In what area(s)?

/area operator

What version of Dapr?

HEAD

Expected Behavior

A dapr sidecar service to be created for applications with valid App IDs.

Actual Behavior

When using really long AppID, like "calculator-with-very-long-name-exceeding-sixty-four-characters", dapr-operator fails with this error

time="2020-09-17T19:24:28.522693561Z" level=error msg="unable to create Dapr service for deployment, service: default/calculator-with-very-long-name-exceeding-sixty-four-characters-dapr, err: Service \"calculator-with-very-long-name-exceeding-sixty-four-characters-dapr\" is invalid: metadata.name: Invalid value: \"calculator-with-very-long-name-exceeding-sixty-four-characters-dapr\": must be no more than 63 characters" instance=dapr-operator-d7fb8dc96-h92lr scope=dapr.operator.handlers type=log ver=0.10.0

This is due to Kubernetes requiring that Service name must be a DNS label https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-subdomain-names which caps out at 63 in length (https://tools.ietf.org/html/rfc1123).

We probably need to update our doc to restrict the App IDs, or change the sidecar Service naming to allow for the current unrestricted set.

Steps to Reproduce the Problem

Use a very long AppId, or use characters not allowed in RFC1123.

Release Note

RELEASE NOTE: Added RFC1123 validation for app IDs

@tcnghia tcnghia added the kind/bug Something isn't working label Sep 17, 2020
@tcnghia
Copy link
Member Author

tcnghia commented Sep 17, 2020

cc @youngbupark

@tcnghia tcnghia added area/k8s-operator good first issue Good for newcomers kind/documentation Improvements or additions to documentation and removed good first issue Good for newcomers labels Sep 17, 2020
@youngbupark youngbupark added the P1 label Sep 18, 2020
@youngbupark youngbupark added this to To do in 1.0.0 Milestone 1 via automation Sep 18, 2020
@yaron2
Copy link
Member

yaron2 commented Oct 6, 2020

This needs an error log in the operator about an invalid service for the given deployment ID, and additional logic in the sidecar injector to not inject the sidecar, since a service that's required for networking will not be created.

@yaron2 yaron2 self-assigned this Oct 6, 2020
@yaron2 yaron2 moved this from To do to In progress in 1.0.0 Milestone 1 Oct 12, 2020
1.0.0 Milestone 1 automation moved this from In progress to Review Oct 12, 2020
@artursouza artursouza moved this from Review to Done in 1.0.0 Milestone 1 Oct 13, 2020
@artursouza artursouza added this to Release in 1.0.0 Milestone Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/k8s-operator kind/bug Something isn't working kind/documentation Improvements or additions to documentation P1
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants