Code Monkey home page Code Monkey logo

plugin-scaffolder-actions-frontend's Introduction

This repository contains frontend plugins related to Backstage scaffolder

Kubernetes Cluster Picker

Allows you to display and select Kubernetes clusters configured in your Backstage configuration.

Optionally, you can extract user token to use against the selected cluster. Note that the target cluster and Kubernetes configuration in Backstage must support this. This typically means you have to configure your cluster to accept a OIDC token and client side authentication must be configured in Backstage.

Configuration

// in packages/app/src/App.tsx

const routes = (
  ...
  <Route path="/create" element={<ScaffolderPage />}>
    <ScaffolderFieldExtensions>
      <KubernetesClusterPickerExtension />
    </ScaffolderFieldExtensions>
  </Route>  
  ...  
)

Usage

The plugin adds KubernetesClusterPicker as an available UI field option.

  • requestUserCredentials Optional. Requests the user's token for use for the target cluster.
  • allowedClusters Optional. Specifies which clusters the user use with this template.

Example usage:

# In your scaffolder template
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
spec:
  parameters:
    - title: Enter some details
      properties:
        clusterName:
          title: Name of the cluster to deploy manfiest into.
          type: string
          ui:field: KubernetesClusterPicker
          ui:options:
            allowedClusters:
              - cluster-1
              - cluster-2
            requestUserCredentials:
              secretKey: MY_TOKEN
    - id: fetch-base
      name: Fetch Base
      action: fetch:template
      input:
        url: ./templates
        values:
          token: ${{ secrets.MY_TOKEN }}

In the above example, the users will be presented with a choice of two clusters, cluster-1 and cluster-2.

It also specified requestUserCredentials. This means the plugin will attempt to retrieve user token for the cluster, then store it in the template secret field called MY_TOKEN.

This token is then used in the next step by referencing the token value with ${{ secrets.MY_TOKEN }}

plugin-scaffolder-actions-frontend's People

Contributors

nabuskey avatar

Stargazers

 avatar

Watchers

Jesse Sanford avatar Joel Cooklin avatar Rick Sostheim avatar  avatar Paul Roberts avatar  avatar Tulika Garg avatar  avatar Vikram Sethi avatar Nima Kaviani avatar Vara Bonthu avatar

plugin-scaffolder-actions-frontend's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.