Commit Graph

53 Commits

Author SHA1 Message Date
Travis Truman b58eb099f7 Responding to review feedback
Signed-off-by: Travis Truman <trumant@gmail.com>
2021-04-16 08:44:04 -04:00
Travis Truman 67d5ad38c0 Merge branch 'master' into k8s-backend-skipTLSVerify-configurable
Signed-off-by: Travis Truman <trumant@gmail.com>
2021-04-15 09:30:05 -04:00
Oliver Sand 7fd46f26dc Use string TypeScript type instead of String
Signed-off-by: Oliver Sand <oliver.sand@sda-se.com>
2021-04-14 14:07:07 +02:00
Travis Truman c42cd1daaf Kubernetes client TLS verification is now configurable
Verification now defaults to true, where previously it defaulted to false

Signed-off-by: Travis Truman <trumant@gmail.com>
2021-04-13 12:56:52 -04:00
shoeb 81ea05c33c updated entityname to get kuernetes-id from annotations or fallback
Signed-off-by: shoeb <shoebsd31@gmail.com>
2021-03-29 19:16:07 +02:00
shoeb 731759ac74 appended entity.metadata.name
Signed-off-by: shoeb <shoebsd31@gmail.com>
2021-03-29 19:16:07 +02:00
shoeb bb714e9246 executed prettier
Signed-off-by: shoeb <shoebsd31@gmail.com>
2021-03-29 19:16:06 +02:00
shoeb 2267722ae1 #5051 entity name updated
Signed-off-by: shoeb <shoebsd31@gmail.com>
2021-03-29 19:16:06 +02:00
Jonah Back e0ecfc5eeb update error message to be the one sent from AWS sdk
Signed-off-by: Jonah Back <jonah@jonahback.com>
2021-03-25 22:12:59 -07:00
Jonah Back 60e463c8d4 improve credential loading for AWS IAM translator
Signed-off-by: Jonah Back <jonah@jonahback.com>
2021-03-24 22:12:07 -07:00
nliesenfeld bb848ac5e8 Don't list the cluster if there are no resources deployed there
Signed-off-by: nliesenfeld <nliesenfeld@spotify.com>
2021-03-12 10:32:06 -05:00
Matthew Clarke e2c1b3fb6a Kubernetes: initial CRD framework (#4892)
* Kubernetes: initial CRD framework

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

* use luxon instead of date-fns

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

* fix test

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

* update ui schema

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

* update app config

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

* rollout tests

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

* add default custom resource component

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

* make custom resources optional

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

* add docs

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

* prettier

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

* replace core-api usage with core

Signed-off-by: mclarke <mclarke@spotify.com>
2021-03-11 10:32:41 +00:00
Fredrik Adelöw 702b837b8b Remove all dot-folder imports everywhere
We aren't supposed to import from '.' or '../..' etc; point to the actual node being imported instead. I did allow e.g. '../../bigfolder' however. Going all the way to the individual file could be done too, but is a matter of taste perhaps.

Also ran Organize Imports on all the touched files :)

No changeset since there are no functional changes at all - only the imports changed

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2021-03-10 13:43:59 +01:00
Ben Lambert d471f98c44 Merge pull request #4883 from mclarke47/remove-client-caching
remove kubernetes client caching
2021-03-09 13:56:59 +01:00
mclarke da59f00f5e remove kubernetes client caching
Signed-off-by: mclarke <mclarke@spotify.com>
2021-03-09 08:20:49 +00:00
Jonah Back c71729a516 Merge branch 'master' into fix/use-aws-sdk-2
Signed-off-by: Jonah Back <jback@legalzoom.com>
2021-03-08 11:56:16 -08:00
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
Jonah Back 401698abc1 Apply suggestions from code review
Co-authored-by: Himanshu Mishra <himanshu@orkohunter.net>
Signed-off-by: Jonah Back <jonah@jonahback.com>
2021-03-04 15:19:47 -08:00
Jonah Back 5d7834baf0 fix: use aws sdk v2 for kubernetes aws backend auth to be compatible with the rest of backstage
Signed-off-by: Jonah Back <jonah@jonahback.com>
2021-03-04 14:34:12 -08:00
Patrik Oldsberg ac4a098551 Merge pull request #4642 from backjo/feature/CustomKubernetesProvider
kubernetes-backend: allow apps to pass in a KubernetesClustersSupplier
2021-03-03 17:46:52 +01:00
Jonah Back 8d4f5ee0ac Remove incorrect comment 2021-02-27 12:13:11 -08:00
Jonah Back e3adec2bd1 feature: add support for apps to pass in a KubernetesClustersSupplier 2021-02-22 20:15:01 -08:00
NHI TRAN ac67aab5dd PR updates
PR updates

