generated from redhat-developer/new-project-template
-
Notifications
You must be signed in to change notification settings - Fork 46
RHIDP-6504: Modularize modules/dynamic-plugins/proc-topology-configure #1065
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
Merged
themr0c
merged 3 commits into
redhat-developer:main
from
jmagak:RHIDP-6504-Modularize-modules-dynamic-plugins-proc-topology-configure
Apr 30, 2025
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
f1f708c
Modularize modules/dynamic-plugins/proc-topology-configur
invalid-email-address 2a37895
Modularize modules/dynamic-plugins/proc-topology-configur
invalid-email-address 23996fb
Modularize modules/dynamic-plugins/proc-topology-configur
invalid-email-address File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
assemblies/assembly-managing-labels-annotations-topology.adoc
This file contains hidden or 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,20 @@ | ||
:_mod-docs-content-type: ASSEMBLY | ||
[id="assembly-managing-labels-annotations-topology"] | ||
= Managing labels and annotations for Topology plugins | ||
:context: assembly-managing-labels-annotations-topology | ||
|
||
include::modules/dynamic-plugins/proc-linking-to-source-code-editor-or-source.adoc[leveloffset=+1] | ||
|
||
include::modules/dynamic-plugins/proc-entity-annotation-or-label.adoc[leveloffset=+1] | ||
|
||
include::modules/dynamic-plugins/proc-namespace-annotation.adoc[leveloffset=+1] | ||
|
||
include::modules/dynamic-plugins/proc-label-selector-query-annotation.adoc[leveloffset=+1] | ||
|
||
include::modules/dynamic-plugins/proc-icon-displayed-in-the-node.adoc[leveloffset=+1] | ||
|
||
include::modules/dynamic-plugins/proc-app-grouping.adoc[leveloffset=+1] | ||
|
||
include::modules/dynamic-plugins/proc-node-connector.adoc[leveloffset=+1] | ||
|
||
For more information about the labels and annotations, see _Guidelines for labels and annotations for OpenShift applications_. |
This file contains hidden or 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,14 @@ | ||
:_mod-docs-content-type: ASSEMBLY | ||
[id="assembly-topology-plugin-configure"] | ||
= Configuring the Topology plugin | ||
:context: assembly-topology-plugin-configure | ||
|
||
include::modules/dynamic-plugins/proc-viewing-openshift-routes.adoc[leveloffset=+1] | ||
|
||
include::modules/dynamic-plugins/proc-viewing-pod-logs.adoc[leveloffset=+1] | ||
|
||
include::modules/dynamic-plugins/proc-viewing-tekton-pipelineruns.adoc[leveloffset=+1] | ||
|
||
include::modules/dynamic-plugins/proc-viewing-virtual-machines.adoc[leveloffset=+1] | ||
|
||
include::modules/dynamic-plugins/proc-enabling-the-source-code-editor.adoc[leveloffset=+1] |
This file contains hidden or 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
14 changes: 14 additions & 0 deletions
14
assemblies/dynamic-plugins/assembly-install-topology-plugin.adoc
This file contains hidden or 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,14 @@ | ||
[id="install-topology-plugin_{context}"] | ||
= Installing the Topology plugin | ||
|
||
include::../modules/dynamic-plugins/proc-topology-install.adoc[leveloffset=+2] | ||
|
||
include::../assembly-topology-plugin-configure.adoc[leveloffset=+1] | ||
|
||
include::../assembly-managing-labels-annotations-topology.adoc[leveloffset=+1] | ||
|
||
include::../assembly-bulk-importing-from-github.adoc[leveloffset=+1] | ||
|
||
include::../assembly-using-servicenow.adoc[leveloffset=+1] | ||
|
||
include::../assembly-using-kubernetes-custom-actions.adoc[leveloffset=+1] |
This file contains hidden or 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,11 @@ | ||
[id="proc-app-grouping"] | ||
|
||
= App grouping | ||
|
||
To display workload resources such as deployments or pods in a visual group, add the following label: | ||
|
||
[source,yaml] | ||
---- | ||
labels: | ||
app.kubernetes.io/part-of: <GROUP_NAME> | ||
---- |
34 changes: 34 additions & 0 deletions
34
modules/dynamic-plugins/proc-enabling-the-source-code-editor.adoc
This file contains hidden or 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,34 @@ | ||
[id="proc-enabling-the-source-code-editor_{context}"] | ||
= Enabling the source code editor | ||
|
||
To enable the source code editor, you must grant read access to the CheClusters resource in the `ClusterRole` as shown in the following example code: | ||
|
||
[source,yaml] | ||
---- | ||
... | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: backstage-read-only | ||
rules: | ||
... | ||
- apiGroups: | ||
- org.eclipse.che | ||
resources: | ||
- checlusters | ||
verbs: | ||
- get | ||
- list | ||
---- | ||
|
||
To use the source code editor, you must add the following configuration to the `kubernetes.customResources` property in your `{my-app-config-file}` file: | ||
|
||
[source,yaml] | ||
---- | ||
kubernetes: | ||
... | ||
customResources: | ||
- group: 'org.eclipse.che' | ||
apiVersion: 'v2' | ||
plural: 'checlusters' | ||
---- |
24 changes: 24 additions & 0 deletions
24
modules/dynamic-plugins/proc-entity-annotation-or-label.adoc
This file contains hidden or 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,24 @@ | ||
[id="proc-entity-annotation-or-label"] | ||
|
||
= Entity annotation/label | ||
|
||
For {product-very-short} to detect that an entity has Kubernetes components, add the following annotation to the `catalog-info.yaml` file of the entity: | ||
|
||
[source,yaml] | ||
---- | ||
annotations: | ||
backstage.io/kubernetes-id: <BACKSTAGE_ENTITY_NAME> | ||
---- | ||
|
||
Add the following label to the resources so that the Kubernetes plugin gets the Kubernetes resources from the requested entity: | ||
|
||
[source,yaml] | ||
---- | ||
labels: | ||
backstage.io/kubernetes-id: <BACKSTAGE_ENTITY_NAME>` | ||
---- | ||
|
||
[NOTE] | ||
==== | ||
When using the label selector, the mentioned labels must be present on the resource. | ||
==== |
52 changes: 52 additions & 0 deletions
52
modules/dynamic-plugins/proc-icon-displayed-in-the-node.adoc
This file contains hidden or 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,52 @@ | ||
[id="proc-icon-displayed-in-the-node"] | ||
|
||
= Icon displayed in the node | ||
|
||
To display a runtime icon in the topology nodes, add the following label to workload resources, such as Deployments: | ||
|
||
[source,yaml] | ||
---- | ||
labels: | ||
app.openshift.io/runtime: <RUNTIME_NAME> | ||
---- | ||
Alternatively, you can include the following label to display the runtime icon: | ||
|
||
[source,yaml] | ||
---- | ||
labels: | ||
app.kubernetes.io/name: <RUNTIME_NAME> | ||
---- | ||
|
||
Supported values of `<RUNTIME_NAME>` include: | ||
|
||
* django | ||
* dotnet | ||
* drupal | ||
* go-gopher | ||
* golang | ||
* grails | ||
* jboss | ||
* jruby | ||
* js | ||
* nginx | ||
* nodejs | ||
* openjdk | ||
* perl | ||
* phalcon | ||
* php | ||
* python | ||
* quarkus | ||
* rails | ||
* redis | ||
* rh-spring-boot | ||
* rust | ||
* java | ||
* rh-openjdk | ||
* ruby | ||
* spring | ||
* spring-boot | ||
|
||
[NOTE] | ||
==== | ||
Other values result in icons not being rendered for the node. | ||
==== |
31 changes: 31 additions & 0 deletions
31
modules/dynamic-plugins/proc-label-selector-query-annotation.adoc
This file contains hidden or 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,31 @@ | ||
[id="proc-label-selector-query-annotation"] | ||
|
||
= Label selector query annotation | ||
|
||
You can write your own custom label, which {product-very-short} uses to find the Kubernetes resources. The label selector takes precedence over the ID annotations: | ||
|
||
[source,yaml] | ||
---- | ||
annotations: | ||
backstage.io/kubernetes-label-selector: 'app=my-app,component=front-end' | ||
---- | ||
|
||
If you have multiple entities while Red Hat Dev Spaces is configured and want multiple entities to support the edit code decorator that redirects to the Red Hat Dev Spaces instance, you can add the backstage.io/kubernetes-label-selector annotation to the catalog-info.yaml file for each entity. | ||
|
||
[source,yaml] | ||
---- | ||
annotations: | ||
backstage.io/kubernetes-label-selector: 'component in (<BACKSTAGE_ENTITY_NAME>,che)' | ||
---- | ||
|
||
If you are using the previous label selector, you must add the following labels to your resources so that the Kubernetes plugin gets the Kubernetes resources from the requested entity: | ||
|
||
[source,yaml] | ||
---- | ||
labels: | ||
component: che # add this label to your che cluster instance | ||
labels: | ||
component: <BACKSTAGE_ENTITY_NAME> # add this label to the other resources associated with your entity | ||
---- | ||
|
||
You can also write your own custom query for the label selector with unique labels to differentiate your entities. However, you need to ensure that you add those labels to the resources associated with your entities including your CheCluster instance. |
33 changes: 33 additions & 0 deletions
33
modules/dynamic-plugins/proc-linking-to-source-code-editor-or-source.adoc
This file contains hidden or 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,33 @@ | ||
[id="proc-linking-to-source-code-editor-or-source"] | ||
|
||
= Linking to the source code editor or the source | ||
|
||
Add the following annotations to workload resources, such as Deployments to navigate to the Git repository of the associated application using the source code editor: | ||
|
||
[source,yaml] | ||
---- | ||
annotations: | ||
app.openshift.io/vcs-uri: <GIT_REPO_URL> | ||
---- | ||
|
||
Add the following annotation to navigate to a specific branch: | ||
|
||
[source,yaml] | ||
---- | ||
annotations: | ||
app.openshift.io/vcs-ref: <GIT_REPO_BRANCH> | ||
---- | ||
|
||
[NOTE] | ||
==== | ||
If Red Hat OpenShift Dev Spaces is installed and configured and Git URL annotations are also added to the workload YAML file, then clicking on the edit code decorator redirects you to the Red Hat OpenShift Dev Spaces instance. | ||
==== | ||
|
||
[NOTE] | ||
==== | ||
When you deploy your application using the OCP Git import flows, then you do not need to add the labels as import flows do that. Otherwise, you need to add the labels manually to the workload YAML file. | ||
==== | ||
|
||
//The labels are not similar to `backstage.io/edit-url` annotations as it points to the catalog entity metadata source file and is applied to RHDH catalog entity metadata YAML file, but not Kubernetes resources. | ||
|
||
You can also add the `app.openshift.io/edit-url` annotation with the edit URL that you want to access using the decorator. |
This file contains hidden or 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,16 @@ | ||
[id="proc-namespace-annotation"] | ||
|
||
= Namespace annotation | ||
|
||
.Procedure | ||
* To identify the Kubernetes resources using the defined namespace, add the `backstage.io/kubernetes-namespace` annotation: | ||
+ | ||
[source,yaml] | ||
---- | ||
annotations: | ||
backstage.io/kubernetes-namespace: <RESOURCE_NS> | ||
---- | ||
+ | ||
The Red Hat OpenShift Dev Spaces instance is not accessible using the source code editor if the `backstage.io/kubernetes-namespace` annotation is added to the `catalog-info.yaml` file. | ||
+ | ||
To retrieve the instance URL, you require the CheCluster custom resource (CR). As the CheCluster CR is created in the openshift-devspaces namespace, the instance URL is not retrieved if the namespace annotation value is not openshift-devspaces. |
This file contains hidden or 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,12 @@ | ||
[id="proc-node-connector"] | ||
|
||
= Node connector | ||
|
||
.Procedure | ||
To display the workload resources such as deployments or pods with a visual connector, add the following annotation: | ||
+ | ||
[source,yaml] | ||
---- | ||
annotations: | ||
app.openshift.io/connects-to: '[{"apiVersion": <RESOURCE_APIVERSION>,"kind": <RESOURCE_KIND>,"name": <RESOURCE_NAME>}]' | ||
---- |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.