Skip to content

Commit 7b65b04

Browse files
author
edge-katanomi-app2[bot]
committed
📚 Sync docs from alaudadevops/tektoncd-operator on 6c3363c6403619ad02742b527556c7f4cfc4121e
Source: docs: improve Tekton Hub configuration documentation (#519) Author: l-qing Ref: refs/heads/main Commit: 6c3363c6403619ad02742b527556c7f4cfc4121e This commit automatically syncs documentation changes from the source-docs repository. 🔗 View source commit: https://github.com/alaudadevops/tektoncd-operator/commit/6c3363c6403619ad02742b527556c7f4cfc4121e 🤖 Synced on 2025-09-11 03:42:14 UTC
1 parent 963ee54 commit 7b65b04

File tree

4 files changed

+103
-24
lines changed

4 files changed

+103
-24
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-09-11 03:34:45 UTC
3+
- **Last synced**: 2025-09-11 03:42:14 UTC
44
- **Source repository**: alaudadevops/tektoncd-operator
5-
- **Source commit**: [a80c6bb1f274da1a98e19decc9e95fba68d4576e](https://github.com/alaudadevops/tektoncd-operator/commit/a80c6bb1f274da1a98e19decc9e95fba68d4576e)
5+
- **Source commit**: [6c3363c6403619ad02742b527556c7f4cfc4121e](https://github.com/alaudadevops/tektoncd-operator/commit/6c3363c6403619ad02742b527556c7f4cfc4121e)
66
- **Triggered by**: edge-katanomi-app2[bot]
7-
- **Workflow run**: [#52](https://github.com/alaudadevops/tektoncd-operator/actions/runs/17633233208)
7+
- **Workflow run**: [#53](https://github.com/alaudadevops/tektoncd-operator/actions/runs/17633346114)
88

99
## Files synced:
1010
- docs/

‎docs/en/hub/configure/custom-catalogs.mdx‎

Lines changed: 90 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ data:
121121
Apply the updated ConfigMap to your cluster:
122122

123123
```bash
124-
kubectl apply -f tekton-hub-api-configmap.yaml
124+
$ kubectl apply -f tekton-hub-api-configmap.yaml
125125
```
126126

127127
### Step 4: Apply Changes
@@ -130,7 +130,7 @@ After updating the ConfigMap, apply the changes:
130130

131131
**Option 1: Restart the API Pod**
132132
```bash
133-
kubectl rollout restart deployment/tekton-hub-api -n <tekton-pipelines>
133+
$ kubectl delete pod app=tekton-hub-api -n <tekton-pipelines>
134134
```
135135

136136
**Option 2: Wait for Automatic Refresh**
@@ -195,7 +195,7 @@ For accessing private Git repositories or repositories from private Git instance
195195
Create a Kubernetes secret named `tekton-hub-api-ssh-crds` with your SSH credentials:
196196

197197
```bash
198-
kubectl create secret generic tekton-hub-api-ssh-crds \
198+
$ kubectl create secret generic tekton-hub-api-ssh-crds \
199199
--from-file=id_rsa="/path/to/id_rsa" \
200200
--from-file=id_rsa.pub="/path/to/id_rsa.pub" \
201201
--from-file=known_hosts="/path/to/known_hosts" \
@@ -207,9 +207,38 @@ kubectl create secret generic tekton-hub-api-ssh-crds \
207207
- The secret must be created in the same namespace as your Tekton Hub installation
208208
- Include all three files: private key, public key, and known_hosts
209209

210-
#### Example known_hosts Entry
210+
#### Generating known_hosts Entries
211211

212-
For GitHub repositories, add this line to your `known_hosts` file:
212+
**Important**: You must generate the `known_hosts` file by actually connecting to the Git server to capture its SSH fingerprint. Simply copying example entries may not work due to server key changes or different Git providers.
213+
214+
**Recommended Approach:**
215+
216+
1. **Test SSH connection locally** to capture the server's fingerprint:
217+
```bash
218+
# This will add the server's fingerprint to your local known_hosts
219+
220+
221+
```
222+
223+
2. **Alternative: Use ssh-keyscan** to generate known_hosts entries:
224+
```bash
225+
# For GitHub
226+
$ ssh-keyscan github.com >> ~/.ssh/known_hosts
227+
228+
# For custom Git servers
229+
$ ssh-keyscan your-git-server.com >> ~/.ssh/known_hosts
230+
```
231+
232+
3. **Verify by cloning your repositories locally** using both URLs:
233+
```bash
234+
# Test the SSH URL that will be used by Tekton Hub
235+
$ git clone ssh://[email protected]:org/private-repo.git
236+
237+
# Also test the HTTPS URL for verification
238+
$ git clone https://github.com/org/private-repo.git
239+
```
240+
241+
**Example known_hosts Entry** (generated after successful SSH connection):
213242

214243
```
215244
github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndN...
@@ -239,17 +268,33 @@ data:
239268

240269
After adding a custom catalog, verify it's properly configured:
241270

242-
> **Tips**: `your-tekton-hub-api` should be replaced with your actual Tekton Hub API endpoint.
271+
> **Tips**: The default Tekton Hub API endpoint is `tekton-hub-api.tekton-pipelines:8000`, which is only accessible within the cluster.
272+
>
273+
> For the `<your-tekton-hub-api>` placeholder in the commands below:
274+
> - Inside the `tekton-hub-api` pod: use `localhost:8000`
275+
> - From other pods in the cluster: use `tekton-hub-api.tekton-pipelines:8000`
276+
> - From outside the cluster: create a `NodePort` service or `Ingress` (not covered in this guide)
277+
>
278+
> For testing purposes, you can run these commands inside the `tekton-hub-api` pod using `wget`.
243279
244280
```bash
281+
# Execute inside the tekton-hub-api pod for testing
282+
$ kubectl exec -it deployment/tekton-hub-api -n <tekton-pipelines> -- /bin/sh
283+
245284
# Check if the catalog appears in the API
246-
curl https://your-tekton-hub-api/v1/catalogs
285+
$ wget -qO- http://<your-tekton-hub-api>/v1/catalogs
286+
287+
{"data":[{"id":1,"name":"catalog","type":"community","url":"file:////mnt/git/catalog.git","provider":"github"},{"id":2,"name":"<new-catalog>","type":"private","url":"<url>","provider":"<provider>"}]}
247288

248289
# Check catalog resources
249-
curl https://your-tekton-hub-api/v1/resources?catalog=my-custom-catalog
290+
$ wget -qO- "http://<your-tekton-hub-api>/v1/query?catalogs=<my-custom-catalog>"
291+
292+
{"data":[{"id":1,"name":"<name>","catalog":{"id":1,"name":"<my-custom-catalog>","type":"community"},"categories":[{"id":9,"name":"<name>"}],"kind":"Task","hubURLPath":"","hubRawURLPath":""}]}
250293

251294
# Verify specific resource
252-
curl https://your-tekton-hub-api/v1/resource/my-custom-catalog/task/my-task
295+
$ wget -qO- http://<your-tekton-hub-api>/v1/resource/<my-custom-catalog>/task/<my-task>
296+
297+
{"data":{"id":4,"name":"<my-task>","catalog":{}}}
253298
```
254299

255300
### Test Resource Resolution
@@ -285,8 +330,8 @@ spec:
285330
286331
**Solutions**:
287332
1. Check ConfigMap was applied: `kubectl get cm tekton-hub-api -o yaml`
288-
2. Restart API pod: `kubectl rollout restart deployment/tekton-hub-api`
289-
3. Check API logs: `kubectl logs deployment/tekton-hub-api`
333+
2. Restart API pod: `kubectl delete pod app=tekton-hub-api -n <tekton-pipelines>`
334+
3. Check API logs: `kubectl logs deployment/tekton-hub-api -n <tekton-pipelines>`
290335

291336
### Resources Not Loading
292337

@@ -322,11 +367,42 @@ spec:
322367
**Debug Steps**:
323368
```bash
324369
# Check available catalogs
325-
curl https://your-tekton-hub-api/v1/catalogs
370+
$ wget -qO- http://<your-tekton-hub-api>/v1/catalogs
326371
327372
# Verify resource exists
328-
curl https://your-tekton-hub-api/v1/resource/catalog-name/task/task-name/0.1
373+
$ wget -qO- http://<your-tekton-hub-api>/v1/resource/<my-custom-catalog>/task/<my-task>/<version>
329374
330375
# Check catalog sync status
331-
kubectl logs deployment/tekton-hub-api | grep "catalog-name"
376+
$ kubectl logs deployment/tekton-hub-api -n <tekton-pipelines>
332377
```
378+
379+
## FAQ
380+
381+
### Q: I configured according to the documentation, but still can't see the new catalog
382+
383+
**A**: First, check the `tekton-hub-api` logs for authentication-related errors such as "Host key verification failed":
384+
385+
```bash
386+
$ kubectl logs deployment/tekton-hub-api -n <tekton-pipelines>
387+
```
388+
389+
**Common causes**:
390+
- SSH key lacks sufficient permissions for the repository
391+
- `known_hosts` file missing the Git server's fingerprint
392+
- SSH key not properly added to repository deploy keys
393+
394+
**Solution**:
395+
1. **Test locally first**: Ensure you can successfully clone the repository locally using the same SSH credentials:
396+
```bash
397+
# Test with the exact same SSH key and known_hosts
398+
$ git clone ssh://[email protected]:org/private-repo.git
399+
```
400+
401+
2. **Only after local clone succeeds**, update your Kubernetes environment:
402+
- Refer to the [Generating known_hosts Entries](#generating-known_hosts-entries) section to properly generate the `known_hosts` file
403+
- Recreate the `tekton-hub-api-ssh-crds` secret with the working credentials
404+
- Restart the `tekton-hub-api` pod and check the logs:
405+
```bash
406+
$ kubectl delete pod -l app=tekton-hub-api -n <tekton-pipelines>
407+
$ kubectl logs deployment/tekton-hub-api -n <tekton-pipelines>
408+
```

‎docs/en/hub/configure/tekton-hub-config.mdx‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,13 @@ After updating the categories:
134134

135135
1. Apply the updated ConfigMap:
136136
```bash
137-
kubectl apply -f tekton-hub-api-configmap.yaml
137+
$ kubectl apply -f tekton-hub-api-configmap.yaml
138138
```
139139

140140
2. Refresh the Hub configuration:
141141
```bash
142142
# Restart the API pod
143-
kubectl rollout restart deployment/tekton-hub-api -n <tekton-pipelines>
143+
$ kubectl delete pod app=tekton-hub-api -n <tekton-pipelines>
144144
```
145145

146146
### Using Categories in Resources
@@ -207,13 +207,16 @@ data:
207207

208208
### Custom Hub Endpoints
209209

210+
> In most cases, you should keep the default `TEKTON_HUB_API` endpoint (`http://tekton-hub-api.tekton-pipelines:8000/`) unchanged.
211+
> Only modify this endpoint when you specifically need to integrate with an external hub API.
212+
210213
For custom `Tekton Hub` instances, configure `API` endpoints via environment variables in the resolver deployment:
211214

212215
```yaml
213216
apiVersion: apps/v1
214217
kind: Deployment
215218
metadata:
216-
name: hubresolver
219+
name: tekton-pipelines-remote-resolvers
217220
namespace: <tekton-pipelines>
218221
spec:
219222
template:
@@ -236,12 +239,12 @@ After updating resolver configuration:
236239

237240
1. Apply the ConfigMap changes:
238241
```bash
239-
kubectl apply -f hubresolver-config.yaml
242+
$ kubectl apply -f hubresolver-config.yaml
240243
```
241244

242245
2. Restart the resolver deployment:
243246
```bash
244-
kubectl rollout restart deployment/hubresolver -n <tekton-pipelines>
247+
$ kubectl delete pod app=tekton-pipelines-resolvers -n <tekton-pipelines>
245248
```
246249

247250
### Testing Hub Resolver
@@ -288,7 +291,7 @@ spec:
288291
1. Check refresh interval setting: `CATALOG_REFRESH_INTERVAL`
289292
2. Verify catalog repository accessibility
290293
3. Review `API` pod logs for sync errors
291-
4. Manually restart `API` pod: `kubectl rollout restart deployment/tekton-hub-api`
294+
4. Manually restart `API` pod: `kubectl delete pod app=tekton-hub-api -n <tekton-pipelines>`
292295

293296
### Category Configuration Problems
294297

‎docs/en/pipelines/concepts/workspace_concept.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ spec:
248248
mkdir -p ~/.ssh
249249
cp $(workspaces.ssh-credentials.path)/* ~/.ssh/
250250
chmod 600 ~/.ssh/id_rsa
251-
git clone [email protected]:org/repo.git $(workspaces.source.path)
251+
git clone ssh://[email protected]:org/repo.git $(workspaces.source.path)
252252
- name: build
253253
image: golang
254254
workingDir: $(workspaces.source.path)

0 commit comments

Comments
 (0)