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

Helper overlay to patch the Operator image #942

Merged
merged 3 commits into from
Feb 1, 2022
Merged

Helper overlay to patch the Operator image #942

merged 3 commits into from
Feb 1, 2022

Conversation

Zerpet
Copy link
Collaborator

@Zerpet Zerpet commented Jan 28, 2022

Note to reviewers: remember to look at the commits in this PR and consider if they can be squashed

Summary Of Changes

This will be used in the pipeline to publish to additional registries.

Additional Context

Related [#869]

Local Testing

Make sure you have ytt installed, then run:

kustomize build config/installation/ | ytt -f- -f config/ytt/overlay-manager-image.yaml \
  --data-value operator_image=quay.io/bunny:latest

Observe the image of the Operator Deployment is set to quay.io/bunny:latest.

Edit: tag correct issue 🙈

This will be used in the pipeline to publish to additional registries.

[#689]

Signed-off-by: Aitor Perez Cedres <[email protected]>
@coro
Copy link
Contributor

coro commented Jan 28, 2022

Not sure why #689 is related!

#@ load("@ytt:overlay", "overlay")
#@ load("@ytt:data", "data")

#@overlay/match by=overlay.subset({"kind": "Deployment"}), expects="1+"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it worth maybe being specific about which Deployment is in the subset? Just in case one used this with a large group of manifests containing other Deployments.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch! I just hope kustomize doesn't mangle the name of the Deployment ever.

@Zerpet
Copy link
Collaborator Author

Zerpet commented Jan 28, 2022

Not sure why #689 is related!

Oops 🙊 It is actually #869

Just to ensure we target the expected Deployment object, in case
multiple Deployment objects are added in the future.

Signed-off-by: Aitor Perez Cedres <[email protected]>
@Zerpet
Copy link
Collaborator Author

Zerpet commented Jan 31, 2022

Made the changes to match the Operator deployment more precisely. If we ever change the name of the Operator deployment, the overlay won't match anything, in which case we'll get a red pipeline somewhere.

@Zerpet Zerpet requested a review from coro January 31, 2022 12:58
@Zerpet Zerpet merged commit 2c830e9 into main Feb 1, 2022
@Zerpet Zerpet deleted the ytt-patch branch February 1, 2022 12:57
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