Skip to content
This repository has been archived by the owner on Aug 12, 2024. It is now read-only.

WIP [v1alpha2]: refactor controller #727

Conversation

varshaprasad96
Copy link
Member

@varshaprasad96 varshaprasad96 commented Sep 7, 2023

This draft PR refactors the controllers for v1alpha2 API.

Things TODO:

  • Implement unpack logic:
    • Images
      • Add finalizer to remove unpack image pods.
    • HTTP
    • Git (Todo: Change unpacking so that a new afero.FS is created only once during unpacking + move unpacking to tmp dir)
  • Implement validate logic:
    • Plain
    • Registry V1
    • Helm
  • Implement deployer:
    • Helm deployer
      • Plain
      • Helm (Todo: Re write the logic to find root dir for helm bundles using afero.FS so that validate is done)
        • Fix adding parent dir, when chart.yaml in cwd while writing to local fs
      • Registry V1
      • Add Default namespace if not specified in individual bundle objects.
  • Add finalizers to BD
  • Add statuses for each step to BD
  • If bd.Spec.Paused is set, don't reconcile.
  • Rebase on top of final changes made on API [v1alpha2] Introduce v1alpha2 APIs #713
    • Remove v1alpha and make v1alpha2 to be stored and served.
  • Clean up manifests for other binaries for controllers which are not required any more.
  • Add and verify any missing features to BD controller which were removed (Metrics handler, crd validator etc)

Extended work:

  • Add caching logic so that unpacking is not done on every update.
  • Add garbage collection to remove any contents stored locally when BD is removed.

This commit intends to introduce the new
v1alpha2 APIs

Signed-off-by: Varsha Prasad Narsing <[email protected]>
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 7, 2023
@codecov
Copy link

codecov bot commented Sep 7, 2023

Codecov Report

Attention: 49 lines in your changes are missing coverage. Please review.

Comparison is base (e59d3f5) 19.21% compared to head (9b3df66) 18.69%.
Report is 17 commits behind head on main.

❗ Current head 9b3df66 differs from pull request most recent head 1e7dc72. Consider uploading reports for the commit 1e7dc72 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #727      +/-   ##
==========================================
- Coverage   19.21%   18.69%   -0.52%     
==========================================
  Files          13       13              
  Lines        1046     1075      +29     
==========================================
  Hits          201      201              
- Misses        801      830      +29     
  Partials       44       44              
Files Coverage Δ
internal/util/fs.go 0.00% <0.00%> (ø)
internal/convert/registryv1.go 14.01% <0.00%> (+0.51%) ⬆️
internal/util/tar.go 0.00% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@varshaprasad96 varshaprasad96 changed the title V1alpha2 prototype controller WIP: v1alpha2 prototype controller Sep 7, 2023
@varshaprasad96 varshaprasad96 changed the title WIP: v1alpha2 prototype controller WIP [v1alpha2]: prototype controller Sep 7, 2023
@varshaprasad96 varshaprasad96 changed the title WIP [v1alpha2]: prototype controller WIP [v1alpha2]: refactor controller Sep 7, 2023
@varshaprasad96 varshaprasad96 force-pushed the v1alpha2-prototype-controller branch 2 times, most recently from f362907 to 8479c98 Compare September 7, 2023 22:17
@varshaprasad96 varshaprasad96 linked an issue Sep 11, 2023 that may be closed by this pull request
@varshaprasad96 varshaprasad96 force-pushed the v1alpha2-prototype-controller branch 2 times, most recently from 46b089c to f4888e8 Compare September 18, 2023 18:59
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 20, 2023
@openshift-merge-robot
Copy link

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

This commit intends to introduce the new
v1alpha2 APIs

Signed-off-by: Varsha Prasad Narsing <[email protected]>
…elm provisioner

- Create a new fs from source, only if destination is specified. This allows
  specifying multiple sources.
- Remove helm provisioner related manifests and controller.

Signed-off-by: Varsha Prasad Narsing <[email protected]>
If the bundle objects do not specify a namespace,
use the default namespace to deploy them.

Signed-off-by: Varsha Prasad Narsing <[email protected]>
@varshaprasad96 varshaprasad96 force-pushed the v1alpha2-prototype-controller branch from 9b3df66 to 0b936c3 Compare September 21, 2023 15:01
Signed-off-by: Varsha Prasad Narsing <[email protected]>
Copy link

github-actions bot commented Nov 5, 2023

This PR has become stale because it has been open for 30 days with no activity. Please update this PR or remove the lifecycle/stale label before it is automatically closed in 30 days. Adding the lifecycle/frozen label will cause this PR to ignore lifecycle events.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 5, 2023
Copy link

github-actions bot commented Dec 6, 2023

This PR has been closed as no updates were detected after 30 days of being stale. Please feel free to reopen this PR if necessary.

@github-actions github-actions bot added the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Dec 6, 2023
@github-actions github-actions bot closed this Dec 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v1alpha2 API
2 participants