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

helm升级到2.5.1 报错 #274

Open
wadeLouis opened this issue Nov 25, 2024 · 3 comments
Open

helm升级到2.5.1 报错 #274

wadeLouis opened this issue Nov 25, 2024 · 3 comments

Comments

@wadeLouis
Copy link

wadeLouis commented Nov 25, 2024

命令:

helm upgrade notification-manager   --set kubesphere.enabled=true --set notificationmanager.sidecar.tenant.resources.limits.cpu=500m --set notificationmanager.sidecar.tenant.resources.limits.memory=500Mi --set notificationmanager.sidecar.tenant.resources.requests.cpu=500m --set notificationmanager.sidecar.tenant.resources.requests.memory=500Mi --set operator.containers.proxy.image.repo=harbor-k8s.net/kubesphere/kube-rbac-proxy --set operator.containers.operator.image.repo=harbor-k8s.net/kubesphere/notification-manager-operator  --set notificationmanager.image.repo=harbor-k8s.net/kubesphere/notification-manager --set notificationmanager.sidecar.image.repo=harbor-k8s.net/kubesphere/notification-tenant-sidecar   -n kubesphere-monitoring-system  ./notification-manager.tgz

错误:

Error: UPGRADE FAILED: cannot patch "notification-manager" with kind NotificationManager: NotificationManager.notification.kubesphere.io "notification-manager" is invalid: [spec.sidecars.tenant.name: Required value, spec.sidecars.tenant.type: Required value]
@wanjunlei
Copy link
Collaborator

sidecar => sidecars

@wadeLouis
Copy link
Author

还是没明白,values 里面定义的就是sidecar,notificationmanager.yaml引用的也是sidecar,报错的信息是spec.sidecars.tenant.name需要这个值。notificationmanager.yaml中这一段已经定义了

  {{- if .Values.kubesphere.enabled }}
  sidecars:
    tenant:
  {{- if .Values.kubesphere.image }}
      image: {{ include "global.imageRegistry" . }}{{ .Values.kubesphere.image }}
  {{- else }}
      image: {{ include "global.imageRegistry" . }}{{ .Values.notificationmanager.sidecar.image.repo }}:{{ .Values.kubesphere.version }}
  {{- end }}
      name: tenant
      type: kubesphere
      resources:
        limits:
          cpu: {{ .Values.notificationmanager.sidecar.tenant.resources.limits.cpu }}
          memory: {{ .Values.notificationmanager.sidecar.tenant.resources.limits.memory }}
        requests:
          cpu: {{  .Values.notificationmanager.sidecar.tenant.resources.requests.cpu }}
          memory: {{  .Values.notificationmanager.sidecar.tenant.resources.requests.memory }}
  {{- end }}

helm dry-run 的结果部分内容:

  sidecars:
    tenant:
      image: harbor-k8s.net/kubesphere/notification-tenant-sidecar:v3.2.0
      name: tenant
      type: kubesphere
      resources:
        limits:
          cpu: 500m
          memory: 500Mi
        requests:
          cpu: 500m
          memory: 500Mi

@wadeLouis
Copy link
Author

我的升级步骤是:

  1. apply bundle.yaml 文件
  2. 执行上述helm升级。
    现在我已经通过卸载notification-manager和删除相关crd,直接使用helm 安装成功。关于升级的问题,还是希望得到解答。

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