0

我已经在 GCP VM 上从头开始安装 Spinnaker 版本:1.14.11(本地)并进行了 hal 配置。Spinnaker 能够看到项目中的计算实例和网络。Spinnaker 也可以很好地创建服务器组/LB 和防火墙。但是一旦我设置管道进行烘焙和部署,它就会失败并出现以下错误。

==> googlecompute: Checking image does not exist...
==> googlecompute: Creating temporary SSH key for instance...
==> googlecompute: Using image: ubuntu-1604-xenial-v20190628
==> googlecompute: Creating instance...
    googlecompute: Loading zone: us-east1-b
    googlecompute: Loading machine type: n1-standard-1
    googlecompute: Requesting instance creation...
==> googlecompute: Error creating instance: googleapi: Error 400: Invalid value for field 'resource.networkInterfaces[0]': '{  "network": "projects/pg-us-p-app-xxxx/global/networks/devops",  "accessConfig": [{    "type": "...'. Subnetwork should be specified for custom subnetmode network, invalid
Build 'googlecompute' errored: Error creating instance: googleapi: Error 400: Invalid value for field 'resource.networkInterfaces[0]': '{  "network": "projects/pg-us-p-app-xxxx/global/networks/devops",  "accessConfig": [{    "type": "...'. Subnetwork should be specified for custom subnetmode network, invalid

==> Some builds didn't complete successfully and had errors:
--> googlecompute: Error creating instance: googleapi: Error 400: Invalid value for field 'resource.networkInterfaces[0]': '{  "network": "projects/pg-us-p-app-xxxx/global/networks/devops",  "accessConfig": [{    "type": "...'. Subnetwork should be specified for custom subnetmode network, invalid

==> Builds finished but no artifacts were created.


gcloud compute networks list  | grep devops
devops                       CUSTOM       REGIONAL

HAL 配置:


google:
      enabled: true
      accounts:
      - name: my-gce-account
        requiredGroupMembership: []
        providerVersion: V1
        permissions: {}
        project: pg-us-p-app-xxxx
        jsonPath: /home/spinnaker/.gcp/gce.json
        alphaListed: false
        imageProjects: []
        consul:
          enabled: false
          agentEndpoint: localhost
          agentPort: 8500
          datacenters: []
      primaryAccount: my-gce-account
      bakeryDefaults:
        templateFile: gce.json
        baseImages: []
        zone: us-east1-b
        network: "devops"
        useInternalIp: true

devops是自定义 VPC 网络,我应该在哪里提供子网?或者如何解决这个错误?

请指教。

4

1 回答 1

0

通过在管道中的“烘焙配置”下将“gce_subnetwork”作为“扩展属性”传递,设法解决了这个问题。

希望这可能会有所帮助。

于 2019-08-13T14:37:03.060 回答