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

controller: Fix usage of LabelSelector #314

Merged
merged 1 commit into from
Jul 10, 2018

Conversation

indradhanush
Copy link
Contributor

@indradhanush indradhanush commented Jul 10, 2018

sts.Spec.Selector is a map[string]string.

This leads to the following error on deleting pods:

ts=2018-07-10T16:05:30.055388286Z level=error component=controller/v1beta2 msg="Habitat could not be synced, requeueing" err="unable to parse requirement: invalid label key \"&LabelSelector{MatchLabels:map[string]string{habitat-name:\": name part must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName',  or 'my.name',  or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]')" obj=redis-habitat/redis

This PR fixes it.

@indradhanush indradhanush force-pushed the indradhanush/fix-pod-deletion branch from e468d43 to 27670f4 Compare July 10, 2018 18:24
Signed-off-by: Indradhanush Gupta <indra@kinvolk.io>
@indradhanush indradhanush force-pushed the indradhanush/fix-pod-deletion branch from 27670f4 to ff17ca1 Compare July 10, 2018 18:38
Copy link
Contributor

@krnowak krnowak left a comment

Choose a reason for hiding this comment

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

LFAD if tests pass.

@indradhanush indradhanush merged commit 7e089d1 into master Jul 10, 2018
@indradhanush indradhanush deleted the indradhanush/fix-pod-deletion branch July 10, 2018 18:58
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.

2 participants