Skip to content

Commit 2a89d44

Browse files
committed
Updated manifests and DataSource claim tag
1 parent b2772ba commit 2a89d44

5 files changed

Lines changed: 36 additions & 27 deletions

File tree

api/v1alpha1/proposal_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ type DataSource struct {
277277
// +kubebuilder:validation:MinLength=1
278278
// +kubebuilder:validation:MaxLength=253
279279
// +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="must be a valid DNS subdomain"
280-
ClaimName string `json:"claimName,omitempty"`
280+
ClaimName string `json:"claimName"`
281281
}
282282

283283
// ProposalSpec defines the desired state of Proposal.

config/crd/bases/agentic.openshift.io_proposals.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,28 @@ spec:
484484
x-kubernetes-validations:
485485
- message: schema is required when mode is Minimal
486486
rule: self.mode != 'Minimal' || has(self.schema)
487+
dataSource:
488+
description: |-
489+
dataSource references a PVC containing pre-populated input data
490+
(e.g., must-gather bundles, diagnostic data). The operator mounts
491+
it read-only at /data/input in the sandbox pod. Skills discover
492+
input data at this standard location.
493+
494+
Immutable: input data source is fixed at creation.
495+
properties:
496+
claimName:
497+
description: |-
498+
claimName is the name of the PersistentVolumeClaim to mount.
499+
The PVC must exist in the same namespace as the Proposal.
500+
maxLength: 253
501+
minLength: 1
502+
type: string
503+
x-kubernetes-validations:
504+
- message: must be a valid DNS subdomain
505+
rule: '!format.dns1123Subdomain().validate(self).hasValue()'
506+
required:
507+
- claimName
508+
type: object
487509
execution:
488510
description: |-
489511
execution defines per-step configuration for the execution step.
@@ -1710,6 +1732,9 @@ spec:
17101732
- message: verification is immutable once set
17111733
rule: '!has(oldSelf.verification) || (has(self.verification) && self.verification
17121734
== oldSelf.verification)'
1735+
- message: dataSource is immutable once set
1736+
rule: '!has(oldSelf.dataSource) || (has(self.dataSource) && self.dataSource
1737+
== oldSelf.dataSource)'
17131738
status:
17141739
description: status defines the observed state of Proposal.
17151740
minProperties: 1

config/rbac/role.yaml

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ kind: ClusterRole
44
metadata:
55
name: agentic-operator-manager-role
66
rules:
7+
- apiGroups:
8+
- ""
9+
resources:
10+
- persistentvolumeclaims
11+
verbs:
12+
- get
13+
- list
14+
- watch
715
- apiGroups:
816
- agentic.openshift.io
917
resources:
@@ -42,12 +50,8 @@ rules:
4250
- apiGroups:
4351
- agentic.openshift.io
4452
resources:
45-
- analysisresults/status
46-
- escalationresults/status
47-
- executionresults/status
4853
- proposalapprovals/status
4954
- proposals/status
50-
- verificationresults/status
5155
verbs:
5256
- get
5357
- patch
@@ -58,27 +62,6 @@ rules:
5862
- proposals/finalizers
5963
verbs:
6064
- update
61-
- apiGroups:
62-
- agents.x-k8s.io
63-
resources:
64-
- sandboxes
65-
verbs:
66-
- get
67-
- list
68-
- watch
69-
- apiGroups:
70-
- extensions.agents.x-k8s.io
71-
resources:
72-
- sandboxclaims
73-
- sandboxtemplates
74-
verbs:
75-
- create
76-
- delete
77-
- get
78-
- list
79-
- patch
80-
- update
81-
- watch
8265
- apiGroups:
8366
- rbac.authorization.k8s.io
8467
resources:

controller/proposal/sandbox.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func (m *SandboxManager) buildClaim(claimName, proposalName, step, templateName
5050
"namespace": m.Namespace,
5151
"labels": map[string]any{
5252
LabelProposal: proposalName,
53-
LabelStep: step,
53+
LabelStep: step,
5454
},
5555
},
5656
"spec": map[string]any{

controller/proposal/sandbox_agent.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ func proposalTimeout(proposal *agenticv1alpha1.Proposal) time.Duration {
6666
}
6767
return defaultSandboxTimeout
6868
}
69+
6970
func stepString(step agenticv1alpha1.SandboxStep) string {
7071
return strings.ToLower(string(step))
7172
}

0 commit comments

Comments
 (0)