Skip to content

Add labels to Metadata #7425

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

Closed
jlewi opened this issue May 19, 2022 · 3 comments · Fixed by #6782
Closed

Add labels to Metadata #7425

jlewi opened this issue May 19, 2022 · 3 comments · Fixed by #6782
Assignees
Labels
area/labels bugbash/q4-2022 Issues related to Skaffold Bugbash Q4 2022 kind/feature-request priority/p2 May take a couple of releases

Comments

@jlewi
Copy link
Contributor

jlewi commented May 19, 2022

I'd like to allow labels to be specified in the metadata of the Skaffold Config. e.g.

apiVersion: skaffold/v2beta28
kind: Config
metadata:
  name: somename
  labels:
    somelabel: some value

The reason for this is we'd like to be able to use selectors to match some config.

I submitted #6782 a while back to add labels to metadata.

Looks like a number of versions have been cut since then but they don't include the changes.

Name string `yaml:"name,omitempty"`

Any pointers about what additional changes are needed to properly support labels?

@ericzzzzzzz
Copy link
Contributor

The pr was not linked to an issue when it was merged in to main, the issue should be closed.

@jlewi
Copy link
Contributor Author

jlewi commented Dec 7, 2022

Thanks. I double checked and confirmed that this appears to be working with skaffold version v2.0.3.

And v4beta1.

apiVersion: skaffold/v4beta1
kind: Config
metadata:
  name: vscode
  labels:
    somelabel: app
build:
  artifacts:
  - image: gcr.io/someimage/quickstart-image
    context: .
    kaniko:
      dockerfile: Dockerfile
~/Downloads/skaffold-darwin-arm64 build
Generating tags...
 - gcr.io/acme/quickstart-image -> gcr.io/acme/quickstart-image:bf99532-dirty
Checking cache...
 - gcr.io/acme/quickstart-image: Not found. Building
Starting build...
Building [gcr.io/acme/quickstart-image]...

@ericzzzzzzz
Copy link
Contributor

@jlewi awesome ! thanks

@aaron-prindle aaron-prindle added the bugbash/q4-2022 Issues related to Skaffold Bugbash Q4 2022 label Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/labels bugbash/q4-2022 Issues related to Skaffold Bugbash Q4 2022 kind/feature-request priority/p2 May take a couple of releases
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants