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
Member

priyawadhwa commented Jun 14, 2019

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)

This comment has been minimized.

Copy link
@balopat

balopat Jun 17, 2019

Collaborator

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()

This comment has been minimized.

Copy link
@priyawadhwa

priyawadhwa Jun 17, 2019

Author Member

for sure, done!

@priyawadhwa priyawadhwa force-pushed the priyawadhwa:default-labeller branch from 9d0380f to 7863159 Jun 17, 2019
@balopat balopat merged commit 5820dee into GoogleContainerTools:master Jun 19, 2019
3 checks passed
3 checks passed
cla/google All necessary CLAs are signed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
kokoro CI build successful.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.