Skip to content

Commit eb6f002

Browse files
authored
Merge branch 'release-1.5' into RHIDP-6323
2 parents 91e2645 + dd9ea3c commit eb6f002

11 files changed

+276
-11
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[id='con-Kubernetes-custom-actions_{context}']
2+
= Kubernetes custom actions in {product}
3+
4+
include::{docdir}/artifacts/snip-technology-preview.adoc[]
5+
6+
With Kubernetes custom actions, you can create and manage Kubernetes resources.
7+
8+
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.
9+
10+
[NOTE]
11+
====
12+
Kubernetes scaffolder actions and Kubernetes custom actions refer to the same concept throughout this documentation.
13+
====
14+
15+
16+
include::modules/using-kubernetes-custom-actions/proc-enable-kubernetes-custom-actions-plugin.adoc[leveloffset=+1]
17+
18+
include::modules/using-kubernetes-custom-actions/proc-using-kubernetes-custom-actions-plugin.adoc[leveloffset=+1]
19+
20+
include::modules/using-kubernetes-custom-actions/ref-creating-a-template-using-kubernetes-custom-actions.adoc[leveloffset=+1]
21+
22+
include::modules/using-kubernetes-custom-actions/ref-supported-kubernetes-custom-actions.adoc[leveloffset=+2]

assemblies/dynamic-plugins/assembly-configuring-rhdh-plugins.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,7 @@ include::../assembly-bulk-importing-from-github.adoc[leveloffset=+1]
2828

2929
include::../assembly-using-servicenow.adoc[leveloffset=+1]
3030

31+
include::../assembly-using-kubernetes-custom-actions.adoc[leveloffset=+1]
32+
3133
// Overriding Core Backend Service Configuration
3234
include::../modules/dynamic-plugins/con-overriding-core-backend-services.adoc[leveloffset=+1]

modules/release-notes/README.adoc

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
= Single-sourcing release notes
2+
3+
== Single-sourcing general purpose release notes
4+
5+
The general purpose release notes content is single-sourced from link:https://issues.redhat.com/browse/RHIDP[the JIRA project].
6+
7+
.Prerequisites
8+
* In link:https://issues.redhat.com/secure/Dashboard.jspa?selectPageId=12364101#SIGwKWmOqDCVBoapBCJiDqhoiKInaroYEg9j2PldSYMUcQVVVdrFHVDUxs1uBtQolXVZgDTdZwjXSCNOA1u11Xeog9Xjb100DUNCh2jwi0TVgzWteeg2FC1TmbT1TUrftGiFHa2CjQtp2TX1DnIGgGCIgEKI+iQfrUlV2AvkJQA[the JIRA project]:
9+
** *Fix Version/s* is set.
10+
** *Release Notes Text* is set using following format: a level 0 title followed by descriptive content, such as:
11+
+
12+
.*Release Notes Text* sample
13+
----
14+
= Configurable PVC mounting for containers
15+
16+
Previously, the default Persistent Volume Claim (PVC) could only be mounted to the Backstage container. With this update, you can now configure which container(s) the PVC should be mounted to, providing greater flexibility in storage management.
17+
----
18+
** *Release Notes Type* is set to `Enhancement`, `Feature`, `Removed Functionality`, `Deprecated Functionality`, `Developer Preview`, `Technology Preview`, `Known Issue`, or `Bug Fix`.
19+
** *Release Notes Status* is set to `Done`.
20+
21+
* On the single-sourcing environment: Bash, Git, Python, and Pip are installed.
22+
23+
.Procedure
24+
. Verify the `product-version` and `product-bundle-version` attributes values in the `artifacts/attributes.adoc` file.
25+
26+
. Open a terminal and change directory to the Git repository root.
27+
28+
. Install required python modules.
29+
+
30+
----
31+
$ pip3 install --requirement requirements.txt
32+
----
33+
34+
. Single-source content from JIRA.
35+
+
36+
----
37+
$ python modules/release-notes/single-source-release-notes.py
38+
----
39+
40+
.Verification
41+
* Verify the changed content:
42+
+
43+
----
44+
$ git diff
45+
----
46+

