Skip to content

Commit 16809c2

Browse files
committed
📚 Sync docs from alaudadevops/tektoncd-operator on c77abd45db5ea12bd8882164817543451d0c6b5b
Source: docs: add CLI upgrade operator operation instructions (#232) Author: l-qing Ref: refs/heads/release-4.1 Commit: c77abd45db5ea12bd8882164817543451d0c6b5b This commit automatically syncs documentation changes from the source-docs repository. 🔗 View source commit: AlaudaDevops/tektoncd-operator@c77abd4 🤖 Synced on 2025-07-17 07:26:23 UTC
1 parent 9f23bac commit 16809c2

File tree

2 files changed

+85
-3
lines changed

2 files changed

+85
-3
lines changed

‎.github/SYNC_INFO.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Documentation Sync Information
22

3-
- **Last synced**: 2025-07-16 09:01:54 UTC
3+
- **Last synced**: 2025-07-17 07:26:23 UTC
44
- **Source repository**: alaudadevops/tektoncd-operator
5-
- **Source commit**: [d29479bcac2a1d45a0c11d058d4ad26274a8939f](https://github.com/alaudadevops/tektoncd-operator/commit/d29479bcac2a1d45a0c11d058d4ad26274a8939f)
5+
- **Source commit**: [c77abd45db5ea12bd8882164817543451d0c6b5b](https://github.com/alaudadevops/tektoncd-operator/commit/c77abd45db5ea12bd8882164817543451d0c6b5b)
66
- **Triggered by**: l-qing
7-
- **Workflow run**: [#19](https://github.com/alaudadevops/tektoncd-operator/actions/runs/16315149670)
7+
- **Workflow run**: [#21](https://github.com/alaudadevops/tektoncd-operator/actions/runs/16338908053)
88

99
## Files synced:
1010
- docs/

‎docs/en/upgrade/upgrade.mdx‎

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,88 @@ Before upgrading the `Alauda DevOps Pipelines` Operator, ensure you:
7878
- Verify that your Tekton components are functioning correctly
7979
- Test that your pipelines can run successfully
8080

81+
### Using `kubectl` CLI
82+
83+
You can also upgrade the `Alauda DevOps Pipelines` Operator using the command line interface. This method is useful for automation or when you prefer CLI-based operations.
84+
85+
1. **Check Current Subscription**
86+
- First, identify the current subscription and its channel:
87+
```bash
88+
$ kubectl get subscriptions.operators.coreos.com -A | grep tektoncd-operator
89+
90+
NAMESPACE NAME PACKAGE SOURCE CHANNEL
91+
tekton-operator tektoncd-operator tektoncd-operator platform latest
92+
```
93+
94+
2. **Switch to Target Channel**
95+
- If you need to upgrade to a version in a different channel, patch the subscription:
96+
```bash
97+
$ kubectl patch subscriptions.operators.coreos.com tektoncd-operator --type merge -p '{"spec":{"channel": "<target-channel>"}}' -n tekton-operator
98+
```
99+
Replace `<target-channel>` with the desired channel (e.g., `pipelines-4.1`, `latest`).
100+
101+
3. **Wait for UpgradePending State**
102+
- Monitor the subscription status until it shows `UpgradePending`:
103+
```bash
104+
$ kubectl get subscriptions.operators.coreos.com tektoncd-operator -n tekton-operator -o yaml
105+
106+
status:
107+
installplan:
108+
apiVersion: operators.coreos.com/v1alpha1
109+
kind: InstallPlan
110+
name: install-abc123
111+
state: UpgradePending
112+
```
113+
Look for the `state: UpgradePending` in the output.
114+
115+
4. **Approve the InstallPlan**
116+
- When the subscription is in `UpgradePending` state, find the corresponding InstallPlan:
117+
```bash
118+
$ kubectl get installplan -n tekton-operator
119+
120+
NAME CSV APPROVAL APPROVED
121+
install-abc123 tektoncd-operator.v4.x.x Manual false
122+
```
123+
124+
- Approve the InstallPlan by setting the `approved` field to `true`:
125+
```bash
126+
$ kubectl patch installplans.operators.coreos.com <installplan-name> --type merge -p '{"spec":{"approved":true}}' -n tekton-operator
127+
```
128+
Replace `<installplan-name>` with the actual InstallPlan name from the previous step.
129+
130+
5. **Monitor the Upgrade Progress**
131+
- Watch the subscription status until it becomes ready:
132+
```bash
133+
$ kubectl get subscriptions.operators.coreos.com tektoncd-operator -n tekton-operator -o yaml -w
134+
```
135+
136+
- Check the operator pods status:
137+
```bash
138+
$ kubectl get pods -n tekton-operator
139+
```
140+
Wait until all pods are in `Running` state.
141+
142+
6. **Verify the Upgrade**
143+
- Confirm the operator version has been updated:
144+
```bash
145+
$ kubectl get csv -n tekton-operator
146+
147+
NAME DISPLAY VERSION REPLACES PHASE
148+
tektoncd-operator.v4.x.x Alauda DevOps Pipelines 4.x.x x Succeeded
149+
```
150+
151+
7. **Monitor Component Upgrades**
152+
- The operator will automatically upgrade Tekton components. Monitor their progress:
153+
```bash
154+
$ kubectl get tektoninstallerset -A
155+
$ kubectl get pods -n tekton-pipelines
156+
```
157+
Ensure all components and pods reach `Ready` state.
158+
159+
:::note
160+
The CLI upgrade process follows the same underlying mechanism as the GUI method. The main difference is that you manually control the channel switching and InstallPlan approval steps.
161+
:::
162+
81163
## Post-Upgrade Steps
82164

83165
After the upgrade completes successfully:

0 commit comments

Comments
 (0)