Skip to content

[addon-operator] Fix module re-enable using old values after disable#653

Merged
ldmonster merged 6 commits intomainfrom
feature/clear-values
Aug 21, 2025
Merged

[addon-operator] Fix module re-enable using old values after disable#653
ldmonster merged 6 commits intomainfrom
feature/clear-values

Conversation

@riptide-01
Copy link
Member

@riptide-01 riptide-01 commented Aug 18, 2025

Overview

This PR fixes a bug where a module, when re-enabled after being disabled, incorrectly reused old values that were set before the disable operation.

Before:

alias dc="kubectl -n d8-system exec -it deployment/deckhouse -c deckhouse -- deckhouse-controller"

dc module enable test
dc module values test
internal:
  apiServers:
    - kube-apiserver-smyslov-master-0
  test: 2025-08-18 11:45:38.180898758 +0000 UTC m=+0.322006676
replicas: 1

dc module disable test
dc module values test
internal:
  apiServers:
    - kube-apiserver-smyslov-master-0
  test: 2025-08-18 11:45:38.180898758 +0000 UTC m=+0.322006676
replicas: 1

After:

alias dc="kubectl -n d8-system exec -it deployment/deckhouse -c deckhouse -- deckhouse-controller"

dc module enable test
dc module values test
internal:
  apiServers:
    - kube-apiserver-smyslov-master-0
  test: 2025-08-18 11:45:38.180898758 +0000 UTC m=+0.322006676
replicas: 1

dc module disable test
dc module values test
internal:
  apiServers: []
  test: ""
replicas: 1

What this PR does / why we need it

Without this fix, re-enabling a module could lead to unexpected behavior because it would restore outdated configuration values instead of starting with a clean state.

Special notes for your reviewer

  • Changes were tested in the Kubernetes cluster manually.

Signed-off-by: Smyslov Maxim <maksim.smyslov@flant.com>
@riptide-01 riptide-01 requested a review from ldmonster August 18, 2025 10:35
@riptide-01 riptide-01 self-assigned this Aug 18, 2025
@riptide-01 riptide-01 added the enhancement New feature or request label Aug 18, 2025
riptide-01 and others added 2 commits August 18, 2025 13:35
Signed-off-by: Smyslov Maxim <maksim.smyslov@flant.com>
@riptide-01 riptide-01 changed the title test [deckhouse-controller] Fix module re-enable using stale values after disable Aug 18, 2025
@riptide-01 riptide-01 changed the title [deckhouse-controller] Fix module re-enable using stale values after disable [deckhouse-controller] Fix module re-enable using old values after disable Aug 18, 2025
riptide-01 and others added 2 commits August 19, 2025 12:42
Signed-off-by: Smyslov Maxim <maksim.smyslov@flant.com>
@ldmonster ldmonster changed the title [deckhouse-controller] Fix module re-enable using old values after disable [addon-operator] Fix module re-enable using old values after disable Aug 21, 2025
Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
@ldmonster ldmonster merged commit b769929 into main Aug 21, 2025
8 of 9 checks passed
@ldmonster ldmonster deleted the feature/clear-values branch August 21, 2025 14:39
@ldmonster ldmonster modified the milestone: 1.0.5 Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants