Skip to content

Commit 3ca56e6

Browse files
committed
Switch template to cluster scoped
1 parent 03b90ff commit 3ca56e6

File tree

4 files changed

+5
-11
lines changed

4 files changed

+5
-11
lines changed

api/v1alpha1/sandboxclaim_types.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ type SandboxClaimSpec struct {
3333
// Template refers to the SandboxTemplate to be used for creating a Sandbox
3434
// +kubebuilder:validation:Required
3535
TemplateName string `json:"templateName,omitempty" protobuf:"bytes,3,name=templateName"`
36-
37-
// TemplateNamespace refers to the SandboxTemplate namespace
38-
// +kubebuilder:validation:Optional
39-
TemplateNamespace string `json:"templateNamespace,omitempty" protobuf:"bytes,4,opt,name=templateNamespace"`
4036
}
4137

4238
// SandboxClaimStatus defines the observed state of Sandbox.

api/v1alpha1/sandboxtemplate_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ type SandboxTemplateSpec struct {
3333
// template is the object that describes the pod spec that will be used to create
3434
// an agent sandbox.
3535
// +kubebuilder:validation:Required
36-
Template corev1.PodTemplateSpec `json:"template" protobuf:"bytes,3,opt,name=template"`
36+
Template corev1.PodTemplateSpec `json:"podTemplate" protobuf:"bytes,3,opt,name=template"`
3737
}
3838

3939
// SandboxTemplateStatus defines the observed state of Sandbox.
@@ -42,7 +42,7 @@ type SandboxTemplateStatus struct {
4242

4343
// +kubebuilder:object:root=true
4444
// +kubebuilder:subresource:status
45-
// +kubebuilder:resource:scope=Namespaced,shortName=sandboxtemplate
45+
// +kubebuilder:resource:scope=Cluster,shortName=sandboxtemplate
4646
// SandboxTemplate is the Schema for the sandboxe template API
4747
type SandboxTemplate struct {
4848
metav1.TypeMeta `json:",inline"`

manifest/crds/agents.x-k8s.io_sandboxclaims.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ spec:
3030
properties:
3131
templateName:
3232
type: string
33-
templateNamespace:
34-
type: string
3533
ttlSeconds:
3634
format: int32
3735
type: integer

manifest/crds/agents.x-k8s.io_sandboxtemplates.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ spec:
1414
shortNames:
1515
- sandboxtemplate
1616
singular: sandboxtemplate
17-
scope: Namespaced
17+
scope: Cluster
1818
versions:
1919
- name: v1alpha1
2020
schema:
@@ -28,7 +28,7 @@ spec:
2828
type: object
2929
spec:
3030
properties:
31-
template:
31+
podTemplate:
3232
properties:
3333
metadata:
3434
type: object
@@ -3666,7 +3666,7 @@ spec:
36663666
format: int32
36673667
type: integer
36683668
required:
3669-
- template
3669+
- podTemplate
36703670
type: object
36713671
status:
36723672
type: object

0 commit comments

Comments
 (0)