Skip to content

Commit 57ce212

Browse files
committed
docs(validator): fix README function signatures and imagePullSecrets references
1 parent 03b53fb commit 57ce212

1 file changed

Lines changed: 23 additions & 23 deletions

File tree

pkg/api/validator/v1/README.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ plans := v1.Plan(
7272
"1.0.0", // Your controller version
7373
"abc123", // Your controller commit
7474
serviceAccount, // ServiceAccount name
75-
"", // imagePullSecret (empty if not needed)
75+
nil, // imagePullSecrets (empty slice if not needed)
7676
nil, // tolerations
7777
nil, // nodeSelector
7878
)
@@ -131,20 +131,20 @@ The `JobPlan` struct contains all components needed to build a validator Job:
131131

132132
```go
133133
type JobPlan struct {
134-
ValidatorName string // Unique validator identifier
135-
Phase string // "deployment", "performance", or "conformance"
136-
JobName string // Pre-generated unique Job name
137-
Image string // Validator container image
138-
Args []string // Container arguments
139-
Env []corev1.EnvVar // Environment variables
140-
Volumes []corev1.Volume // Pod volumes (ConfigMaps)
141-
VolumeMounts []corev1.VolumeMount // Container volume mounts
142-
Resources corev1.ResourceRequirements // CPU/memory requests and limits
143-
Timeout int64 // Max execution time (seconds)
144-
ServiceAccount string // Kubernetes ServiceAccount
145-
Tolerations []corev1.Toleration // Pod tolerations
146-
ImagePullSecret string // Image pull secret name
147-
Labels map[string]string // Job and Pod labels
134+
ValidatorName string // Unique validator identifier
135+
Phase string // "deployment", "performance", or "conformance"
136+
JobName string // Pre-generated unique Job name
137+
Image string // Validator container image
138+
Args []string // Container arguments
139+
Env []corev1.EnvVar // Environment variables
140+
Volumes []corev1.Volume // Pod volumes (ConfigMaps)
141+
VolumeMounts []corev1.VolumeMount // Container volume mounts
142+
Resources corev1.ResourceRequirements // CPU/memory requests and limits
143+
Timeout int64 // Max execution time (seconds)
144+
ServiceAccount string // Kubernetes ServiceAccount
145+
Tolerations []corev1.Toleration // Pod tolerations
146+
ImagePullSecrets []string // Image pull secret names
147+
Labels map[string]string // Job and Pod labels
148148
}
149149
```
150150

@@ -187,7 +187,7 @@ plan := v1.BuildJobPlan(
187187
"1.0.0",
188188
"abc123",
189189
serviceAccount,
190-
"", // imagePullSecret
190+
nil, // imagePullSecrets
191191
tolerations,
192192
nodeSelector,
193193
)
@@ -263,7 +263,7 @@ func RunValidation(
263263
"1.0.0", // version
264264
"abc123", // commit
265265
serviceAccount,
266-
"", // imagePullSecret
266+
nil, // imagePullSecrets
267267
nil, // tolerations
268268
nil, // nodeSelector
269269
)
@@ -301,7 +301,7 @@ Format: `{timestamp}-{random-hex}` (e.g., "20260514-123045-abc123def456")
301301

302302
### Job Planning
303303

304-
**`Plan(cat, validationInput, runID, namespace, version, commit, serviceAccount, imagePullSecret, tolerations, nodeSelector) []JobPlan`**
304+
**`Plan(cat, validationInput, runID, namespace, version, commit, serviceAccount, imagePullSecrets, tolerations, nodeSelector) []JobPlan`**
305305
Generates JobPlans for all validators across all phases matching the ValidationInput filters.
306306

307307
**Parameters:**
@@ -312,19 +312,19 @@ Generates JobPlans for all validators across all phases matching the ValidationI
312312
- `version` - Controller version (forwarded to validators)
313313
- `commit` - Controller commit SHA (forwarded to validators)
314314
- `serviceAccount` - ServiceAccount name for Jobs (use your own naming strategy)
315-
- `imagePullSecret` - Image pull secret name (empty if not needed)
315+
- `imagePullSecrets` - Image pull secret names (empty slice if not needed)
316316
- `tolerations` - Pod tolerations (forwarded to inner workloads)
317317
- `nodeSelector` - Node selector (forwarded to inner workloads)
318318

319-
**`BuildJobPlan(entry, runID, namespace, version, commit, serviceAccount, imagePullSecret, tolerations, nodeSelector) JobPlan`**
319+
**`BuildJobPlan(entry, runID, namespace, version, commit, serviceAccount, imagePullSecrets, tolerations, nodeSelector) JobPlan`**
320320
Builds a JobPlan from a single validator catalog entry. Used for custom scenarios.
321321

322322
### Job Rendering
323323

324-
**`RenderPlan(plan JobPlan, namespace string) *batchv1.Job`**
325-
Renders a complete Kubernetes Job from a JobPlan. Uses `plan.JobName` for the Job name.
324+
**`RenderPlan(plan JobPlan) *batchv1.Job`**
325+
Renders a complete Kubernetes Job from a JobPlan. Uses `plan.JobName` for the Job name and `plan.Namespace` for the namespace.
326326

327-
**`RenderPlanToApplyConfig(plan JobPlan, namespace, jobName string) *applybatchv1.JobApplyConfiguration`**
327+
**`RenderPlanToApplyConfig(plan JobPlan, jobName string) *applybatchv1.JobApplyConfiguration`**
328328
Renders a Kubernetes Job ApplyConfiguration from a JobPlan for server-side apply.
329329
Typically called with `plan.JobName` as the jobName parameter.
330330

0 commit comments

Comments
 (0)