Skip to content

Introduce optional components - #391

Merged
Andrei Kvapil (kvaps) merged 3 commits into
mainfrom
optional-components
Oct 8, 2024
Merged

Introduce optional components#391
Andrei Kvapil (kvaps) merged 3 commits into
mainfrom
optional-components

Conversation

@kvaps

@kvaps Andrei Kvapil (kvaps) commented Oct 4, 2024

Copy link
Copy Markdown
Member

This PR introduces an extra option to cozystack configmap. It allows to enable components that are optional to specific bundle name, example usage:

bundle-enable: telepresence,external-dns,external-secrets-operator

Summary by CodeRabbit

  • New Features

    • Added optional attributes to several release entries, allowing for more flexible deployment configurations.
    • Enhanced Helm release generation logic to consider both enabled and disabled states for components.
    • Improved namespace management by incorporating checks for optional components based on enablement and disablement.
  • Bug Fixes

    • Updated dependencies for external-dns to include cilium and kubeovn.
  • Documentation

    • Clarified the configurability of deployment components with the introduction of optional attributes.

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
@coderabbitai

coderabbitai Bot commented Oct 4, 2024

Copy link
Copy Markdown
Contributor

Walkthrough

The pull request introduces modifications to several configuration files, specifically adding the optional: true attribute to various release entries across distro-full.yaml, distro-hosted.yaml, paas-full.yaml, and paas-hosted.yaml. This change indicates that these components are now optional within their respective deployment configurations. Additionally, the Helm template files helmreleases.yaml and namespaces.yaml have been updated to incorporate new logic for handling enabled and disabled components, enhancing the control flow for Helm release generation and namespace management.

Changes

File Path Change Summary
packages/core/platform/bundles/distro-full.yaml Added optional: true to telepresence, external-dns, and external-secrets-operator.
packages/core/platform/bundles/distro-hosted.yaml Added optional: true to traffic-manager, external-dns, and external-secrets-operator.
packages/core/platform/bundles/paas-full.yaml Added optional: true to telepresence, external-dns, and external-secrets-operator.
packages/core/platform/bundles/paas-hosted.yaml Added optional: true to telepresence, external-dns (with updated dependencies), and external-secrets-operator.
packages/core/platform/templates/helmreleases.yaml Added variable $enabledComponents to manage enabled components based on configuration.
packages/core/platform/templates/namespaces.yaml Introduced $disabledComponents and $enabledComponents for managing namespace enablement.

Possibly related PRs

🐰 In the meadow, changes bloom,
Optional entries make room!
Releases now dance with glee,
Configs set the rabbits free!
With logic bright and paths anew,
Hops of joy in every view! 🌼


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 6e932f7 and c3c4afa.

📒 Files selected for processing (1)
  • packages/core/platform/bundles/paas-full.yaml (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/core/platform/bundles/paas-full.yaml

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (8)
packages/core/platform/templates/namespaces.yaml (1)

4-5: LGTM with a minor formatting suggestion.

The introduction of $disabledComponents and $enabledComponents variables provides a good mechanism for controlling component enablement. The use of splitList and default values ensures robust handling of the configuration.

Consider adding a space after the comma in the splitList function calls for better readability:

-{{- $disabledComponents := splitList "," ((index $cozyConfig.data "bundle-disable") | default "") }}
-{{- $enabledComponents := splitList "," ((index $cozyConfig.data "bundle-enable") | default "") }}
+{{- $disabledComponents := splitList ", " ((index $cozyConfig.data "bundle-disable") | default "") }}
+{{- $enabledComponents := splitList ", " ((index $cozyConfig.data "bundle-enable") | default "") }}
🧰 Tools
🪛 yamllint

[warning] 5-5: too few spaces after comma

(commas)

packages/core/platform/templates/helmreleases.yaml (2)

6-6: LGTM with a minor formatting suggestion.

The introduction of the $enabledComponents variable is a good addition, complementing the existing $disabledComponents. It provides a way to explicitly enable optional components.

Consider adding a space after the comma in the splitList function call to improve readability and adhere to YAML formatting conventions:

-{{- $enabledComponents := splitList "," ((index $cozyConfig.data "bundle-enable") | default "") }}
+{{- $enabledComponents := splitList ", " ((index $cozyConfig.data "bundle-enable") | default "") }}
🧰 Tools
🪛 yamllint

[warning] 6-6: too few spaces after comma

(commas)


Line range hint 1-70: Summary: Good implementation of optional components feature.

Overall, the changes introduce a well-implemented mechanism for managing optional components in the Helm releases. The new $enabledComponents variable and the additional conditional logic provide more granular control over which components are included in the deployment.

A few minor suggestions were made for formatting and indentation, but these don't impact the functionality. The changes align well with the PR objective of introducing optional components.

Consider documenting this new feature in the project's documentation, explaining how users can leverage the bundle-enable ConfigMap key to manage optional components.

Would you like assistance in updating the documentation or creating example configurations demonstrating the use of optional components?

🧰 Tools
🪛 yamllint

[warning] 6-6: too few spaces after comma

(commas)

packages/core/platform/bundles/distro-hosted.yaml (1)

94-94: LGTM: Making traffic-manager optional provides deployment flexibility.

The addition of optional: true to the traffic-manager release is a good change that allows for more flexible deployments. This change is unlikely to cause issues as the component has no dependencies.

Note: There's a discrepancy between the name "telepresence" and the releaseName "traffic-manager". While not related to this change, it might be worth aligning these in the future for consistency.

packages/core/platform/bundles/paas-hosted.yaml (2)

108-108: Fix spacing after comma in dependsOn

There's a minor formatting issue in the dependsOn field. Please add a space after the comma for better readability.

Apply this change:

-  dependsOn: [cilium,kubeovn]
+  dependsOn: [cilium, kubeovn]
🧰 Tools
🪛 yamllint

[warning] 108-108: too few spaces after comma

(commas)


100-114: Consider updating documentation for optional components

The changes to make telepresence, external-dns, and external-secrets-operator optional improve the flexibility of the deployment configuration. However, it might be beneficial to add comments or update the documentation to explain:

  1. The implications of making these components optional.
  2. Any specific scenarios where users might choose to exclude these components.
  3. Any additional steps required when these components are not deployed.

This additional context would help users make informed decisions when configuring their deployments.

Would you like assistance in drafting these documentation updates?

🧰 Tools
🪛 yamllint

[warning] 108-108: too few spaces after comma

(commas)

packages/core/platform/bundles/distro-full.yaml (2)

150-150: LGTM: External-dns made optional

The addition of optional: true to the external-dns release is appropriate. Not all deployments may require dynamic DNS management, so making it optional provides more flexibility. This change aligns with the PR objective of introducing optional components.

Consider adding a note in the documentation that if external-dns is not deployed, manual DNS management may be required for the cluster's ingress resources.


157-157: LGTM: External-secrets-operator made optional

The addition of optional: true to the external-secrets-operator release is appropriate. Not all deployments may require external secrets management, so making it optional provides more flexibility. This change aligns with the PR objective of introducing optional components.

Consider adding a note in the documentation about alternative methods for managing secrets securely when external-secrets-operator is not deployed. This could include using Kubernetes Secrets directly or other secret management solutions.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between eda62ff and 6e932f7.

📒 Files selected for processing (6)
  • packages/core/platform/bundles/distro-full.yaml (1 hunks)
  • packages/core/platform/bundles/distro-hosted.yaml (1 hunks)
  • packages/core/platform/bundles/paas-full.yaml (1 hunks)
  • packages/core/platform/bundles/paas-hosted.yaml (1 hunks)
  • packages/core/platform/templates/helmreleases.yaml (3 hunks)
  • packages/core/platform/templates/namespaces.yaml (1 hunks)
🧰 Additional context used
🪛 yamllint
packages/core/platform/bundles/paas-hosted.yaml

[warning] 108-108: too few spaces after comma

(commas)

packages/core/platform/templates/helmreleases.yaml

[warning] 6-6: too few spaces after comma

(commas)

packages/core/platform/templates/namespaces.yaml

[warning] 5-5: too few spaces after comma

(commas)


[warning] 10-10: wrong indentation: expected 0 but found 2

(indentation)


[warning] 11-11: wrong indentation: expected 0 but found 4

(indentation)


[warning] 12-12: wrong indentation: expected 0 but found 6

(indentation)


[warning] 13-13: wrong indentation: expected 0 but found 8

(indentation)


[warning] 14-14: wrong indentation: expected 0 but found 6

(indentation)


[warning] 15-15: wrong indentation: expected 0 but found 4

(indentation)


[warning] 16-16: wrong indentation: expected 0 but found 2

(indentation)


[warning] 17-17: wrong indentation: expected 0 but found 2

(indentation)


[warning] 18-18: wrong indentation: expected 0 but found 2

(indentation)


[warning] 19-19: wrong indentation: expected 0 but found 4

(indentation)


[warning] 20-20: wrong indentation: expected 0 but found 2

(indentation)

🔇 Additional comments (17)
packages/core/platform/templates/namespaces.yaml (3)

17-20: LGTM: Privileged namespace logic remains sound.

The logic for determining privileged namespaces is unchanged and continues to work correctly. It properly handles cases where a release requires a privileged namespace or when the namespace is already marked as privileged.

🧰 Tools
🪛 yamllint

[warning] 17-17: wrong indentation: expected 0 but found 2

(indentation)


[warning] 18-18: wrong indentation: expected 0 but found 2

(indentation)


[warning] 19-19: wrong indentation: expected 0 but found 4

(indentation)


[warning] 20-20: wrong indentation: expected 0 but found 2

(indentation)


1-20: Consider updating documentation to reflect new component management.

The changes introduce a more sophisticated mechanism for managing optional components through namespace control. This aligns well with the PR title "Introduce optional components".

To ensure smooth adoption of these changes:

  1. Update any relevant documentation to explain the new bundle-disable and bundle-enable configuration options.
  2. Consider adding comments in the template file itself to explain the logic for future maintainers.
  3. Ensure that the deployment process and any related scripts are updated to handle these new configuration options.

Let's check for any existing documentation that might need updating:

#!/bin/bash
# Search for documentation files that might mention bundle configuration
rg --type md 'bundle.*config' .
🧰 Tools
🪛 yamllint

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[warning] 5-5: too few spaces after comma

(commas)


[warning] 10-10: wrong indentation: expected 0 but found 2

(indentation)


[warning] 11-11: wrong indentation: expected 0 but found 4

(indentation)


[warning] 12-12: wrong indentation: expected 0 but found 6

(indentation)


[warning] 13-13: wrong indentation: expected 0 but found 8

(indentation)


[warning] 14-14: wrong indentation: expected 0 but found 6

(indentation)


[warning] 15-15: wrong indentation: expected 0 but found 4

(indentation)


[warning] 16-16: wrong indentation: expected 0 but found 2

(indentation)


[warning] 17-17: wrong indentation: expected 0 but found 2

(indentation)


[warning] 18-18: wrong indentation: expected 0 but found 2

(indentation)


[warning] 19-19: wrong indentation: expected 0 but found 4

(indentation)


[warning] 20-20: wrong indentation: expected 0 but found 2

(indentation)


10-16: Approve the logic change with a suggestion for improved readability.

The new logic for namespace addition provides more granular control, which is good. However, the nested conditions might make it slightly harder to read and maintain.

Consider refactoring the condition for better readability:

{{- if and 
    (not (hasKey $namespaces $x.namespace))
    (not (has $x.name $disabledComponents))
    (or (not $x.optional) (has $x.name $enabledComponents))
}}
  {{- $_ := set $namespaces $x.namespace false }}
{{- end }}

This refactoring maintains the same logic but flattens the structure, making it easier to understand at a glance.

To ensure this change doesn't affect other parts of the codebase, let's check for other occurrences of similar patterns:

🧰 Tools
🪛 yamllint

[warning] 10-10: wrong indentation: expected 0 but found 2

(indentation)


[warning] 11-11: wrong indentation: expected 0 but found 4

(indentation)


[warning] 12-12: wrong indentation: expected 0 but found 6

(indentation)


[warning] 13-13: wrong indentation: expected 0 but found 8

(indentation)


[warning] 14-14: wrong indentation: expected 0 but found 6

(indentation)


[warning] 15-15: wrong indentation: expected 0 but found 4

(indentation)


[warning] 16-16: wrong indentation: expected 0 but found 2

(indentation)

packages/core/platform/templates/helmreleases.yaml (1)

Line range hint 15-70: Approve logic change with indentation suggestion.

The addition of the new condition for optional components is a good improvement. It allows for more granular control over which components are included in the Helm release.

The indentation of the new condition suggests it's part of the HelmRelease template. If this is not intended, consider adjusting the indentation:

 {{- range $x := $bundle.releases }}
 {{- if not (has $x.name $disabledComponents) }}
-{{- if and ($x.optional) (has $x.name $enabledComponents) }}
+{{- if or (not $x.optional) (has $x.name $enabledComponents) }}
 ---
 apiVersion: helm.toolkit.fluxcd.io/v2
 kind: HelmRelease
 ...
 {{- end }}
 {{- end }}
 {{- end }}

This change ensures that non-optional components are always included, while optional components are only included if they're in the $enabledComponents list.

To ensure this change doesn't unintentionally exclude any components, let's verify the usage:

packages/core/platform/bundles/distro-hosted.yaml (3)

101-101: LGTM: Making external-dns optional enhances deployment flexibility.

Adding optional: true to the external-dns release is a positive change. It allows for more flexible deployments, particularly in scenarios where external DNS management might not be required. This change is unlikely to cause issues as the component has no dependencies.


94-108: Overall change looks good, but verify system-wide impact.

The changes to make traffic-manager, external-dns, and external-secrets-operator optional provide greater flexibility in deployment configurations. This is generally a positive change that allows users to tailor the system to their specific needs.

However, it's important to ensure that these changes don't introduce unexpected issues in the broader system context.

Please consider the following:

  1. Update documentation to reflect these new optional components and their implications.
  2. Verify that the deployment process and any related scripts or tools can handle these optional components correctly.
  3. Ensure that there are no implicit dependencies on these components in other parts of the system.
  4. Consider adding a note in the PR description explaining the rationale behind making these specific components optional.

You can use the following script to help verify some of these points:

This script will help identify potential areas that might need updates or further investigation due to these components becoming optional.


108-108: LGTM with a caveat: Verify implications of optional external-secrets-operator.

Adding optional: true to the external-secrets-operator release provides deployment flexibility, which is good. However, as this component deals with secrets management, it's crucial to ensure that making it optional doesn't inadvertently impact the security of the system.

Please verify that:

  1. There are no components that implicitly depend on external-secrets-operator.
  2. There's a fallback mechanism or clear documentation for secret management when this component is not deployed.
  3. The implications of not using external-secrets-operator are well understood and communicated to users.

You can use the following script to check for potential implicit dependencies:

packages/core/platform/bundles/paas-hosted.yaml (4)

100-100: LGTM: Telepresence made optional

The addition of optional: true to the telepresence release enhances deployment flexibility. This change aligns well with the PR objective of introducing optional components.


107-107: LGTM: External-dns made optional

The addition of optional: true to the external-dns release enhances deployment flexibility, aligning with the PR objective.


114-114: LGTM: External-secrets-operator made optional

The addition of optional: true to the external-secrets-operator release enhances deployment flexibility. This change is consistent with the PR objective of introducing optional components.


108-108: Verify new dependencies for external-dns

The dependsOn field for external-dns has been updated to include both cilium and kubeovn. Please ensure that this change is intentional and that these dependencies are indeed required for external-dns to function correctly in your setup.

To verify the dependencies, you can run the following script:

This script will help confirm that cilium and kubeovn are properly defined and referenced in your bundle configurations.

🧰 Tools
🪛 yamllint

[warning] 108-108: too few spaces after comma

(commas)

packages/core/platform/bundles/distro-full.yaml (2)

143-143: LGTM: Telepresence made optional

The addition of optional: true to the telepresence release is appropriate. Telepresence is primarily used for development and debugging purposes, so making it optional allows for more flexibility in different deployment scenarios. This change aligns well with the PR objective of introducing optional components.


143-157: Summary of changes and request for additional context

The changes to make telepresence, external-dns, and external-secrets-operator optional are well-implemented and consistent. These modifications align with the PR objective of introducing optional components, providing more flexibility in deployment configurations.

To ensure a comprehensive understanding of these changes:

  1. Could you provide more context on why these specific components were chosen to be optional?
  2. Are there any plans to make other components optional in the future?
  3. How will the deployment process handle these optional components? Will there be a mechanism to enable/disable them easily?

This information would be valuable for reviewers and future maintainers to understand the rationale behind these changes and their potential impact on the system.

To verify the consistency of these changes, please run the following script:

✅ Verification successful

Verification Successful: Optional Components

All three components (telepresence, external-dns, and external-secrets-operator) are correctly marked as optional in packages/core/platform/bundles/distro-full.yaml. This matches the expectations set by the PR titled "Introduce optional components."

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that only the intended components are marked as optional

# Test: Check for 'optional: true' in the file
echo "Components marked as optional:"
grep -n "optional: true" packages/core/platform/bundles/distro-full.yaml

# Test: Ensure no other components are marked as optional
echo "Total count of 'optional: true':"
grep -c "optional: true" packages/core/platform/bundles/distro-full.yaml

# Expected output should show 3 components and a total count of 3

Length of output: 366

packages/core/platform/bundles/paas-full.yaml (4)

218-232: Overall review of optional components introduction

The changes in this PR align with the title "Introduce optional components" by making capi-providers, external-dns, and external-secrets-operator optional. While this approach can provide more flexibility in deployments, it also raises some concerns:

  1. System Stability: Ensure that the system remains stable and functional when these components are not deployed.
  2. Dependency Management: Verify that any components depending on these newly optional services can handle their absence gracefully.
  3. Documentation: Update relevant documentation to reflect these changes and provide guidance on when and why to enable/disable these components.
  4. Configuration: Consider introducing configuration options to easily enable/disable these optional components during deployment.

To better understand the implications of these changes, could you provide more context on:

  1. The overall goal of introducing these optional components?
  2. Any planned changes to deployment processes or scripts?
  3. How these changes affect the system's architecture and functionality?

This information will help in assessing the full impact of the changes and ensure they align with the project's objectives.


225-225: Verify implications of making external-dns optional

The external-dns release has been marked as optional. This change may impact how DNS is managed for services in the cluster. Please ensure that:

  1. The system can operate correctly without external-dns.
  2. Any components that rely on automatic DNS management have fallback mechanisms or can handle the absence of external-dns.
  3. Documentation is updated to reflect this change and provide guidance on when to enable/disable this component.

Could you elaborate on the reasoning behind making external-dns optional and how DNS management will be handled when this component is not deployed?

#!/bin/bash
# Check for any direct dependencies on external-dns
echo "Checking for direct dependencies on external-dns:"
grep -R "dependsOn:.*external-dns" .

# Check for any references to external-dns in other files
echo "Checking for references to external-dns in other files:"
grep -R "external-dns" . --exclude="paas-full.yaml"

232-232: Verify implications of making external-secrets-operator optional

The external-secrets-operator release has been marked as optional. This change may impact how secrets are managed and synchronized from external sources. Please ensure that:

  1. The system can function securely without the external-secrets-operator.
  2. Any components that rely on external secrets have alternative methods for secret management or can handle the absence of this operator.
  3. Documentation is updated to reflect this change and provide guidance on when to enable/disable this component.

Could you provide more information on why the external-secrets-operator is now optional and how secret management will be handled in its absence?

#!/bin/bash
# Check for any direct dependencies on external-secrets-operator
echo "Checking for direct dependencies on external-secrets-operator:"
grep -R "dependsOn:.*external-secrets-operator" .

# Check for any references to external-secrets-operator in other files
echo "Checking for references to external-secrets-operator in other files:"
grep -R "external-secrets-operator" . --exclude="paas-full.yaml"

218-218: Verify implications of making capi-providers optional

The capi-providers release has been marked as optional. While this change allows for more flexibility in deployment, it's important to ensure that:

  1. The system can function correctly without this component.
  2. Any components that depend on capi-providers can handle its absence gracefully.
  3. Documentation and deployment scripts are updated to reflect this change.

Could you provide more context on why this component is now optional and how it affects the overall system architecture?

✅ Verification successful

Verified: Making capi-providers Optional Does Not Introduce Dependency Issues

  • No direct dependencies on capi-providers were found in other parts of the codebase.
  • Internal references within capi-providers configurations are appropriate and do not affect external components.
  • The system can operate correctly without capi-providers being mandatory.
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for any direct dependencies on capi-providers
echo "Checking for direct dependencies on capi-providers:"
grep -R "dependsOn:.*capi-providers" .

# Check for any references to capi-providers in other files
echo "Checking for references to capi-providers in other files:"
grep -R "capi-providers" . --exclude="paas-full.yaml"

Length of output: 1704


Script:

#!/bin/bash
# Check for any direct dependencies on capi-providers
echo "Checking for direct dependencies on capi-providers:"
grep -R "dependsOn:.*capi-providers" .

# Check for any references to capi-providers in other files
echo "Checking for references to capi-providers in other files:"
grep -R "capi-providers" . --exclude="paas-full.yaml"

Length of output: 509

@mrkhachaturov Mr. Khachaturov (mrkhachaturov) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

To disable specific components within a bundle, utilize the bundle-disable option by supplying a comma-separated list of the components you wish to deactivate.

It seems that for optional components, a repetitive approach is used, where some components are disabled by default and need to be enabled. Perhaps we could consider a more streamlined method for managing this activation process.

To maintain clarity within our bundles, we might consider creating additional bundles that function as add-ons. This approach would allow us to incorporate specific components through a configuration map, enabling users to seamlessly define and integrate extra add-ons into their existing bundles.

Let me know what you think about creating a new bundle (add-on) where we can place components that can be optionally added to the main bundles via a ConfigMap.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

In general, some kind of overengineering feature, it is not very clear what it is for, if you can simply disable this or that module within the bundle.

Comment thread packages/core/platform/bundles/paas-full.yaml Outdated
@kvaps

Copy link
Copy Markdown
Member Author

In general, some kind of overengineering feature, it is not very clear what it is for, if you can simply disable this or that module within the bundle.

This feature is intended only for optional components, now telepresence, external-dns, external-secrets-operator charts will not be enabled by default.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Now looks good.

@kvaps
Andrei Kvapil (kvaps) merged commit 65bdb7b into main Oct 8, 2024
@kvaps
Andrei Kvapil (kvaps) deleted the optional-components branch October 8, 2024 08:56
chumkaska pushed a commit to chumkaska/cozystack that referenced this pull request Oct 15, 2024
This PR introduces an extra option to cozystack configmap. It allows to
enable components that are optional to specific bundle name, example
usage:

```yaml
bundle-enable: telepresence,external-dns,external-secrets-operator
```

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Added optional attributes to several release entries, allowing for
more flexible deployment configurations.
- Enhanced Helm release generation logic to consider both enabled and
disabled states for components.
- Improved namespace management by incorporating checks for optional
components based on enablement and disablement.

- **Bug Fixes**
- Updated dependencies for `external-dns` to include `cilium` and
`kubeovn`.

- **Documentation**
- Clarified the configurability of deployment components with the
introduction of optional attributes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
@coderabbitai coderabbitai Bot mentioned this pull request Oct 21, 2024
@coderabbitai coderabbitai Bot mentioned this pull request Feb 5, 2025
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.

3 participants