modules/release-notes/single-source-release-notes-template.adoc.jinja

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
== {{ title }} in {{ fixversion }}
1111
{% endif %}
1212
[id="{{ issue.fields.customfield_12320850 | lower | replace(" ", "-") }}-{{ issue.key | lower }}"]
13-
=== {{ issue.fields.summary }}
14-
{% else -%}
13+
==
14+
{%- else -%}
1515
[id="{{ issue.fields.customfield_12320850 | lower | replace(" ", "-") }}-{{ issue.key | lower }}"]
16-
== {{ issue.fields.summary }}
17-
{% endif %}
16+
=
17+
{%- endif -%}
1818
{{ issue.fields.customfield_12317313 }}
1919
{% if template == "with-jira-link" or template == "with-z-stream-section" %}
2020

modules/release-notes/single-source-release-notes.jira2asciidoc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ sections:
6969
- id: fixed-issues
7070
title: Fixed issues
7171
description: |
72-
This section lists issues fixed in {product} {product-version}.
72+
This section lists issues fixed in {product} {product-version} that have a significant impact on users.
7373
query: >
7474
project = "Red Hat Internal Developer Platform"
7575
AND "Release Note Status" = "Done"

modules/release-notes/single-source-release-notes.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,8 @@
4747
items = lines.rsplit(':', 2)
4848
attributes[items[1]] = items[2].strip()
4949

50-
product_version_minor = attributes["product-version"]
50+
product_version_minor = attributes["product-version"] + ".0"
5151
product_version_patch = attributes["product-bundle-version"]
52-
# Until 1.4 at least, Jira has no z-stream 0. Use the y-stream instead.
53-
if re.search('.0$',product_version_patch):
54-
product_version_patch = product_version_minor
5552

5653
# Load the configuration file to get the sections and their Jira queries.
5754
with open(config_file) as file:
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
[id='proc-enable-kubernetes-custom-actions-plugin_{context}']
2+
= Enabling Kubernetes custom actions plugin in {product}
3+
4+
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.
5+
6+
.Prerequisites
7+
8+
* You have installed {product} with the Helm chart.
9+
10+
.Procedure
11+
12+
To enable the Kubernetes custom actions plugin, complete the following step:
13+
14+
* In your Helm chart, add a `package` with the Kubernetes custom action plugin name and update the `disabled` field. For example:
15+
+
16+
--
17+
[source,yaml]
18+
----
19+
global:
20+
dynamic:
21+
includes:
22+
- dynamic-plugins.default.yaml
23+
plugins:
24+
- package: ./dynamic-plugins/dist/backstage-community-plugin-scaffolder-backend-module-kubernetes-dynamic
25+
disabled: false
26+
----
27+
28+
[NOTE]
29+
====
30+
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.
31+
====
32+
--
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
[id='proc-using-kubernetes-custom-actions-plugin_{context}']
2+
= Using Kubernetes custom actions plugin in {product}
3+
4+
In {product}, the Kubernetes custom actions enable you to run template actions for Kubernetes.
5+
6+
.Procedure
7+
8+
* To use a Kubernetes custom action in your custom template, add the following Kubernetes actions to your template:
9+
+
10+
11+
[source,yaml,subs="+attributes"]
12+
----
13+
action: kubernetes:create-namespace
14+
id: create-kubernetes-namespace
15+
name: Create kubernetes namespace
16+
input:
17+
namespace: {my-product-namespace}
18+
clusterRef: bar
19+
token: TOKEN
20+
skipTLSVerify: false
21+
caData: Zm9v
22+
labels: app.io/type=ns; app.io/managed-by=org;
23+
24+
----
25+
26+
[role="_additional-resources"]
27+
.Additional resource
28+
29+
* link:{customizing-book-url#configuring-templates}[Configuring templates].
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
[id='ref-creating-a-template-using-Kubernetes-custom-actions_{context}']
2+
= Creating a template using Kubernetes custom actions in {product}
3+
4+
You can create a template by defining a `Template` object as a YAML file.
5+
6+
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.
7+
+
8+
9+
[source,yaml,subs="+attributes"]
10+
----
11+
apiVersion: scaffolder.backstage.io/v1beta3
12+
kind: Template
13+
metadata:
14+
name: create-kubernetes-namespace
15+
title: Create a kubernetes namespace
16+
description: Create a kubernetes namespace
17+
18+
spec:
19+
type: service
20+
parameters:
21+
- title: Information
22+
required: [namespace, token]
23+
properties:
24+
namespace:
25+
title: Namespace name
26+
type: string
27+
description: Name of the namespace to be created
28+
clusterRef:
29+
title: Cluster reference
30+
type: string
31+
description: Cluster resource entity reference from the catalog
32+
ui:field: EntityPicker
33+
ui:options:
34+
catalogFilter:
35+
kind: Resource
36+
url:
37+
title: Url
38+
type: string
39+
description: Url of the kubernetes API, will be used if clusterRef is not provided
40+
token:
41+
title: Token
42+
type: string
43+
ui:field: Secret
44+
description: Bearer token to authenticate with
45+
skipTLSVerify:
46+
title: Skip TLS verification
47+
type: boolean
48+
description: Skip TLS certificate verification, not recommended to use in production environment, default to false
49+
caData:
50+
title: CA data
51+
type: string
52+
ui:field: Secret
53+
description: Certificate Authority base64 encoded certificate
54+
labels:
55+
title: Labels
56+
type: string
57+
description: Labels to be applied to the namespace
58+
ui:widget: textarea
59+
ui:options:
60+
rows: 3
61+
ui:help: 'Hint: Separate multiple labels with a semicolon!'
62+
ui:placeholder: 'kubernetes.io/type=namespace; app.io/managed-by=org'
63+
64+
steps:
65+
- id: create-kubernetes-namespace
66+
name: Create kubernetes namespace
67+
action: kubernetes:create-namespace
68+
input:
69+
namespace: ${{ parameters.namespace }}
70+
clusterRef: ${{ parameters.clusterRef }}
71+
url: ${{ parameters.url }}
72+
token: ${{ secrets.token }}
73+
skipTLSVerify: ${{ parameters.skipTLSVerify }}
74+
caData: ${{ secrets.caData }}
75+
labels: ${{ parameters.labels }}
76+
77+
----
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
[id='ref-supported-Kubernetes-custom-actions_{context}']
2+
= Supported Kubernetes custom actions in {product}
3+
4+
In {product}, you can use custom Kubernetes actions in scaffolder templates.
5+
6+
.Custom Kubernetes scaffolder actions
7+
8+
Action: kubernetes:create-namespace::
9+
Creates a namespace for the Kubernetes cluster in the {product-short}.
10+
11+
[cols="15%,15%,15%,40%,15%", frame="all", options="header"]
12+
|===
13+
|Parameter name
14+
|Type
15+
|Requirement
16+
|Description
17+
|Example
18+
19+
|`namespace`
20+
|`string`
21+
|Required
22+
|Name of the Kubernetes namespace
23+
|`{my-product-namespace}`
24+
25+
|`clusterRef`
26+
|`string`
27+
|Required only if `url` is not defined. You cannot specify both `url` and `clusterRef`.
28+
|Cluster resource entity reference from the catalog
29+
|`bar`
30+
31+
|`url`
32+
|`string`
33+
|Required only if `clusterRef` is not defined. You cannot specify both `url` and `clusterRef`.
34+
|API url of the Kubernetes cluster
35+
|`https://api.foo.redhat.com:6443`
36+
37+
|`token`
38+
|`String`
39+
|Required
40+
|Kubernetes API bearer token used for authentication
41+
|
42+
43+
|`skipTLSVerify`
44+
|`boolean`
45+
|Optional
46+
|If true, certificate verification is skipped
47+
|false
48+
49+
|`caData`
50+
|`string`
51+
|Optional
52+
|Base64 encoded certificate data
53+
|
54+
55+
|`label`
56+
|`string`
57+
|Optional
58+
|Labels applied to the namespace
59+
|app.io/type=ns; app.io/managed-by=org;
60+
|===

0 commit comments

Comments
 (0)