k8s-agent-skills 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +102 -0
- package/package.json +63 -0
- package/skills/atlas/SKILL.md +166 -0
- package/skills/cert-manager/SKILL.md +212 -0
- package/skills/cilium-gateway/SKILL.md +283 -0
- package/skills/cilium-network/SKILL.md +243 -0
- package/skills/cnpg/SKILL.md +130 -0
- package/skills/dragonfly/SKILL.md +194 -0
- package/skills/external-dns/SKILL.md +185 -0
- package/skills/flagger/SKILL.md +292 -0
- package/skills/flux/SKILL.md +36 -0
- package/skills/gitea/SKILL.md +32 -0
- package/skills/gitea-api/SKILL.md +104 -0
- package/skills/gitea-registry/SKILL.md +71 -0
- package/skills/gitea-runner/SKILL.md +126 -0
- package/skills/gitea-tea/SKILL.md +206 -0
- package/skills/gitea-webhooks/SKILL.md +93 -0
- package/skills/harbor/SKILL.md +32 -0
- package/skills/harbor-api/SKILL.md +231 -0
- package/skills/harbor-helm/SKILL.md +238 -0
- package/skills/harbor-terraform/SKILL.md +233 -0
- package/skills/higress/SKILL.md +27 -0
- package/skills/higress-helm/SKILL.md +328 -0
- package/skills/higress-operator/SKILL.md +435 -0
- package/skills/kserve/SKILL.md +28 -0
- package/skills/kserve-helm/SKILL.md +330 -0
- package/skills/kserve-operator/SKILL.md +763 -0
- package/skills/kubeflow/SKILL.md +33 -0
- package/skills/kubeflow-pipelines/SKILL.md +392 -0
- package/skills/kubeflow-trainer/SKILL.md +429 -0
- package/skills/kubeflow-training-operator/SKILL.md +176 -0
- package/skills/mariadb/SKILL.md +27 -0
- package/skills/mariadb-helm/SKILL.md +378 -0
- package/skills/mariadb-operator/SKILL.md +1114 -0
- package/skills/nvidia-device-plugin/SKILL.md +204 -0
- package/skills/rook-ceph/SKILL.md +22 -0
- package/skills/rook-ceph-operator/SKILL.md +150 -0
- package/skills/rook-ceph-toolbox/SKILL.md +220 -0
- package/skills/sealed-secrets/SKILL.md +221 -0
- package/skills/stakater-reloader/SKILL.md +259 -0
- package/skills/talos/SKILL.md +244 -0
- package/skills/tekton/SKILL.md +187 -0
- package/skills/vector/SKILL.md +24 -0
- package/skills/vector-helm/SKILL.md +186 -0
- package/skills/vector-operator/SKILL.md +455 -0
- package/skills/victoria-metrics/SKILL.md +35 -0
- package/skills/victoriametrics-operator/SKILL.md +248 -0
- package/skills/zitadel/SKILL.md +24 -0
- package/skills/zitadel-api/SKILL.md +962 -0
- package/skills/zitadel-helm/SKILL.md +263 -0
- package/skills/zitadel-terraform/SKILL.md +728 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: harbor
|
|
3
|
+
description: Use when working with Harbor container registry — route to the correct sub-skill based on what the user needs: API calls, Helm deployment, or Terraform management.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Harbor — Skill Router
|
|
7
|
+
|
|
8
|
+
Pick the right sub-skill.
|
|
9
|
+
|
|
10
|
+
## Which Sub-Skill?
|
|
11
|
+
|
|
12
|
+
| User wants to... | Load skill |
|
|
13
|
+
|---|---|
|
|
14
|
+
| Hit REST API endpoints, manage projects/artifacts/robots via curl | `harbor-api` |
|
|
15
|
+
| Deploy, configure, upgrade Harbor on K8s with Helm | `harbor-helm` |
|
|
16
|
+
| Manage Harbor infrastructure as code with Terraform | `harbor-terraform` |
|
|
17
|
+
|
|
18
|
+
## Quick Map
|
|
19
|
+
|
|
20
|
+
| Task | Skill |
|
|
21
|
+
|---|---|
|
|
22
|
+
| "Create a project via API" | `harbor-api` |
|
|
23
|
+
| "Set up a robot account for CI" | `harbor-api` |
|
|
24
|
+
| "Deploy Harbor on Kubernetes" | `harbor-helm` |
|
|
25
|
+
| "Configure external database for Harbor" | `harbor-helm` |
|
|
26
|
+
| "Manage Harbor resources with Terraform" | `harbor-terraform` |
|
|
27
|
+
| "Create a replication rule" | `harbor-api` |
|
|
28
|
+
| "Configure Trivy scanner" | `harbor-api` |
|
|
29
|
+
| "Upgrade Harbor Helm release" | `harbor-helm` |
|
|
30
|
+
| "Provision projects + robot accounts as code" | `harbor-terraform` |
|
|
31
|
+
| "Manage retention policies" | `harbor-api` |
|
|
32
|
+
| "Configure OIDC auth" | `harbor-api` |
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: harbor-api
|
|
3
|
+
description: Use when working with the Harbor REST API v2 — project management, artifact operations, robot accounts, replication, vulnerability scanning, OIDC/LDAP config, garbage collection, and general API automation with curl.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Harbor REST API v2
|
|
7
|
+
|
|
8
|
+
Base: `/api/v2.0`. Latest stable: **Harbor v2.15.1** (May 2026). API spec: Swagger 2.0 at `api/v2.0/swagger.yaml`. Built-in Swagger UI: `https://<harbor>/devcenter-api-2.0`.
|
|
9
|
+
|
|
10
|
+
## Authentication
|
|
11
|
+
|
|
12
|
+
| Method | Header / Usage | Use Case |
|
|
13
|
+
|--------|---------------|----------|
|
|
14
|
+
| Basic Auth | `-u username:password` | Direct admin/developer API access |
|
|
15
|
+
| Bearer Token | `Authorization: Bearer <token>` | Obtained from `/service/token` per Docker Registry v2 spec |
|
|
16
|
+
| Robot Account | `-u robot$<prefix><name>:<secret>` | Automated CI/CD with scoped permissions |
|
|
17
|
+
| OIDC ID Token | `Authorization: Bearer <oidc_id_token>` | OIDC-authenticated users (basic auth not supported for OIDC) |
|
|
18
|
+
|
|
19
|
+
### Bearer Token Flow
|
|
20
|
+
```bash
|
|
21
|
+
# Get token for push/pull access to a repo
|
|
22
|
+
TOKEN=$(curl -s -u "username:password" \
|
|
23
|
+
"https://harbor.example.com/service/token?service=harbor-registry&scope=repository:project/repo:pull,push" \
|
|
24
|
+
| jq -r '.token')
|
|
25
|
+
|
|
26
|
+
# Use for registry operations
|
|
27
|
+
curl -H "Authorization: Bearer $TOKEN" https://harbor.example.com/v2/_catalog
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Robot Account Notes
|
|
31
|
+
- Secret shown **only once** at creation — Harbor does not store it
|
|
32
|
+
- Username format: `robot$<prefix><account_name>`
|
|
33
|
+
- System-level (v2.2.0+) or project-level scope
|
|
34
|
+
- Permissions: granular RBAC (push, pull, create, read, delete, list, etc.)
|
|
35
|
+
|
|
36
|
+
## Key Endpoints
|
|
37
|
+
|
|
38
|
+
### Health & Status
|
|
39
|
+
|
|
40
|
+
| Method | Endpoint | Purpose |
|
|
41
|
+
|--------|----------|---------|
|
|
42
|
+
| GET | `/health` | Component health (no auth) |
|
|
43
|
+
| GET | `/statistics` | Project & repo statistics |
|
|
44
|
+
| GET | `/search?q=<query>` | Search projects, repos, helm charts |
|
|
45
|
+
|
|
46
|
+
### Project Management
|
|
47
|
+
|
|
48
|
+
| Method | Endpoint | Purpose |
|
|
49
|
+
|--------|----------|---------|
|
|
50
|
+
| GET | `/projects` | List projects (filter: name, public, owner) |
|
|
51
|
+
| POST | `/projects` | Create project |
|
|
52
|
+
| HEAD | `/projects` | Check project name exists |
|
|
53
|
+
| GET | `/projects/{name_or_id}` | Get project |
|
|
54
|
+
| PUT | `/projects/{name_or_id}` | Update project |
|
|
55
|
+
| DELETE | `/projects/{name_or_id}` | Delete project |
|
|
56
|
+
| GET | `/projects/{name_or_id}/_deletable` | Check if deletable |
|
|
57
|
+
| GET | `/projects/{name_or_id}/summary` | Project summary |
|
|
58
|
+
| GET | `/projects/{name_or_id}/metadatas` | List metadata |
|
|
59
|
+
| POST | `/projects/{name_or_id}/metadatas` | Add metadata |
|
|
60
|
+
| GET/PUT/DELETE | `/projects/{name_or_id}/metadatas/{meta_name}` | CRUD metadata entry |
|
|
61
|
+
| GET | `/projects/{name_or_id}/members` | List members |
|
|
62
|
+
| POST | `/projects/{name_or_id}/members` | Add member |
|
|
63
|
+
| GET/PUT/DELETE | `/projects/{name_or_id}/members/{mid}` | CRUD member |
|
|
64
|
+
|
|
65
|
+
### Repository Management
|
|
66
|
+
|
|
67
|
+
| Method | Endpoint | Purpose |
|
|
68
|
+
|--------|----------|---------|
|
|
69
|
+
| GET | `/repositories` | List all authorized repos |
|
|
70
|
+
| GET | `/projects/{project}/repositories` | List repos in project |
|
|
71
|
+
| GET | `/projects/{project}/repositories/{repo}` | Get repo |
|
|
72
|
+
| PUT | `/projects/{project}/repositories/{repo}` | Update repo description |
|
|
73
|
+
| DELETE | `/projects/{project}/repositories/{repo}` | Delete repo |
|
|
74
|
+
|
|
75
|
+
### Artifact Management
|
|
76
|
+
|
|
77
|
+
| Method | Endpoint | Purpose |
|
|
78
|
+
|--------|----------|---------|
|
|
79
|
+
| GET | `/projects/{proj}/repositories/{repo}/artifacts` | List artifacts (`?q=tags=*`, labels, etc.) |
|
|
80
|
+
| POST | `/projects/{proj}/repositories/{repo}/artifacts` | Copy artifact |
|
|
81
|
+
| GET | `/projects/{proj}/repositories/{repo}/artifacts/{ref}` | Get artifact by digest or tag |
|
|
82
|
+
| DELETE | `/projects/{proj}/repositories/{repo}/artifacts/{ref}` | Delete artifact |
|
|
83
|
+
| PUT | `/projects/{proj}/repositories/{repo}/artifacts/{ref}/add-label` | Add label |
|
|
84
|
+
| DELETE | `/projects/{proj}/repositories/{repo}/artifacts/{ref}/labels/{label_id}` | Remove label |
|
|
85
|
+
| GET | `/projects/{proj}/repositories/{repo}/artifacts/{ref}/tags` | List tags |
|
|
86
|
+
| POST | `/projects/{proj}/repositories/{repo}/artifacts/{ref}/tags` | Create tag |
|
|
87
|
+
| DELETE | `/projects/{proj}/repositories/{repo}/artifacts/{ref}/tags/{tag}` | Delete tag |
|
|
88
|
+
|
|
89
|
+
### Vulnerability Scanning
|
|
90
|
+
|
|
91
|
+
| Method | Endpoint | Purpose |
|
|
92
|
+
|--------|----------|---------|
|
|
93
|
+
| POST | `/projects/{proj}/repositories/{repo}/artifacts/{ref}/scan` | Trigger scan |
|
|
94
|
+
| POST | `/projects/{proj}/repositories/{repo}/artifacts/{ref}/scan/stop` | Stop scan |
|
|
95
|
+
| GET | `/scanners` | List scanners |
|
|
96
|
+
| GET | `/scanners/{id}` | Get scanner metadata |
|
|
97
|
+
| POST | `/scanners/ping` | Ping scanner adapter |
|
|
98
|
+
| GET | `/projects/{proj}/repositories/{repo}/artifacts/{ref}/scan/{report_id}` | Get scan report |
|
|
99
|
+
|
|
100
|
+
### Robot Accounts
|
|
101
|
+
|
|
102
|
+
| Method | Endpoint | Purpose |
|
|
103
|
+
|--------|----------|---------|
|
|
104
|
+
| GET | `/robots` | List robot accounts |
|
|
105
|
+
| POST | `/robots` | Create robot account |
|
|
106
|
+
| GET | `/robots/{id}` | Get robot |
|
|
107
|
+
| PUT | `/robots/{id}` | Update robot |
|
|
108
|
+
| DELETE | `/robots/{id}` | Delete robot |
|
|
109
|
+
| PATCH | `/robots/{id}` | Refresh robot secret |
|
|
110
|
+
|
|
111
|
+
### Replication
|
|
112
|
+
|
|
113
|
+
| Method | Endpoint | Purpose |
|
|
114
|
+
|--------|----------|---------|
|
|
115
|
+
| GET | `/replication/policies` | List policies |
|
|
116
|
+
| POST | `/replication/policies` | Create policy |
|
|
117
|
+
| GET/PUT/DELETE | `/replication/policies/{id}` | CRUD policy |
|
|
118
|
+
| GET | `/replication/executions` | List executions |
|
|
119
|
+
| POST | `/replication/executions` | Start replication |
|
|
120
|
+
| GET | `/replication/executions/{id}` | Get execution status |
|
|
121
|
+
| GET | `/replication/executions/{id}/tasks` | List execution tasks |
|
|
122
|
+
| GET | `/registries` | List registries |
|
|
123
|
+
| POST | `/registries` | Create registry endpoint |
|
|
124
|
+
| GET/PUT/DELETE | `/registries/{id}` | CRUD registry |
|
|
125
|
+
| POST | `/registries/ping` | Ping registry endpoint |
|
|
126
|
+
|
|
127
|
+
### Garbage Collection
|
|
128
|
+
|
|
129
|
+
| Method | Endpoint | Purpose |
|
|
130
|
+
|--------|----------|---------|
|
|
131
|
+
| GET | `/system/gc` | List GC schedules |
|
|
132
|
+
| POST | `/system/gc` | Create GC schedule |
|
|
133
|
+
| GET | `/system/gc/{id}` | Get GC job |
|
|
134
|
+
| GET | `/system/gc/{id}/log` | Get GC log |
|
|
135
|
+
|
|
136
|
+
### OIDC / LDAP
|
|
137
|
+
|
|
138
|
+
| Method | Endpoint | Purpose |
|
|
139
|
+
|--------|----------|---------|
|
|
140
|
+
| POST | `/ldap/ping` | Ping LDAP |
|
|
141
|
+
| GET | `/ldap/users/search` | Search LDAP users |
|
|
142
|
+
| POST | `/ldap/users/import` | Import LDAP users |
|
|
143
|
+
| GET | `/ldap/groups/search` | Search LDAP groups |
|
|
144
|
+
| POST | `/system/oidc/ping` | Ping OIDC provider |
|
|
145
|
+
| GET | `/configurations` | Get system config (auth_mode, oidc, ldap) |
|
|
146
|
+
| PUT | `/configurations` | Update system config |
|
|
147
|
+
|
|
148
|
+
### System & Admin
|
|
149
|
+
|
|
150
|
+
| Method | Endpoint | Purpose |
|
|
151
|
+
|--------|----------|---------|
|
|
152
|
+
| GET | `/systeminfo` | System info |
|
|
153
|
+
| GET | `/systeminfo/volumes` | Storage volume info |
|
|
154
|
+
| GET | `/internalconfig` | Internal config (admin only) |
|
|
155
|
+
| GET | `/labels` | List labels |
|
|
156
|
+
| POST | `/labels` | Create label |
|
|
157
|
+
| GET/PUT/DELETE | `/labels/{id}` | CRUD label |
|
|
158
|
+
| GET | `/usergroups` | List user groups |
|
|
159
|
+
| POST | `/usergroups` | Create user group |
|
|
160
|
+
| GET/PUT/DELETE | `/usergroups/{id}` | CRUD user group |
|
|
161
|
+
| GET | `/preheat/policies` | List preheat policies |
|
|
162
|
+
| POST | `/preheat/policies` | Create preheat policy |
|
|
163
|
+
| GET | `/preheat/instances` | List preheat instances |
|
|
164
|
+
| POST | `/preheat/instances` | Create preheat instance |
|
|
165
|
+
| GET | `/audit-logs` | List audit logs |
|
|
166
|
+
| GET | `/quota` | List storage quotas |
|
|
167
|
+
|
|
168
|
+
## Examples
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
# Create a project
|
|
172
|
+
curl -X POST https://harbor.example.com/api/v2.0/projects \
|
|
173
|
+
-u "admin:Harbor12345" \
|
|
174
|
+
-H "Content-Type: application/json" \
|
|
175
|
+
-d '{"project_name": "myapp", "public": false, "storage_limit": -1}'
|
|
176
|
+
|
|
177
|
+
# Create a robot account (system-level)
|
|
178
|
+
curl -X POST https://harbor.example.com/api/v2.0/robots \
|
|
179
|
+
-u "admin:Harbor12345" \
|
|
180
|
+
-H "Content-Type: application/json" \
|
|
181
|
+
-d '{
|
|
182
|
+
"name": "ci-deploy",
|
|
183
|
+
"description": "CI/CD deployment robot",
|
|
184
|
+
"level": "system",
|
|
185
|
+
"permissions": [{
|
|
186
|
+
"kind": "project",
|
|
187
|
+
"namespace": "myapp",
|
|
188
|
+
"access": [
|
|
189
|
+
{"resource": "repository", "action": "pull"},
|
|
190
|
+
{"resource": "repository", "action": "push"}
|
|
191
|
+
]
|
|
192
|
+
}]
|
|
193
|
+
}'
|
|
194
|
+
|
|
195
|
+
# Trigger artifact scan
|
|
196
|
+
curl -X POST "https://harbor.example.com/api/v2.0/projects/myapp/repositories/nginx/artifacts/latest/scan" \
|
|
197
|
+
-u "admin:Harbor12345"
|
|
198
|
+
|
|
199
|
+
# Create a replication rule
|
|
200
|
+
curl -X POST https://harbor.example.com/api/v2.0/replication/policies \
|
|
201
|
+
-u "admin:Harbor12345" \
|
|
202
|
+
-H "Content-Type: application/json" \
|
|
203
|
+
-d '{
|
|
204
|
+
"name": "backup-to-dr",
|
|
205
|
+
"description": "Replicate to DR site",
|
|
206
|
+
"trigger": {"type": "event_based"},
|
|
207
|
+
"dest_registry": {"id": 2},
|
|
208
|
+
"filters": [{"type": "name", "value": "myapp/**"}],
|
|
209
|
+
"deletion": true,
|
|
210
|
+
"override": true
|
|
211
|
+
}'
|
|
212
|
+
|
|
213
|
+
# Search across Harbor
|
|
214
|
+
curl -s "https://harbor.example.com/api/v2.0/search?q=nginx" \
|
|
215
|
+
-u "admin:Harbor12345"
|
|
216
|
+
|
|
217
|
+
# Trigger garbage collection
|
|
218
|
+
curl -X POST https://harbor.example.com/api/v2.0/system/gc \
|
|
219
|
+
-u "admin:Harbor12345" \
|
|
220
|
+
-H "Content-Type: application/json" \
|
|
221
|
+
-d '{"schedule": {"type": "Weekly", "weekday": 0, "offtime": 0}}'
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
## Common Mistakes
|
|
225
|
+
|
|
226
|
+
- **Robot secret not saved** — Secret is only returned on creation. Store it immediately.
|
|
227
|
+
- **API version path** — Always use `/api/v2.0/`, not `/api/` (v1.x legacy path).
|
|
228
|
+
- **OIDC users can't use basic auth** — Must use OIDC ID token as Bearer token.
|
|
229
|
+
- **Robot tokens auto-expire** — Set `duration` in days on creation (default: no expiry).
|
|
230
|
+
- **Scan reports deleted on v2.2 upgrade** — Schema migration clears old scan data. Re-scan after upgrade.
|
|
231
|
+
- **Bearer token scope** — Token is scoped to the `scope` param in the `/service/token` request. Use `repository:*:pull` for read-only, `repository:*:pull,push` for write.
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: harbor-helm
|
|
3
|
+
description: Use when deploying, configuring, or upgrading Harbor on Kubernetes via Helm chart — values configuration, external database, TLS/certificates, storage, ingress, authentication, and production patterns.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Harbor Helm Chart
|
|
7
|
+
|
|
8
|
+
Source: `https://helm.goharbor.io`. Latest chart version: **1.19.1** (app version 2.15.1). Images: all v2.15.1 (core, portal, jobservice, registry, trivy, nginx, log, database, redis, exporter).
|
|
9
|
+
|
|
10
|
+
## Quick Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
helm repo add harbor https://helm.goharbor.io
|
|
14
|
+
helm repo update
|
|
15
|
+
|
|
16
|
+
helm install harbor harbor/harbor \
|
|
17
|
+
--namespace harbor \
|
|
18
|
+
--create-namespace \
|
|
19
|
+
--set expose.tls.auto.commonName=harbor.example.com \
|
|
20
|
+
--set externalURL=https://harbor.example.com \
|
|
21
|
+
--set harborAdminPassword=admin123
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Values Overview
|
|
25
|
+
|
|
26
|
+
### Expose / Ingress
|
|
27
|
+
|
|
28
|
+
| Parameter | Default | Description |
|
|
29
|
+
|-----------|---------|-------------|
|
|
30
|
+
| `expose.type` | `ingress` | `ingress`, `clusterIP`, `nodePort`, `loadBalancer` |
|
|
31
|
+
| `expose.tls.auto.commonName` | — | Auto-generate cert for this hostname |
|
|
32
|
+
| `expose.tls.secretName` | — | Use existing TLS secret |
|
|
33
|
+
| `expose.tls.certSource` | `auto` | `auto`, `secret`, `none` |
|
|
34
|
+
| `expose.ingress.hosts.core` | `core.harbor.domain` | Core ingress host |
|
|
35
|
+
| `expose.ingress.hosts.notary` | `notary.harbor.domain` | Notary ingress host |
|
|
36
|
+
| `expose.ingress.className` | — | Ingress class name |
|
|
37
|
+
| `expose.ingress.annotations` | `{}` | Ingress annotations |
|
|
38
|
+
|
|
39
|
+
### External URL
|
|
40
|
+
|
|
41
|
+
| Parameter | Default | Description |
|
|
42
|
+
|-----------|---------|-------------|
|
|
43
|
+
| `externalURL` | `https://core.harbor.domain` | Full URL users access Harbor at |
|
|
44
|
+
|
|
45
|
+
### Auth
|
|
46
|
+
|
|
47
|
+
| Parameter | Default | Description |
|
|
48
|
+
|-----------|---------|-------------|
|
|
49
|
+
| `harborAdminPassword` | `Harbor12345` | Initial admin password |
|
|
50
|
+
| `database.internal` | `true` | Use internal PostgreSQL |
|
|
51
|
+
| `database.type` | `postgresql` | `postgresql` or `external` |
|
|
52
|
+
|
|
53
|
+
### External Database
|
|
54
|
+
|
|
55
|
+
```yaml
|
|
56
|
+
database:
|
|
57
|
+
type: external
|
|
58
|
+
external:
|
|
59
|
+
host: postgres.example.com
|
|
60
|
+
port: 5432
|
|
61
|
+
username: harbor
|
|
62
|
+
password: secret
|
|
63
|
+
database: harbor
|
|
64
|
+
sslmode: require
|
|
65
|
+
maxIdleConns: 100
|
|
66
|
+
maxOpenConns: 900
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### External Redis
|
|
70
|
+
|
|
71
|
+
```yaml
|
|
72
|
+
redis:
|
|
73
|
+
type: external
|
|
74
|
+
external:
|
|
75
|
+
addr: redis.example.com:6379
|
|
76
|
+
password: secret
|
|
77
|
+
sentinelMaster: mymaster # if using sentinel
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Storage
|
|
81
|
+
|
|
82
|
+
| Component | Default PVC | Parameter |
|
|
83
|
+
|-----------|-------------|-----------|
|
|
84
|
+
| Registry | `200Gi` | `persistence.persistentVolumeClaim.registry.size` |
|
|
85
|
+
| Jobservice | `1Gi` | `persistence.persistentVolumeClaim.jobservice.size` |
|
|
86
|
+
| Database | `1Gi` | `persistence.persistentVolumeClaim.database.size` |
|
|
87
|
+
| Redis | `1Gi` | `persistence.persistentVolumeClaim.redis.size` |
|
|
88
|
+
| Trivy | `5Gi` | `persistence.persistentVolumeClaim.trivy.size` |
|
|
89
|
+
|
|
90
|
+
Object storage (S3-compatible) for registry:
|
|
91
|
+
|
|
92
|
+
```yaml
|
|
93
|
+
persistence:
|
|
94
|
+
imageChartStorage:
|
|
95
|
+
type: s3
|
|
96
|
+
s3:
|
|
97
|
+
region: us-east-1
|
|
98
|
+
bucket: harbor-registry
|
|
99
|
+
accesskey: AKIA...
|
|
100
|
+
secretkey: ...
|
|
101
|
+
rootdirectory: /registry
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Trivy Scanner
|
|
105
|
+
|
|
106
|
+
| Parameter | Default | Description |
|
|
107
|
+
|-----------|---------|-------------|
|
|
108
|
+
| `trivy.enabled` | `true` | Enable Trivy vulnerability scanner |
|
|
109
|
+
| `trivy.image.repository` | `goharbor/trivy-adapter` | Scanner image |
|
|
110
|
+
| `trivy.image.tag` | `v0.35.1` | Adapter version (Harbor 2.15.x) |
|
|
111
|
+
| `trivy.gitHubToken` | — | GitHub token for Trivy DB download (avoid rate limits) |
|
|
112
|
+
| `trivy.skipUpdate` | `false` | Skip Trivy DB update on startup |
|
|
113
|
+
| `trivy.offlineScan` | `false` | Disable vulnerability DB updates |
|
|
114
|
+
|
|
115
|
+
### Components
|
|
116
|
+
|
|
117
|
+
| Parameter | Description |
|
|
118
|
+
|-----------|-------------|
|
|
119
|
+
| `portal.enabled` | Enable Harbor web UI (core depends on it) |
|
|
120
|
+
| `core.replicas` | Core API replicas |
|
|
121
|
+
| `jobservice.replicas` | Job service replicas |
|
|
122
|
+
| `registry.replicas` | Registry replicas |
|
|
123
|
+
| `exporter.enabled` | Enable Prometheus metrics exporter |
|
|
124
|
+
| `chartmuseum.enabled` | Enable Helm Chart Museum |
|
|
125
|
+
| `notary.enabled` | Enable Notary (deprecated, disabled by default) |
|
|
126
|
+
| `notary.disabled` | Notary v1 removed in v2.9+ |
|
|
127
|
+
|
|
128
|
+
## Production Values Example
|
|
129
|
+
|
|
130
|
+
```yaml
|
|
131
|
+
expose:
|
|
132
|
+
type: ingress
|
|
133
|
+
tls:
|
|
134
|
+
certSource: secret
|
|
135
|
+
secretName: harbor-tls
|
|
136
|
+
ingress:
|
|
137
|
+
className: cilium
|
|
138
|
+
annotations:
|
|
139
|
+
cert-manager.io/cluster-issuer: letsencrypt-prod
|
|
140
|
+
hosts:
|
|
141
|
+
core: harbor.example.com
|
|
142
|
+
notary: notary.example.com
|
|
143
|
+
|
|
144
|
+
externalURL: https://harbor.example.com
|
|
145
|
+
|
|
146
|
+
harborAdminPassword: changeme
|
|
147
|
+
|
|
148
|
+
database:
|
|
149
|
+
type: external
|
|
150
|
+
external:
|
|
151
|
+
host: postgres-cluster-rw.db.svc
|
|
152
|
+
port: 5432
|
|
153
|
+
username: harbor
|
|
154
|
+
password: "${DB_PASSWORD}"
|
|
155
|
+
database: harbor
|
|
156
|
+
sslmode: require
|
|
157
|
+
maxIdleConns: 50
|
|
158
|
+
maxOpenConns: 500
|
|
159
|
+
|
|
160
|
+
redis:
|
|
161
|
+
type: external
|
|
162
|
+
external:
|
|
163
|
+
addr: redis-cluster.redis.svc:6379
|
|
164
|
+
password: "${REDIS_PASSWORD}"
|
|
165
|
+
|
|
166
|
+
persistence:
|
|
167
|
+
enabled: true
|
|
168
|
+
resourcePolicy: keep
|
|
169
|
+
imageChartStorage:
|
|
170
|
+
type: s3
|
|
171
|
+
s3:
|
|
172
|
+
region: us-east-1
|
|
173
|
+
bucket: harbor-registry
|
|
174
|
+
accesskey: "${AWS_ACCESS_KEY}"
|
|
175
|
+
secretkey: "${AWS_SECRET_KEY}"
|
|
176
|
+
rootdirectory: /registry
|
|
177
|
+
persistentVolumeClaim:
|
|
178
|
+
registry:
|
|
179
|
+
size: 500Gi
|
|
180
|
+
jobservice:
|
|
181
|
+
size: 10Gi
|
|
182
|
+
trivy:
|
|
183
|
+
size: 20Gi
|
|
184
|
+
|
|
185
|
+
trivy:
|
|
186
|
+
enabled: true
|
|
187
|
+
gitHubToken: "${GITHUB_TOKEN}"
|
|
188
|
+
replicas: 2
|
|
189
|
+
|
|
190
|
+
core:
|
|
191
|
+
replicas: 3
|
|
192
|
+
resources:
|
|
193
|
+
requests:
|
|
194
|
+
cpu: 500m
|
|
195
|
+
memory: 1Gi
|
|
196
|
+
limits:
|
|
197
|
+
cpu: 2
|
|
198
|
+
memory: 4Gi
|
|
199
|
+
|
|
200
|
+
registry:
|
|
201
|
+
replicas: 3
|
|
202
|
+
resources:
|
|
203
|
+
requests:
|
|
204
|
+
cpu: 500m
|
|
205
|
+
memory: 1Gi
|
|
206
|
+
|
|
207
|
+
jobservice:
|
|
208
|
+
replicas: 2
|
|
209
|
+
|
|
210
|
+
exporter:
|
|
211
|
+
enabled: true
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
## Upgrading
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
helm repo update
|
|
218
|
+
helm upgrade harbor harbor/harbor \
|
|
219
|
+
--namespace harbor \
|
|
220
|
+
--values values.yaml \
|
|
221
|
+
--version 1.19.1
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### Migration Path
|
|
225
|
+
- Harbor v2.11.0+ → v2.15.0 directly (via `goharbor/prepare` Docker image)
|
|
226
|
+
- < v2.11.0 requires sequential upgrades through intermediate versions
|
|
227
|
+
- **Must backup ALL data before migration**
|
|
228
|
+
- External PostgreSQL must be ≥ v12
|
|
229
|
+
|
|
230
|
+
## Common Mistakes
|
|
231
|
+
|
|
232
|
+
- **Admin password change** — Changing `harborAdminPassword` after initial deploy does NOT update the password. Change via UI or API.
|
|
233
|
+
- **Internal DB in production** — Internal PostgreSQL is single-Pod. Use external PostgreSQL with HA for production.
|
|
234
|
+
- **Notary v1 deprecated** — Disabled since v2.9. Don't enable unless you still need it.
|
|
235
|
+
- **Trivy DB download** — Without `trivy.gitHubToken`, Trivy DB downloads are rate-limited to 60 req/hr. Set a GitHub token.
|
|
236
|
+
- **S3 region mismatch** — Registry S3 bucket and IAM credentials must match the configured region.
|
|
237
|
+
- **Exporter credentials** — Prometheus exporter uses the same admin credentials. Set `exporter.secret` for a dedicated monitoring password.
|
|
238
|
+
- **Upgrade schema migration** — `goharbor/prepare` must run during upgrade to apply DB schema migrations. The Helm chart handles this automatically.
|