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 K8sManagedBy function to labeller #2270

Merged
merged 2 commits into from
Jun 19, 2019

Conversation

priyawadhwa
Copy link
Contributor

This function will be used by the port forwarder to parse out deployed services to automatically port forward. I've added the defaultLabeller to the runner so that the label can be passed in to the port forwarder in an upcoming PR.

This function will be used by the port forwarder to parse out deployed services to automatically port forward. I've added the defaultLabeller to the runner so that the label can be passed in to the port forwarder in an upcoming PR.
@@ -51,3 +51,7 @@ func (d *DefaultLabeller) Labels() map[string]string {
K8ManagedByLabel: fmt.Sprintf("skaffold-%s", version),
}
}

func (d *DefaultLabeller) K8sMangedByLabel() string {
return fmt.Sprintf("%s=skaffold-%s", K8ManagedByLabel, d.version)
Copy link
Contributor

Choose a reason for hiding this comment

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

This took me a while to understand - can we rename/refactor some things to make it clearer?

  • K8ManagedByLabel -> K8sManagedByLabelKey
  • K8sMangedByLabel() -> K8sManagedByLabelKeyValueString()
  • fmt.Sprintf("skaffold-%s", version) -> skaffoldVersion() and use that in K8sManagedByLabelKeyValueString()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

for sure, done!

@balopat balopat merged commit 5820dee into GoogleContainerTools:master Jun 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants