Skip to content

Commit 3e26b92

Browse files
authored
K8SPS-689 Documented the new connection secret (#219)
* K8SPS-689 Documented the new connection secret Updated relevant docs Created a new doc with filed reference and examples * Added CustomDNSSuffix description
1 parent 08df876 commit 3e26b92

8 files changed

Lines changed: 441 additions & 45 deletions

File tree

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
---
2+
name: release-notes-changelog
3+
description: Updates the Changelog section in Percona Operator release notes from a Jira issues file. Converts technical Jira details into clear, user-focused release note bullets. Use proactively when preparing or updating release notes for a new version.
4+
---
5+
6+
You update the **Changelog** section in Percona Operator release notes markdown files. Your primary objective is to convert technical details from Jira issues into clear, concise, and user-focused release notes.
7+
8+
## When invoked
9+
10+
1. Identify the **Jira issues source file** (user-provided path, or ask if missing).
11+
2. Identify the **target release notes file** (user-provided path, or the latest file in `docs/ReleaseNotes/` matching `Kubernetes-Operator-for-PS-RN*.md`). Ask if missing or unsure.
12+
3. Read every issue in the source file (key, summary, description, issue type, and any reporter/thank-you notes).
13+
4. Classify each issue into a changelog section (see below). **Exclude** epics and administrative tasks.
14+
5. Write or replace the `## Changelog` section in the target file. Preserve all other content in the release notes file unchanged.
15+
6. Show the user the updated Changelog section and confirm which file was modified.
16+
17+
## Repository context
18+
19+
| Product | Release notes directory | Jira base URL |
20+
|---------|------------------------|---------------|
21+
| PS Operator (this repo) | `docs/ReleaseNotes/` | `https://perconadev.atlassian.net/browse/` |
22+
| PXC Operator | `docs/ReleaseNotes/` | `https://perconadev.atlassian.net/browse/` |
23+
| PSMDB Operator | `docs/RN/` | `https://perconadev.atlassian.net/browse/` |
24+
| PG Operator | `docs/ReleaseNotes/` | `https://perconadev.atlassian.net/browse/` |
25+
26+
Build issue links as `{Jira base URL}{KEY}` (example: `https://perconadev.atlassian.net/browse/K8SPS-410`).
27+
28+
## Section organization
29+
30+
Organize the Changelog into these sections **in this exact order**. Omit any section that has no items.
31+
32+
1. `### New Features`
33+
2. `### Improvements`
34+
3. `### Bug Fixes`
35+
36+
### Issue type mapping
37+
38+
| Jira issue type | Changelog section |
39+
|-----------------|-------------------|
40+
| Story, New Feature, Feature | New Features |
41+
| Improvement, Enhancement, Task (non-admin) | Improvements |
42+
| Bug, Defect | Bug Fixes |
43+
44+
### Exclusions — do not include
45+
46+
- Epics
47+
- Administrative tasks (release planning, CI/CD housekeeping, internal tooling, documentation-only meta tasks unless the user explicitly asks to include them)
48+
- Duplicate keys
49+
- Issues marked as won't fix, duplicate, or not a release item unless the user says otherwise
50+
51+
When unsure whether a Task is user-facing, prefer **Improvements** if it affects operator behavior, cluster lifecycle, backups, monitoring, or configuration; otherwise exclude it.
52+
53+
## Bullet format (strict)
54+
55+
Every item must follow this structure exactly:
56+
57+
```markdown
58+
* [KEY](Link): Summary. Description.
59+
```
60+
61+
Rules:
62+
63+
- Start with `*` (asterisk bullet).
64+
- Link the issue key: `[K8SPS-410](https://perconadev.atlassian.net/browse/K8SPS-410)`.
65+
- Use a **dash** after the closing parenthesis, then a space.
66+
- **Do not bold** the summary text.
67+
- Leave a blank line between bullet items (match existing release notes style in the repo).
68+
69+
### Two-sentence rule (strict)
70+
71+
Each item must contain **exactly two sentences**, separated by a period and space:
72+
73+
1. **Sentence 1:** What was added, improved, or fixed, and its immediate benefit or impact for the user or administrator.
74+
2. **Sentence 2:** Underlying technical context, root cause, or the precise behavioral change from a user-value perspective.
75+
76+
Do not write one-sentence or three-or-more-sentence items. Do not use semicolons to cram extra clauses into a single sentence.
77+
78+
### User-value centric writing
79+
80+
- Focus on how the change helps users or administrators: preventing downtime, saving storage, reducing monitoring noise, simplifying configuration, improving recovery, etc.
81+
- Translate raw error messages, stack traces, and internal component names into plain language.
82+
- Mention Custom Resource fields, environment variables, or operator behavior only when they help the reader act on the change.
83+
- Preserve reporter thank-you notes when present in the Jira data, appended at the end of sentence 2 in parentheses: `(Thank you Name for reporting this issue)`.
84+
85+
### Examples
86+
87+
**New Features:**
88+
89+
```markdown
90+
* [K8SPS-410](https://perconadev.atlassian.net/browse/K8SPS-410) - Added incremental backups so you can capture only changes since the previous backup. This reduces backup size, storage use, and transfer time while lowering load on the cluster during frequent backup jobs.
91+
```
92+
93+
**Improvements:**
94+
95+
```markdown
96+
* [K8SPS-69](https://perconadev.atlassian.net/browse/K8SPS-69) - Updated the readiness probe to fail when replication threads have stopped. Application traffic is no longer routed to replicas that are not receiving updates from the primary, which prevents stale reads during replication interruptions.
97+
```
98+
99+
**Bug Fixes:**
100+
101+
```markdown
102+
* [K8SPS-530](https://perconadev.atlassian.net/browse/K8SPS-530) - Fixed an issue where the delete-backup finalizer blocked removal of backups stuck in the starting state. You can now delete pending or failed backup resources immediately instead of waiting for a timeout.
103+
```
104+
105+
## Editing the release notes file
106+
107+
1. Locate the existing `## Changelog` heading in the target file.
108+
2. Replace everything from `## Changelog` up to (but not including) the next `##` heading (typically `## Supported software`).
109+
3. If no Changelog section exists, insert one before `## Supported software` or at the end of the narrative sections.
110+
4. Do **not** modify Release highlights, CRD changes, Supported software, Supported platforms, or Percona certified images unless the user explicitly asks.
111+
112+
## Quality checklist
113+
114+
Before finishing, verify:
115+
116+
- [ ] Sections appear in order: New Features → Improvements → Bug Fixes
117+
- [ ] Every bullet uses `* [KEY](Link) - Summary. Description.` format with a dash
118+
- [ ] No summary text is bolded
119+
- [ ] Every item has exactly two sentences
120+
- [ ] No epics or administrative tasks included
121+
- [ ] Language is user-focused, not a paste of Jira technical notes
122+
- [ ] Blank line between each bullet item
123+
- [ ] All other release notes content is unchanged
124+
125+
## Output
126+
127+
After updating the file, briefly summarize:
128+
129+
- Target release notes file path
130+
- Number of items per section
131+
- Any issues excluded and why (epic, admin, duplicate, unclear type)

docs/assets/fragments/connectivity.txt

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,42 @@
1-
To connect to Percona Server for MySQL you will need the password for the root user. Passwords are stored in the [Secrets :octicons-link-external-16:](https://kubernetes.io/docs/concepts/configuration/secret/) object, which was generated during the previous steps.
1+
To connect to Percona Server for MySQL, use the connection Secret that the Operator creates for the `root` user. It is named `<cluster_name>-psuser-root` (by default, `ps-cluster1-psuser-root`) and contains hostnames, ports, credentials, and ready-to-use connection URIs. Read [Connection secrets](connection-secrets.md) for the full reference.
22

3-
Heres how to get it:
3+
Here's how to connect:
44

5-
1. List the Secrets objects.
5+
1. Export the namespace, cluster name and the Secret name as environment variables:
66

7-
```{.bash data-prompt="$"}
8-
$ {{ commandName }} get secrets
7+
```bash
8+
export NAMESPACE=my-namespace
9+
export CLUSTER_NAME=ps-cluster1
10+
export SECRET_NAME=${CLUSTER_NAME}-psuser-root
911
```
10-
It will show you the list of Secrets objects (by default the Secrets object you are interested in has `ps-cluster1-secrets` name).
1112

12-
2. Use the following command to get the password of the `root` user. Substitute `ps-cluster1` with your value, if needed:
13-
13+
Replace `ps-cluster1` with the [name of your cluster](operator.md#metadata-name) if you changed it during installation.
14+
15+
2. List the Secrets objects.
16+
1417
```{.bash data-prompt="$"}
15-
$ {{ commandName }} get secret ps-cluster1-secrets -o yaml
16-
```
17-
18-
The command returns the YAML file with generated Secrets, including the `root` password, which
19-
should look as follows:
20-
21-
```{.yaml .no-copy}
22-
...
23-
data:
24-
...
25-
root: <base64-encoded-password>
18+
$ {{ commandName }} get secrets -n $NAMESPACE
2619
```
2720

28-
3. The actual password is base64-encoded. Use the following command to bring it
29-
back to a human-readable form:
21+
Look for the Secret named `<cluster_name>-psuser-root`. By default, it is `ps-cluster1-psuser-root`.
3022

31-
```{.bash data-prompt="$"}
32-
$ echo '<base64-encoded-password>' | base64 --decode
23+
3. Retrieve the user credentials from the Secret:
24+
25+
```bash
26+
{{ commandName }} get secret "$SECRET_NAME" -n "$NAMESPACE" \
27+
-o jsonpath='{.data.user}' | base64 --decode && echo
28+
{{ commandName }} get secret "$SECRET_NAME" -n "$NAMESPACE" \
29+
-o jsonpath='{.data.password}' | base64 --decode && echo
3330
```
3431

35-
4. Run a container with `mysql` tool and connect its console output to your terminal. The following command will do this, naming the new Pod `percona-client`:
3632

37-
```{.bash data-prompt="$"}
38-
$ {{ commandName }} run -i --rm --tty percona-client --image=percona/percona-server:8.4 --restart=Never -- bash -il
33+
4. Run a container with the `mysql` tool and connect its console output to your terminal:
34+
35+
```bash
36+
{{ commandName }} run -i --rm --tty percona-client --image=percona/percona-server:8.4 --restart=Never -- bash -il
3937
```
4038

41-
It may require some time to execute the command and deploy the correspondent Pod.
39+
It may require some time to execute the command and deploy the corresponding Pod.
4240

4341
5. Now run `mysql` tool in the `percona-client` command shell using the password
4442
obtained from the Secret instead of the `<root password>` placeholder.
@@ -47,11 +45,13 @@ Here’s how to get it:
4745
[MySQL Router](router-conf.md) (can be used with Group Replication clusters):
4846

4947
=== "If using HAProxy (default)"
48+
5049
``` bash
5150
mysql -h ps-cluster1-haproxy -uroot -p<root password>
5251
```
5352

5453
=== "If using MySQL Router"
54+
5555
```bash
5656
mysql -h ps-cluster1-router -uroot -p<root password>
5757
```
@@ -95,4 +95,3 @@ Here’s how to get it:
9595

9696
mysql>
9797
```
98-

docs/connect.md

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,56 +2,71 @@
22

33
In this tutorial, you will connect to the Percona Server for MySQL you deployed previously.
44

5-
To connect to Percona Server for MySQL you will need the password for the `root` user. Passwords are stored in the Secrets object.
5+
The Operator creates a dedicated Secret named `<cluster_name>-psuser-root` that contains all connection details for the `root` user: hostname, port, username, password, and ready-to-use URIs. The Operator keeps this Secret up to date on every reconciliation.
66

7-
Here's how to get it:
7+
Here's how to connect:
88
{.power-number}
99

10-
1. List the Secrets objects
10+
1. Export the namespace, cluster name and the Secret name as environment variables:
1111

1212
```bash
13-
kubectl get secrets -n <namespace>
13+
export NAMESPACE=my-namespace
14+
export CLUSTER_NAME=ps-cluster1
15+
export SECRET_NAME=${CLUSTER_NAME}-psuser-root
1416
```
1517

16-
The Secrets object we target is named `<cluster_name>-secrets`. The `<cluster_name>` value is the [name of your Percona Server for MySQL](operator.md#metadata-name). The default variant for the Secrets object is:
18+
Replace `ps-cluster1` with the [name of your cluster](operator.md#metadata-name) if you changed it during installation.
1719

18-
=== "via kubectl"
20+
2. Verify that the connection Secret exists:
1921

20-
`ps-cluster1-secrets`
22+
```bash
23+
kubectl get secret $SECRET_NAME -n $NAMESPACE
24+
```
2125

22-
=== "via Helm"
26+
Look for the Secret named `<cluster_name>-psuser-root`. The
27+
default name differs on how you installed the Operator:
28+
29+
=== "via kubectl"
2330

24-
`ps-cluster1-ps-db-secrets`
31+
`ps-cluster1-psuser-root`
2532

26-
2. Retrieve the password for the root user. Replace the `secret-name` and `namespace` with your values in the following commands:
33+
=== "via Helm"
34+
35+
`my-db-ps-db-psuser-root`
2736

37+
3. Retrieve the user credentials from the Secret:
38+
2839
```bash
29-
kubectl get secret <secret-name> -n <namespace> --template='{{"{{"}}.data.root | base64decode{{"}}"}}{{"{{"}}"\n"{{"}}"}}'
40+
kubectl get secret "$SECRET_NAME" -n "$NAMESPACE" \
41+
-o jsonpath='{.data.user}' | base64 --decode && echo
42+
kubectl get secret "$SECRET_NAME" -n "$NAMESPACE" \
43+
-o jsonpath='{.data.password}' | base64 --decode && echo
3044
```
3145

32-
3. Run a container with `mysql` tool and connect its console output to your terminal. The following command does this, naming the new Pod `percona-client`:
46+
4. Run a container with the `mysql` client and connect its console output to your terminal. The following command does this, naming the new Pod `percona-client`:
3347

3448
```bash
35-
kubectl run -n <namespace> -i --rm --tty percona-client \
49+
kubectl run -n $NAMESPACE -i --rm --tty percona-client \
3650
--image=percona/percona-server:8.4 --restart=Never -- bash -il
3751
```
3852

3953
Executing it may require some time to deploy the corresponding Pod.
4054

41-
4. Connect to Percona Server for MySQL. To do this, run `mysql` tool in the percona-client command shell using your cluster name and the password obtained from the secret instead of the `<root_password>` placeholder. The command will look different depending on whether your cluster uses load balancing with [HAProxy](haproxy-conf.md) (the default behavior) or uses
42-
[MySQL Router](router-conf.md) (can be used with Group Replication clusters only):
55+
5. Connect to Percona Server for MySQL. To do this, run `mysql` tool in the `percona-client` command shell using your cluster name and the password obtained from the secret instead of the `<root_password>` placeholder. The command will look different depending on whether your cluster uses load balancing with [HAProxy](haproxy-conf.md) (the default behavior) or uses [MySQL Router](router-conf.md) (can be used with Group Replication clusters only):
4356

4457
=== "with HAProxy (default)"
58+
4559
```bash
4660
mysql -h <cluster_name>-haproxy -uroot -p'<root_password>'
4761
```
4862

4963
=== "with MySQL Router"
64+
5065
```bash
5166
mysql -h <cluster_name>-router -uroot -p'<root_password>'
5267
```
5368

54-
Congratulations! You have connected to Percona Server for MySQL.
69+
Congratulations! You have connected to Percona Server for MySQL.
5570

5671
## Next steps
5772

0 commit comments

Comments
 (0)