mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-09-18 13:22:17 +00:00
Previously, only a single embedded Kubernetes API version could be specified, resulting in a lack of support for certain GVKs. To address this, the goal is to create and utilize a unified scheme that consolidates Kubernetes API definitions. As a preliminary step, the current method of loading API definitions will be improved.
26 lines
549 B
Go
26 lines
549 B
Go
// Copyright 2019 The Kubernetes Authors.
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package info
|
|
|
|
import (
|
|
"fmt"
|
|
"io"
|
|
|
|
"github.com/spf13/cobra"
|
|
"sigs.k8s.io/kustomize/kyaml/openapi"
|
|
)
|
|
|
|
// NewCmdInfo makes a new info command.
|
|
func NewCmdInfo(w io.Writer) *cobra.Command {
|
|
infoCmd := cobra.Command{
|
|
Use: "info",
|
|
Short: "Prints the `info` field from the kubernetes OpenAPI data",
|
|
Example: `kustomize openapi info`,
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
fmt.Fprintln(w, openapi.BuiltinSchemaInfo)
|
|
},
|
|
}
|
|
return &infoCmd
|
|
}
|