Files
backstage/.changeset/shaggy-islands-mix.md
T
Matthew Clarke 9581ff0b4f Kubernetes: lookup cluster config from google api when using GKE (#4844)
* Restructure config; add GKE cluster locator

Signed-off-by: mclarke <mclarke@spotify.com>

* PR feedback

Signed-off-by: mclarke <mclarke@spotify.com>

* fix region typo

Signed-off-by: mclarke <mclarke@spotify.com>

* replace config api call with clusters endpoint

Signed-off-by: mclarke <mclarke@spotify.com>

* missed tsc error

Signed-off-by: mclarke <mclarke@spotify.com>

* doc tweak

Signed-off-by: mclarke <mclarke@spotify.com>
2021-03-08 10:27:09 +00:00

1.2 KiB

@backstage/plugin-kubernetes, @backstage/plugin-kubernetes-backend
@backstage/plugin-kubernetes @backstage/plugin-kubernetes-backend
minor minor

Restructure configuration; Add GKE cluster locator

Config migration

  1. kubernetes.clusters is now at kubernetes.clusterLocatorMethods[].clusters when the clusterLocatorMethod is of type: 'config''
  2. kubernetes.serviceLocatorMethod is now an object. multiTenant is the only valid type currently

Old config example:

kubernetes:
  serviceLocatorMethod: 'multiTenant'
  clusterLocatorMethods:
    - 'config'
  clusters:
    - url: http://127.0.0.1:9999
      name: minikube
      authProvider: 'serviceAccount'
      serviceAccountToken:
        $env: K8S_MINIKUBE_TOKEN
    - url: http://127.0.0.2:9999
      name: aws-cluster-1
      authProvider: 'aws'

New config example:

kubernetes:
  serviceLocatorMethod:
    type: 'multiTenant'
  clusterLocatorMethods:
    - type: 'config'
      clusters:
        - url: http://127.0.0.1:9999
          name: minikube
          authProvider: 'serviceAccount'
          serviceAccountToken:
            $env: K8S_MINIKUBE_TOKEN
        - url: http://127.0.0.2:9999
          name: aws-cluster-1
          authProvider: 'aws'