Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(kiali): add kiali dynamic plugin #902

Closed
wants to merge 1 commit into from

Conversation

aljesusg
Copy link

@aljesusg aljesusg commented Jan 25, 2024

Description

Add kiali plugin to showcase

Which issue(s) does this PR fix

  • Fixes #?

PR acceptance criteria

Please make sure that the following steps are complete:

  • GitHub Actions are completed and successful
  • Unit Tests are updated and passing
  • E2E Tests are updated and passing
  • Documentation is updated if necessary (requirement for new features)
  • Add a screenshot if the change is UX/UI related

How to test changes / Special notes to the reviewer

1- In your local backstage-plugins/plugins/kiali and backstage-plugins/plugins/kiali-backend, run yarn export-dynamic to export RBAC plugin UI as a dynamic plugin
2 -In your local backstage-showcase/dynamic-plugins-root/ directory, run the below command to install RBAC plugin UI

pkg=<local/path/to/backstage-plugins/plugins/kiali/>
pkgback=<local/path/to/backstage-plugins/plugins/kiali-backend/>
archive=$(npm pack $pkg)
tar -xzf "$archive" && rm "$archive"
mv package $(echo $archive | sed -e 's:\.tgz$::')
archiveback=$(npm pack $pkgback)
tar -xzf "$archiveback" && rm "$archiveback"
mv package $(echo $archiveback | sed -e 's:\.tgz$::')

The result in folder dynamic-plugins-root should be something like this
janus-idp-backstage-plugin-kiali-1.14.1
janus-idp-backstage-plugin-kiali-backend-1.10.1
3- In your local backstage-showcase/app-config.local.yaml file, add the below changes

...
# Kiali backend configuration
catalog:
  providers:
    kiali:
      url: '${KIALI_ENDPOINT}'
      serviceAccountToken: '${KIALI_SERVICE_ACCOUNT_TOKEN}'
      skipTLSVerify: true
# End kiali backend cofniguration
# Add this to enable Dynamic Plugins
dynamicPlugins:
  rootDirectory: dynamic-plugins-root
  frontend:
    janus-idp.backstage-plugin-kiali:
      appIcons:
        - name: kialiIcon
          importName: KialiIcon
      dynamicRoutes:
        - path: /kiali
          importName: KialiPage
          menuItem:
            icon: kialiIcon
            text: Kiali
      mountPoints:
        - config:           
            layout:
              gridColumn: "1 / -1"
            if:
              anyOf:
                - hasAnnotation: backstage.io/kubernetes-namespace
          importName: EntityKialiContent
          mountPoint: entity.page.kiali/cards
# End of Dynamic Plugins enablement config

4- In dynamic-plugins.default.yaml file Line 596, and Line 619 change disabled value to disabled: false to enable RBAC plugin UI.

  - package: ./dynamic-plugins/dist/janus-idp-backstage-kiali
    disabled: false
...
 - package: ./dynamic-plugins/dist/janus-idp-backstage-plugin-kiali-backend-dynamic
    disabled: false

5 - Add a component with the annotation backstage.io/kubernetes-namespace

# Example
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
  name: istio
  description: An example of a Kiali demo istio-system.
  tags:
    - istio
    - kiali
    - core
    - servicemesh
  annotations:
    'backstage.io/kubernetes-namespace': istio-system,bookinfo
spec:
  type: service
  lifecycle: production
  owner: user:guest

6 - Start Backend-showcase app, and observe that Kiali button shows on the left side menu and the entity tab.

Copy link

changeset-bot bot commented Jan 25, 2024

⚠️ No Changeset found

Latest commit: 7e83dbf

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

openshift-ci bot commented Jan 25, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign invinciblejai for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Contributor

The image is available at: quay.io/janus-idp/backstage-showcase:pr-902!

Copy link
Contributor

github-actions bot commented Feb 1, 2024

The image is available at: quay.io/janus-idp/backstage-showcase:pr-902!

@aljesusg aljesusg changed the title feat: add kiali plugin feat(kiali): add kiali dynamic plugin Feb 2, 2024
Copy link
Contributor

github-actions bot commented Feb 7, 2024

The image is available at: quay.io/janus-idp/backstage-showcase:pr-902!

Copy link

sonarcloud bot commented Feb 7, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.4% Duplication on New Code

See analysis details on SonarCloud

Copy link
Contributor

github-actions bot commented Feb 7, 2024

The image is available at: quay.io/janus-idp/backstage-showcase:pr-902!

Copy link
Contributor

github-actions bot commented Apr 1, 2024

The image is available at: quay.io/janus-idp/backstage-showcase:pr-902!

1 similar comment
Copy link
Contributor

github-actions bot commented Apr 1, 2024

The image is available at: quay.io/janus-idp/backstage-showcase:pr-902!

Copy link
Contributor

github-actions bot commented Apr 2, 2024

The image is available at: quay.io/janus-idp/backstage-showcase:pr-902!

@aljesusg aljesusg marked this pull request as ready for review April 4, 2024 13:31
@aljesusg aljesusg requested a review from a team as a code owner April 4, 2024 13:31
@davidfestal
Copy link
Member

@christophe-f Do we really want to embed such a new plugin in the RHDH image and add a fixed new tab ?

Copy link

sonarcloud bot commented Apr 4, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
10.3% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@aljesusg
Copy link
Author

aljesusg commented Apr 4, 2024

@christophe-f Do we really want to embed such a new plugin in the RHDH image and add a fixed new tab ?

we have customers already using the plugin (menu view) like dynamic plugin but they requested us to have some view for entity perspective

We did the plugin in https://github.com/janus-idp/backstage-plugins/tree/main/plugins/kiali some time ago (9 months) but we didn't know that we have to add the plugin here to see kiali in the entity view

Copy link
Contributor

github-actions bot commented Apr 4, 2024

The image is available at: quay.io/janus-idp/backstage-showcase:pr-902!

@davidfestal
Copy link
Member

davidfestal commented Apr 4, 2024

we didn't know that we have to add the plugin here to see kiali in the entity view

This shouldn't be. It's related to a limitation in the dynamic plugins support. We've just been discussing with @christophe-f that we should drop this limitation asap.

@davidfestal
Copy link
Member

Issue #1160 was opened for this purpose.

@gashcrumb
Copy link
Member

With #1173 it will be possible to configure new tabs as needed in configuration. Would you be willing to try this solution and see if this works for you?

@aljesusg
Copy link
Author

If this work and it will be for next june release for us is fine. Anyway where is the place to add docs and kiali in RHDH docs? This is going to be a Openshift servicemesh plugin for customers supported and we want to include it

@openshift-merge-robot
Copy link

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@aljesusg aljesusg closed this Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants