Skip to content

Add schema validation for all Cilium CRDs #11142

@joestringer

Description

@joestringer

Kubernetes 1.19 will remove deprecate v1beta1 support for Custom Resource Definitions.

In v1 of the CRD API, CRDs must be accompanied with schema validation. All fields need to be covered by this.

Implement schema validation for all CRDs.

  • CiliumNode
  • CiliumNetworkPolicy / CiliumClusterwideNetworkPolicy
  • CiliumEndpoint
  • CiliumIdentity

Note that if entries are injected into k8s v1beta1 CRDs without validation, then we migrate to v1 CRDs, we may only discover that the entries do not follow the schema when attempting to insert new entries or upgrading the CRD.

Related: #10727

This issue tracks implementing schemas and switching the code over to v1.

In an ideal world, we would generate the schema code from the definition in code using k8s controlle-tools. @aanm attempted this previously and hit the following issue:

Metadata

Metadata

Assignees

Labels

area/k8sImpacts the kubernetes API, or kubernetes -> cilium internals translation layers.kind/featureThis introduces new functionality.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions