-
Notifications
You must be signed in to change notification settings - Fork 50
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
✨ Plug in unpacker, add Handler #757
Conversation
Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com>
TypeResolved = "Resolved" | ||
TypeInstalled = "Installed" | ||
TypeResolved = "Resolved" | ||
TypeHasValidBundle = "HasValidBundle" |
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.
Nit: I really think there should be a blank line after this.
// This function unsets user and group information in the tar archive so that readers | ||
// of archives produced by this function do not need to account for differences in | ||
// permissions between source and destination filesystems. | ||
func FSToTarGZ(w io.Writer, fsys fs.FS) error { |
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 was originally in tar.go
, did we want to keep it there, to keep the code somewhat consistent with upstream rukpak?
"github.com/nlepage/go-tarfs" | ||
"github.com/operator-framework/operator-controller/internal/rukpak/util" | ||
"sigs.k8s.io/controller-runtime/pkg/client" | ||
) |
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.
Yeah, the ordering here is inconsistent.
|
||
type postrenderer struct { | ||
labels map[string]string | ||
cascade postrender.PostRenderer | ||
} | ||
|
||
func (p *postrenderer) Run(renderedManifests *bytes.Buffer) (*bytes.Buffer, error) { | ||
var buf bytes.Buffer | ||
dec := apimachyaml.NewYAMLOrJSONDecoder(renderedManifests, 1024) | ||
for { | ||
obj := unstructured.Unstructured{} | ||
err := dec.Decode(&obj) | ||
if errors.Is(err, io.EOF) { | ||
break | ||
} | ||
if err != nil { | ||
return nil, err | ||
} | ||
obj.SetLabels(util.MergeMaps(obj.GetLabels(), p.labels)) | ||
b, err := obj.MarshalJSON() | ||
if err != nil { | ||
return nil, err | ||
} | ||
buf.Write(b) | ||
} | ||
if p.cascade != nil { | ||
return p.cascade.Run(&buf) | ||
} | ||
return &buf, nil | ||
} |
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.
What's this for? Something moving forward?
A few minor things, but github also seems to have opinions... |
Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com> Co-authored-by: varshaprasad96@gmail.com <vnarsing@vnarsing-mac.hsd1.ca.comcast.net>
Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com> Co-authored-by: varshaprasad96@gmail.com <vnarsing@vnarsing-mac.hsd1.ca.comcast.net>
plug in resolver Deal with removal of HigherBundleVersion Removed in e079129 Signed-off-by: Todd Short <tshort@redhat.com> :sparkles: Starting Helm POC - pull in some rukpak (#756) * Fix suite_test.go Signed-off-by: Todd Short <tshort@redhat.com> * Copy over some rukpak code and replace BundleDeployment Replace BundleDeployment in the Unpack APIs with a combination of BundleSource and ClusterExtension. It builds... Signed-off-by: Todd Short <tshort@redhat.com> * fixup! Copy over some rukpak code and replace BundleDeployment --------- Signed-off-by: Todd Short <tshort@redhat.com> Plugin unpacker, add Handler (#757) Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com> Co-authored-by: varshaprasad96@gmail.com <vnarsing@vnarsing-mac.hsd1.ca.comcast.net> A bit of cleanup (#761) Signed-off-by: Todd Short <tshort@redhat.com> :warning: Install the helm chart (#762) * Install the helm chart Signed-off-by: Todd Short <tshort@redhat.com> * fixup! Install the helm chart Signed-off-by: Todd Short <tshort@redhat.com> --------- Signed-off-by: Todd Short <tshort@redhat.com> Set up right watches and all labels to postrenderer (#763) Co-authored-by: varshaprasad96@gmail.com <vnarsing@vnarsing-mac.hsd1.ca.comcast.net> :warning: Update owner keys (#765) * Update owner keys Signed-off-by: Todd Short <tshort@redhat.com> * fixup! Update owner keys Signed-off-by: Todd Short <tshort@redhat.com> --------- Signed-off-by: Todd Short <tshort@redhat.com> No more panics (#767) Signed-off-by: Todd Short <tshort@redhat.com> Add relevant RBAC to enable controller to watch resources (#776) Co-authored-by: varshaprasad96@gmail.com <vnarsing@vnarsing-mac.hsd1.ca.comcast.net> Changes required for ClusterExtension to install an operator (#789) * Add relevant RBAC to enable controller to watch resources * Debugging iteration - one * ClusterExtension installing the operator - working --------- Co-authored-by: varshaprasad96@gmail.com <vnarsing@vnarsing-mac.hsd1.ca.comcast.net> Fix some lints (#793) Signed-off-by: Todd Short <tshort@redhat.com> :sparkles: Getting cluster extension running (#795) * Getting cluster extension running * Specify namespace to create secret Set resolved and installed versions (#806) Remove install references to rukpak (#805) Signed-off-by: Todd Short <tshort@redhat.com> Consolidate error message generation (#807) Signed-off-by: Todd Short <tshort@redhat.com> Add make kind-redeploy (#808) Signed-off-by: Todd Short <tshort@redhat.com> Use rukpak as a library (#821) Signed-off-by: Todd Short <tshort@redhat.com> Improve caching and fix constant reconciles (#825) Improve performance by caching objects that only have ClusterExtension as owners. Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com> Fix linter (#826) Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com> Move helm-operator-plugin (#828) Signed-off-by: Todd Short <tshort@redhat.com> Really fix linter (#833) Signed-off-by: Todd Short <tshort@redhat.com>
plug in resolver Deal with removal of HigherBundleVersion Removed in e079129 Signed-off-by: Todd Short <tshort@redhat.com> :sparkles: Starting Helm POC - pull in some rukpak (#756) * Fix suite_test.go Signed-off-by: Todd Short <tshort@redhat.com> * Copy over some rukpak code and replace BundleDeployment Replace BundleDeployment in the Unpack APIs with a combination of BundleSource and ClusterExtension. It builds... Signed-off-by: Todd Short <tshort@redhat.com> * fixup! Copy over some rukpak code and replace BundleDeployment --------- Signed-off-by: Todd Short <tshort@redhat.com> Plugin unpacker, add Handler (#757) Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com> Co-authored-by: varshaprasad96@gmail.com <vnarsing@vnarsing-mac.hsd1.ca.comcast.net> A bit of cleanup (#761) Signed-off-by: Todd Short <tshort@redhat.com> :warning: Install the helm chart (#762) * Install the helm chart Signed-off-by: Todd Short <tshort@redhat.com> * fixup! Install the helm chart Signed-off-by: Todd Short <tshort@redhat.com> --------- Signed-off-by: Todd Short <tshort@redhat.com> Set up right watches and all labels to postrenderer (#763) Co-authored-by: varshaprasad96@gmail.com <vnarsing@vnarsing-mac.hsd1.ca.comcast.net> :warning: Update owner keys (#765) * Update owner keys Signed-off-by: Todd Short <tshort@redhat.com> * fixup! Update owner keys Signed-off-by: Todd Short <tshort@redhat.com> --------- Signed-off-by: Todd Short <tshort@redhat.com> No more panics (#767) Signed-off-by: Todd Short <tshort@redhat.com> Add relevant RBAC to enable controller to watch resources (#776) Co-authored-by: varshaprasad96@gmail.com <vnarsing@vnarsing-mac.hsd1.ca.comcast.net> Changes required for ClusterExtension to install an operator (#789) * Add relevant RBAC to enable controller to watch resources * Debugging iteration - one * ClusterExtension installing the operator - working --------- Co-authored-by: varshaprasad96@gmail.com <vnarsing@vnarsing-mac.hsd1.ca.comcast.net> Fix some lints (#793) Signed-off-by: Todd Short <tshort@redhat.com> :sparkles: Getting cluster extension running (#795) * Getting cluster extension running * Specify namespace to create secret Set resolved and installed versions (#806) Remove install references to rukpak (#805) Signed-off-by: Todd Short <tshort@redhat.com> Consolidate error message generation (#807) Signed-off-by: Todd Short <tshort@redhat.com> Add make kind-redeploy (#808) Signed-off-by: Todd Short <tshort@redhat.com> Use rukpak as a library (#821) Signed-off-by: Todd Short <tshort@redhat.com> Improve caching and fix constant reconciles (#825) Improve performance by caching objects that only have ClusterExtension as owners. Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com> Fix linter (#826) Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com> Move helm-operator-plugin (#828) Signed-off-by: Todd Short <tshort@redhat.com> Really fix linter (#833) Signed-off-by: Todd Short <tshort@redhat.com>
plug in resolver Deal with removal of HigherBundleVersion Removed in e079129 Signed-off-by: Todd Short <tshort@redhat.com> :sparkles: Starting Helm POC - pull in some rukpak (operator-framework#756) * Fix suite_test.go Signed-off-by: Todd Short <tshort@redhat.com> * Copy over some rukpak code and replace BundleDeployment Replace BundleDeployment in the Unpack APIs with a combination of BundleSource and ClusterExtension. It builds... Signed-off-by: Todd Short <tshort@redhat.com> * fixup! Copy over some rukpak code and replace BundleDeployment --------- Signed-off-by: Todd Short <tshort@redhat.com> Plugin unpacker, add Handler (operator-framework#757) Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com> Co-authored-by: varshaprasad96@gmail.com <vnarsing@vnarsing-mac.hsd1.ca.comcast.net> A bit of cleanup (operator-framework#761) Signed-off-by: Todd Short <tshort@redhat.com> :warning: Install the helm chart (operator-framework#762) * Install the helm chart Signed-off-by: Todd Short <tshort@redhat.com> * fixup! Install the helm chart Signed-off-by: Todd Short <tshort@redhat.com> --------- Signed-off-by: Todd Short <tshort@redhat.com> Set up right watches and all labels to postrenderer (operator-framework#763) Co-authored-by: varshaprasad96@gmail.com <vnarsing@vnarsing-mac.hsd1.ca.comcast.net> :warning: Update owner keys (operator-framework#765) * Update owner keys Signed-off-by: Todd Short <tshort@redhat.com> * fixup! Update owner keys Signed-off-by: Todd Short <tshort@redhat.com> --------- Signed-off-by: Todd Short <tshort@redhat.com> No more panics (operator-framework#767) Signed-off-by: Todd Short <tshort@redhat.com> Add relevant RBAC to enable controller to watch resources (operator-framework#776) Co-authored-by: varshaprasad96@gmail.com <vnarsing@vnarsing-mac.hsd1.ca.comcast.net> Changes required for ClusterExtension to install an operator (operator-framework#789) * Add relevant RBAC to enable controller to watch resources * Debugging iteration - one * ClusterExtension installing the operator - working --------- Co-authored-by: varshaprasad96@gmail.com <vnarsing@vnarsing-mac.hsd1.ca.comcast.net> Fix some lints (operator-framework#793) Signed-off-by: Todd Short <tshort@redhat.com> :sparkles: Getting cluster extension running (operator-framework#795) * Getting cluster extension running * Specify namespace to create secret Set resolved and installed versions (operator-framework#806) Remove install references to rukpak (operator-framework#805) Signed-off-by: Todd Short <tshort@redhat.com> Consolidate error message generation (operator-framework#807) Signed-off-by: Todd Short <tshort@redhat.com> Add make kind-redeploy (operator-framework#808) Signed-off-by: Todd Short <tshort@redhat.com> Use rukpak as a library (operator-framework#821) Signed-off-by: Todd Short <tshort@redhat.com> Improve caching and fix constant reconciles (operator-framework#825) Improve performance by caching objects that only have ClusterExtension as owners. Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com> Fix linter (operator-framework#826) Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com> Move helm-operator-plugin (operator-framework#828) Signed-off-by: Todd Short <tshort@redhat.com> Really fix linter (operator-framework#833) Signed-off-by: Todd Short <tshort@redhat.com>
plug in resolver Deal with removal of HigherBundleVersion Removed in e079129 Signed-off-by: Todd Short <tshort@redhat.com> :sparkles: Starting Helm POC - pull in some rukpak (#756) * Fix suite_test.go Signed-off-by: Todd Short <tshort@redhat.com> * Copy over some rukpak code and replace BundleDeployment Replace BundleDeployment in the Unpack APIs with a combination of BundleSource and ClusterExtension. It builds... Signed-off-by: Todd Short <tshort@redhat.com> * fixup! Copy over some rukpak code and replace BundleDeployment --------- Signed-off-by: Todd Short <tshort@redhat.com> Plugin unpacker, add Handler (#757) Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com> Co-authored-by: varshaprasad96@gmail.com <vnarsing@vnarsing-mac.hsd1.ca.comcast.net> A bit of cleanup (#761) Signed-off-by: Todd Short <tshort@redhat.com> :warning: Install the helm chart (#762) * Install the helm chart Signed-off-by: Todd Short <tshort@redhat.com> * fixup! Install the helm chart Signed-off-by: Todd Short <tshort@redhat.com> --------- Signed-off-by: Todd Short <tshort@redhat.com> Set up right watches and all labels to postrenderer (#763) Co-authored-by: varshaprasad96@gmail.com <vnarsing@vnarsing-mac.hsd1.ca.comcast.net> :warning: Update owner keys (#765) * Update owner keys Signed-off-by: Todd Short <tshort@redhat.com> * fixup! Update owner keys Signed-off-by: Todd Short <tshort@redhat.com> --------- Signed-off-by: Todd Short <tshort@redhat.com> No more panics (#767) Signed-off-by: Todd Short <tshort@redhat.com> Add relevant RBAC to enable controller to watch resources (#776) Co-authored-by: varshaprasad96@gmail.com <vnarsing@vnarsing-mac.hsd1.ca.comcast.net> Changes required for ClusterExtension to install an operator (#789) * Add relevant RBAC to enable controller to watch resources * Debugging iteration - one * ClusterExtension installing the operator - working --------- Co-authored-by: varshaprasad96@gmail.com <vnarsing@vnarsing-mac.hsd1.ca.comcast.net> Fix some lints (#793) Signed-off-by: Todd Short <tshort@redhat.com> :sparkles: Getting cluster extension running (#795) * Getting cluster extension running * Specify namespace to create secret Set resolved and installed versions (#806) Remove install references to rukpak (#805) Signed-off-by: Todd Short <tshort@redhat.com> Consolidate error message generation (#807) Signed-off-by: Todd Short <tshort@redhat.com> Add make kind-redeploy (#808) Signed-off-by: Todd Short <tshort@redhat.com> Use rukpak as a library (#821) Signed-off-by: Todd Short <tshort@redhat.com> Improve caching and fix constant reconciles (#825) Improve performance by caching objects that only have ClusterExtension as owners. Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com> Fix linter (#826) Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com> Move helm-operator-plugin (#828) Signed-off-by: Todd Short <tshort@redhat.com> Really fix linter (#833) Signed-off-by: Todd Short <tshort@redhat.com>
plug in resolver Deal with removal of HigherBundleVersion Removed in e079129 Signed-off-by: Todd Short <tshort@redhat.com> :sparkles: Starting Helm POC - pull in some rukpak (#756) * Fix suite_test.go Signed-off-by: Todd Short <tshort@redhat.com> * Copy over some rukpak code and replace BundleDeployment Replace BundleDeployment in the Unpack APIs with a combination of BundleSource and ClusterExtension. It builds... Signed-off-by: Todd Short <tshort@redhat.com> * fixup! Copy over some rukpak code and replace BundleDeployment --------- Signed-off-by: Todd Short <tshort@redhat.com> Plugin unpacker, add Handler (#757) Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com> Co-authored-by: varshaprasad96@gmail.com <vnarsing@vnarsing-mac.hsd1.ca.comcast.net> A bit of cleanup (#761) Signed-off-by: Todd Short <tshort@redhat.com> :warning: Install the helm chart (#762) * Install the helm chart Signed-off-by: Todd Short <tshort@redhat.com> * fixup! Install the helm chart Signed-off-by: Todd Short <tshort@redhat.com> --------- Signed-off-by: Todd Short <tshort@redhat.com> Set up right watches and all labels to postrenderer (#763) Co-authored-by: varshaprasad96@gmail.com <vnarsing@vnarsing-mac.hsd1.ca.comcast.net> :warning: Update owner keys (#765) * Update owner keys Signed-off-by: Todd Short <tshort@redhat.com> * fixup! Update owner keys Signed-off-by: Todd Short <tshort@redhat.com> --------- Signed-off-by: Todd Short <tshort@redhat.com> No more panics (#767) Signed-off-by: Todd Short <tshort@redhat.com> Add relevant RBAC to enable controller to watch resources (#776) Co-authored-by: varshaprasad96@gmail.com <vnarsing@vnarsing-mac.hsd1.ca.comcast.net> Changes required for ClusterExtension to install an operator (#789) * Add relevant RBAC to enable controller to watch resources * Debugging iteration - one * ClusterExtension installing the operator - working --------- Co-authored-by: varshaprasad96@gmail.com <vnarsing@vnarsing-mac.hsd1.ca.comcast.net> Fix some lints (#793) Signed-off-by: Todd Short <tshort@redhat.com> :sparkles: Getting cluster extension running (#795) * Getting cluster extension running * Specify namespace to create secret Set resolved and installed versions (#806) Remove install references to rukpak (#805) Signed-off-by: Todd Short <tshort@redhat.com> Consolidate error message generation (#807) Signed-off-by: Todd Short <tshort@redhat.com> Add make kind-redeploy (#808) Signed-off-by: Todd Short <tshort@redhat.com> Use rukpak as a library (#821) Signed-off-by: Todd Short <tshort@redhat.com> Improve caching and fix constant reconciles (#825) Improve performance by caching objects that only have ClusterExtension as owners. Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com> Fix linter (#826) Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com> Move helm-operator-plugin (#828) Signed-off-by: Todd Short <tshort@redhat.com> Really fix linter (#833) Signed-off-by: Todd Short <tshort@redhat.com>
Description
Reviewer Checklist