Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions pkg/crd/markers/topology.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,6 @@ func (l ListType) ApplyToSchema(schema *apiext.JSONSchemaProps) error {
if l != "map" && l != "atomic" && l != "set" {
return fmt.Errorf(`ListType must be either "map", "set" or "atomic"`)
}

if l == "set" {
if itemSchema := schema.Items.Schema; itemSchema != nil {
v := "atomic"
itemSchema.XMapType = &v
}
}
p := string(l)
schema.XListType = &p
return nil
Expand Down
5 changes: 0 additions & 5 deletions pkg/crd/testdata/cronjob_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,6 @@ type CronJobSpec struct {

// Checks that arrays work when the type contains a composite literal
ArrayUsingCompositeLiteral [len(struct{ X [3]int }{}.X)]string `json:"arrayUsingCompositeLiteral,omitempty"`

// Tests the generation of a set list type
// +listType=set
// +optional
Set []string `json:"set,omitempty"`
}

type ContainsNestedMap struct {
Expand Down
9 changes: 1 addition & 8 deletions pkg/crd/testdata/testdata.kubebuilder.io_cronjobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: (devel)
api-approved.kubernetes.io: https://github.com/kubernetes-sigs/controller-tools
cert-manager.io/inject-ca-from-secret: cert-manager/cert-manager-webhook-ca
controller-gen.kubebuilder.io/version: (devel)
creationTimestamp: null
name: cronjobs.testdata.kubebuilder.io
spec:
Expand Down Expand Up @@ -7330,13 +7330,6 @@ spec:
type: string
schemaless:
description: This tests that the schemaless marker works
set:
description: Tests the generation of a set list type
items:
type: string
x-kubernetes-map-type: atomic
type: array
x-kubernetes-list-type: set
startingDeadlineSeconds:
description: Optional deadline in seconds for starting the job if
it misses scheduled time for any reason. Missed jobs executions
Expand Down