gpt4 book ai didi

azure - ValidationError(Deployment.spec.template.spec.containers[0].env[13])

转载 作者:行者123 更新时间:2023-12-03 06:48:24 26 4
gpt4 key购买 nike

我有 Kubernetes 部署 的 list 。当我尝试从 Azure Devops 部署它时,出现以下错误:

error: error validating "/home/vsts/work/r1/a/_MozCom-Ace-QTR/beta/ace-ui-deploy.yaml": error validating data: ValidationError(Deployment.spec.template.spec.containers[0].env[13]): missing required field "name" in io.k8s.api.core.v1.EnvVar; if you choose to ignore these errors, turn validation off with --validate=false

enter image description here

enter image description here enter image description here

apiVersion: apps/v1
kind: Deployment
metadata:
name: abc-ui
namespace: abcqat-frontend
spec:
replicas: 1
selector:
matchLabels:
app: abc-ui
template:
metadata:
labels:
app: abc-ui
spec:
containers:
- name: abc-ui
image: abc.azurecr.io/mozcom-abc-ui-mig:65272
imagePullPolicy: Always
ports:
- containerPort: 3883
name: abc-ui
readinessProbe:
httpGet:
path: /health-probe
port: 3883
initialDelaySeconds: 15
periodSeconds: 10
timeoutSeconds: 5
livenessProbe:
httpGet:
path: /health-probe
port: 3883
initialDelaySeconds: 15
periodSeconds: 10
timeoutSeconds: 5
env:
- name: ENVIRONMENT
value: PROD
- name: PORT
value: "3883"
- name: DISABLE_CONSTRUCT_API_URL
value: "true"
- name: APP_API_HOST
value: https://afgabcqtr-webapi-beta.mozcomtest.com
- name: APP_API_PROTOCOL
value: "https:"
- name: SITE_NAME_SEPARATOR
value: "-"
- name: AUTH_SERVER_HOST
value: https://afgabcqtr-cas-beta.mozcomtest.com
- name: GOOGLE_MAP_KEY
valueFrom:
secretKeyRef:
name: mozcom-env-secret
key: googleMapKey
- name: BASIC_AUTH_ENABLED
value: "true"
- name: BASIC_AUTH_USER
value: mozcomabc
- name: BASIC_AUTH_PASSWORD
value: afgabclive
- name: AKS_UNIQUE_KEY_DEPLOY_DATE
value: REPLabc_WITH_DATE_STAMP
- name: SENTRY_DNS
value: "https://<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="fbcbc99ec29d9dc99ace9fcd99cf989fcf9ac9cec89dc8c99f9ec2c9c8cc989acebb94cec8cccccacdd592959c9e888fd5889e958f8982d59294" rel="noreferrer noopener nofollow">[email protected]</a>/5658030"
- name: APPLE_PAY_MERCHANT_ID
value: merchant.com.alfuttaim.abcuae
- name: LOG_ROCKET_ID
value: pjpo3x/abc
- name: APP_API_INTERNAL_HOST
value: 'http://web-api:8071'
- name: AUTH_SERVER_INTERNAL_HOST
value: 'http://cas-server:6443'
- name: ALGOLIA_BRAND
value: mozanta_abc
- name: BRAND
value: abc
- name: APPLICATION_ID
value: 6DAMKJX8YE
- name: SEARCH_API_KEY
value: 85e7bf88034b7bc60b7f0085683a19af

最佳答案

该错误表明您在容器的第 14 个环境变量 (spec.containers[0].env[13]) 中缺少 name 属性/字段。但是,在上面共享的 list 中没有写入环境变量。

您可以分享完整的 list 文件吗?

关于azure - ValidationError(Deployment.spec.template.spec.containers[0].env[13]),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73918658/

26 4 0