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

VALUES in enabled script not the current values #535

Open
wuxiaocheng0506 opened this issue Dec 6, 2024 · 1 comment
Open

VALUES in enabled script not the current values #535

wuxiaocheng0506 opened this issue Dec 6, 2024 · 1 comment
Assignees

Comments

@wuxiaocheng0506
Copy link

when I get the values of $CONFIG_VALUES_PATH and $VALUES_PATH in enabled script, it's not the current values but the previous values of ConfigMap/addon-operator.

such as:

# enabled script

cat $CONFIG_VALUES_PATH
cat $VALUES_PATH

Environment:

  • Addon-operator version: v1.5.3
  • Helm version: v3.10.3
  • Kubernetes version: v1.24.17
  • Installation type (kubectl apply, helm chart, etc.):
@miklezzzz miklezzzz self-assigned this Jan 24, 2025
@miklezzzz
Copy link
Contributor

Couldn't reproduce the issue

relevant logs

{"level":"info","logger":"addon-operator.module-manager.file-system-loader.basic-module","msg":"{\"global\":{\"param12\":\"value12\",\"test\":\"test\"},\"sysctlTuner\":{\"env\":\"testing2\",\"param11\":\"value11\"}}","source":"o/pkg/mod/github.com/flant/[email protected]/pkg/executor/executor.go:171","binding":"ConvergeModules","event.type":"OperatorStartup","extender":"ScriptEnabled","module":"sysctl-tuner","operator.component":"ModuleManager.RefreshEnabledState","output":"stdout","queue":"main","task.id":"37f4d861-8c6a-4024-ad4c-ccc8cf9212c0","time":"2025-01-27T07:58:28Z"}
{"level":"info","logger":"addon-operator.module-manager.file-system-loader.basic-module","msg":"{\"global\":{\"enabledModules\":[],\"param12\":\"value12\",\"test\":\"test\"},\"sysctlTuner\":{\"env\":\"testing2\",\"param11\":\"value11\"}}","source":"o/pkg/mod/github.com/flant/[email protected]/pkg/executor/executor.go:171","binding":"ConvergeModules","event.type":"OperatorStartup","extender":"ScriptEnabled","module":"sysctl-tuner","operator.component":"ModuleManager.RefreshEnabledState","output":"stdout","queue":"main","task.id":"37f4d861-8c6a-4024-ad4c-ccc8cf9212c0","time":"2025-01-27T07:58:28Z"}

...
{"level":"info","logger":"addon-operator.module-manager.file-system-loader.basic-module","msg":"{\"global\":{\"param12\":\"value12\",\"test\":\"test\"},\"sysctlHuyuner\":{\"param123\":\"value11\"}}","source":"o/pkg/mod/github.com/flant/[email protected]/pkg/executor/executor.go:171","binding":"ConvergeModules","event.type":"OperatorStartup","extender":"ScriptEnabled","module":"sysctl-huyuner","operator.component":"ModuleManager.RefreshEnabledState","output":"stdout","queue":"main","task.id":"37f4d861-8c6a-4024-ad4c-ccc8cf9212c0","time":"2025-01-27T07:58:28Z"}
{"level":"info","logger":"addon-operator.module-manager.file-system-loader.basic-module","msg":"{\"global\":{\"enabledModules\":[\"sysctl-tuner\"],\"param12\":\"value12\",\"test\":\"test\"},\"sysctlHuyuner\":{\"param123\":\"value11\"}}","source":"o/pkg/mod/github.com/flant/[email protected]/pkg/executor/executor.go:171","binding":"ConvergeModules","event.type":"OperatorStartup","extender":"ScriptEnabled","module":"sysctl-huyuner","operator.component":"ModuleManager.RefreshEnabledState","output":"stdout","queue":"main","task.id":"37f4d861-8c6a-4024-ad4c-ccc8cf9212c0","time":"2025-01-27T07:58:28Z"}
{"level":"info","logger":"addon-operator.module-manager.file-system-loader.basic-module","msg":"Enabled script run successful, result 'true', module 'Enabled'","source":"pp/pkg/module_manager/models/modules/basic.go:505","binding":"ConvergeModules","event.type":"OperatorStartup","extender":"ScriptEnabled","module":"sysctl-huyuner","operator.component":"ModuleManager.RefreshEnabledState","queue":"main","task.id":"37f4d861-8c6a-4024-ad4c-ccc8cf9212c0","time":"2025-01-27T07:58:28Z"}

the values seems to be consistent with the configmap

apiVersion: v1
data:
  global: |
    param12: value12
    test: test
  sysctlHuyuner: |
    env: staging
    param123: value11
  sysctlHuyunerEnabled: "true"
  sysctlTuner: |
    env: testing2
    param11: value11
  sysctlTunerEnabled: "true"
  testModule: |
    val: val1
kind: ConfigMap
metadata:
  name: addon-operator
  namespace: default

need more information for further investigations

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

No branches or pull requests

2 participants