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

Refactor CronJob and MultiVersion Sample Code to Align with DeployImage Plugin Scaffold Structure #4291

Open
camilamacedo86 opened this issue Nov 5, 2024 · 0 comments
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/documentation Categorizes issue or PR as related to documentation. testing
Milestone

Comments

@camilamacedo86
Copy link
Member

camilamacedo86 commented Nov 5, 2024

What do you want to happen?

This issue proposes refactoring the CronJob and MultiVersion samples to follow the structure and best practices introduced by the DeployImage plugin, which includes scaffolding to manage resources defined via command-line inputs, such as images.

Objectives

The main goals for this refactoring include ensure:

  1. Align the structure of the CronJob and MultiVersion examples with the scaffolded layout used by the DeployImage plugin.
  2. Apply best practices, such as fetching the resource before updates, to prevent reconciliation conflicts due to intermediate changes.
  3. Integrate status conditions to better track resource states. (see that we have indeed a task for that: Update Cronjob and Multiversion Tutorials samples to Use Status Conditions #4019)
  4. Ensure that test implementations mirror the DeployImage scaffolded layout, with comprehensive tests for the controller logic.(see that we have indeed a task for that: Review and Improve Test Coverage and Alignment for Controller Tests in CronJob Tutorial #4140)
  5. Retain the original logic and functionality of the CronJob and MultiVersion examples.
  6. Preserve the existing markers to ensure that documentation snippets are generated and rendered consistently in the docs.

Reference Materials

To align with DeployImage scaffolding, please review the following examples:

Additional Notes

All sample updates should be implemented to ensure they match the DeployImage plugin’s scaffold structure and best practices, while still fulfilling the unique requirements of each sample (i.e., CronJob and MultiVersion functionality).

Related tasks:

Example of Motivation: #4290

Updating the Documentation Samples

Please note that these sample files are auto-generated for the documentation. Any changes made to these samples will be reflected in the documentation only when running make generate-docs.

The sample generation process is managed through:

  • Makefile configuration: See Makefile#L82-L84.
  • Documentation generation scripts: Updates should be made within

Note: We can approach this refactoring with multiple smaller PRs or a single comprehensive one. For example, we could start by adding Status Conditions, then improve the tests, and so on.

Extra Labels

No response

@camilamacedo86 camilamacedo86 added kind/feature Categorizes issue or PR as related to a new feature. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. testing kind/documentation Categorizes issue or PR as related to documentation. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. and removed kind/feature Categorizes issue or PR as related to a new feature. labels Nov 5, 2024
@camilamacedo86 camilamacedo86 added this to the tutorials milestone Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/documentation Categorizes issue or PR as related to documentation. testing
Projects
None yet
Development

No branches or pull requests

1 participant