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

ROX-24494: ACSCS Addon overrides in Gitops lingers after removing from Gitops #2186

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kovayur
Copy link
Contributor

@kovayur kovayur commented Feb 7, 2025

Description

There is only a PATCH endpoint for updating addons in OCM.
So when a parameter is removed from the gitops config, it is not removed from the addon installation or switched to default value as expected, but remains there unmodified. As a result, there will always be a mismatch between the addon installed on the cluster and the expected state of the addon represented in the gitops config.

The proposed solution is to get all the default parameters for the given addon version and enrich the expected addon parameters by the default values.

This will only help if the engineer wants to switch from the value defined in gitops to the default value defined in OCM. When they need to remove a parameter from OCM, it always requires a new version to be released in OCM..
So the full procedure of removing the parameter, will look like the following:

  1. Stop using a parameter in the addon.
  2. Delete it from the gitops config.
  3. Create a new addon version in OCM with a schema without this parameter.

Checklist (Definition of Done)

  • Unit and integration tests added
  • Added test description under Test manual
  • Documentation added if necessary (i.e. changes to dev setup, test execution, ...)
  • CI and all relevant tests are passing
  • Add the ticket number to the PR title if available, i.e. ROX-12345: ...
  • Discussed security and business related topics privately. Will move any security and business related topics that arise to private communication channel.
  • Add secret to app-interface Vault or Secrets Manager if necessary
  • RDS changes were e2e tested manually
  • Check AWS limits are reasonable for changes provisioning new resources
  • (If applicable) Changes to the dp-terraform Helm values have been reflected in the addon on integration environment

Test manual

Unit tests

@@ -168,6 +165,39 @@ func (p *AddonProvisioner) provisionAddon(dataplaneClusterConfig gitops.DataPlan
return
}

func (p *AddonProvisioner) augmentGitopsWithOCMDefaultValues(expectedConfig *gitops.AddonConfig) error {
if expectedConfig.Version == "" {
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is this condition about?

Copy link
Contributor Author

@kovayur kovayur Feb 7, 2025

Choose a reason for hiding this comment

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

You can specify the addon version in the gitops config. If you do not do this, the latest version will be installed.

@kovayur kovayur requested a review from ludydoo February 7, 2025 15:37
Copy link
Contributor

openshift-ci bot commented Feb 7, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kovayur, kurlov, ludydoo

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:
  • OWNERS [kovayur,kurlov,ludydoo]

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

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.

3 participants