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

kustomize does not support multiple "x-kubernetes-group-version-kind" in OpenAPI #4127

Closed
ciis0 opened this issue Aug 19, 2021 · 2 comments · Fixed by #4163
Closed

kustomize does not support multiple "x-kubernetes-group-version-kind" in OpenAPI #4127

ciis0 opened this issue Aug 19, 2021 · 2 comments · Fixed by #4163
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@ciis0
Copy link

ciis0 commented Aug 19, 2021

if !ok || len(exts) != 1 {
continue
}

This for example breaks using the default OpenShift OpenAPI JSON which for example contains two GVKs for DeploymentConfig:

{
    "com.github.openshift.api.apps.v1.DeploymentConfig": {
      "properties": {
        "apiVersion": {
          "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
          "type": "string"
        },
        "kind": {
          "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
          "type": "string"
        },
        "metadata": {
          "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"
        },
        "spec": {
          "$ref": "#/definitions/com.github.openshift.api.apps.v1.DeploymentConfigSpec",
          "description": "Spec represents a desired deployment state and how to deploy to it."
        },
        "status": {
          "$ref": "#/definitions/com.github.openshift.api.apps.v1.DeploymentConfigStatus",
          "description": "Status represents the current deployment state."
        }
      },
      "required": [
        "spec"
      ],
      "type": "object",
      "x-kubernetes-group-version-kind": [
        {
          "group": "",
          "kind": "DeploymentConfig",
          "version": "v1"
        },
        {
          "group": "apps.openshift.io",
          "kind": "DeploymentConfig",
          "version": "v1"
        }
      ]
    }
@k8s-ci-robot k8s-ci-robot added needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Aug 19, 2021
@KnVerey
Copy link
Contributor

KnVerey commented Sep 1, 2021

/triage accepted
/assign @natasha41575

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Sep 1, 2021
@natasha41575 natasha41575 added the kind/bug Categorizes issue or PR as related to a bug. label Sep 2, 2021
@k8s-ci-robot k8s-ci-robot removed the needs-kind Indicates a PR lacks a `kind/foo` label and requires one. label Sep 2, 2021
@ciis0
Copy link
Author

ciis0 commented Sep 17, 2021

thank you for the fast fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants