kubernetes 错误:使用config配置内置PatchTransformer时出错

jchrr9hc  于 2023-05-28  发布在  Kubernetes
关注(0)|答案(1)|浏览(181)

我遇到了这个问题。我有metadata.name但我没有更多的想法如何解决这个问题。这个kustomize曾经工作,但最近它只是拒绝工作。你能给我点建议吗

Client Version: v1.25.2
Kustomize Version: v4.5.7

这就是命令行上显示的错误

Error: trouble configuring builtin PatchTransformer with config: `
patch: |-
  apiVersion: apps/v1
  kind: Deployment
  metadata:
    name: core-keycloak
  spec:
    template:
      spec:
        containers:
          - name: core-keycloak
            resources:
              requests:
                cpu: '4'
                memory: '4Gi'
            startupProbe:
              initialDelaySeconds: 10
              timeoutSeconds: 30
              failureThreshold: 2
              exec:
                command:
                  - 'sh'
                  - '-cx'
                  - 'postStart.sh >> /proc/1/fd/1 2>&1'
            volumeMounts:
              - mountPath: /etc/x509/https
                name: tls-mount
            lifecycle:
              : delete
        volumes:
          - name: tls-mount
            secret:
              secretName: internal-cert
`: unable to parse SM or JSON patch from [apiVersion: apps/v1
kind: Deployment
metadata:
  name: core-keycloak
spec:
  template:
    spec:
      containers:
        - name: core-keycloak
          resources:
            requests:
              cpu: '4'
              memory: '4Gi'
          startupProbe:
            initialDelaySeconds: 10
            timeoutSeconds: 30
            failureThreshold: 2
            exec:
              command:
                - 'sh'
                - '-cx'
                - 'postStart.sh >> /proc/1/fd/1 2>&1'
          volumeMounts:
            - mountPath: /etc/x509/https
              name: tls-mount
          lifecycle:
            : delete
      volumes:
        - name: tls-mount
          secret:
            secretName: internal-cert]

我尝试了不同的选项,没有元数据,但没有任何工作。

相关问题