1.4.6 • Published 8 hours ago

@janus-idp/backstage-plugin-openshift-image-registry v1.4.6

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
8 hours ago

OpenShift Image Registry plugin for Backstage

The OpenShift Image Registry plugin displays all ImageStreams in an Openshift cluster.

For administrators

Prerequisites

The OpenShift Image Registry plugin requires read access to all ImageStreams and ImageStreamTags on a cluster. (Currently only a single cluster is supported.)

You can create a ServiceAccount, ClusterRole and ClusterRoleBinding with this commands.

Please notice that the ServiceAccount will be created in your current namespace while the ClusterRole and ClusterRoleBinding giving access to all namespaces are cluster-wide resources.

Additional information on these commands could be found in the OpenShift Container Platform authentication and authorization documentation.

oc create serviceaccount janus-idp-openshift-image-registry-reader

oc create clusterrole janus-idp-openshift-image-registry-reader --verb=get,watch,list --resource=imagestreams --resource=imagestreamtags

oc adm policy add-cluster-role-to-user janus-idp-openshift-image-registry-reader -z janus-idp-openshift-image-registry-reader

And finally you can use this command to create a token that is valid for one week:

oc create token --duration=168h janus-idp-openshift-image-registry-reader

Installation

Run the following command to install the OpenShift Image Registry plugin:

yarn workspace app add @janus-idp/backstage-plugin-openshift-image-registry

Configuration

  1. Set the proxy to desired OpenShift cluster in the app-config.yaml file as follows:

    proxy:
      endpoints:
        '/openshift-image-registry/api':
        target: <URL where k8s control plane for OpenShift cluster is running>
        headers:
          X-Requested-With: 'XMLHttpRequest'
          Authorization: Bearer <TOKEN>
        changeOrigin: true
        # Change to "false" in case of using self hosted OpenShift cluster with a self-signed certificate
        secure: true
  2. Enable an additional sidebar-item on the app sidebar in the packages/app/src/components/Root/Root.tsx file:

    /* highlight-add-next-line */
    import ExtensionIcon from '@material-ui/icons/Extension';
    
    export const Root = ({ children }: PropsWithChildren<{}>) => (
      <SidebarPage>
        <Sidebar>
          <SidebarGroup label="Menu" icon={<MenuIcon />}>
            {/* ... */}
            {/* highlight-add-start */}
            <SidebarItem
              icon={ExtensionIcon}
              to="openshift-image-registry"
              text="Image Registry"
            />
            {/* highlight-add-end */}
          </SidebarGroup>
          {/* ... */}
        </Sidebar>
        {children}
      </SidebarPage>
    );
  3. Add the Openshift Image Registry page in packages/app/src/App.tsx file:

    /* highlight-add-next-line */
    import { OpenshiftImageRegistryPage } from '@janus-idp/backstage-plugin-openshift-image-registry';
    
    const routes = (
      <FlatRoutes>
        {/* ... */}
        {/* highlight-add-start */}
        <Route
          path="/openshift-image-registry"
          element={<OpenshiftImageRegistryPage />}
        />
        {/* highlight-add-end */}
      </FlatRoutes>
    );
1.4.6

8 hours ago

1.4.5

8 days ago

1.4.4

8 days ago

1.4.3

9 days ago

1.4.2

10 days ago

1.4.1

14 days ago

1.4.0

24 days ago

1.3.32

1 month ago

1.3.33

1 month ago

1.3.34

1 month ago

1.3.31

1 month ago

1.3.30

1 month ago

1.3.29

1 month ago

1.3.28

1 month ago

1.3.27

2 months ago

1.3.26

2 months ago

1.3.25

2 months ago

1.3.24

3 months ago

1.3.23

3 months ago

1.3.22

3 months ago

1.3.20

3 months ago

1.3.21

3 months ago

1.3.19

4 months ago

1.3.18

4 months ago

1.3.17

5 months ago

1.3.16

5 months ago

1.3.15

5 months ago

1.3.14

5 months ago

1.3.13

5 months ago

1.2.0

9 months ago

1.3.7

6 months ago

1.1.9

10 months ago

1.3.6

6 months ago

1.1.8

10 months ago

1.3.5

6 months ago

1.3.4

6 months ago

1.3.3

6 months ago

1.2.4

7 months ago

1.3.2

6 months ago

1.2.3

7 months ago

1.3.1

6 months ago

1.2.2

7 months ago

1.3.0

6 months ago

1.2.1

8 months ago

1.3.10

6 months ago

1.3.11

6 months ago

1.1.10

10 months ago

1.3.12

5 months ago

1.3.9

6 months ago

1.3.8

6 months ago

1.1.7

11 months ago

1.1.6

12 months ago

1.1.5

12 months ago

1.1.4

12 months ago

1.1.3

12 months ago

1.1.2

12 months ago

1.1.1

12 months ago

1.1.0

12 months ago

1.0.1

12 months ago

1.0.0

1 year ago