Unable to deploy Run Job stage on Spinnaker using Kubernetes cloud provider

470 views Asked by At

I’m currently unable to deploy run job stages using Kubernetes v1 provider on Spinnaker, by default when the stage is created I’m unable to choose the Account, the select box is empty.

By editing said stage as JSON, noticed that 'cloudProvider' is set to 'titus' by default, although I don’t have anything related to a Titus provider configured.

Changed that key to ‘kubernetes’, then the interface changes and allows me to choose which account, namespace, image, command and plenty of other settings I wish to use.

Then when I try to execute that pipeline it terminates inmediately, throwing the following error in spin-orca:

[handlers-18] c.n.s.orca.q.handler.RunTaskHandler : Error running RunJobTask for pipeline[01CWF8DSF15F5EWY915YTKCYKD] java.lang.NullPointerException: Cannot get property ‘imageDescription’ on null object at org.codehaus.groovy.runtime.NullObject.getProperty(NullObject.java:60) at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:174) at org.codehaus.groovy.runtime.callsite.NullCallSite.getProperty(NullCallSite.java:47)

From my understanding, the containers array is not being passed into Orca, but its showing properly constructed on the JSON editor.

This is an example of the JSON object generated by the interface:

{
      "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
  }

Currently running Spinnaker version 1.10.5, installed using Halyard 1.12.0-20181024113436, over a Google Kubernetes Engine cluster.

0

There are 0 answers