无法使用Kubernetes云提供程序在Spinnaker上部署Run Job阶段

时间:2018-11-17 12:50:36

标签: kubernetes pipeline spinnaker spinnaker-halyard

我目前无法使用Spinnaker上的Kubernetes v1提供程序来部署运行作业阶段,默认情况下,创建阶段时,我无法选择帐户,选择框为空。

通过将上述阶段编辑为JSON,注意到尽管我没有配置任何与Titus提供程序相关的内容,但默认情况下'cloudProvider'设置为'titus'。

将该键更改为“ kubernetes”,然后界面更改,允许我选择我想使用的帐户,名称空间,图像,命令以及许多其他设置。

然后,当我尝试执行该管道时,它立即终止,并在spin-orca中引发以下错误:

  

[handlers-18] c.n.s.orca.q.handler.RunTaskHandler:运行错误   管道的RunJobTask [01CWF8DSF15F5EWY915YTKCYKD]   java.lang.NullPointerException:无法获取属性“ imageDescription”   在空对象上   org.codehaus.groovy.runtime.NullObject.getProperty(NullObject.java:60)   在   org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:174)   在   org.codehaus.groovy.runtime.callsite.NullCallSite.getProperty(NullCallSite.java:47)

据我了解,容器数组不会传递给Orca,但会在JSON编辑器上正确构建。

这是接口生成的JSON对象的示例:

{
      "account": "example-account",
      "annotations": {},
      "application": "website",
      "cloudProvider": "kubernetes",
      "cloudProviderType": "kubernetes",
      "cluster": {
        "application": "website",
        "capacity": {
          "desired": 1,
          "max": 1,
          "min": 1
        },
        "env": {},
        "resources": {
          "cpu": 1,
          "disk": 10000,
          "gpu": 0,
          "memory": 512,
          "networkMbps": 128
        },
        "retries": 0,
        "runtimeLimitSecs": 3600,
        "securityGroups": []
      },
      "containers": [
        {
          "args": [],
          "command": [],
          "envFrom": [],
          "envVars": [],
          "imageDescription": {
            "account": "gcr-docker-registry",
            "fromTrigger": true,
            "imageId": "gcr.io/example/example-backend (Tag resolved at runtime)",
            "registry": "gcr.io",
            "repository": "example/example-backend",
            "tag": ""
          },
          "imagePullPolicy": "IFNOTPRESENT",
          "limits": {
            "cpu": null,
            "memory": null
          },
          "livenessProbe": null,
          "name": "example-web-backend",
          "ports": [
            {
              "containerPort": 80,
              "hostIp": null,
              "hostPort": null,
              "name": "http",
              "protocol": "TCP"
            }
          ],
          "readinessProbe": null,
          "requests": {
            "cpu": null,
            "memory": null
          },
          "volumeMounts": []
        }
      ],
      "deferredInitialization": true,
      "dnsPolicy": "ClusterFirst",
      "labels": {},
      "name": "Run Job",
      "namespace": "staging",
      "nodeSelector": {},
      "organization": "",
      "refId": "3",
      "registry": "",
      "repository": "",
      "requisiteStageRefIds": [],
      "tag": "",
      "type": "runJob",
      "volumeSources": [],
      "waitForCompletion": true
  }

当前正在通过Google Kubernetes Engine集群使用Halyard 1.12.0-20181024113436安装的Spinnaker版本1.10.5。

0 个答案:

没有答案