-
Couldn't load subscription status.
- Fork 68
add support for handling plain+v0 bundle types #242
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 support for handling plain+v0 bundle types #242
Conversation
e53ddd1 to
a49efb5
Compare
771b5f8 to
44d2c15
Compare
a7ee2fa to
5eb8b1e
Compare
|
|
||
| func (r *OperatorReconciler) generateExpectedBundleDeployment(o operatorsv1alpha1.Operator, bundlePath string) *unstructured.Unstructured { | ||
| func (r *OperatorReconciler) generateExpectedBundleDeployment(o operatorsv1alpha1.Operator, bundlePath string, bundleProvisioner string) *unstructured.Unstructured { | ||
| // We use unstructured here to avoid problems of serializing default values when sending patches to the apiserver. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't new code for this PR but ... why not use SSA?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it does here:
| return r.Client.Patch(ctx, desiredBundleDeployment, client.Apply, client.ForceOwnership, client.FieldOwner("operator-controller")) |
generateExpectedBundleDeployment is generating an unstructured.Unstructured to use for that patch request. I'd be curious to see if it is worth it to create applyconfigurations for the rukpak APIs to improve the creation of the patch information here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be curious to see if it is worth it to create applyconfigurations for the rukpak APIs to improve the creation of the patch information here
We updated the generators upstream so you should get those free with newer codegen tools. I do think the apply you linked will be SSA - and the defaults worries from this block should be obviated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Watching this closely :) kubernetes-sigs/controller-tools#818
testdata/bundles/registry-v1/prometheus-operator.v0.47.0/metadata/annotations.yaml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
| err = c.List(ctx, pList) | ||
| g.Expect(err).ToNot(HaveOccurred()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For anything that just returns an error, I find this is shorter/easier to parse:
| err = c.List(ctx, pList) | |
| g.Expect(err).ToNot(HaveOccurred()) | |
| g.Expect(c.List(ctx, pList)).To(Succeed()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, missed some: 7f4c1bf
| relatedImages: | ||
| - name: "" | ||
| image: "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could remove this if we merge #259 first.
|
New changes are detected. LGTM label has been removed. |
Signed-off-by: Bryce Palmer <bpalmer@redhat.com>
Signed-off-by: Bryce Palmer <bpalmer@redhat.com>
Signed-off-by: Bryce Palmer <bpalmer@redhat.com>
Signed-off-by: Bryce Palmer <bpalmer@redhat.com>
Signed-off-by: Bryce Palmer <bpalmer@redhat.com>
7f4c1bf to
8abcc14
Compare
Signed-off-by: Bryce Palmer <bpalmer@redhat.com>
| }) | ||
| }) | ||
| }) | ||
| When("an invalid semver is provided that bypasses the regex validation", func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may have been missed in the merge. I moved this in #257.
Signed-off-by: Bryce Palmer <bpalmer@redhat.com>
Description
Adds logic for differentiating between
plain+v0andregistry+v1bundle formats and configuring the properprovisionerClassNamefor theBundletemplate in theBundleDeployment.Spec.Templatefield.Adds unit tests where necessary
Adds e2e tests for installing a
plain+v0bundleAdds a
plain+v0bundle to the testdata catalogresolves Support installation of different bundle formats #238
Reviewer Checklist