Files
backstage/plugins/kubernetes-backend
blam e44cb85b22 Merge branch 'master' of github.com:spotify/backstage into migrate-to-msw
* 'master' of github.com:spotify/backstage: (66 commits)
  chore: fix lerna linting
  v0.1.1-alpha.25
  Add Code Insights plugin to sample app and marketplace (#2833)
  Improve main CI build status badge in README (#2866)
  Update roadmap: Design System 🚢 (#2858)
  github/codecov: switch to informational mode
  github/workflows: use the tip of master as the base for comparing PR code coverage
  make saml provider path from globalConfig (#2855)
  fix(catalog-backend): limit search value lengths
  Update project Copyright (#2852)
  fix(catalog-backend): actually use modified entity output (default namespace was broken)
  remove unnecessary center keyword
  Move card header bg to up contrast, fix #2558
  Update name of env authentication env vars
  Fix feedback from dtuite
  Remove chart testing workflow for now
  Only lint charts on Pull Requests
  Move the k8s deployment docs to its own helm deployment page
  Remove line in initdb script that creates backend db
  Use app-config.development.yaml to provide configuration instead of local
  ...
2020-10-13 03:56:13 +02:00
..
2020-10-07 15:49:49 +01:00

Kubernetes Backend

WORK IN PROGRESS

This is the backend part of the Kubernetes plugin.

It responds to Kubernetes requests from the frontend.

Configuration

clusterLocatorMethod

This configures how to determine which clusters a component is running in.

Currently, the only valid locator method is:

configMultiTenant

This configuration assumes that all components run on all the provided clusters.

Example:

kubernetes:
  clusterLocatorMethod: 'configMultiTenant'
  clusters:
    - url: http://127.0.0.1:9999
      name: minikube
      serviceAccountToken: <TOKEN FROM STEP 4>
      authProvider: 'serviceAccount'
    - url: http://127.0.0.2:9999
      name: gke-cluster-1
      authProvider: 'google'
clusters

Used by the configMultiTenant clusterLocatorMethod to construct Kubernetes clients.

url

The base url to the Kubernetes control plane. Can be found by using the Kubernetes master result from running the kubectl cluster-info command.

name

A name to represent this cluster, this must be unique within the clusters array. Users will see this value in the Service Catalog Kubernetes plugin.

authProvider

This determines how the Kubernetes client authenticate with the Kubernetes cluster. Valid values are:

Value Description
serviceAccount This will use a Kubernetes service account to access the Kubernetes API. When this is used the serviceAccountToken field should also be set.
google This will use a user's google auth token from the google auth plugin to access the Kubernetes API.
serviceAccount (optional)

The service account token to be used when using the authProvider, serviceAccount.

RBAC

The current RBAC permissions required are read-only cluster wide, for the following objects:

  • pods
  • services
  • configmaps
  • deployments
  • replicasets
  • horizontalpodautoscalers
  • ingresses