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

Telemeter server statefulset manifest attempting to create PV claim with invalid name #60

Closed
jfchevrette opened this issue Oct 25, 2018 · 3 comments

Comments

@jfchevrette
Copy link
Member

create Claim -telemeter-server-0 for Pod telemeter-server-0 in StatefulSet telemeter-server failed error: PersistentVolumeClaim "-telemeter-server-0" is invalid: [metadata.name: Invalid value: "-telemeter-server-0": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'), spec.accessModes: Required value: at least 1 access mode is required, spec.resources[storage]: Required value]

Possibly related to the empty item here?

volumeClaimTemplates:
- {}

@pbergene
Copy link

@squat would like to try to have this sorted on the morning eu if possible. I'm traveling, so please sync with @jmelis or @riuvshin if there is anything you need assistance with.

cc @s-urbaniak

@s-urbaniak
Copy link
Contributor

@pbergene @jfchevrette I am having a look at it now

@s-urbaniak
Copy link
Contributor

the issue is, that instead of setting empty seq [] in the telemeter-server statefulSet, we are setting an empty dict {}:

statefulSet.new('telemeter-server', 3, [telemeterServer], {}, podLabels) +

Internally, the k8s libsonnet then creates one sequence entry set to empty object. This object is then interpreted by k8s causing the above error.

The resolution is simple: simply set an empty seq [] vs. empty dict {}. I am submitting a PR now.

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

No branches or pull requests

3 participants