Skip to content

Issue generating CRDs with controller-gen 0.4.0 #502

@chrispatmore

Description

@chrispatmore

Hey, I have been using controller-gen 0.3.0 to generate my CRD. And with no changes the CRD fails to generate when using 0.4.0

The problem is that the validation for stats.conditions in my CRD is being completely removed and replaced with type: Any

I have been using this package https://github.com/operator-framework/operator-lib/blob/v0.1.0/status/conditions.go
for the status conditions field in my api

import (
	"github.com/operator-framework/operator-lib/status"
)
Conditions status.Conditions `json:"conditions"`

error
CustomResourceDefinition.apiextensions.k8s.io "<group>" is invalid: spec.validation.openAPIV3Schema.properties[status].properties[conditions].type: Unsupported value: "Any": supported values: "array", "boolean", "integer", "number", "object", "string"

Is there a way to fix this error and get things working again?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions