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

K8S: RFC-1123 compliant job names #712

Closed
wants to merge 1 commit into from

Conversation

oavdeev
Copy link
Collaborator

@oavdeev oavdeev commented Sep 21, 2021

This fixes a known TODO item on K8S API to make job names always-valid

@oavdeev oavdeev changed the title Rfc compliant 1123 job names Kubernetes: Rfc compliant 1123 job names Sep 21, 2021
@oavdeev oavdeev changed the title Kubernetes: Rfc compliant 1123 job names Kubernetes: RFC-1123 compliant job names Sep 21, 2021
@oavdeev oavdeev changed the title Kubernetes: RFC-1123 compliant job names K8S: RFC-1123 compliant job names Sep 21, 2021
""" Generate RFC 1123 compatible job name """
long_name = "-".join(
[
flow_name,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Technically flow_name can start with an underscore, which will make the output of this function non-compliant.

Also, we would need to sanitize the strings for labels as well - we can (at a later stage) make this a utility method.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed. Also I realized that the previous version could generate identical names for HelloFlow and Helloflow, fixed that too

@oavdeev oavdeev force-pushed the rfc-1123-job-names branch 2 times, most recently from 48abada to 1a6c4a6 Compare September 22, 2021 19:08
@oavdeev oavdeev force-pushed the rfc-1123-job-names branch 2 times, most recently from be2f658 to 78d66e9 Compare October 2, 2021 01:16
@savingoyal
Copy link
Collaborator

We can sunset this PR in favour of #719?

@oavdeev
Copy link
Collaborator Author

oavdeev commented Oct 8, 2021

either works, #719 has this commit and one more for labels

@savingoyal
Copy link
Collaborator

Great! Merged #719. We can sunset this PR.

@oavdeev oavdeev closed this Oct 8, 2021
@oavdeev oavdeev deleted the rfc-1123-job-names branch October 8, 2021 00:27
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.

None yet

2 participants