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

[BOP-111] add support for enabled field #85

Merged
merged 4 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions config/crd/bases/blueprint.mirantis.com_addons.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ spec:
TagSuffix is the value used to suffix the original tag
If Digest and NewTag is present an error is thrown
type: string
required:
- name
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems like someone forgot to checkin these changes when this variable was introduced. So, checking it in as part of this PR.

type: object
type: array
patches:
Expand Down
2 changes: 2 additions & 0 deletions config/crd/bases/blueprint.mirantis.com_blueprints.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ spec:
TagSuffix is the value used to suffix the original tag
If Digest and NewTag is present an error is thrown
type: string
required:
- name
type: object
type: array
patches:
Expand Down
2 changes: 2 additions & 0 deletions config/crd/bases/blueprint.mirantis.com_manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ spec:
TagSuffix is the value used to suffix the original tag
If Digest and NewTag is present an error is thrown
type: string
required:
- name
type: object
type: array
patches:
Expand Down
5 changes: 5 additions & 0 deletions controllers/blueprint_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ func (r *BlueprintReconciler) reconcileAddons(ctx context.Context, logger logr.L
addonSpec.Namespace = instance.Namespace
}

if !addonSpec.Enabled {
// No create/update the addon if it is not enabled
continue
}

logger.Info("Reconciling addonSpec", "Name", addonSpec.Name, "Spec.Namespace", addonSpec.Namespace)
addon := addonResource(&addonSpec)
err = r.createOrUpdateAddon(ctx, logger, addon)
Expand Down
Loading