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

Can you confirm the applicable kubernetes version? My kubernetes 1.20 report is wrong. #173

Open
llody55 opened this issue Jun 30, 2023 · 2 comments

Comments

@llody55
Copy link

llody55 commented Jun 30, 2023

kubernetesL1.20 permission-manager:1.9.0
error: error validating "permission-manager/crd.yml": error validating data: [ValidationError(CustomResourceDefinition.spec.versions[0].schema): unknown field "properties" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceValidation, ValidationError(CustomResourceDefinition.spec.versions[0].schema): unknown field "type" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceValidation]; if you choose to ignore these errors, turn validation off with --validate=false

@baymax55
Copy link

I also encountered this problem.

Error from server (BadRequest): error when creating "crd.yml": CustomResourceDefinition in version "v1" cannot be handled as a CustomResourceDefinition: strict decoding error: unknown field "spec.versions[0].schema.properties", unknown field "spec.versions[0].schema.type"

k8s version:
Client Version: version.Info{Major:"1", Minor:"27", GitVersion:"v1.27.3+k3s1", GitCommit:"fe9604cac119216e67f8bd5f14eb5608e3bcd3cf", GitTreeState:"clean", BuildDate:"2023-06-26T16:49:54Z", GoVersion:"go1.20.5", Compiler:"gc", Platform:"linux/amd64"} Kustomize Version: v5.0.1 Server Version: version.Info{Major:"1", Minor:"27", GitVersion:"v1.27.3+k3s1", GitCommit:"fe9604cac119216e67f8bd5f14eb5608e3bcd3cf", GitTreeState:"clean", BuildDate:"2023-06-26T16:49:54Z", GoVersion:"go1.20.5", Compiler:"gc", Platform:"linux/amd64"}

@igorstepanenkos
Copy link

Seems like crd has a bug in formatting, since they did linting in 1.8.0 and I can apply it after these changes:

      schema:
        openAPIV3Schema:
          type: object
          properties:
            spec:
              type: object
              properties:
                name:
                  type: string
                  minLength: 2

igorstepanenkos added a commit to igorstepanenkos/permission-manager that referenced this issue Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants