helm 安装说字段丢失但是它们在 CRD 中可见

问题描述 投票:0回答:0

我正在尝试通过以下命令为

helm
进行
velero
安装:

helm install velero . --namespace velero  -f values.yaml --set-file 'credentials.secretContents.cloud=/var/credentials'

但是,它给我以下错误:

client.go:477: [debug] Starting delete for "default" BackupStorageLocation
client.go:481: [debug] Ignoring delete failure for "default" velero.io/v1, Kind=BackupStorageLocation: backupstoragelocations.velero.io "default" not found
Error: INSTALLATION FAILED: failed post-install: unable to build kubernetes object for post-install hook velero/charts/velero/templates/backupstoragelocation.yaml: error validating "": error validating data: [ValidationError(BackupStorageLocation.spec.objectStorage): missing required field "bucket" in io.velero.v1.BackupStorageLocation.spec.objectStorage, ValidationError(BackupStorageLocation.spec): missing required field "provider" in io.velero.v1.BackupStorageLocation.spec]
helm.go:84: [debug] failed post-install: unable to build kubernetes object for post-install hook velero/charts/velero/templates/backupstoragelocation.yaml: error validating "": error validating data: [ValidationError(BackupStorageLocation.spec.objectStorage): missing required field "bucket" in io.velero.v1.BackupStorageLocation.spec.objectStorage, ValidationError(BackupStorageLocation.spec): missing required field "provider" in io.velero.v1.BackupStorageLocation.spec]

values.yaml
中正确定义了BSL的配置:

configuration:
    provider: aws
    backupStorageLocation:
        name: bsl_a
        provider: aws
        bucket: s3_bucket_a
        default: true
        accessMode: ReadWrite

config:
    region: eu-east-2

此外,如果我查看安装失败期间生成的 CRD,这些值也在那里:

kc get backupstoragelocations.velero.io -n velero -o yaml

apiVersion: v1
items:
- apiVersion: velero.io/v1
  kind: BackupStorageLocation
  metadata:
    annotations:
      helm.sh/hook: post-install,post-upgrade,post-rollback
      helm.sh/hook-delete-policy: before-hook-creation
    creationTimestamp: "2023-04-17T12:05:50Z"
    generation: 1
    labels:
      app.kubernetes.io/instance: velero
      app.kubernetes.io/managed-by: Helm
      app.kubernetes.io/name: velero
      helm.sh/chart: velero-1.10.2
    name: bsl_a
    namespace: velero
    resourceVersion: "14124214"
    uid: 57810f14-3434-4c15-8b25-a53253235
  spec:
    accessMode: ReadWrite
    config:
      region: eu-east-2
    default: true
    objectStorage:
      bucket: s3_bucket_a
    provider: aws
kind: List
metadata:
  resourceVersion: ""

目录结构:

tree
├── Chart.lock
├── Chart.yaml
├── charts
│   └── velero-3.1.6.tgz
├── templates
├── values
└── values.yaml
kubernetes-helm velero
© www.soinside.com 2019 - 2024. All rights reserved.