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

fix: 容器化版本 Job 更改 values.yml 中的特性开关配置不生效 #2173

Closed
wangyu096 opened this issue Jun 29, 2023 · 0 comments
Closed
Assignees
Labels
done 已上线到正式环境并验收通过 kind/bug 程序故障Bug,漏洞

Comments

@wangyu096
Copy link
Collaborator

Version / Branch / tag

3.7.x

出了什么问题?(What Happened?)
values.yml 原始配置:

job:
  features:
    gseV2:
      enabled: true

修改配置,增加 gseFileProtocolBeforeV2 的特性

job:
  features:
    gseV2:
      enabled: true
    gseFileProtocolBeforeV2:
      enabled: true

执行 helm upgrade 之后,发现 values 对应的 ConfigMap 并没有生效。找到对应的 ConfigMap 的定义,代码如下:

apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "common.names.fullname" . }}-common-refreshable
  namespace: {{ .Release.Namespace }}
  labels:
    spring.cloud.kubernetes.config: "true"
    {{- include "common.labels.standard" . | nindent 4 }}
    app.kubernetes.io/component: "job-common-refreshable"
    {{- if .Values.commonLabels }}
    {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
    {{- end }}
  annotations:
    spring.cloud.kubernetes.configmap.apps: "job-analysis,job-backup,job-crontab,job-execute,job-file-gateway,job-gateway,job-logsvr,job-manage"
data:
  application.yaml: |-
    job:
      features:
        fileManage:
          enabled: {{ .Values.job.features.fileManage.enabled }}
        bkBizIdCompatible:
          enabled: {{ .Values.job.features.bkBizIdCompatible.enabled }}
        gseV2:
          enabled: {{ .Values.job.features.gseV2.enabled }}
          {{- if .Values.job.features.gseV2.strategy }}
          strategy:
            id: {{ .Values.job.features.gseV2.strategy.id }}
            {{- if .Values.job.features.gseV2.strategy.params }}
            params: {{- include "common.tplvalues.render" ( dict "value" .Values.job.features.gseV2.strategy.params "context" $ ) | nindent 14 }}
            {{- end }}
          {{- end }}

里边特性开关配置这里是写死的,没有 gseFileProtocolBeforeV2 这个特性,所以通过 helm upgrade 生成的 ConfigMap 并不会改变

如何复现?(How to reproduce?)

必现

预期结果(What you expect?)

执行 helm upgrade 之后,发现 values 对应的 ConfigMap 生效

@wangyu096 wangyu096 added kind/bug 程序故障Bug,漏洞 backlog 需求初始状态,等待产品进行评估 labels Jun 29, 2023
@wangyu096 wangyu096 self-assigned this Jun 29, 2023
wangyu096 added a commit that referenced this issue Jun 29, 2023
fix: 容器化版本 Job 更改 values.yml 中的特性开关配置不生效 #2173
@wangyu096 wangyu096 added the todo 进入开发排期的状态,纳入了最近的迭代 label Jun 29, 2023
@bkjob-bot bkjob-bot added for test 可以在测试环境进行验收 done 已上线到正式环境并验收通过 and removed backlog 需求初始状态,等待产品进行评估 todo 进入开发排期的状态,纳入了最近的迭代 for test 可以在测试环境进行验收 labels Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
done 已上线到正式环境并验收通过 kind/bug 程序故障Bug,漏洞
Projects
None yet
Development

No branches or pull requests

2 participants