0

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

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

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

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

[handlers-18] cnsorca.q.handler.RunTaskHandler:为管道运行 RunJobTask 时出错 [01CWF8DSF15F5EWY915YTKCYKD] java.lang.NullPointerException:无法在 org.codehaus.groovy.runtime.NullObject.getProperty 的空对象上获取属性“imageDescription”(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 集群上运行 Spinnaker 版本 1.10.5,使用 Halyard 1.12.0-20181024113436 安装。

4

0 回答 0