Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The CustomResourceDefinition is invalid for 1.17 and 1.18 kubernetes versions #37

Closed
f41gh7 opened this issue Jun 15, 2020 · 2 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@f41gh7
Copy link
Collaborator

f41gh7 commented Jun 15, 2020

There are two problems:

  1. with 1.16 and 1.17 clusters
 The CustomResourceDefinition "vmagents.victoriametrics.com" is invalid:
* spec.validation.openAPIV3Schema.properties[spec].properties[containers].items.type: Invalid value: "object": must be a scalar or atomic type as item of a list with x-kubernetes-list-type=set
* spec.validation.openAPIV3Schema.properties[spec].properties[volumeMounts].items.type: Invalid value: "object": must be a scalar or atomic type as item of a list with x-kubernetes-list-type=set
* spec.validation.openAPIV3Schema.properties[spec].properties[remoteWrite].items.type: Invalid value: "object": must be a scalar or atomic type as item of a list with x-kubernetes-list-type=set
* spec.validation.openAPIV3Schema.properties[spec].properties[initContainers].items.type: Invalid value: "object": must be a scalar or atomic type as item of a list with x-kubernetes-list-type=set
* spec.validation.openAPIV3Schema.properties[spec].properties[imagePullSecrets].items.type: Invalid value: "object": must be a scalar or atomic type as item of a list with x-kubernetes-list-type=set

listType=set must be removed to fix it.

  1. with 1.18 cluster version
The CustomResourceDefinition "appservices.app.example.com" is invalid: spec.validation.openAPIV3Schema.properties[spec].properties[initContainers].items.properties[ports].items.properties[protocol].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property

Kubernetes upstream problem.

operator-framework/operator-sdk#3235

need to find out minimal version of Kubernetes, that operator supports.

@f41gh7 f41gh7 added the bug Something isn't working label Jun 15, 2020
@f41gh7 f41gh7 self-assigned this Jun 15, 2020
@f41gh7
Copy link
Collaborator Author

f41gh7 commented Jun 23, 2020

first part fixed.

f41gh7 added a commit that referenced this issue Jul 18, 2020
elegant solution for k8s 1.18 crd issue  #37
@f41gh7
Copy link
Collaborator Author

f41gh7 commented Jul 18, 2020

embedded containers and initContainers open api properties were removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant