Skip to content

Installation

Billy edited this page Feb 3, 2023 · 14 revisions

Prerequisites

Go Clouddriver uses a sidecar Arcade to authenticate to all its Kubernetes providers. It is a simple API, but you need to validate that it supports your Kubernetes infrastructure. Please open an issue in Arcade to have your authentication method supported.

Instructions

The following instructions will guide you through deploying Go Clouddriver alongside Clouddriver OSS in a Kubernetes environment. We will be putting two proxies in front of both Clouddriver deployments for the purpose of routing requests based on where the account lives and caching. This will allow you to migrate accounts from OSS to Go Clouddriver (or migrate back) if there are any issues found in your setup. When completed, your deployment setup should look like this:

spin-proxy-full

  • spin-clouddriver, the first icon on the left, is a Kubernetes service that has been set to select cluster: spin-go-clouddriver, however there are modifications to the Spinnaker Config below which tell this resource to route requests to Spin Doctor.
  • spin-doctor, the second icon is a KrakenD API gateway. It is responsible for grabbing info from both Go Clouddriver and Clouddriver OSS, combining the responses, and returning them to the client. It also adds a caching layer for the Applications API so multiple users will not overwhelm Kubernetes clusters when listing server groups, server group managers, and load balancers.
  • spin-router, is a Javascript proxy that routes to either Go Clouddriver or Clouddriver OSS, depending on where the Kubernetes provider lives. It defaults to routing to Go Clouddriver by calling the /v1/kubernetes/providers/{name}, if this does not return 200 OK, then the request is routed to Clouddriver OSS at http://clouddriver.spinnaker:7200.
  • go-clouddriver, is the Go rewrite of the Kubernetes portion of Clouddriver OSS.

Resources not included in the image but are necessary for deployment:

After deploying all of these resources, you will need to modify your Spinnaker Config. This will tell Clouddriver to route requests through the spin-doctor.spinnaker service, the first of the proxies in our proxy chain. The KrakenD config for Spin Doctor will route requests to either of both of the Clouddrivers or through Spin Router for Kubernetes endpoints.

apiVersion: spinnaker.io/v1alpha2
kind: SpinnakerService
metadata:
  name: spinnaker
spec:
  spinnakerConfig:
    service-settings:
      clouddriver:
        artifactId: us-docker.pkg.dev/spinnaker-community/docker/clouddriver:5.74.4
        address: spin-doctor.spinnaker
        overrideBaseUrl: http://spin-doctor.spinnaker:7002/
      gate:
        env:
          JAVA_OPTS: -Djdk.security.allowNonCaAnchor=true
        kubernetes:
          nodeSelector:
            cloud.google.com/gke-nodepool: primary

SQL Cleanup

Finally, for productions deployments make sure to add indexes for more frequently polled data and follow the SQL procedures document here: https://github.com/homedepot/go-clouddriver#mysql-indexes-and-cleanup.

Clone this wiki locally