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

image spec manifest annotations - key/platform/registry #173

Merged
merged 6 commits into from
Feb 12, 2024

Conversation

amartin120
Copy link
Contributor

Please check below, if the PR fulfills these requirements:

  • The commit message follows the guidelines.
  • Tests for the changes have been added (for bug fixes / features).
  • Docs have been added / updated (for bug fixes / features).

What kind of change does this PR introduce?

  • Allows for the use of key/platform/registry annotations for the image spec of a Hauler manifest. This gives users the ability to provide global overrides without the use of specifying flags via the CLI.
apiVersion: content.hauler.cattle.io/v1alpha1
kind: Images
metadata:
  name: <name>
  annotations:
    hauler.dev/key: <cosign public key>
    hauler.dev/platform:<platform>
    hauler.dev/registry: <registry>

Currently, the flags from the CLI have a global effect on any image UNLESS it has a (key/platform) specified on the individual image. Individual image key/platform takes precedence.

Moving forward, if I have hauler.dev/key and/or hauler.dev/platform at the annotation level, it would work just like the CLI flag and globally apply for everything except individual images specifying otherwise. Just like above.

If you just so happen to provide both an annotation AND the CLI flag for the same thing, the CLI flag wins.

As for the hauler.dev/registry annotation, it will apply globally unless the provided image reference already has a registry specified in its name.

What is the current behavior?

  • The only way to specify a global overrides to Hauler manifest is via the CLI flags.

What is the new behavior (if this is a feature change)?

  • Allows for the same functionality but via a declarative approach.

Does this PR introduce a breaking change?

  • No

Other information:

@amartin120
Copy link
Contributor Author

amartin120 commented Feb 11, 2024

Copy link
Member

@zackbradys zackbradys left a comment

Choose a reason for hiding this comment

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

Appreciate the quick fix @amartin120! I like that we are keeping the k8s theme with global flags being annotations in the manifest. 🚀

@amartin120 amartin120 merged commit 3cf4afe into hauler-dev:main Feb 12, 2024
1 check passed
@amartin120 amartin120 deleted the sync-annotations branch February 16, 2024 15:46
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