forked from backstage/backstage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Kubernetes: lookup cluster config from google api when using GKE (bac…
…kstage#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>
- Loading branch information
Showing
20 changed files
with
710 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
'@backstage/plugin-kubernetes': minor | ||
'@backstage/plugin-kubernetes-backend': 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: | ||
|
||
```yaml | ||
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: | ||
```yaml | ||
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' | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.