Repository: redhat-developer/red-hat-developers-documentation-rhdh
Pull request #951: RHIDP-5423: Content for Kubernetes scaffolder actions
Author: login: pabel-rh
Labels: name: Technical review done :partly_sunny:
description: Any procedure has been succesfully tested
name: Ready to merge  :guard:
name: Peer review done :blue_book:
Created: 2025-02-25T05:36:23Z | Merged: 2025-03-13T12:38:15Z

<!--- PR title format: [GH#<gh-issue-id>][BZ#<bz-issue-id>][RHIDP#<jira-issue-id>]: <short-description-of-the-pr> --->

<!--- If your changes apply to the latest released and/or in-development version of RHDH, open your PR against the `main` branch and cherrypick your PR to any released branches that you want to apply your changes to. --->

**IMPORTANT: Do Not Merge - To be merged by Docs Team Only**

**Version(s):**
1.5, main
**Issue:**
[RHIDP-5423](https://issues.redhat.com/browse/RHIDP-5423)
**Preview link:**
https://redhat-developer.github.io/red-hat-developers-documentation-rhdh/pr-951/plugins-rhdh-configure/#con-Kubernetes-custom-actions_title-plugins-rhdh-configure



Diff:
diff --git a/assemblies/assembly-using-kubernetes-custom-actions.adoc b/assemblies/assembly-using-kubernetes-custom-actions.adoc
new file mode 100644
index 00000000000..f3610ed9bfb
--- /dev/null
+++ b/assemblies/assembly-using-kubernetes-custom-actions.adoc
@@ -0,0 +1,22 @@
+[id='con-Kubernetes-custom-actions_{context}']
+= Kubernetes custom actions in {product}
+
+include::{docdir}/artifacts/snip-technology-preview.adoc[]
+
+With Kubernetes custom actions, you can create and manage Kubernetes resources.
+
+The Kubernetes custom actions plugin is preinstalled and disabled on a {product-short} instance by default. You can disable or enable the Kubernetes custom actions plugin, and change other parameters, by configuring the {product} Helm chart. 
+
+[NOTE]
+====
+Kubernetes scaffolder actions and Kubernetes custom actions refer to the same concept throughout this documentation.
+====
+
+
+include::modules/using-kubernetes-custom-actions/proc-enable-kubernetes-custom-actions-plugin.adoc[leveloffset=+1]
+
+include::modules/using-kubernetes-custom-actions/proc-using-kubernetes-custom-actions-plugin.adoc[leveloffset=+1]
+
+include::modules/using-kubernetes-custom-actions/ref-creating-a-template-using-kubernetes-custom-actions.adoc[leveloffset=+1]
+
+include::modules/using-kubernetes-custom-actions/ref-supported-kubernetes-custom-actions.adoc[leveloffset=+2]
\ No newline at end of file
diff --git a/assemblies/dynamic-plugins/assembly-configuring-rhdh-plugins.adoc b/assemblies/dynamic-plugins/assembly-configuring-rhdh-plugins.adoc
index 5fa7b95bb31..e4740b72ffa 100644
--- a/assemblies/dynamic-plugins/assembly-configuring-rhdh-plugins.adoc
+++ b/assemblies/dynamic-plugins/assembly-configuring-rhdh-plugins.adoc
@@ -28,5 +28,7 @@ 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]
+
 // Overriding Core Backend Service Configuration
 include::../modules/dynamic-plugins/con-overriding-core-backend-services.adoc[leveloffset=+1]
diff --git a/modules/using-kubernetes-custom-actions/proc-enable-kubernetes-custom-actions-plugin.adoc b/modules/using-kubernetes-custom-actions/proc-enable-kubernetes-custom-actions-plugin.adoc
new file mode 100644
index 00000000000..9c8c7355692
--- /dev/null
+++ b/modules/using-kubernetes-custom-actions/proc-enable-kubernetes-custom-actions-plugin.adoc
@@ -0,0 +1,32 @@
+[id='proc-enable-kubernetes-custom-actions-plugin_{context}']
+= Enabling Kubernetes custom actions plugin in {product}
+
+In {product}, the Kubernetes custom actions are provided as a preinstalled plugin, which is disabled by default. You can enable the Kubernetes custom actions plugin by updating the `disabled` key value in your Helm chart.
+
+.Prerequisites
+
+* You have installed {product} with the Helm chart.
+
+.Procedure
+
+To enable the Kubernetes custom actions plugin, complete the following step:
+
+* In your Helm chart, add a `package` with the Kubernetes custom action plugin name and update the `disabled` field. For example:
++
+--
+[source,yaml]
+----
+global:
+  dynamic:
+    includes:
+      - dynamic-plugins.default.yaml
+    plugins:
+      - package: ./dynamic-plugins/dist/backstage-community-plugin-scaffolder-backend-module-kubernetes-dynamic
+        disabled: false
+----
+
+[NOTE]
+====
+The default configuration for a plugin is extracted from the `dynamic-plugins.default.yaml` file, however, you can use a `pluginConfig` entry to override the default configuration.
+====
+--
diff --git a/modules/using-kubernetes-custom-actions/proc-using-kubernetes-custom-actions-plugin.adoc b/modules/using-kubernetes-custom-actions/proc-using-kubernetes-custom-actions-plugin.adoc
new file mode 100644
index 00000000000..716386d75ca
--- /dev/null
+++ b/modules/using-kubernetes-custom-actions/proc-using-kubernetes-custom-actions-plugin.adoc
@@ -0,0 +1,29 @@
+[id='proc-using-kubernetes-custom-actions-plugin_{context}']
+= Using Kubernetes custom actions plugin in {product}
+
+In {product}, the Kubernetes custom actions enable you to run template actions for Kubernetes.
+
+.Procedure
+
+* To use a Kubernetes custom action in your custom template, add the following Kubernetes actions to your template:
++
+
+[source,yaml,subs="+attributes"]
+----
+action: kubernetes:create-namespace
+id: create-kubernetes-namespace
+name: Create kubernetes namespace
+input:
+  namespace: {my-product-namespace}
+  clusterRef: bar
+  token: TOKEN
+  skipTLSVerify: false
+  caData: Zm9v
+  labels: app.io/type=ns; app.io/managed-by=org;
+
+----
+
+[role="_additional-resources"]
+.Additional resource
+
+* link:{customizing-book-url#configuring-templates}[Configuring templates].
\ No newline at end of file
diff --git a/modules/using-kubernetes-custom-actions/ref-creating-a-template-using-kubernetes-custom-actions.adoc b/modules/using-kubernetes-custom-actions/ref-creating-a-template-using-kubernetes-custom-actions.adoc
new file mode 100644
index 00000000000..fd37a2494de
--- /dev/null
+++ b/modules/using-kubernetes-custom-actions/ref-creating-a-template-using-kubernetes-custom-actions.adoc
@@ -0,0 +1,77 @@
+[id='ref-creating-a-template-using-Kubernetes-custom-actions_{context}']
+= Creating a template using Kubernetes custom actions in {product}
+
+You can create a template by defining a `Template` object as a YAML file.
+
+The `Template` object describes the template and its metadata. It also contains required input variables and a list of actions that are executed by the scaffolding service.
++
+
+[source,yaml,subs="+attributes"]
+----
+apiVersion: scaffolder.backstage.io/v1beta3
+kind: Template
+metadata:
+  name: create-kubernetes-namespace
+  title: Create a kubernetes namespace
+  description: Create a kubernetes namespace
+
+spec:
+  type: service
+  parameters:
+    - title: Information
+      required: [namespace, token]
+      properties:
+        namespace:
+          title: Namespace name
+          type: string
+          description: Name of the namespace to be created
+        clusterRef:
+          title: Cluster reference
+          type: string
+          description: Cluster resource entity reference from the catalog
+          ui:field: EntityPicker
+          ui:options:
+            catalogFilter:
+              kind: Resource
+        url:
+          title: Url
+          type: string
+          description: Url of the kubernetes API, will be used if clusterRef is not provided
+        token:
+          title: Token
+          type: string
+          ui:field: Secret
+          description: Bearer token to authenticate with
+        skipTLSVerify:
+          title: Skip TLS verification
+          type: boolean
+          description: Skip TLS certificate verification, not recommended to use in production environment, default to false
+        caData:
+          title: CA data
+          type: string
+          ui:field: Secret
+          description: Certificate Authority base64 encoded certificate
+        labels:
+          title: Labels
+          type: string
+          description: Labels to be applied to the namespace
+          ui:widget: textarea
+          ui:options:
+            rows: 3
+          ui:help: 'Hint: Separate multiple labels with a semicolon!'
+          ui:placeholder: 'kubernetes.io/type=namespace; app.io/managed-by=org'
+
+  steps:
+    - id: create-kubernetes-namespace
+      name: Create kubernetes namespace
+      action: kubernetes:create-namespace
+      input:
+        namespace: ${{ parameters.namespace }}
+        clusterRef: ${{ parameters.clusterRef }}
+        url: ${{ parameters.url }}
+        token: ${{ secrets.token }}
+        skipTLSVerify: ${{ parameters.skipTLSVerify }}
+        caData: ${{ secrets.caData }}
+        labels: ${{ parameters.labels }}
+
+----
\ No newline at end of file
diff --git a/modules/using-kubernetes-custom-actions/ref-supported-kubernetes-custom-actions.adoc b/modules/using-kubernetes-custom-actions/ref-supported-kubernetes-custom-actions.adoc
new file mode 100644
index 00000000000..2faba2e7983
--- /dev/null
+++ b/modules/using-kubernetes-custom-actions/ref-supported-kubernetes-custom-actions.adoc
@@ -0,0 +1,60 @@
+[id='ref-supported-Kubernetes-custom-actions_{context}']
+= Supported Kubernetes custom actions in {product}
+
+In {product}, you can use custom Kubernetes actions in scaffolder templates.
+
+.Custom Kubernetes scaffolder actions
+
+Action: kubernetes:create-namespace::
+Creates a namespace for the Kubernetes cluster in the {product-short}.
+
+[cols="15%,15%,15%,40%,15%", frame="all", options="header"]
+|===
+|Parameter name
+|Type
+|Requirement
+|Description
+|Example
+
+|`namespace`
+|`string`
+|Required
+|Name of the Kubernetes namespace
+|`{my-product-namespace}`
+
+|`clusterRef`
+|`string`
+|Required only if `url` is not defined. You cannot specify both `url` and `clusterRef`.
+|Cluster resource entity reference from the catalog
+|`bar`
+
+|`url`
+|`string`
+|Required only if `clusterRef` is not defined. You cannot specify both `url` and `clusterRef`.
+|API url of the Kubernetes cluster
+|`https://api.foo.redhat.com:6443`
+
+|`token`
+|`String`
+|Required
+|Kubernetes API bearer token used for authentication
+|
+
+|`skipTLSVerify`
+|`boolean`
+|Optional
+|If true, certificate verification is skipped
+|false
+
+|`caData`
+|`string`
+|Optional
+|Base64 encoded certificate data
+|
+
+|`label`
+|`string`
+|Optional
+|Labels applied to the namespace
+|app.io/type=ns; app.io/managed-by=org;
+|===
\ No newline at end of file
diff --git a/modules/using-service-now/proc-enable-servicenow-custom-actions-plugin.adoc b/modules/using-service-now/proc-enable-servicenow-custom-actions-plugin.adoc
index 0c4b040ea16..b1cb404d610 100644
--- a/modules/using-service-now/proc-enable-servicenow-custom-actions-plugin.adoc
+++ b/modules/using-service-now/proc-enable-servicenow-custom-actions-plugin.adoc
@@ -11,7 +11,7 @@ For more information about installing the {product-short}, see xref:{installing-
 
 .Procedure
 
-. To activate the custom actions plugin, add a `package` with plugin name and update the `disabled` field in your Helm Chart as follows:
+. To activate the custom actions plugin, add a `package` with plugin name and update the `disabled` field in your Helm chart as follows:
 +
 --
 [source,yaml]
@@ -31,7 +31,7 @@ The default configuration for a plugin is extracted from the `dynamic-plugins.de
 ====
 --
 
-. Set the following variables in the Helm Chart to access the custom actions:
+. Set the following variables in the Helm chart to access the custom actions:
 +
 --
 [source,yaml]


Reviews:
user: login: dzemanov
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-02-25T08:22:29Z
user: login: dzemanov
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-02-25T08:22:56Z
user: login: dzemanov
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-02-25T08:30:55Z
user: login: dzemanov
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-02-25T08:31:28Z
user: login: dzemanov
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-02-25T08:31:48Z
user: login: dzemanov
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-02-25T08:33:54Z
user: login: linfraze
body: A few considerations, but lots of great info here!
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-02-25T16:07:39Z
user: login: pabel-rh
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-02-26T08:53:27Z
user: login: dzemanov
state: CHANGES_REQUESTED
author_association: MEMBER
submitted_at: 2025-02-27T12:18:20Z
user: login: dzemanov
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-05T09:42:20Z
user: login: dzemanov
state: APPROVED
author_association: MEMBER
submitted_at: 2025-03-05T09:42:41Z
user: login: dzemanov
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-06T10:40:44Z
user: login: pabel-rh
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-06T12:18:33Z
user: login: dzemanov
body: The secrets need to be specified also here.
state: CHANGES_REQUESTED
author_association: MEMBER
submitted_at: 2025-03-06T13:53:46Z
user: login: dzemanov
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-06T14:21:12Z
user: login: dzemanov
state: APPROVED
author_association: MEMBER
submitted_at: 2025-03-07T07:08:48Z

Review comments:
diff_hunk: @@ -0,0 +1,12 @@
+[id='con-Kubernetes-scaffolder-actions_{context}']
+= Kubernetes scaffolder actions in {product}
+
+The Kubernetes custom plugin is preinstalled and disabled on a {product-short} instance by default. You can disable or enable the Kubernetes custom plugin, and change other parameters, by configuring the {product} Helm chart. You can install and use Kubernetes custom actions to create and manage Kubernetes resources.
path: assemblies/assembly-using-kubernetes-scaffolder-actions.adoc
user: login: dzemanov
body: ```suggestion
The Kubernetes custom actions plugin is preinstalled and disabled on a {product-short} instance by default. You can disable or enable the Kubernetes custom actions plugin, and change other parameters, by configuring the {product} Helm chart. You can install and use Kubernetes custom actions to create and manage Kubernetes resources.
```

I would specify we are talking about 'custom actions' as opposed to 'custom plugin'.
created_at: 2025-02-25T08:22:28Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,34 @@
+[id='proc-enable-kubernetes-scaffolder-actions-plugin_{context}']
+= Enabling Kubernetes scaffolder actions plugin in {product}
+
+In {product}, the Kubernetes scaffolder actions are provided as a preinstalled plugin, which is disabled by default. You can enable the Kubernetes scaffolder plugin using the following procedure.
path: modules/using-kubernetes-scaffolder-actions/proc-enable-kubernetes-scaffolder-actions-plugin.adoc
user: login: dzemanov
body: ```suggestion
In {product}, the Kubernetes scaffolder actions are provided as a preinstalled plugin, which is disabled by default. You can enable the Kubernetes scaffolder actions plugin using the following procedure.
```
created_at: 2025-02-25T08:22:56Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,18 @@
+[id='con-Kubernetes-custom-actions_{context}']
+= Kubernetes custom actions in {product}
+
+The Kubernetes custom actions plugin is preinstalled and disabled on a {product-short} instance by default. You can disable or enable the Kubernetes custom plugin, and change other parameters, by configuring the {product} Helm chart. You can install and use Kubernetes custom actions to create and manage Kubernetes resources.
path: assemblies/assembly-using-kubernetes-custom-actions.adoc
user: login: dzemanov
body: ```suggestion
The Kubernetes custom actions plugin is preinstalled and disabled on a {product-short} instance by default. You can disable or enable the Kubernetes custom actions plugin, and change other parameters, by configuring the {product} Helm chart. You can install and use Kubernetes custom actions to create and manage Kubernetes resources.
```
created_at: 2025-02-25T08:30:55Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,34 @@
+[id='proc-enable-kubernetes-custom-actions-plugin_{context}']
+= Enabling Kubernetes custom actions plugin in {product}
+
+In {product}, the Kubernetes custom actions are provided as a preinstalled plugin, which is disabled by default. You can enable the Kubernetes custom plugin using the following procedure.
path: modules/using-kubernetes-custom-actions/proc-enable-kubernetes-custom-actions-plugin.adoc
user: login: dzemanov
body: ```suggestion
In {product}, the Kubernetes custom actions are provided as a preinstalled plugin, which is disabled by default. You can enable the Kubernetes custom actions plugin using the following procedure.
```
created_at: 2025-02-25T08:31:28Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,34 @@
+[id='proc-enable-kubernetes-custom-actions-plugin_{context}']
+= Enabling Kubernetes custom actions plugin in {product}
+
+In {product}, the Kubernetes custom actions are provided as a preinstalled plugin, which is disabled by default. You can enable the Kubernetes custom plugin using the following procedure.
+
+.Prerequisites
+
+* {product} is installed and running.
+For more information about installing the {product-short}, see xref:{installing-on-ocp-book-url}#assembly-install-rhdh-ocp-helm[{installing-on-ocp-book-title} with the Helm chart].
+* You have created a project in the {product-short}.
+
+.Procedure
+
+To enable the Kubernetes custom plugin, complete the following step:
path: modules/using-kubernetes-custom-actions/proc-enable-kubernetes-custom-actions-plugin.adoc
user: login: dzemanov
body: ```suggestion
To enable the Kubernetes custom actions plugin, complete the following step:
```
created_at: 2025-02-25T08:31:47Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,34 @@
+[id='proc-enable-kubernetes-custom-actions-plugin_{context}']
+= Enabling Kubernetes custom actions plugin in {product}
+
+In {product}, the Kubernetes custom actions are provided as a preinstalled plugin, which is disabled by default. You can enable the Kubernetes custom plugin using the following procedure.
+
+.Prerequisites
+
+* {product} is installed and running.
+For more information about installing the {product-short}, see xref:{installing-on-ocp-book-url}#assembly-install-rhdh-ocp-helm[{installing-on-ocp-book-title} with the Helm chart].
+* You have created a project in the {product-short}.
+
+.Procedure
+
+To enable the Kubernetes custom plugin, complete the following step:
+
+* In your Helm chart, add a `package` with the Kubernetes custom action plugin name and update the `disabled` field. For example:
++
+--
+[source,yaml]
+----
+global:
+  dynamic:
+    includes:
+      - dynamic-plugins.default.yaml
+    plugins:
+      - package: ./dynamic-plugins/dist/backstage-community-plugin-scaffolder-backend-module-servicenow-dynamic
path: modules/using-kubernetes-custom-actions/proc-enable-kubernetes-custom-actions-plugin.adoc
user: login: dzemanov
body: ```suggestion
      - package: ./dynamic-plugins/dist/backstage-community-plugin-scaffolder-backend-module-kubernetes-dynamic
```
created_at: 2025-02-25T08:33:54Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,18 @@
+[id='con-Kubernetes-custom-actions_{context}']
+= Kubernetes custom actions in {product}
+
+The Kubernetes custom actions plugin is preinstalled and disabled on a {product-short} instance by default. You can disable or enable the Kubernetes custom plugin, and change other parameters, by configuring the {product} Helm chart. You can install and use Kubernetes custom actions to create and manage Kubernetes resources.
path: assemblies/assembly-using-kubernetes-custom-actions.adoc
user: login: linfraze
body: Consider separating the latter part of the paragraph that talks about why a user might want to install the plugin / what they can do with the Kubernetes custom actions from the first part of the paragraph that talks about the enabled/disabled state of the plugin. It might also be a good idea to lead with the plugin benefits / purpose part. 
created_at: 2025-02-25T15:56:33Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,34 @@
+[id='proc-enable-kubernetes-custom-actions-plugin_{context}']
+= Enabling Kubernetes custom actions plugin in {product}
+
+In {product}, the Kubernetes custom actions are provided as a preinstalled plugin, which is disabled by default. You can enable the Kubernetes custom plugin using the following procedure.
path: modules/using-kubernetes-custom-actions/proc-enable-kubernetes-custom-actions-plugin.adoc
user: login: linfraze
body: ```suggestion
In {product}, the Kubernetes custom actions are provided as a preinstalled plugin, which is disabled by default. You can enable the Kubernetes custom plugin by updating the `disabled` key value in your Helm chart.
```
Replace self-referential language with more meaningful information
created_at: 2025-02-25T15:58:00Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,34 @@
+[id='proc-enable-kubernetes-custom-actions-plugin_{context}']
+= Enabling Kubernetes custom actions plugin in {product}
+
+In {product}, the Kubernetes custom actions are provided as a preinstalled plugin, which is disabled by default. You can enable the Kubernetes custom plugin using the following procedure.
+
+.Prerequisites
+
+* {product} is installed and running.
+For more information about installing the {product-short}, see xref:{installing-on-ocp-book-url}#assembly-install-rhdh-ocp-helm[{installing-on-ocp-book-title} with the Helm chart].
path: modules/using-kubernetes-custom-actions/proc-enable-kubernetes-custom-actions-plugin.adoc
user: login: linfraze
body: ```suggestion
* You have installed {product} with the Helm chart.
```
Based on the feedback we received about all of the links in the Prerequisites section of our docs, let's refrain from sending the user out to another doc - it is also assumed that the user has RHDH installed and running, although we might specify that this is a Helm-specific procedure 
created_at: 2025-02-25T16:01:34Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,75 @@
+[id='ref-creating-a-template-using-Kubernetes-custom-actions_{context}']
+= Creating a template using Kubernetes custom actions in {product}
+
+You can create a template by defining a `Template` object as a YAML file.
+
+The `Template` object describes the template and its metadata. It also contains required input variables and a list of actions that are executed by the scaffolding service.
path: modules/using-kubernetes-custom-actions/ref-creating-a-template-using-kubernetes-custom-actions.adoc
user: login: linfraze
body: Helpful conceptual info! :) 
created_at: 2025-02-25T16:03:48Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,62 @@
+[id='ref-supported-Kubernetes-custom-actions_{context}']
+= Supported Kubernetes custom actions in {product}
+
+In {product}, you can use custom Kubernetes actions in scaffolder templates.
+
+== Custom Kubernetes scaffolder actions
path: modules/using-kubernetes-custom-actions/ref-supported-kubernetes-custom-actions.adoc
user: login: linfraze
body: ```suggestion
.Custom Kubernetes scaffolder actions
```
created_at: 2025-02-25T16:04:41Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,62 @@
+[id='ref-supported-Kubernetes-custom-actions_{context}']
+= Supported Kubernetes custom actions in {product}
+
+In {product}, you can use custom Kubernetes actions in scaffolder templates.
+
+== Custom Kubernetes scaffolder actions
+
+Action: kubernetes:create-namespace::
++
+
path: modules/using-kubernetes-custom-actions/ref-supported-kubernetes-custom-actions.adoc
user: login: linfraze
body: I don't think we want 2 line break here. You should be able to add line 11 to line 8 (:: Creates a namespace...) 
created_at: 2025-02-25T16:05:48Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,18 @@
+[id='con-Kubernetes-custom-actions_{context}']
+= Kubernetes custom actions in {product}
+
+The Kubernetes custom actions plugin is preinstalled and disabled on a {product-short} instance by default. You can disable or enable the Kubernetes custom plugin, and change other parameters, by configuring the {product} Helm chart. You can install and use Kubernetes custom actions to create and manage Kubernetes resources.
path: assemblies/assembly-using-kubernetes-custom-actions.adoc
user: login: pabel-rh
body: Thanks for the tip, Lindsey! I've changed the para a little to match your suggestion. Please let me know if it's okay!
created_at: 2025-02-26T08:53:27Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,60 @@
+[id='ref-supported-Kubernetes-custom-actions_{context}']
+= Supported Kubernetes custom actions in {product}
+
+In {product}, you can use custom Kubernetes actions in scaffolder templates.
+
+.Custom Kubernetes scaffolder actions
+
+Action: kubernetes:create-namespace::
+Creates a namespace for the Kubernetes cluster in the {product-short}.
+
+[cols="15%,15%,15%,40%,15%", frame="all", options="header"]
+|===
+|Parameter name
+|Type
+|Requirement
+|Description
+|Example
+
+|`namespace`
+|`string`
+|Required
+|Name of the Kubernetes namespace
+|`{my-product-namespace}`
+
+|`clusterRef`
+|`string`
+|Optional if `url` is defined
path: modules/using-kubernetes-custom-actions/ref-supported-kubernetes-custom-actions.adoc
user: login: dzemanov
body: User must specify either clusterRef or url. User can't specify clusterRef and url - this is error. So clusterRef is not optional if `url` is defined.
created_at: 2025-02-27T12:15:03Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,60 @@
+[id='ref-supported-Kubernetes-custom-actions_{context}']
+= Supported Kubernetes custom actions in {product}
+
+In {product}, you can use custom Kubernetes actions in scaffolder templates.
+
+.Custom Kubernetes scaffolder actions
+
+Action: kubernetes:create-namespace::
+Creates a namespace for the Kubernetes cluster in the {product-short}.
+
+[cols="15%,15%,15%,40%,15%", frame="all", options="header"]
+|===
+|Parameter name
+|Type
+|Requirement
+|Description
+|Example
+
+|`namespace`
+|`string`
+|Required
+|Name of the Kubernetes namespace
+|`{my-product-namespace}`
+
+|`clusterRef`
+|`string`
+|Optional if `url` is defined
+|Cluster resource entity reference from the catalog
+|`bar`
+
+|`url`
+|`string`
+|Optional if `clusterRef` is defined
path: modules/using-kubernetes-custom-actions/ref-supported-kubernetes-custom-actions.adoc
user: login: dzemanov
body: Same as above for `clusterRef`.
created_at: 2025-02-27T12:18:12Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,75 @@
+[id='ref-creating-a-template-using-Kubernetes-custom-actions_{context}']
+= Creating a template using Kubernetes custom actions in {product}
+
+You can create a template by defining a `Template` object as a YAML file.
+
+The `Template` object describes the template and its metadata. It also contains required input variables and a list of actions that are executed by the scaffolding service.
++
+
+[source,yaml,subs="+attributes"]
+----
+apiVersion: scaffolder.backstage.io/v1beta3
+kind: Template
+metadata:
+  name: create-kubernetes-namespace
+  title: Create a kubernetes namespace
+  description: Create a kubernetes namespace
+
+spec:
+  type: service
+  parameters:
+    - title: Information
+      required: [namespace, token]
+      properties:
+        namespace:
+          title: Namespace name
+          type: string
+          description: Name of the namespace to be created
+        clusterRef:
+          title: Cluster reference
+          type: string
+          description: Cluster resource entity reference from the catalog
+          ui:field: EntityPicker
+          ui:options:
+            catalogFilter:
+              kind: Resource
+        url:
+          title: Url
+          type: string
+          description: Url of the kubernetes API, will be used if clusterRef is not provided
+        token:
+          title: Token
+          type: string
+          description: Bearer token to authenticate with
path: modules/using-kubernetes-custom-actions/ref-creating-a-template-using-kubernetes-custom-actions.adoc
user: login: dzemanov
body: One last small question. Do we want to declare token and caData as secrets? Otherwise they can be seen in UI instead of **** and in logs. I have created a small PR to fix this in our example template: https://github.com/backstage/community-plugins/pull/3117/files but it so far hasn't been checked by others so this is up to you. Otherwise great work 🪄!
created_at: 2025-03-05T09:42:20Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,75 @@
+[id='ref-creating-a-template-using-Kubernetes-custom-actions_{context}']
+= Creating a template using Kubernetes custom actions in {product}
+
+You can create a template by defining a `Template` object as a YAML file.
+
+The `Template` object describes the template and its metadata. It also contains required input variables and a list of actions that are executed by the scaffolding service.
++
+
+[source,yaml,subs="+attributes"]
+----
+apiVersion: scaffolder.backstage.io/v1beta3
+kind: Template
+metadata:
+  name: create-kubernetes-namespace
+  title: Create a kubernetes namespace
+  description: Create a kubernetes namespace
+
+spec:
+  type: service
+  parameters:
+    - title: Information
+      required: [namespace, token]
+      properties:
+        namespace:
+          title: Namespace name
+          type: string
+          description: Name of the namespace to be created
+        clusterRef:
+          title: Cluster reference
+          type: string
+          description: Cluster resource entity reference from the catalog
+          ui:field: EntityPicker
+          ui:options:
+            catalogFilter:
+              kind: Resource
+        url:
+          title: Url
+          type: string
+          description: Url of the kubernetes API, will be used if clusterRef is not provided
+        token:
+          title: Token
+          type: string
+          description: Bearer token to authenticate with
path: modules/using-kubernetes-custom-actions/ref-creating-a-template-using-kubernetes-custom-actions.adoc
user: login: dzemanov
body: The secrets PR has been merged, so I think it would be good to be in sync with our example template and update docs to use secrets fields as well @pabel-rh.
created_at: 2025-03-06T10:40:44Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,75 @@
+[id='ref-creating-a-template-using-Kubernetes-custom-actions_{context}']
+= Creating a template using Kubernetes custom actions in {product}
+
+You can create a template by defining a `Template` object as a YAML file.
+
+The `Template` object describes the template and its metadata. It also contains required input variables and a list of actions that are executed by the scaffolding service.
++
+
+[source,yaml,subs="+attributes"]
+----
+apiVersion: scaffolder.backstage.io/v1beta3
+kind: Template
+metadata:
+  name: create-kubernetes-namespace
+  title: Create a kubernetes namespace
+  description: Create a kubernetes namespace
+
+spec:
+  type: service
+  parameters:
+    - title: Information
+      required: [namespace, token]
+      properties:
+        namespace:
+          title: Namespace name
+          type: string
+          description: Name of the namespace to be created
+        clusterRef:
+          title: Cluster reference
+          type: string
+          description: Cluster resource entity reference from the catalog
+          ui:field: EntityPicker
+          ui:options:
+            catalogFilter:
+              kind: Resource
+        url:
+          title: Url
+          type: string
+          description: Url of the kubernetes API, will be used if clusterRef is not provided
+        token:
+          title: Token
+          type: string
+          description: Bearer token to authenticate with
path: modules/using-kubernetes-custom-actions/ref-creating-a-template-using-kubernetes-custom-actions.adoc
user: login: pabel-rh
body: Changed them, Dominika! :) 
created_at: 2025-03-06T12:18:33Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,75 @@
+[id='ref-creating-a-template-using-Kubernetes-custom-actions_{context}']
+= Creating a template using Kubernetes custom actions in {product}
+
+You can create a template by defining a `Template` object as a YAML file.
+
+The `Template` object describes the template and its metadata. It also contains required input variables and a list of actions that are executed by the scaffolding service.
++
+
+[source,yaml,subs="+attributes"]
+----
+apiVersion: scaffolder.backstage.io/v1beta3
+kind: Template
+metadata:
+  name: create-kubernetes-namespace
+  title: Create a kubernetes namespace
+  description: Create a kubernetes namespace
+
+spec:
+  type: service
+  parameters:
+    - title: Information
+      required: [namespace, token]
+      properties:
+        namespace:
+          title: Namespace name
+          type: string
+          description: Name of the namespace to be created
+        clusterRef:
+          title: Cluster reference
+          type: string
+          description: Cluster resource entity reference from the catalog
+          ui:field: EntityPicker
+          ui:options:
+            catalogFilter:
+              kind: Resource
+        url:
+          title: Url
+          type: string
+          description: Url of the kubernetes API, will be used if clusterRef is not provided
+        token:
+          title: Token
+          type: string
+          description: Bearer token to authenticate with
path: modules/using-kubernetes-custom-actions/ref-creating-a-template-using-kubernetes-custom-actions.adoc
user: login: dzemanov
body: ```suggestion
          type: string
          ui:field: Secret
          description: Bearer token to authenticate with
```
created_at: 2025-03-06T13:52:25Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,75 @@
+[id='ref-creating-a-template-using-Kubernetes-custom-actions_{context}']
+= Creating a template using Kubernetes custom actions in {product}
+
+You can create a template by defining a `Template` object as a YAML file.
+
+The `Template` object describes the template and its metadata. It also contains required input variables and a list of actions that are executed by the scaffolding service.
++
+
+[source,yaml,subs="+attributes"]
+----
+apiVersion: scaffolder.backstage.io/v1beta3
+kind: Template
+metadata:
+  name: create-kubernetes-namespace
+  title: Create a kubernetes namespace
+  description: Create a kubernetes namespace
+
+spec:
+  type: service
+  parameters:
+    - title: Information
+      required: [namespace, token]
+      properties:
+        namespace:
+          title: Namespace name
+          type: string
+          description: Name of the namespace to be created
+        clusterRef:
+          title: Cluster reference
+          type: string
+          description: Cluster resource entity reference from the catalog
+          ui:field: EntityPicker
+          ui:options:
+            catalogFilter:
+              kind: Resource
+        url:
+          title: Url
+          type: string
+          description: Url of the kubernetes API, will be used if clusterRef is not provided
+        token:
+          title: Token
+          type: string
+          description: Bearer token to authenticate with
+        skipTLSVerify:
+          title: Skip TLS verification
+          type: boolean
+          description: Skip TLS certificate verification, not recommended to use in production environment, default to false
+        caData:
+          title: CA data
+          type: string
+          description: Certificate Authority base64 encoded certificate
path: modules/using-kubernetes-custom-actions/ref-creating-a-template-using-kubernetes-custom-actions.adoc
user: login: dzemanov
body: ```suggestion
          type: string
          ui:field: Secret
          description: Certificate Authority base64 encoded certificate
```
created_at: 2025-03-06T13:53:08Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,75 @@
+[id='ref-creating-a-template-using-Kubernetes-custom-actions_{context}']
+= Creating a template using Kubernetes custom actions in {product}
+
+You can create a template by defining a `Template` object as a YAML file.
+
+The `Template` object describes the template and its metadata. It also contains required input variables and a list of actions that are executed by the scaffolding service.
++
+
+[source,yaml,subs="+attributes"]
+----
+apiVersion: scaffolder.backstage.io/v1beta3
+kind: Template
+metadata:
+  name: create-kubernetes-namespace
+  title: Create a kubernetes namespace
+  description: Create a kubernetes namespace
+
+spec:
+  type: service
+  parameters:
+    - title: Information
+      required: [namespace, token]
+      properties:
+        namespace:
+          title: Namespace name
+          type: string
+          description: Name of the namespace to be created
+        clusterRef:
+          title: Cluster reference
+          type: string
+          description: Cluster resource entity reference from the catalog
+          ui:field: EntityPicker
+          ui:options:
+            catalogFilter:
+              kind: Resource
+        url:
+          title: Url
+          type: string
+          description: Url of the kubernetes API, will be used if clusterRef is not provided
+        token:
+          title: Token
+          type: string
+          description: Bearer token to authenticate with
path: modules/using-kubernetes-custom-actions/ref-creating-a-template-using-kubernetes-custom-actions.adoc
user: login: dzemanov
body: @pabel-rh Please leave the type: string there, only add new line:
`ui:field: Secret`
created_at: 2025-03-06T14:21:12Z
author_association: MEMBER

PR comments:
user: login: rhdh-bot
created_at: 2025-02-25T05:39:20Z
body: Updated preview: https://redhat-developer.github.io/red-hat-developers-documentation-rhdh/pr-951/ @ 03/11/25 05:48:17
author_association: COLLABORATOR
user: login: pabel-rh
created_at: 2025-02-25T05:47:37Z
body: The term "Kubernetes scaffolder actions" or "Kubernetes actions" is still in discussion. 
cc: @dzemanov 
author_association: MEMBER
user: login: hmanwani-rh
created_at: 2025-03-13T12:37:59Z
body: /cherry-pick release-1.5
author_association: MEMBER
user: login: openshift-cherrypick-robot
created_at: 2025-03-13T12:38:05Z
body: @hmanwani-rh: once the present PR merges, I will cherry-pick it on top of `release-1.5` in a new PR and assign it to you.

<details>

In response to [this](https://github.com/redhat-developer/red-hat-developers-documentation-rhdh/pull/951#issuecomment-2721114301):

>/cherry-pick release-1.5


Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
</details>
author_association: CONTRIBUTOR
user: login: openshift-cherrypick-robot
created_at: 2025-03-13T12:38:54Z
body: @hmanwani-rh: new pull request created: #983

<details>

In response to [this](https://github.com/redhat-developer/red-hat-developers-documentation-rhdh/pull/951#issuecomment-2721114301):

>/cherry-pick release-1.5


Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
</details>
author_association: CONTRIBUTOR