fix failing test
2021-02-22 10:23:26 -05:00
NHI TRAN e6fe13c675 upstream master 2021-02-21 13:21:37 -05:00
NHI TRAN f43192207a enhancement: 4423 switch sending back data from server to res.json() instead of res.send()
changeset
2021-02-19 17:05:14 -05:00
mclarke 888497b55c replace kubernetes fanout request function with class 2021-02-10 11:16:37 +00:00
Debajyoti Halder 4dad818e01 Merge branch 'master' of https://github.com/spotify/backstage into lintMod 2021-01-29 14:05:27 +05:30
Debajyoti Halder 6106345e6d Update project with latest eslint rules 2021-01-29 11:55:12 +05:30
Jonah Back 6811112282 feature: add aws iam auth translator for kubernetes 2021-01-23 16:00:18 -08:00
Adam Harvey 38545afbfa Add Bad Request test 2021-01-14 10:30:55 -05:00
Adam Harvey a1f587c861 Support HTTP 400 Bad Request 2021-01-14 01:01:37 -05:00
Patrik Oldsberg 1da7d2c657 plugins,packages: replace usages of ConfigReader.from 2020-12-15 19:04:50 +01:00
Moustafa Baiou bcc211a081 refactor(k8s-plugin): update to use annotation based label selector
add changeset
2020-12-01 03:28:04 -05:00
Himanshu Mishra 05b916761d fix(kubernetes-backend): Fix Typescript error stopping backend to start 2020-11-23 21:06:44 +01:00
Moustafa Baiou 18d0fd10a0 add needed import 2020-11-23 06:18:55 -05:00
Moustafa Baiou 44ea3101a7 remove unneeded import 2020-11-23 06:18:55 -05:00
Moustafa Baiou 74102d9176 fix test after refactor 2020-11-23 06:18:55 -05:00
Moustafa Baiou 728767e3d3 cleanup 2020-11-23 06:18:55 -05:00
Moustafa Baiou 75d63ee0a0 fix test 2020-11-23 06:18:55 -05:00
Moustafa Baiou 4639d20720 modify approach to post entire entity to k8s backend 2020-11-23 06:16:57 -05:00
Moustafa Baiou 61a552fac6 fix type checks 2020-11-23 06:16:57 -05:00
Moustafa Baiou beaa0a82db fix tests, types and cleanup 2020-11-23 06:16:57 -05:00
Moustafa Baiou e2085293a6 feat(kubernetes): update k8s-backend plugin to use label selectors
update plugin to use label selectors when querying backend
2020-11-23 06:16:57 -05:00
blam 101978963d Merge branch 'master' of github.com:spotify/backstage into migrate-to-msw
* 'master' of github.com:spotify/backstage: (139 commits)
  Cleanup
  Update PinButton.test.tsx
  feat: update github insights plugin version (#2973)
  Ignore IntelliJ *.iml files (#2971)
  chore(deps): bump rollup-plugin-dts from 1.4.11 to 1.4.13
  fix the plugin card on plugins page
  align 'Add to Marketplace' button on plugins page
  fix the PluginGrid on mobiles sizes
  use getBy query instead of queryBy when asserting for elements present in document (#2951)
  Update PinButton.tsx
  Add test case for Progress component (#2953)
  fix the styling of footer copy on mobile
  add changeset
  handle the case where no entities are available to show
  core-api: work around issue with ApiRef export const declarations
  core-api: move utility api system implementation into apis/system
  Update docs regarding npm config ignore-scripts flag
  Another try
  Fix Core Features configuration id (#2948)
  Fix test?
  ...
2020-10-19 23:57:40 +02:00
Matthew Clarke 0ede39fd08 split service locator and cluster locators (#2900)
* split service locator and cluster locators

* fix test
2020-10-14 15:46:11 +01:00
blam b33353dd39 Merge branch 'master' of github.com:spotify/backstage into migrate-to-msw
* 'master' of github.com:spotify/backstage: (110 commits)
  chore(catalog-backend): removing redudant classes and some functions
  chore(deps-dev): bump @types/webpack from 4.41.21 to 4.41.22 (#2765)
  move codecov.yml to .github
  feat(catalog-backend): add batch concurrency
  create-app: remove build step
  cli: simplify jest transform ignore regex
  feat(catalog-backend): introduce batching, speed up reading and writing of large datasets
  Techdocs: add Azure DevOps prepare support (#2748)
  feat(techdocs-header): Show breadcrumbs on docs page (#2786)
  changesets: add entry for create-app template location fix
  create-app: revert to github location type for example templates
  fix: make catalog filter work again
  Use new url scheme for techdocs
  feat: remove LocationProcessor.processEntity
  Add Dockerfile for helm chart
  feat: use the new UrlReader in the CodeOwnersProcessor
  feat: use new UrlReader in PlaceholderProcessor
  feat: remove the backstage.io/definition-at-location annotation
  Update loud-lamps-visit.md
  feat(proxy-backend): limit the forwarded http headers to a safe set
  ...
2020-10-09 14:48:32 +02:00
blam 54ef1eea7e chore(kubernetes-backend): removing node-fetch and jest-fetch-mock 2020-10-09 13:30:49 +02:00
James Wen 108ce37949 Allow for Kubernetes cluster authentication via google auth (#2691)
* Allow for Kubernetes cluster authentication via google auth

- For the kubernetes and kubernetes-backend plugins
  - The kubernetes (front-end) plugin uses the googleAuthApi and goes
    through oauth flow to fetch a Google auth token for the current user
    and pass that in a request to the kubernetes-backend plugin, which
    uses this token as the service account token (and hence as the
    authentication token for making K8s API requests).
- Related to https://github.com/spotify/backstage/issues/2552

* Use KubernetesAuthProvider and KubernetesAuthTranslator interfaces for K8s auth

- Implementations of KubernetesAuthProvider decorate the bodies of requests (for
  Kubernetes resources) sent from the kubernetes plugin (frontend) to the
  kubernetes-backend plugin (backend) with whatever information is
  needed for K8s authentication
- Implementations of KubernetesAuthTranslator take the contents of these request
  bodies sent from the kubernetes plugin (frontend) to the kubernetes-backend plugin
  (backend) and use specific values in the bodies to properly set up tokens for K8s auth
- Start with KubernetesAuthProvider + KubernetesAuthTranslator
  implementations for 'serviceAccount' and 'google' as auth providers
- Implementation of what was proposed at https://github.com/spotify/backstage/issues/2552#issuecomment-702545382
- Load in and prepare KubernetesAuthProvider implementations at plugin
  startup time via KubernetesAuthProviders API (that essentially stores
  or wraps these KubernetesAuthProvider instances)
- Related to https://github.com/spotify/backstage/issues/2552
2020-10-07 15:21:40 +01:00
Matthew Clarke 44e18975bd add better error handling (#2664) 2020-09-30 16:07:30 +01:00
Matthew Clarke d66c6a7dcb k8s add hpa and ingresses UI (#2640)
* k8s add hpa and ingresses UI

* add todo
2020-09-28 19:32:35 +01:00