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

CNF-15718: Add Configuration Support for the SiteConfig Operator #132

Conversation

sakhoury
Copy link

Summary

This PR introduces functionality to manage the SiteConfig Operator's configuration via a ConfigMap.

A new controller, ConfigurationMonitor, has been implemented to monitor and maintain the configuration. Key features include:

  • Automatic creation of the ConfigMap with default values during manager pod initialization if it doesn't exist.
  • Re-creation of the ConfigMap with default values if it is deleted.

The following configuration fields are supported:

  • AllowReinstalls: Enables or disables the reinstall functionality.
  • MaxConcurrentReconciles: Sets the maximum number of ClusterInstances that can be processed concurrently.

Unit tests have been added to validate the behavior of the new components.

Resolves: CNF-15718

@sakhoury sakhoury requested a review from carbonin November 29, 2024 20:20
@openshift-ci openshift-ci bot requested a review from imiller0 November 29, 2024 20:21
@sakhoury sakhoury force-pushed the acm-15718-configure-siteconfig-operator branch from ed3eea5 to d5faf6a Compare November 29, 2024 21:25
@sakhoury
Copy link
Author

/override ci/prow/sonar-pre-submit

Copy link

openshift-ci bot commented Nov 29, 2024

@sakhoury: Overrode contexts on behalf of sakhoury: ci/prow/sonar-pre-submit

In response to this:

/override ci/prow/sonar-pre-submit

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-sigs/prow repository.

@sakhoury
Copy link
Author

/override "SonarCloud Code Analysis"

Copy link

openshift-ci bot commented Nov 29, 2024

@sakhoury: Overrode contexts on behalf of sakhoury: SonarCloud Code Analysis

In response to this:

/override "SonarCloud Code Analysis"

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-sigs/prow repository.

@sakhoury sakhoury force-pushed the acm-15718-configure-siteconfig-operator branch from d5faf6a to a3f9804 Compare December 2, 2024 18:12
@sakhoury
Copy link
Author

sakhoury commented Dec 2, 2024

/override ci/prow/sonar-pre-submit

Copy link

openshift-ci bot commented Dec 2, 2024

@sakhoury: Overrode contexts on behalf of sakhoury: ci/prow/sonar-pre-submit

In response to this:

/override ci/prow/sonar-pre-submit

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-sigs/prow repository.

@sakhoury
Copy link
Author

sakhoury commented Dec 2, 2024

/override "SonarCloud Code Analysis"

Copy link

openshift-ci bot commented Dec 2, 2024

@sakhoury: Overrode contexts on behalf of sakhoury: SonarCloud Code Analysis

In response to this:

/override "SonarCloud Code Analysis"

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-sigs/prow repository.

cmd/main.go Outdated Show resolved Hide resolved
@sakhoury sakhoury force-pushed the acm-15718-configure-siteconfig-operator branch 2 times, most recently from 7e96213 to 331dcd1 Compare December 9, 2024 17:06
@sakhoury
Copy link
Author

sakhoury commented Dec 9, 2024

/override ci/prow/sonar-pre-submit

Copy link

openshift-ci bot commented Dec 9, 2024

@sakhoury: Overrode contexts on behalf of sakhoury: ci/prow/sonar-pre-submit

In response to this:

/override ci/prow/sonar-pre-submit

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-sigs/prow repository.

@sakhoury
Copy link
Author

sakhoury commented Dec 9, 2024

/override "SonarCloud Code Analysis"

Copy link

openshift-ci bot commented Dec 9, 2024

@sakhoury: Overrode contexts on behalf of sakhoury: SonarCloud Code Analysis

In response to this:

/override "SonarCloud Code Analysis"

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-sigs/prow repository.

@sakhoury
Copy link
Author

sakhoury commented Dec 9, 2024

/ok-to-test

@sakhoury
Copy link
Author

sakhoury commented Dec 9, 2024

/override ci/prow/sonar-pre-submit

Copy link

openshift-ci bot commented Dec 9, 2024

@sakhoury: Overrode contexts on behalf of sakhoury: ci/prow/sonar-pre-submit

In response to this:

/override ci/prow/sonar-pre-submit

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-sigs/prow repository.

Copy link

@carbonin carbonin left a comment

Choose a reason for hiding this comment

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

Just some minor comments, otherwise looks good

cmd/main.go Outdated Show resolved Hide resolved
internal/controller/configuration/utils.go Outdated Show resolved Hide resolved
internal/controller/configuration_monitor.go Show resolved Hide resolved
This commit introduces functionality to manage the SiteConfig Operator's configuration via a ConfigMap.

A new controller, `ConfigurationMonitor`, has been implemented to monitor and maintain the configuration. Key features include:
- Automatic creation of the ConfigMap with default values during manager pod initialization if it doesn't exist.
- Re-creation of the ConfigMap with default values if it is deleted.

The following configuration fields are supported:
- `AllowReinstalls`: Enables or disables the reinstall functionality.
- `MaxConcurrentReconciles`: Sets the maximum number of `ClusterInstances` that can be processed concurrently.

Unit tests have been added to validate the behavior of the new components.

Signed-off-by: Sharat Akhoury <[email protected]>
@sakhoury sakhoury force-pushed the acm-15718-configure-siteconfig-operator branch from 331dcd1 to 2bd27b0 Compare December 9, 2024 21:50
@sakhoury
Copy link
Author

sakhoury commented Dec 9, 2024

/override ci/prow/sonar-pre-submit

Copy link

openshift-ci bot commented Dec 9, 2024

@sakhoury: Overrode contexts on behalf of sakhoury: ci/prow/sonar-pre-submit

In response to this:

/override ci/prow/sonar-pre-submit

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-sigs/prow repository.

Copy link

sonarqubecloud bot commented Dec 9, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 70%)

See analysis details on SonarQube Cloud

@sakhoury
Copy link
Author

sakhoury commented Dec 9, 2024

/override ci/prow/sonar-pre-submit
/override "SonarCloud Code Analysis"

Copy link

openshift-ci bot commented Dec 9, 2024

@sakhoury: Overrode contexts on behalf of sakhoury: SonarCloud Code Analysis, ci/prow/sonar-pre-submit

In response to this:

/override ci/prow/sonar-pre-submit
/override "SonarCloud Code Analysis"

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-sigs/prow repository.

Copy link

openshift-ci bot commented Dec 10, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: carbonin, sakhoury

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 3b1dbc9 into stolostron:main Dec 10, 2024
15 of 16 checks passed
@sakhoury sakhoury deleted the acm-15718-configure-siteconfig-operator branch December 10, 2024 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants