我已经使用 terraform 部署了我的应用程序,现在我想将其同步到我的 ArgoCD,但我一直收到此错误并且无法绕过它。
error validating data: ValidationError(Deployment.spec.template.metadata): unknown field "spec" in io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
这是我的 yaml 文件。
apiVersion: apps/v1
kind: Deployment
metadata:
name: springboot
namespace: call
labels:
app: springboot
admission.datadoghq.com/enabled: "true"
tags.datadoghq.com/env: "dev"
tags.datadoghq.com/service: "backend"
tags.datadoghq.com/version: "0.0.1"
spec:
replicas: 1
selector:
matchLabels:
app: springboot
template:
metadata:
labels:
app: springboot
admission.datadoghq.com/enabled: "true"
tags.datadoghq.com/env: "dev"
tags.datadoghq.com/service: "backend"
tags.datadoghq.com/version: "0.0.1"
annotations:
admission.datadoghq.com/java-lib.version: "v1.16.2"
spec:
containers:
- name: springboot
image: northamerica-northeast1-docker.pkg.dev/cal/java-springboot/boot:1.38.
ports:
- containerPort: 8080
- containerPort: 8081
env:
- name: DD_PROFILING_ENABLED
value: "false"
- name: DD_LOGS_INJECTION
value: "true"
- name: DD_APPSEC_ENABLED
value: "false"
- name: DD_TRACE_SAMPLE_RATE
value: "1"
- name: COTURN_HOST
value: "host"
- name: COTURN_USERNAME
value: "username"
- name: COTURN_PASSWORD
value: "password"
- name: COTURN_PORT
value: "80"
envFrom:
- configMapRef:
name: calconfig
- secretRef:
name: openvidu-secret
- secretRef:
name: jwt-secrets
- secretRef:
name: mail-secrets
- secretRef:
name: db-secrets
这个错误和缩进有关吗?