From a291b6161e81c9710a2e3caa2f6aab9f59550c7c Mon Sep 17 00:00:00 2001 From: Mike Splain Date: Tue, 24 Jul 2018 10:00:43 -0400 Subject: [PATCH] Fix api-gen-docs --- Gopkg.lock | 4 +- Gopkg.toml | 1 + hack/make-gendocs.sh | 16 +- pkg/openapi/openapi_generated.go | 5433 ++++++++++------- .../cmd/apiregister-gen/BUILD.bazel | 21 + .../apiregister-gen/generators/BUILD.bazel | 28 + .../generators/apis_generator.go | 100 + .../generators/controller_generator.go | 357 ++ .../generators/install_generator.go | 68 + .../cmd/apiregister-gen/generators/package.go | 178 + .../cmd/apiregister-gen/generators/parser.go | 761 +++ .../generators/unversioned_generator.go | 292 + .../cmd/apiregister-gen/generators/util.go | 167 + .../generators/versioned_generator.go | 173 + .../cmd/apiregister-gen/main.go | 51 + 15 files changed, 5476 insertions(+), 2174 deletions(-) create mode 100644 vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/BUILD.bazel create mode 100644 vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/BUILD.bazel create mode 100644 vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/apis_generator.go create mode 100644 vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/controller_generator.go create mode 100644 vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/install_generator.go create mode 100644 vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/package.go create mode 100644 vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/parser.go create mode 100644 vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/unversioned_generator.go create mode 100644 vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/util.go create mode 100644 vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/versioned_generator.go create mode 100644 vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/main.go diff --git a/Gopkg.lock b/Gopkg.lock index f788bb0ae8616..bf7cd33ee3723 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -621,6 +621,8 @@ [[projects]] name = "github.com/kubernetes-incubator/apiserver-builder" packages = [ + "cmd/apiregister-gen", + "cmd/apiregister-gen/generators", "cmd/apiserver-boot", "cmd/apiserver-boot/boot/build", "cmd/apiserver-boot/boot/create", @@ -1786,6 +1788,6 @@ [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "b2c3876a387bc89849c0113df69d24ad9987cbccea885c60ed499162851e4039" + inputs-digest = "c083db22a03ca0fe3ccc11361c91a444e674aa1ec6fb0aba6447b4b4982c0355" solver-name = "gps-cdcl" solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml index 19635c97cd2e7..7c6f4d7369244 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -12,6 +12,7 @@ required = [ # Needed for docs generation "k8s.io/code-generator/cmd/openapi-gen", "github.com/kubernetes-incubator/apiserver-builder/cmd/apiserver-boot", + "github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen", "github.com/kubernetes-incubator/reference-docs/gen-apidocs", # Needed for bazel generation / verification diff --git a/hack/make-gendocs.sh b/hack/make-gendocs.sh index b48665c9e0bde..63a819a5fb98a 100755 --- a/hack/make-gendocs.sh +++ b/hack/make-gendocs.sh @@ -33,11 +33,13 @@ cp ${WORK_DIR}/go/bin/openapi-gen ${GOPATH}/bin/ # Install the apiserver-builder commands GOPATH=${WORK_DIR}/go/ go install github.com/kubernetes-incubator/apiserver-builder/cmd/... -cp ${WORK_DIR}/go/bin/openapi-gen ${GOPATH}/bin/ +cp ${WORK_DIR}/go/bin/apiserver-boot ${GOPATH}/bin/ +cp ${WORK_DIR}/go/bin/apiregister-gen ${GOPATH}/bin/ # Install the reference docs commands (apiserver-builder commands invoke these) GOPATH=${WORK_DIR}/go/ go install github.com/kubernetes-incubator/reference-docs/gen-apidocs/... cp ${WORK_DIR}/go/bin/openapi-gen ${GOPATH}/bin/ +cp ${WORK_DIR}/go/bin/gen-apidocs ${GOPATH}/bin/ # More code generators GOPATH=${WORK_DIR}/go/ go install k8s.io/code-generator/cmd/lister-gen @@ -46,3 +48,15 @@ cp ${WORK_DIR}/go/bin/lister-gen ${GOPATH}/bin/ GOPATH=${WORK_DIR}/go/ go install k8s.io/code-generator/cmd/informer-gen cp ${WORK_DIR}/go/bin/informer-gen ${GOPATH}/bin/ +GOPATH=${WORK_DIR}/go/ go install k8s.io/code-generator/cmd/client-gen +cp ${WORK_DIR}/go/bin/client-gen ${GOPATH}/bin/ + +GOPATH=${WORK_DIR}/go/ go install k8s.io/code-generator/cmd/deepcopy-gen +cp ${WORK_DIR}/go/bin/deepcopy-gen ${GOPATH}/bin/ + +GOPATH=${WORK_DIR}/go/ go install k8s.io/code-generator/cmd/conversion-gen +cp ${WORK_DIR}/go/bin/conversion-gen ${GOPATH}/bin/ + +GOPATH=${WORK_DIR}/go/ go install k8s.io/code-generator/cmd/defaulter-gen +cp ${WORK_DIR}/go/bin/defaulter-gen ${GOPATH}/bin/ + diff --git a/pkg/openapi/openapi_generated.go b/pkg/openapi/openapi_generated.go index 7088c7b591415..30244cc23f5e8 100644 --- a/pkg/openapi/openapi_generated.go +++ b/pkg/openapi/openapi_generated.go @@ -24790,6 +24790,13 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA Format: "", }, }, + "containerProxy": { + SchemaProps: spec.SchemaProps{ + Description: "ContainerProxy is a url for a pull-through proxy of a docker registry", + Type: []string{"string"}, + Format: "", + }, + }, }, }, }, @@ -24804,16 +24811,16 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.KopeioAuthenticationSpec"), }, }, - "heptio": { + "aws": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.HeptioAuthenticationSpec"), + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.AwsAuthenticationSpec"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/kops/pkg/apis/kops/v1alpha1.HeptioAuthenticationSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.KopeioAuthenticationSpec"}, + "k8s.io/kops/pkg/apis/kops/v1alpha1.AwsAuthenticationSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.KopeioAuthenticationSpec"}, }, "k8s.io/kops/pkg/apis/kops/v1alpha1.AuthorizationSpec": { Schema: spec.Schema{ @@ -24835,6 +24842,14 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA Dependencies: []string{ "k8s.io/kops/pkg/apis/kops/v1alpha1.AlwaysAllowAuthorizationSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.RBACAuthorizationSpec"}, }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.AwsAuthenticationSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Properties: map[string]spec.Schema{}, + }, + }, + Dependencies: []string{}, + }, "k8s.io/kops/pkg/apis/kops/v1alpha1.BastionSpec": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -24874,7 +24889,14 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: "CNINetworkingSpec is the specification for networking that is implemented by a Daemonset Networking is not managed by kops - we can create options here that directly configure e.g. weave but this is useful for arbitrary network modes or for modes that don't need additional configuration.", - Properties: map[string]spec.Schema{}, + Properties: map[string]spec.Schema{ + "usesSecondaryIP": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + }, }, }, Dependencies: []string{}, @@ -24897,6 +24919,13 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA Format: "", }, }, + "mtu": { + SchemaProps: spec.SchemaProps{ + Description: "MTU to be set in the cni-network-config for calico.", + Type: []string{"integer"}, + Format: "int32", + }, + }, "prometheusMetricsEnabled": { SchemaProps: spec.SchemaProps{ Description: "PrometheusMetricsEnabled can be set to enable the experimental Prometheus metrics server (default: false)", @@ -24992,802 +25021,705 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "k8s.io/kops/pkg/apis/kops/v1alpha1.CiliumNetworkingSpec": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CiliumNetworkingSpec declares that we want Cilium networking", Properties: map[string]spec.Schema{ - "debug": { + "version": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, + Type: []string{"string"}, Format: "", }, }, - "tunnel": { + "accessLog": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, Format: "", }, }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.ClassicNetworkingSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ClassicNetworkingSpec is the specification of classic networking mode, integrated into kubernetes", - Properties: map[string]spec.Schema{}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.CloudConfiguration": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CloudConfiguration defines the cloud provider configuration", - Properties: map[string]spec.Schema{ - "multizone": { + "agentLabels": { SchemaProps: spec.SchemaProps{ - Description: "GCE cloud-config options", - Type: []string{"boolean"}, - Format: "", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "nodeTags": { + "allowLocalhost": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, Format: "", }, }, - "nodeInstancePrefix": { + "autoIpv6NodeRoutes": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "bpfRoot": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, Format: "", }, }, - "disableSecurityGroupIngress": { + "containerRuntime": { SchemaProps: spec.SchemaProps{ - Description: "AWS cloud-config options", - Type: []string{"boolean"}, - Format: "", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "elbSecurityGroup": { + "containerRuntimeEndpoint": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "debug": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, Format: "", }, }, - "vSphereUsername": { + "debugVerbose": { SchemaProps: spec.SchemaProps{ - Description: "vSphere cloud-config specs", - Type: []string{"string"}, - Format: "", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "vSpherePassword": { + "device": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, Format: "", }, }, - "vSphereServer": { + "disableConntrack": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, + Type: []string{"boolean"}, Format: "", }, }, - "vSphereDatacenter": { + "disableIpv4": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, + Type: []string{"boolean"}, Format: "", }, }, - "vSphereResourcePool": { + "disableK8sServices": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, + Type: []string{"boolean"}, Format: "", }, }, - "vSphereDatastore": { + "enablePolicy": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, Format: "", }, }, - "vSphereCoreDNSServer": { + "enableTracing": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "envoyLog": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, Format: "", }, }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.CloudControllerManagerConfig": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CloudControllerManagerConfig is the configuration of the cloud controller", - Properties: map[string]spec.Schema{ - "master": { + "ipv4ClusterCidrMaskSize": { SchemaProps: spec.SchemaProps{ - Description: "Master is the url for the kube api master.", - Type: []string{"string"}, - Format: "", + Type: []string{"integer"}, + Format: "int32", }, }, - "logLevel": { + "ipv4Node": { SchemaProps: spec.SchemaProps{ - Description: "LogLevel is the verbosity of the logs.", - Type: []string{"integer"}, - Format: "int32", + Type: []string{"string"}, + Format: "", }, }, - "image": { + "ipv4Range": { SchemaProps: spec.SchemaProps{ - Description: "Image is the OCI image of the cloud controller manager.", - Type: []string{"string"}, - Format: "", + Type: []string{"string"}, + Format: "", }, }, - "cloudProvider": { + "ipv4ServiceRange": { SchemaProps: spec.SchemaProps{ - Description: "CloudProvider is the provider for cloud services.", - Type: []string{"string"}, - Format: "", + Type: []string{"string"}, + Format: "", }, }, - "clusterName": { + "ipv6ClusterAllocCidr": { SchemaProps: spec.SchemaProps{ - Description: "ClusterName is the instance prefix for the cluster.", - Type: []string{"string"}, - Format: "", + Type: []string{"string"}, + Format: "", }, }, - "clusterCIDR": { + "ipv6Node": { SchemaProps: spec.SchemaProps{ - Description: "ClusterCIDR is CIDR Range for Pods in cluster.", - Type: []string{"string"}, - Format: "", + Type: []string{"string"}, + Format: "", }, }, - "allocateNodeCIDRs": { + "ipv6Range": { SchemaProps: spec.SchemaProps{ - Description: "AllocateNodeCIDRs enables CIDRs for Pods to be allocated and, if ConfigureCloudRoutes is true, to be set on the cloud provider.", - Type: []string{"boolean"}, - Format: "", + Type: []string{"string"}, + Format: "", }, }, - "configureCloudRoutes": { + "ipv6ServiceRange": { SchemaProps: spec.SchemaProps{ - Description: "ConfigureCloudRoutes enables CIDRs allocated with to be configured on the cloud provider.", - Type: []string{"boolean"}, - Format: "", + Type: []string{"string"}, + Format: "", }, }, - "cidrAllocatorType": { + "k8sApiServer": { SchemaProps: spec.SchemaProps{ - Description: "CIDRAllocatorType specifies the type of CIDR allocator to use.", - Type: []string{"string"}, - Format: "", + Type: []string{"string"}, + Format: "", }, }, - "leaderElection": { + "k8sKubeconfigPath": { SchemaProps: spec.SchemaProps{ - Description: "LeaderElection defines the configuration of leader election client.", - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.LeaderElectionConfiguration"), + Type: []string{"string"}, + Format: "", }, }, - "useServiceAccountCredentials": { + "keepBpfTemplates": { SchemaProps: spec.SchemaProps{ - Description: "UseServiceAccountCredentials controls whether we use individual service account credentials for each controller.", - Type: []string{"boolean"}, - Format: "", + Type: []string{"boolean"}, + Format: "", }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/kops/pkg/apis/kops/v1alpha1.LeaderElectionConfiguration"}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.Cluster": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Cluster is a specific cluster wrapper", - Properties: map[string]spec.Schema{ - "kind": { + "keepConfig": { SchemaProps: spec.SchemaProps{ - 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/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", + Type: []string{"boolean"}, + Format: "", }, }, - "apiVersion": { + "labelPrefixFile": { SchemaProps: spec.SchemaProps{ - 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/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", + Type: []string{"string"}, + Format: "", }, }, - "metadata": { + "labels": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "spec": { + "lb": { SchemaProps: spec.SchemaProps{ - Description: "Spec defines the behavior of a Cluster.", - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.ClusterSpec"), + Type: []string{"string"}, + Format: "", }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/kops/pkg/apis/kops/v1alpha1.ClusterSpec"}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.ClusterList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ClusterList is a list of clusters", - Properties: map[string]spec.Schema{ - "kind": { + "libDir": { SchemaProps: spec.SchemaProps{ - 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/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - 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/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Type: []string{"string"}, + Format: "", }, }, - "items": { + "logDriver": { SchemaProps: spec.SchemaProps{ Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.Cluster"), + Type: []string{"string"}, + Format: "", }, }, }, }, }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/kops/pkg/apis/kops/v1alpha1.Cluster"}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.ClusterSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ClusterSpec defines the configuration for a cluster", - Properties: map[string]spec.Schema{ - "channel": { - SchemaProps: spec.SchemaProps{ - Description: "Channel we are following", - Type: []string{"string"}, - Format: "", - }, - }, - "addons": { + "logOpt": { SchemaProps: spec.SchemaProps{ - Description: "Additional addons that should be installed on the cluster", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.AddonSpec"), + Type: []string{"string"}, + Format: "", }, }, }, }, }, - "configBase": { + "logstash": { SchemaProps: spec.SchemaProps{ - Description: "ConfigBase is the path where we store configuration for the cluster This might be different that the location when the cluster spec itself is stored, both because this must be accessible to the cluster, and because it might be on a different cloud or storage system (etcd vs S3)", - Type: []string{"string"}, - Format: "", + Type: []string{"boolean"}, + Format: "", }, }, - "cloudProvider": { + "logstashAgent": { SchemaProps: spec.SchemaProps{ - Description: "The CloudProvider to use (aws or gce)", - Type: []string{"string"}, - Format: "", + Type: []string{"string"}, + Format: "", }, }, - "kubernetesVersion": { + "logstashProbeTimer": { SchemaProps: spec.SchemaProps{ - Description: "The version of kubernetes to install (optional, and can be a \"spec\" like stable)", - Type: []string{"string"}, - Format: "", + Type: []string{"integer"}, + Format: "int64", }, }, - "zones": { + "disableMasquerade": { SchemaProps: spec.SchemaProps{ - Description: "Configuration of zones we are targeting", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.ClusterZoneSpec"), - }, - }, - }, + Type: []string{"boolean"}, + Format: "", }, }, - "project": { + "nat46Range": { SchemaProps: spec.SchemaProps{ - Description: "Project is the cloud project we should use, required on GCE", - Type: []string{"string"}, - Format: "", + Type: []string{"string"}, + Format: "", }, }, - "masterPublicName": { + "pprof": { SchemaProps: spec.SchemaProps{ - Description: "MasterPublicName is the external DNS name for the master nodes", - Type: []string{"string"}, - Format: "", + Type: []string{"boolean"}, + Format: "", }, }, - "masterInternalName": { + "prefilterDevice": { SchemaProps: spec.SchemaProps{ - Description: "MasterInternalName is the internal DNS name for the master nodes", - Type: []string{"string"}, - Format: "", + Type: []string{"string"}, + Format: "", }, }, - "networkCIDR": { + "prometheusServeAddr": { SchemaProps: spec.SchemaProps{ - Description: "NetworkCIDR is the CIDR used for the AWS VPC Network, or otherwise allocated to k8s This is a real CIDR, not the internal k8s network On AWS, it maps to the VPC CIDR. It is not required on GCE.", - Type: []string{"string"}, - Format: "", + Type: []string{"string"}, + Format: "", }, }, - "additionalNetworkCIDRs": { + "restore": { SchemaProps: spec.SchemaProps{ - Description: "AdditionalNetworkCIDRs is a list of additional CIDR used for the AWS VPC or otherwise allocated to k8s. This is a real CIDR, not the internal k8s network On AWS, it maps to any additional CIDRs added to a VPC.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Type: []string{"boolean"}, + Format: "", }, }, - "networkID": { + "singleClusterRoute": { SchemaProps: spec.SchemaProps{ - Description: "NetworkID is an identifier of a network, if we want to reuse/share an existing network (e.g. an AWS VPC)", - Type: []string{"string"}, - Format: "", + Type: []string{"boolean"}, + Format: "", }, }, - "topology": { + "socketPath": { SchemaProps: spec.SchemaProps{ - Description: "Topology defines the type of network topology to use on the cluster - default public This is heavily weighted towards AWS for the time being, but should also be agnostic enough to port out to GCE later if needed", - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.TopologySpec"), + Type: []string{"string"}, + Format: "", }, }, - "secretStore": { + "stateDir": { SchemaProps: spec.SchemaProps{ - Description: "SecretStore is the VFS path to where secrets are stored", - Type: []string{"string"}, - Format: "", + Type: []string{"string"}, + Format: "", }, }, - "keyStore": { + "tracePayloadlen": { SchemaProps: spec.SchemaProps{ - Description: "KeyStore is the VFS path to where SSL keys and certificates are stored", - Type: []string{"string"}, - Format: "", + Type: []string{"integer"}, + Format: "int32", }, }, - "configStore": { + "tunnel": { SchemaProps: spec.SchemaProps{ - Description: "ConfigStore is the VFS path to where the configuration (Cluster, InstanceGroupss etc) is stored", - Type: []string{"string"}, - Format: "", + Type: []string{"string"}, + Format: "", }, }, - "dnsZone": { + }, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.ClassicNetworkingSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClassicNetworkingSpec is the specification of classic networking mode, integrated into kubernetes", + Properties: map[string]spec.Schema{}, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.CloudConfiguration": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CloudConfiguration defines the cloud provider configuration", + Properties: map[string]spec.Schema{ + "multizone": { SchemaProps: spec.SchemaProps{ - Description: "DNSZone is the DNS zone we should use when configuring DNS This is because some clouds let us define a managed zone foo.bar, and then have kubernetes.dev.foo.bar, without needing to define dev.foo.bar as a hosted zone. DNSZone will probably be a suffix of the MasterPublicName and MasterInternalName Note that DNSZone can either by the host name of the zone (containing dots), or can be an identifier for the zone.", - Type: []string{"string"}, + Description: "GCE cloud-config options", + Type: []string{"boolean"}, Format: "", }, }, - "additionalSans": { + "nodeTags": { SchemaProps: spec.SchemaProps{ - Description: "AdditionalSANs adds additional Subject Alternate Names to apiserver cert that kops generates", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Type: []string{"string"}, + Format: "", }, }, - "clusterDNSDomain": { + "nodeInstancePrefix": { SchemaProps: spec.SchemaProps{ - Description: "ClusterDNSDomain is the suffix we use for internal DNS names (normally cluster.local)", - Type: []string{"string"}, - Format: "", + Type: []string{"string"}, + Format: "", }, }, - "multizone": { + "disableSecurityGroupIngress": { SchemaProps: spec.SchemaProps{ - Description: "ClusterName is a unique identifier for the cluster, and currently must be a DNS name ClusterName string `json:\",omitempty\"`", + Description: "AWS cloud-config options", Type: []string{"boolean"}, Format: "", }, }, - "serviceClusterIPRange": { + "elbSecurityGroup": { SchemaProps: spec.SchemaProps{ - Description: "ServiceClusterIPRange is the CIDR, from the internal network, where we allocate IPs for services", - Type: []string{"string"}, - Format: "", + Type: []string{"string"}, + Format: "", }, }, - "nonMasqueradeCIDR": { + "vSphereUsername": { SchemaProps: spec.SchemaProps{ - Description: "NonMasqueradeCIDR is the CIDR for the internal k8s network (on which pods & services live) It cannot overlap ServiceClusterIPRange", + Description: "vSphere cloud-config specs", Type: []string{"string"}, Format: "", }, }, - "adminAccess": { + "vSpherePassword": { SchemaProps: spec.SchemaProps{ - Description: "AdminAccess determines the permitted access to the admin endpoints (SSH & master HTTPS) Currently only a single CIDR is supported (though a richer grammar could be added in future)", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Type: []string{"string"}, + Format: "", }, }, - "isolateMasters": { + "vSphereServer": { SchemaProps: spec.SchemaProps{ - Description: "IsolatesMasters determines whether we should lock down masters so that they are not on the pod network. true is the kube-up behaviour, but it is very surprising: it means that daemonsets only work on the master if they have hostNetwork=true. false is now the default, and it will:\n * give the master a normal PodCIDR\n * run kube-proxy on the master\n * enable debugging handlers on the master, so kubectl logs works", - Type: []string{"boolean"}, - Format: "", + Type: []string{"string"}, + Format: "", }, }, - "updatePolicy": { + "vSphereDatacenter": { SchemaProps: spec.SchemaProps{ - Description: "UpdatePolicy determines the policy for applying upgrades automatically. Valid values:\n 'external' do not apply updates automatically - they are applied manually or by an external system\n missing: default policy (currently OS security upgrades that do not require a reboot)", - Type: []string{"string"}, - Format: "", + Type: []string{"string"}, + Format: "", }, }, - "additionalPolicies": { + "vSphereResourcePool": { SchemaProps: spec.SchemaProps{ - Description: "Additional policies to add for roles", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Type: []string{"string"}, + Format: "", }, }, - "fileAssets": { + "vSphereDatastore": { SchemaProps: spec.SchemaProps{ - Description: "A collection of files assets for deployed cluster wide", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.FileAssetSpec"), - }, - }, - }, + Type: []string{"string"}, + Format: "", }, }, - "egressProxy": { + "vSphereCoreDNSServer": { SchemaProps: spec.SchemaProps{ - Description: "HTTPProxy defines connection information to support use of a private cluster behind an forward HTTP Proxy", - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.EgressProxySpec"), + Type: []string{"string"}, + Format: "", }, }, - "sshKeyName": { + }, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.CloudControllerManagerConfig": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CloudControllerManagerConfig is the configuration of the cloud controller", + Properties: map[string]spec.Schema{ + "master": { SchemaProps: spec.SchemaProps{ - Description: "SSHKeyName specifies a preexisting SSH key to use", + Description: "Master is the url for the kube api master.", Type: []string{"string"}, Format: "", }, }, - "etcdClusters": { + "logLevel": { SchemaProps: spec.SchemaProps{ - Description: "EtcdClusters stores the configuration for each cluster", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.EtcdClusterSpec"), - }, - }, - }, + Description: "LogLevel is the verbosity of the logs.", + Type: []string{"integer"}, + Format: "int32", }, }, - "docker": { + "image": { SchemaProps: spec.SchemaProps{ - Description: "Component configurations", - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.DockerConfig"), + Description: "Image is the OCI image of the cloud controller manager.", + Type: []string{"string"}, + Format: "", }, }, - "kubeDNS": { + "cloudProvider": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.KubeDNSConfig"), + Description: "CloudProvider is the provider for cloud services.", + Type: []string{"string"}, + Format: "", }, }, - "kubeAPIServer": { + "clusterName": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.KubeAPIServerConfig"), + Description: "ClusterName is the instance prefix for the cluster.", + Type: []string{"string"}, + Format: "", }, }, - "kubeControllerManager": { + "clusterCIDR": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.KubeControllerManagerConfig"), + Description: "ClusterCIDR is CIDR Range for Pods in cluster.", + Type: []string{"string"}, + Format: "", }, }, - "cloudControllerManager": { + "allocateNodeCIDRs": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.CloudControllerManagerConfig"), + Description: "AllocateNodeCIDRs enables CIDRs for Pods to be allocated and, if ConfigureCloudRoutes is true, to be set on the cloud provider.", + Type: []string{"boolean"}, + Format: "", }, }, - "kubeScheduler": { + "configureCloudRoutes": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.KubeSchedulerConfig"), + Description: "ConfigureCloudRoutes enables CIDRs allocated with to be configured on the cloud provider.", + Type: []string{"boolean"}, + Format: "", }, }, - "kubeProxy": { + "cidrAllocatorType": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.KubeProxyConfig"), + Description: "CIDRAllocatorType specifies the type of CIDR allocator to use.", + Type: []string{"string"}, + Format: "", }, }, - "kubelet": { + "leaderElection": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.KubeletConfigSpec"), + Description: "LeaderElection defines the configuration of leader election client.", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.LeaderElectionConfiguration"), }, }, - "masterKubelet": { + "useServiceAccountCredentials": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.KubeletConfigSpec"), + Description: "UseServiceAccountCredentials controls whether we use individual service account credentials for each controller.", + Type: []string{"boolean"}, + Format: "", }, }, - "cloudConfig": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/kops/pkg/apis/kops/v1alpha1.LeaderElectionConfiguration"}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.Cluster": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Cluster is a specific cluster wrapper", + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.CloudConfiguration"), + 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/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", }, }, - "externalDns": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.ExternalDNSConfig"), + 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/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", }, }, - "networking": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Networking configuration", - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.NetworkingSpec"), + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "api": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "API field controls how the API is exposed outside the cluster", - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.AccessSpec"), + Description: "Spec defines the behavior of a Cluster.", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.ClusterSpec"), }, }, - "authentication": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/kops/pkg/apis/kops/v1alpha1.ClusterSpec"}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.ClusterList": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterList is a list of clusters", + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Description: "Authentication field controls how the cluster is configured for authentication", - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.AuthenticationSpec"), + 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/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", }, }, - "authorization": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Authorization field controls how the cluster is configured for authorization", - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.AuthorizationSpec"), + 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/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", }, }, - "cloudLabels": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "Tags for AWS instance groups", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, - "hooks": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "Hooks for custom actions e.g. on first installation", - Type: []string{"array"}, + Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.HookSpec"), + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.Cluster"), }, }, }, }, }, - "assets": { - SchemaProps: spec.SchemaProps{ - Description: "Alternative locations for files and containers", - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.Assets"), - }, - }, - "iam": { - SchemaProps: spec.SchemaProps{ - Description: "IAM field adds control over the IAM security policies applied to resources", - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.IAMSpec"), - }, - }, - "encryptionConfig": { - SchemaProps: spec.SchemaProps{ - Description: "EncryptionConfig holds the encryption config", - Type: []string{"boolean"}, - Format: "", - }, - }, - "target": { - SchemaProps: spec.SchemaProps{ - Description: "Target allows for us to nest extra config for targets such as terraform", - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.TargetSpec"), - }, - }, }, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/kops/pkg/apis/kops/v1alpha1.AccessSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.AddonSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.Assets", "k8s.io/kops/pkg/apis/kops/v1alpha1.AuthenticationSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.AuthorizationSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.CloudConfiguration", "k8s.io/kops/pkg/apis/kops/v1alpha1.CloudControllerManagerConfig", "k8s.io/kops/pkg/apis/kops/v1alpha1.ClusterZoneSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.DockerConfig", "k8s.io/kops/pkg/apis/kops/v1alpha1.EgressProxySpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.EtcdClusterSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.ExternalDNSConfig", "k8s.io/kops/pkg/apis/kops/v1alpha1.FileAssetSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.HookSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.IAMSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.KubeAPIServerConfig", "k8s.io/kops/pkg/apis/kops/v1alpha1.KubeControllerManagerConfig", "k8s.io/kops/pkg/apis/kops/v1alpha1.KubeDNSConfig", "k8s.io/kops/pkg/apis/kops/v1alpha1.KubeProxyConfig", "k8s.io/kops/pkg/apis/kops/v1alpha1.KubeSchedulerConfig", "k8s.io/kops/pkg/apis/kops/v1alpha1.KubeletConfigSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.NetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.TargetSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.TopologySpec"}, + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/kops/pkg/apis/kops/v1alpha1.Cluster"}, }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.ClusterZoneSpec": { + "k8s.io/kops/pkg/apis/kops/v1alpha1.ClusterSpec": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ + Description: "ClusterSpec defines the configuration for a cluster", Properties: map[string]spec.Schema{ - "name": { + "channel": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Channel we are following", + Type: []string{"string"}, + Format: "", }, }, - "privateCIDR": { + "addons": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Additional addons that should be installed on the cluster", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.AddonSpec"), + }, + }, + }, }, }, - "cidr": { + "configBase": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "ConfigBase is the path where we store configuration for the cluster This might be different that the location when the cluster spec itself is stored, both because this must be accessible to the cluster, and because it might be on a different cloud or storage system (etcd vs S3)", + Type: []string{"string"}, + Format: "", }, }, - "id": { + "cloudProvider": { SchemaProps: spec.SchemaProps{ - Description: "ProviderID is the cloud provider id for the objects associated with the zone (the subnet on AWS)", + Description: "The CloudProvider to use (aws or gce)", Type: []string{"string"}, Format: "", }, }, - "egress": { + "kubernetesVersion": { SchemaProps: spec.SchemaProps{ - Description: "Egress defines the method of traffic egress for this subnet", + Description: "The version of kubernetes to install (optional, and can be a \"spec\" like stable)", Type: []string{"string"}, Format: "", }, }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.DNSAccessSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.DNSSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.DockerConfig": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DockerConfig is the configuration for docker", - Properties: map[string]spec.Schema{ - "authorizationPlugins": { + "zones": { SchemaProps: spec.SchemaProps{ - Description: "AuthorizationPlugins is a list of authorization plugins", + Description: "Configuration of zones we are targeting", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.ClusterZoneSpec"), }, }, }, }, }, - "bridge": { + "project": { SchemaProps: spec.SchemaProps{ - Description: "Bridge is the network interface containers should bind onto", + Description: "Project is the cloud project we should use, required on GCE", Type: []string{"string"}, Format: "", }, }, - "bridgeIP": { + "masterPublicName": { SchemaProps: spec.SchemaProps{ - Description: "BridgeIP is a specific IP address and netmask for the docker0 bridge, using standard CIDR notation", + Description: "MasterPublicName is the external DNS name for the master nodes", Type: []string{"string"}, Format: "", }, }, - "defaultUlimit": { + "masterInternalName": { SchemaProps: spec.SchemaProps{ - Description: "DefaultUlimit is the ulimits for containers", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "MasterInternalName is the internal DNS name for the master nodes", + Type: []string{"string"}, + Format: "", }, }, - "hosts": { + "networkCIDR": { SchemaProps: spec.SchemaProps{ - Description: "Hosts enables you to configure the endpoints the docker daemon listens on i.e tcp://0.0.0.0.2375 or unix:///var/run/docker.sock etc", + Description: "NetworkCIDR is the CIDR used for the AWS VPC Network, or otherwise allocated to k8s This is a real CIDR, not the internal k8s network On AWS, it maps to the VPC CIDR. It is not required on GCE.", + Type: []string{"string"}, + Format: "", + }, + }, + "additionalNetworkCIDRs": { + SchemaProps: spec.SchemaProps{ + Description: "AdditionalNetworkCIDRs is a list of additional CIDR used for the AWS VPC or otherwise allocated to k8s. This is a real CIDR, not the internal k8s network On AWS, it maps to any additional CIDRs added to a VPC.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -25799,51 +25731,50 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA }, }, }, - "ipMasq": { + "networkID": { SchemaProps: spec.SchemaProps{ - Description: "IPMasq enables ip masquerading for containers", - Type: []string{"boolean"}, + Description: "NetworkID is an identifier of a network, if we want to reuse/share an existing network (e.g. an AWS VPC)", + Type: []string{"string"}, Format: "", }, }, - "ipTables": { + "topology": { SchemaProps: spec.SchemaProps{ - Description: "IPtables enables addition of iptables rules", - Type: []string{"boolean"}, - Format: "", + Description: "Topology defines the type of network topology to use on the cluster - default public This is heavily weighted towards AWS for the time being, but should also be agnostic enough to port out to GCE later if needed", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.TopologySpec"), }, }, - "insecureRegistry": { + "secretStore": { SchemaProps: spec.SchemaProps{ - Description: "InsecureRegistry enable insecure registry communication @question according to dockers this a list??", + Description: "SecretStore is the VFS path to where secrets are stored", Type: []string{"string"}, Format: "", }, }, - "liveRestore": { + "keyStore": { SchemaProps: spec.SchemaProps{ - Description: "LiveRestore enables live restore of docker when containers are still running", - Type: []string{"boolean"}, + Description: "KeyStore is the VFS path to where SSL keys and certificates are stored", + Type: []string{"string"}, Format: "", }, }, - "logDriver": { + "configStore": { SchemaProps: spec.SchemaProps{ - Description: "LogDriver is the default driver for container logs (default \"json-file\")", + Description: "ConfigStore is the VFS path to where the configuration (Cluster, InstanceGroupss etc) is stored", Type: []string{"string"}, Format: "", }, }, - "logLevel": { + "dnsZone": { SchemaProps: spec.SchemaProps{ - Description: "LogLevel is the logging level (\"debug\", \"info\", \"warn\", \"error\", \"fatal\") (default \"info\")", + Description: "DNSZone is the DNS zone we should use when configuring DNS This is because some clouds let us define a managed zone foo.bar, and then have kubernetes.dev.foo.bar, without needing to define dev.foo.bar as a hosted zone. DNSZone will probably be a suffix of the MasterPublicName and MasterInternalName Note that DNSZone can either by the host name of the zone (containing dots), or can be an identifier for the zone.", Type: []string{"string"}, Format: "", }, }, - "logOpt": { + "additionalSans": { SchemaProps: spec.SchemaProps{ - Description: "Logopt is a series of options given to the log driver options for containers", + Description: "AdditionalSANs adds additional Subject Alternate Names to apiserver cert that kops generates", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -25855,37 +25786,37 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA }, }, }, - "mtu": { + "clusterDNSDomain": { SchemaProps: spec.SchemaProps{ - Description: "MTU is the containers network MTU", - Type: []string{"integer"}, - Format: "int32", + Description: "ClusterDNSDomain is the suffix we use for internal DNS names (normally cluster.local)", + Type: []string{"string"}, + Format: "", }, }, - "registryMirrors": { + "multizone": { SchemaProps: spec.SchemaProps{ - Description: "RegistryMirrors is a referred list of docker registry mirror", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "ClusterName is a unique identifier for the cluster, and currently must be a DNS name ClusterName string `json:\",omitempty\"`", + Type: []string{"boolean"}, + Format: "", }, }, - "storage": { + "serviceClusterIPRange": { SchemaProps: spec.SchemaProps{ - Description: "Storage is the docker storage driver to use", + Description: "ServiceClusterIPRange is the CIDR, from the internal network, where we allocate IPs for services", Type: []string{"string"}, Format: "", }, }, - "storageOpts": { + "nonMasqueradeCIDR": { SchemaProps: spec.SchemaProps{ - Description: "StorageOpts is a series of options passed to the storage driver", + Description: "NonMasqueradeCIDR is the CIDR for the internal k8s network (on which pods & services live) It cannot overlap ServiceClusterIPRange", + Type: []string{"string"}, + Format: "", + }, + }, + "adminAccess": { + SchemaProps: spec.SchemaProps{ + Description: "AdminAccess determines the permitted access to the admin endpoints (SSH & master HTTPS) Currently only a single CIDR is supported (though a richer grammar could be added in future)", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -25897,239 +25828,164 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA }, }, }, - "version": { + "isolateMasters": { SchemaProps: spec.SchemaProps{ - Description: "Version is consumed by the nodeup and used to pick the docker version", - Type: []string{"string"}, + Description: "IsolatesMasters determines whether we should lock down masters so that they are not on the pod network. true is the kube-up behaviour, but it is very surprising: it means that daemonsets only work on the master if they have hostNetwork=true. false is now the default, and it will:\n * give the master a normal PodCIDR\n * run kube-proxy on the master\n * enable debugging handlers on the master, so kubectl logs works", + Type: []string{"boolean"}, Format: "", }, }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.EgressProxySpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{ - "httpProxy": { + "updatePolicy": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.HTTPProxy"), + Description: "UpdatePolicy determines the policy for applying upgrades automatically. Valid values:\n 'external' do not apply updates automatically - they are applied manually or by an external system\n missing: default policy (currently OS security upgrades that do not require a reboot)", + Type: []string{"string"}, + Format: "", }, }, - "excludes": { + "additionalPolicies": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "Additional policies to add for roles", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/kops/pkg/apis/kops/v1alpha1.HTTPProxy"}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.EtcdBackupSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EtcdBackupSpec describes how we want to do backups of etcd", - Properties: map[string]spec.Schema{ - "backupStore": { + "fileAssets": { SchemaProps: spec.SchemaProps{ - Description: "BackupStore is the VFS path where we will read/write backup data", - Type: []string{"string"}, - Format: "", + Description: "A collection of files assets for deployed cluster wide", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.FileAssetSpec"), + }, + }, + }, }, }, - "image": { + "egressProxy": { SchemaProps: spec.SchemaProps{ - Description: "Image is the etcd backup manager image to use. Setting this will create a sidecar container in the etcd pod with the specified image.", - Type: []string{"string"}, - Format: "", + Description: "HTTPProxy defines connection information to support use of a private cluster behind an forward HTTP Proxy", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.EgressProxySpec"), }, }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.EtcdClusterSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EtcdClusterSpec is the etcd cluster specification", - Properties: map[string]spec.Schema{ - "name": { + "sshKeyName": { SchemaProps: spec.SchemaProps{ - Description: "Name is the name of the etcd cluster (main, events etc)", + Description: "SSHKeyName specifies a preexisting SSH key to use", Type: []string{"string"}, Format: "", }, }, - "etcdMembers": { + "etcdClusters": { SchemaProps: spec.SchemaProps{ - Description: "Members stores the configurations for each member of the cluster (including the data volume)", + Description: "EtcdClusters stores the configuration for each cluster", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.EtcdMemberSpec"), + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.EtcdClusterSpec"), }, }, }, }, }, - "enableTLSAuth": { + "docker": { SchemaProps: spec.SchemaProps{ - Description: "EnableTLSAuth indicates client and peer TLS auth should be enforced", - Type: []string{"boolean"}, - Format: "", + Description: "Component configurations", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.DockerConfig"), }, }, - "enableEtcdTLS": { + "kubeDNS": { SchemaProps: spec.SchemaProps{ - Description: "EnableEtcdTLS indicates the etcd service should use TLS between peers and clients", - Type: []string{"boolean"}, - Format: "", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.KubeDNSConfig"), }, }, - "version": { + "kubeAPIServer": { SchemaProps: spec.SchemaProps{ - Description: "Version is the version of etcd to run i.e. 2.1.2, 3.0.17 etcd", - Type: []string{"string"}, - Format: "", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.KubeAPIServerConfig"), }, }, - "leaderElectionTimeout": { + "kubeControllerManager": { SchemaProps: spec.SchemaProps{ - Description: "LeaderElectionTimeout is the time (in milliseconds) for an etcd leader election timeout", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.KubeControllerManagerConfig"), }, }, - "heartbeatInterval": { + "cloudControllerManager": { SchemaProps: spec.SchemaProps{ - Description: "HeartbeatInterval is the time (in milliseconds) for an etcd heartbeat interval", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.CloudControllerManagerConfig"), }, }, - "image": { + "kubeScheduler": { SchemaProps: spec.SchemaProps{ - Description: "Image is the etcd docker image to use. Setting this will ignore the Version specified.", - Type: []string{"string"}, - Format: "", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.KubeSchedulerConfig"), }, }, - "backups": { + "kubeProxy": { SchemaProps: spec.SchemaProps{ - Description: "Backups describes how we do backups of etcd", - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.EtcdBackupSpec"), - }, - }, - "manager": { - SchemaProps: spec.SchemaProps{ - Description: "Manager describes the manager configuration", - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.EtcdManagerSpec"), + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.KubeProxyConfig"), }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/kops/pkg/apis/kops/v1alpha1.EtcdBackupSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.EtcdManagerSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.EtcdMemberSpec"}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.EtcdManagerSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EtcdManagerSpec describes how we configure the etcd manager", - Properties: map[string]spec.Schema{ - "image": { + "kubelet": { SchemaProps: spec.SchemaProps{ - Description: "Image is the etcd manager image to use.", - Type: []string{"string"}, - Format: "", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.KubeletConfigSpec"), }, }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.EtcdMemberSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EtcdMemberSpec is a specification for a etcd member", - Properties: map[string]spec.Schema{ - "name": { + "masterKubelet": { SchemaProps: spec.SchemaProps{ - Description: "Name is the name of the member within the etcd cluster", - Type: []string{"string"}, - Format: "", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.KubeletConfigSpec"), }, }, - "zone": { + "cloudConfig": { SchemaProps: spec.SchemaProps{ - Description: "Zone is the zone the member lives", - Type: []string{"string"}, - Format: "", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.CloudConfiguration"), }, }, - "volumeType": { + "externalDns": { SchemaProps: spec.SchemaProps{ - Description: "VolumeType is the underlining cloud storage class", - Type: []string{"string"}, - Format: "", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.ExternalDNSConfig"), }, }, - "volumeIops": { + "networking": { SchemaProps: spec.SchemaProps{ - Description: "If volume type is io1, then we need to specify the number of Iops.", - Type: []string{"integer"}, - Format: "int32", + Description: "Networking configuration", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.NetworkingSpec"), }, }, - "volumeSize": { + "api": { SchemaProps: spec.SchemaProps{ - Description: "VolumeSize is the underlining cloud volume size", - Type: []string{"integer"}, - Format: "int32", + Description: "API field controls how the API is exposed outside the cluster", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.AccessSpec"), }, }, - "kmsKeyId": { + "authentication": { SchemaProps: spec.SchemaProps{ - Description: "KmsKeyId is a AWS KMS ID used to encrypt the volume", - Type: []string{"string"}, - Format: "", + Description: "Authentication field controls how the cluster is configured for authentication", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.AuthenticationSpec"), }, }, - "encryptedVolume": { + "authorization": { SchemaProps: spec.SchemaProps{ - Description: "EncryptedVolume indicates you want to encrypt the volume", - Type: []string{"boolean"}, - Format: "", + Description: "Authorization field controls how the cluster is configured for authorization", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.AuthorizationSpec"), }, }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.ExecContainerAction": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ExecContainerAction defines an hood action", - Properties: map[string]spec.Schema{ - "image": { + "nodeAuthorization": { SchemaProps: spec.SchemaProps{ - Description: "Image is the docker image", - Type: []string{"string"}, - Format: "", + Description: "NodeAuthorization defined the custom node authorization configuration", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.NodeAuthorizationSpec"), }, }, - "command": { + "cloudLabels": { SchemaProps: spec.SchemaProps{ - Description: "Command is the command supplied to the above image", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ + Description: "Tags for AWS instance groups", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -26139,109 +25995,83 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA }, }, }, - "environment": { + "hooks": { SchemaProps: spec.SchemaProps{ - Description: "Environment is a map of environment variables added to the hook", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ + Description: "Hooks for custom actions e.g. on first installation", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.HookSpec"), }, }, }, }, }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.ExternalDNSConfig": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ExternalDNSConfig are options of the dns-controller", - Properties: map[string]spec.Schema{ - "disable": { + "assets": { SchemaProps: spec.SchemaProps{ - Description: "Disable indicates we do not wish to run the dns-controller addon", - Type: []string{"boolean"}, - Format: "", + Description: "Alternative locations for files and containers", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.Assets"), }, }, - "watchIngress": { + "iam": { SchemaProps: spec.SchemaProps{ - Description: "WatchIngress indicates you want the dns-controller to watch and create dns entries for ingress resources", + Description: "IAM field adds control over the IAM security policies applied to resources", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.IAMSpec"), + }, + }, + "encryptionConfig": { + SchemaProps: spec.SchemaProps{ + Description: "EncryptionConfig holds the encryption config", Type: []string{"boolean"}, Format: "", }, }, - "watchNamespace": { + "target": { SchemaProps: spec.SchemaProps{ - Description: "WatchNamespace is namespace to watch, defaults to all (use to control whom can creates dns entries)", - Type: []string{"string"}, - Format: "", + Description: "Target allows for us to nest extra config for targets such as terraform", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.TargetSpec"), }, }, }, }, }, - Dependencies: []string{}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.ExternalNetworkingSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ExternalNetworkingSpec is the specification for networking that is implemented by a Daemonset It also uses kubenet", - Properties: map[string]spec.Schema{}, - }, - }, - Dependencies: []string{}, + Dependencies: []string{ + "k8s.io/kops/pkg/apis/kops/v1alpha1.AccessSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.AddonSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.Assets", "k8s.io/kops/pkg/apis/kops/v1alpha1.AuthenticationSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.AuthorizationSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.CloudConfiguration", "k8s.io/kops/pkg/apis/kops/v1alpha1.CloudControllerManagerConfig", "k8s.io/kops/pkg/apis/kops/v1alpha1.ClusterZoneSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.DockerConfig", "k8s.io/kops/pkg/apis/kops/v1alpha1.EgressProxySpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.EtcdClusterSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.ExternalDNSConfig", "k8s.io/kops/pkg/apis/kops/v1alpha1.FileAssetSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.HookSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.IAMSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.KubeAPIServerConfig", "k8s.io/kops/pkg/apis/kops/v1alpha1.KubeControllerManagerConfig", "k8s.io/kops/pkg/apis/kops/v1alpha1.KubeDNSConfig", "k8s.io/kops/pkg/apis/kops/v1alpha1.KubeProxyConfig", "k8s.io/kops/pkg/apis/kops/v1alpha1.KubeSchedulerConfig", "k8s.io/kops/pkg/apis/kops/v1alpha1.KubeletConfigSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.NetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.NodeAuthorizationSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.TargetSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.TopologySpec"}, }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.FileAssetSpec": { + "k8s.io/kops/pkg/apis/kops/v1alpha1.ClusterZoneSpec": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "FileAssetSpec defines the structure for a file asset", Properties: map[string]spec.Schema{ "name": { SchemaProps: spec.SchemaProps{ - Description: "Name is a shortened reference to the asset", - Type: []string{"string"}, - Format: "", + Type: []string{"string"}, + Format: "", }, }, - "path": { + "privateCIDR": { SchemaProps: spec.SchemaProps{ - Description: "Path is the location this file should reside", - Type: []string{"string"}, - Format: "", + Type: []string{"string"}, + Format: "", }, }, - "roles": { + "cidr": { SchemaProps: spec.SchemaProps{ - Description: "Roles is a list of roles the file asset should be applied, defaults to all", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Type: []string{"string"}, + Format: "", }, }, - "content": { + "id": { SchemaProps: spec.SchemaProps{ - Description: "Content is the contents of the file", + Description: "ProviderID is the cloud provider id for the objects associated with the zone (the subnet on AWS)", Type: []string{"string"}, Format: "", }, }, - "isBase64": { + "egress": { SchemaProps: spec.SchemaProps{ - Description: "IsBase64 indicates the contents is base64 encoded", - Type: []string{"boolean"}, + Description: "Egress defines the method of traffic egress for this subnet", + Type: []string{"string"}, Format: "", }, }, @@ -26250,74 +26080,37 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA }, Dependencies: []string{}, }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.FlannelNetworkingSpec": { + "k8s.io/kops/pkg/apis/kops/v1alpha1.DNSAccessSpec": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "FlannelNetworkingSpec declares that we want Flannel networking", - Properties: map[string]spec.Schema{ - "backend": { - SchemaProps: spec.SchemaProps{ - Description: "Backend is the backend overlay type we want to use (vxlan or udp)", - Type: []string{"string"}, - Format: "", - }, - }, - }, + Properties: map[string]spec.Schema{}, }, }, Dependencies: []string{}, }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.HTTPProxy": { + "k8s.io/kops/pkg/apis/kops/v1alpha1.DNSSpec": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Properties: map[string]spec.Schema{ - "host": { + "type": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, Format: "", }, }, - "port": { - SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int32", - }, - }, }, }, }, Dependencies: []string{}, }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.HeptioAuthenticationSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.HookSpec": { + "k8s.io/kops/pkg/apis/kops/v1alpha1.DockerConfig": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "HookSpec is a definition hook", + Description: "DockerConfig is the configuration for docker", Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name is an optional name for the hook, otherwise the name is kops-hook-", - Type: []string{"string"}, - Format: "", - }, - }, - "disabled": { - SchemaProps: spec.SchemaProps{ - Description: "Disabled indicates if you want the unit switched off", - Type: []string{"boolean"}, - Format: "", - }, - }, - "roles": { + "authorizationPlugins": { SchemaProps: spec.SchemaProps{ - Description: "Roles is an optional list of roles the hook should be rolled out to, defaults to all", + Description: "AuthorizationPlugins is a list of authorization plugins", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -26329,13 +26122,34 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA }, }, }, - "requires": { + "bridge": { SchemaProps: spec.SchemaProps{ - Description: "Requires is a series of systemd units the action requires", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ + Description: "Bridge is the network interface containers should bind onto", + Type: []string{"string"}, + Format: "", + }, + }, + "bridgeIP": { + SchemaProps: spec.SchemaProps{ + Description: "BridgeIP is a specific IP address and netmask for the docker0 bridge, using standard CIDR notation", + Type: []string{"string"}, + Format: "", + }, + }, + "dataRoot": { + SchemaProps: spec.SchemaProps{ + Description: "DataRoot is the root directory of persistent docker state (default \"/var/lib/docker\")", + Type: []string{"string"}, + Format: "", + }, + }, + "defaultUlimit": { + SchemaProps: spec.SchemaProps{ + Description: "DefaultUlimit is the ulimits for containers", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ Type: []string{"string"}, Format: "", }, @@ -26343,9 +26157,16 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA }, }, }, - "before": { + "execRoot": { SchemaProps: spec.SchemaProps{ - Description: "Before is a series of systemd units which this hook must run before", + Description: "ExecRoot is the root directory for execution state files (default \"/var/run/docker\")", + Type: []string{"string"}, + Format: "", + }, + }, + "hosts": { + SchemaProps: spec.SchemaProps{ + Description: "Hosts enables you to configure the endpoints the docker daemon listens on i.e tcp://0.0.0.0.2375 or unix:///var/run/docker.sock etc", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -26357,33 +26178,114 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA }, }, }, - "execContainer": { + "ipMasq": { SchemaProps: spec.SchemaProps{ - Description: "ExecContainer is the image itself", - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.ExecContainerAction"), + Description: "IPMasq enables ip masquerading for containers", + Type: []string{"boolean"}, + Format: "", }, }, - "manifest": { + "ipTables": { SchemaProps: spec.SchemaProps{ - Description: "Manifest is a raw systemd unit file", + Description: "IPtables enables addition of iptables rules", + Type: []string{"boolean"}, + Format: "", + }, + }, + "insecureRegistry": { + SchemaProps: spec.SchemaProps{ + Description: "InsecureRegistry enable insecure registry communication @question according to dockers this a list??", Type: []string{"string"}, Format: "", }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/kops/pkg/apis/kops/v1alpha1.ExecContainerAction"}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.IAMProfileSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "IAMProfileSpec is the AWS IAM Profile to attach to instances in this instance group. Specify the ARN for the IAM instance profile (AWS only).", - Properties: map[string]spec.Schema{ - "profile": { + "liveRestore": { SchemaProps: spec.SchemaProps{ - Description: "Profile of the cloud group iam profile. In aws this is the arn for the iam instance profile", + Description: "LiveRestore enables live restore of docker when containers are still running", + Type: []string{"boolean"}, + Format: "", + }, + }, + "logDriver": { + SchemaProps: spec.SchemaProps{ + Description: "LogDriver is the default driver for container logs (default \"json-file\")", + Type: []string{"string"}, + Format: "", + }, + }, + "logLevel": { + SchemaProps: spec.SchemaProps{ + Description: "LogLevel is the logging level (\"debug\", \"info\", \"warn\", \"error\", \"fatal\") (default \"info\")", + Type: []string{"string"}, + Format: "", + }, + }, + "logOpt": { + SchemaProps: spec.SchemaProps{ + Description: "Logopt is a series of options given to the log driver options for containers", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "mtu": { + SchemaProps: spec.SchemaProps{ + Description: "MTU is the containers network MTU", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "registryMirrors": { + SchemaProps: spec.SchemaProps{ + Description: "RegistryMirrors is a referred list of docker registry mirror", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "storage": { + SchemaProps: spec.SchemaProps{ + Description: "Storage is the docker storage driver to use", + Type: []string{"string"}, + Format: "", + }, + }, + "storageOpts": { + SchemaProps: spec.SchemaProps{ + Description: "StorageOpts is a series of options passed to the storage driver", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "userNamespaceRemap": { + SchemaProps: spec.SchemaProps{ + Description: "UserNamespaceRemap sets the user namespace remapping option for the docker daemon", + Type: []string{"string"}, + Format: "", + }, + }, + "version": { + SchemaProps: spec.SchemaProps{ + Description: "Version is consumed by the nodeup and used to pick the docker version", Type: []string{"string"}, Format: "", }, @@ -26393,272 +26295,225 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA }, Dependencies: []string{}, }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.IAMSpec": { + "k8s.io/kops/pkg/apis/kops/v1alpha1.EgressProxySpec": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "IAMSpec adds control over the IAM security policies applied to resources", Properties: map[string]spec.Schema{ - "legacy": { + "httpProxy": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.HTTPProxy"), }, }, - "allowContainerRegistry": { + "excludes": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, + Type: []string{"string"}, Format: "", }, }, }, - Required: []string{"legacy"}, }, }, - Dependencies: []string{}, + Dependencies: []string{ + "k8s.io/kops/pkg/apis/kops/v1alpha1.HTTPProxy"}, }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.InstanceGroup": { + "k8s.io/kops/pkg/apis/kops/v1alpha1.EtcdBackupSpec": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "InstanceGroup represents a group of instances (either nodes or masters) with the same configuration", + Description: "EtcdBackupSpec describes how we want to do backups of etcd", Properties: map[string]spec.Schema{ - "kind": { + "backupStore": { SchemaProps: spec.SchemaProps{ - 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/api-conventions.md#types-kinds", + Description: "BackupStore is the VFS path where we will read/write backup data", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "image": { SchemaProps: spec.SchemaProps{ - 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/api-conventions.md#resources", + Description: "Image is the etcd backup manager image to use. Setting this will create a sidecar container in the etcd pod with the specified image.", Type: []string{"string"}, Format: "", }, }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.InstanceGroupSpec"), - }, - }, }, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/kops/pkg/apis/kops/v1alpha1.InstanceGroupSpec"}, + Dependencies: []string{}, }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.InstanceGroupList": { + "k8s.io/kops/pkg/apis/kops/v1alpha1.EtcdClusterSpec": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ + Description: "EtcdClusterSpec is the etcd cluster specification", Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - 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/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { + "name": { SchemaProps: spec.SchemaProps{ - 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/api-conventions.md#resources", + Description: "Name is the name of the etcd cluster (main, events etc)", Type: []string{"string"}, Format: "", }, }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { + "etcdMembers": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, + Description: "Members stores the configurations for each member of the cluster (including the data volume)", + Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.InstanceGroup"), + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.EtcdMemberSpec"), }, }, }, }, }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/kops/pkg/apis/kops/v1alpha1.InstanceGroup"}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.InstanceGroupSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "InstanceGroupSpec is the specification for a instanceGroup", - Properties: map[string]spec.Schema{ - "role": { + "enableTLSAuth": { SchemaProps: spec.SchemaProps{ - Description: "Type determines the role of instances in this group: masters or nodes", - Type: []string{"string"}, + Description: "EnableTLSAuth indicates client and peer TLS auth should be enforced", + Type: []string{"boolean"}, Format: "", }, }, - "image": { + "enableEtcdTLS": { SchemaProps: spec.SchemaProps{ - Description: "Image is the instance instance (ami etc) we should use", - Type: []string{"string"}, + Description: "EnableEtcdTLS indicates the etcd service should use TLS between peers and clients", + Type: []string{"boolean"}, Format: "", }, }, - "minSize": { + "version": { SchemaProps: spec.SchemaProps{ - Description: "MinSize is the minimum size of the pool", - Type: []string{"integer"}, - Format: "int32", + Description: "Version is the version of etcd to run i.e. 2.1.2, 3.0.17 etcd", + Type: []string{"string"}, + Format: "", }, }, - "maxSize": { + "leaderElectionTimeout": { SchemaProps: spec.SchemaProps{ - Description: "MaxSize is the maximum size of the pool", - Type: []string{"integer"}, - Format: "int32", + Description: "LeaderElectionTimeout is the time (in milliseconds) for an etcd leader election timeout", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "machineType": { + "heartbeatInterval": { SchemaProps: spec.SchemaProps{ - Description: "MachineType is the instance class", - Type: []string{"string"}, - Format: "", - }, - }, - "rootVolumeSize": { - SchemaProps: spec.SchemaProps{ - Description: "RootVolumeSize is the size of the EBS root volume to use, in GB", - Type: []string{"integer"}, - Format: "int32", + Description: "HeartbeatInterval is the time (in milliseconds) for an etcd heartbeat interval", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "rootVolumeType": { + "image": { SchemaProps: spec.SchemaProps{ - Description: "RootVolumeType is the type of the EBS root volume to use (e.g. gp2)", + Description: "Image is the etcd docker image to use. Setting this will ignore the Version specified.", Type: []string{"string"}, Format: "", }, }, - "rootVolumeIops": { + "backups": { SchemaProps: spec.SchemaProps{ - Description: "If volume type is io1, then we need to specify the number of Iops.", - Type: []string{"integer"}, - Format: "int32", + Description: "Backups describes how we do backups of etcd", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.EtcdBackupSpec"), }, }, - "rootVolumeOptimization": { + "manager": { SchemaProps: spec.SchemaProps{ - Description: "RootVolumeOptimization enables EBS optimization for an instance", - Type: []string{"boolean"}, - Format: "", + Description: "Manager describes the manager configuration", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.EtcdManagerSpec"), }, }, - "hooks": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/kops/pkg/apis/kops/v1alpha1.EtcdBackupSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.EtcdManagerSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.EtcdMemberSpec"}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.EtcdManagerSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EtcdManagerSpec describes how we configure the etcd manager", + Properties: map[string]spec.Schema{ + "image": { SchemaProps: spec.SchemaProps{ - Description: "Hooks is a list of hooks for this instanceGroup, note: these can override the cluster wide ones if required", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.HookSpec"), - }, - }, - }, + Description: "Image is the etcd manager image to use.", + Type: []string{"string"}, + Format: "", }, }, - "maxPrice": { + }, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.EtcdMemberSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EtcdMemberSpec is a specification for a etcd member", + Properties: map[string]spec.Schema{ + "name": { SchemaProps: spec.SchemaProps{ - Description: "MaxPrice indicates this is a spot-pricing group, with the specified value as our max-price bid", + Description: "Name is the name of the member within the etcd cluster", Type: []string{"string"}, Format: "", }, }, - "associatePublicIp": { + "zone": { SchemaProps: spec.SchemaProps{ - Description: "AssociatePublicIP is true if we want instances to have a public IP", - Type: []string{"boolean"}, + Description: "Zone is the zone the member lives", + Type: []string{"string"}, Format: "", }, }, - "additionalSecurityGroups": { + "volumeType": { SchemaProps: spec.SchemaProps{ - Description: "AdditionalSecurityGroups attaches additional security groups (e.g. i-123456)", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "VolumeType is the underlining cloud storage class", + Type: []string{"string"}, + Format: "", }, }, - "cloudLabels": { + "volumeIops": { SchemaProps: spec.SchemaProps{ - Description: "CloudLabels indicates the labels for instances in this group, at the AWS level", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "If volume type is io1, then we need to specify the number of Iops.", + Type: []string{"integer"}, + Format: "int32", }, }, - "nodeLabels": { + "volumeSize": { SchemaProps: spec.SchemaProps{ - Description: "NodeLabels indicates the kubernetes labels for nodes in this group", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "VolumeSize is the underlining cloud volume size", + Type: []string{"integer"}, + Format: "int32", }, }, - "fileAssets": { + "kmsKeyId": { SchemaProps: spec.SchemaProps{ - Description: "A collection of files assets for deployed cluster wide", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.FileAssetSpec"), - }, - }, - }, + Description: "KmsKeyId is a AWS KMS ID used to encrypt the volume", + Type: []string{"string"}, + Format: "", }, }, - "tenancy": { + "encryptedVolume": { SchemaProps: spec.SchemaProps{ - Description: "Describes the tenancy of the instance group. Can be either default or dedicated. Currently only applies to AWS.", - Type: []string{"string"}, + Description: "EncryptedVolume indicates you want to encrypt the volume", + Type: []string{"boolean"}, Format: "", }, }, - "kubelet": { + }, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.ExecContainerAction": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExecContainerAction defines an hood action", + Properties: map[string]spec.Schema{ + "image": { SchemaProps: spec.SchemaProps{ - Description: "Kubelet overrides kubelet config from the ClusterSpec", - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.KubeletConfigSpec"), + Description: "Image is the docker image", + Type: []string{"string"}, + Format: "", }, }, - "taints": { + "command": { SchemaProps: spec.SchemaProps{ - Description: "Taints indicates the kubernetes taints for nodes in this group", + Description: "Command is the command supplied to the above image", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -26670,24 +26525,11 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA }, }, }, - "additionalUserData": { - SchemaProps: spec.SchemaProps{ - Description: "AdditionalUserData is any additional user-data to be passed to the host", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.UserData"), - }, - }, - }, - }, - }, - "zones": { + "environment": { SchemaProps: spec.SchemaProps{ - Description: "Zones is the names of the Zones where machines in this instance group should be placed This is needed for regional subnets (e.g. GCE), to restrict placement to particular zones", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ + Description: "Environment is a map of environment variables added to the hook", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -26697,127 +26539,163 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA }, }, }, - "suspendProcesses": { + }, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.ExternalDNSConfig": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExternalDNSConfig are options of the dns-controller", + Properties: map[string]spec.Schema{ + "disable": { SchemaProps: spec.SchemaProps{ - Description: "SuspendProcesses disables the listed Scaling Policies", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "Disable indicates we do not wish to run the dns-controller addon", + Type: []string{"boolean"}, + Format: "", }, }, - "detailedInstanceMonitoring": { + "watchIngress": { SchemaProps: spec.SchemaProps{ - Description: "DetailedInstanceMonitoring defines if detailed-monitoring is enabled (AWS only)", + Description: "WatchIngress indicates you want the dns-controller to watch and create dns entries for ingress resources", Type: []string{"boolean"}, Format: "", }, }, - "iam": { + "watchNamespace": { SchemaProps: spec.SchemaProps{ - Description: "IAMProfileSpec defines the identity of the cloud group iam profile (AWS only).", - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.IAMProfileSpec"), + Description: "WatchNamespace is namespace to watch, defaults to all (use to control whom can creates dns entries)", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - Dependencies: []string{ - "k8s.io/kops/pkg/apis/kops/v1alpha1.FileAssetSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.HookSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.IAMProfileSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.KubeletConfigSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.UserData"}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.KopeioAuthenticationSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{}, - }, - }, Dependencies: []string{}, }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.KopeioNetworkingSpec": { + "k8s.io/kops/pkg/apis/kops/v1alpha1.ExternalNetworkingSpec": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "KopeioNetworkingSpec declares that we want Kopeio networking", + Description: "ExternalNetworkingSpec is the specification for networking that is implemented by a Daemonset It also uses kubenet", Properties: map[string]spec.Schema{}, }, }, Dependencies: []string{}, }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.KubeAPIServerConfig": { + "k8s.io/kops/pkg/apis/kops/v1alpha1.FileAssetSpec": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "KubeAPIServerConfig defines the configuration for the kube api", + Description: "FileAssetSpec defines the structure for a file asset", Properties: map[string]spec.Schema{ - "image": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "Image is the docker container used", + Description: "Name is a shortened reference to the asset", Type: []string{"string"}, Format: "", }, }, - "logLevel": { - SchemaProps: spec.SchemaProps{ - Description: "LogLevel is the logging level of the api", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "cloudProvider": { + "path": { SchemaProps: spec.SchemaProps{ - Description: "CloudProvider is the name of the cloudProvider we are using, aws, gce etcd", + Description: "Path is the location this file should reside", Type: []string{"string"}, Format: "", }, }, - "securePort": { + "roles": { SchemaProps: spec.SchemaProps{ - Description: "SecurePort is the port the kube runs on", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "insecurePort": { - SchemaProps: spec.SchemaProps{ - Description: "InsecurePort is the port the insecure api runs", - Type: []string{"integer"}, - Format: "int32", + Description: "Roles is a list of roles the file asset should be applied, defaults to all", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "address": { + "content": { SchemaProps: spec.SchemaProps{ - Description: "Address is the binding address for the kube api: Deprecated - use insecure-bind-address and bind-address", + Description: "Content is the contents of the file", Type: []string{"string"}, Format: "", }, }, - "bindAddress": { + "isBase64": { SchemaProps: spec.SchemaProps{ - Description: "BindAddress is the binding address for the secure kubernetes API", + Description: "IsBase64 indicates the contents is base64 encoded", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.FlannelNetworkingSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "FlannelNetworkingSpec declares that we want Flannel networking", + Properties: map[string]spec.Schema{ + "backend": { + SchemaProps: spec.SchemaProps{ + Description: "Backend is the backend overlay type we want to use (vxlan or udp)", Type: []string{"string"}, Format: "", }, }, - "insecureBindAddress": { + }, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.HTTPProxy": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Properties: map[string]spec.Schema{ + "host": { SchemaProps: spec.SchemaProps{ - Description: "InsecureBindAddress is the binding address for the InsecurePort for the insecure kubernetes API", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.HookSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HookSpec is a definition hook", + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is an optional name for the hook, otherwise the name is kops-hook-", Type: []string{"string"}, Format: "", }, }, - "enableBootstrapTokenAuth": { + "disabled": { SchemaProps: spec.SchemaProps{ - Description: "EnableBootstrapAuthToken enables 'bootstrap.kubernetes.io/token' in the 'kube-system' namespace to be used for TLS bootstrapping authentication", + Description: "Disabled indicates if you want the unit switched off", Type: []string{"boolean"}, Format: "", }, }, - "admissionControl": { + "roles": { SchemaProps: spec.SchemaProps{ - Description: "Deprecated: AdmissionControl is a list of admission controllers to use", + Description: "Roles is an optional list of roles the hook should be rolled out to, defaults to all", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -26829,9 +26707,9 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA }, }, }, - "enableAdmissionPlugins": { + "requires": { SchemaProps: spec.SchemaProps{ - Description: "EnableAdmissionPlugins is a list of enabled admission plugins", + Description: "Requires is a series of systemd units the action requires", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -26843,9 +26721,9 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA }, }, }, - "disableAdmissionPlugins": { + "before": { SchemaProps: spec.SchemaProps{ - Description: "DisableAdmissionPlugins is a list of disabled admission plugins", + Description: "Before is a series of systemd units which this hook must run before", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -26857,318 +26735,308 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA }, }, }, - "serviceClusterIPRange": { + "execContainer": { SchemaProps: spec.SchemaProps{ - Description: "ServiceClusterIPRange is the service address range", - Type: []string{"string"}, - Format: "", + Description: "ExecContainer is the image itself", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.ExecContainerAction"), }, }, - "serviceNodePortRange": { + "manifest": { SchemaProps: spec.SchemaProps{ - Description: "Passed as --service-node-port-range to kube-apiserver. Expects 'startPort-endPort' format. Eg. 30000-33000", + Description: "Manifest is a raw systemd unit file", Type: []string{"string"}, Format: "", }, }, - "etcdServers": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/kops/pkg/apis/kops/v1alpha1.ExecContainerAction"}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.IAMProfileSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IAMProfileSpec is the AWS IAM Profile to attach to instances in this instance group. Specify the ARN for the IAM instance profile (AWS only).", + Properties: map[string]spec.Schema{ + "profile": { SchemaProps: spec.SchemaProps{ - Description: "EtcdServers is a list of the etcd service to connect", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "Profile of the cloud group iam profile. In aws this is the arn for the iam instance profile", + Type: []string{"string"}, + Format: "", }, }, - "etcdServersOverrides": { + }, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.IAMSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IAMSpec adds control over the IAM security policies applied to resources", + Properties: map[string]spec.Schema{ + "legacy": { SchemaProps: spec.SchemaProps{ - Description: "EtcdServersOverrides is per-resource etcd servers overrides, comma separated. The individual override format: group/resource#servers, where servers are http://ip:port, semicolon separated", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Type: []string{"boolean"}, + Format: "", }, }, - "etcdCaFile": { + "allowContainerRegistry": { SchemaProps: spec.SchemaProps{ - Description: "EtcdCAFile is the path to a ca certificate", - Type: []string{"string"}, - Format: "", + Type: []string{"boolean"}, + Format: "", }, }, - "etcdCertFile": { + }, + Required: []string{"legacy"}, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.InstanceGroup": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "InstanceGroup represents a group of instances (either nodes or masters) with the same configuration", + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Description: "EtcdCertFile is the path to a certificate", + 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/api-conventions.md#types-kinds", Type: []string{"string"}, Format: "", }, }, - "etcdKeyFile": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "EtcdKeyFile is the path to a private key", + 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/api-conventions.md#resources", Type: []string{"string"}, Format: "", }, }, - "basicAuthFile": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "clientCAFile": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "tlsCertFile": { + "metadata": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "tlsPrivateKeyFile": { + "spec": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.InstanceGroupSpec"), }, }, - "tokenAuthFile": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/kops/pkg/apis/kops/v1alpha1.InstanceGroupSpec"}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.InstanceGroupList": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Properties: map[string]spec.Schema{ + "kind": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + 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/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", }, }, - "allowPrivileged": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "AllowPrivileged indicates if we can run privileged containers", - Type: []string{"boolean"}, + 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/api-conventions.md#resources", + Type: []string{"string"}, Format: "", }, }, - "apiServerCount": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "APIServerCount is the number of api servers", - Type: []string{"integer"}, - Format: "int32", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, - "runtimeConfig": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "RuntimeConfig is a series of keys/values are parsed into the `--runtime-config` parameters", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.InstanceGroup"), }, }, }, }, }, - "kubeletClientCertificate": { + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/kops/pkg/apis/kops/v1alpha1.InstanceGroup"}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.InstanceGroupSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "InstanceGroupSpec is the specification for a instanceGroup", + Properties: map[string]spec.Schema{ + "role": { SchemaProps: spec.SchemaProps{ - Description: "KubeletClientCertificate is the path of a certificate for secure communication between api and kubelet", + Description: "Type determines the role of instances in this group: masters or nodes", Type: []string{"string"}, Format: "", }, }, - "kubeletClientKey": { - SchemaProps: spec.SchemaProps{ - Description: "KubeletClientKey is the path of a private to secure communication between api and kubelet", - Type: []string{"string"}, - Format: "", - }, - }, - "anonymousAuth": { - SchemaProps: spec.SchemaProps{ - Description: "AnonymousAuth indicates if anonymous authentication is permitted", - Type: []string{"boolean"}, - Format: "", - }, - }, - "kubeletPreferredAddressTypes": { - SchemaProps: spec.SchemaProps{ - Description: "KubeletPreferredAddressTypes is a list of the preferred NodeAddressTypes to use for kubelet connections", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "storageBackend": { - SchemaProps: spec.SchemaProps{ - Description: "StorageBackend is the backend storage", - Type: []string{"string"}, - Format: "", - }, - }, - "oidcUsernameClaim": { - SchemaProps: spec.SchemaProps{ - Description: "OIDCUsernameClaim is the OpenID claim to use as the user name. Note that claims other than the default ('sub') is not guaranteed to be unique and immutable.", - Type: []string{"string"}, - Format: "", - }, - }, - "oidcUsernamePrefix": { + "image": { SchemaProps: spec.SchemaProps{ - Description: "OIDCUsernamePrefix is the prefix prepended to username claims to prevent clashes with existing names (such as 'system:' users).", + Description: "Image is the instance instance (ami etc) we should use", Type: []string{"string"}, Format: "", }, }, - "oidcGroupsClaim": { + "minSize": { SchemaProps: spec.SchemaProps{ - Description: "OIDCGroupsClaim if provided, the name of a custom OpenID Connect claim for specifying user groups. The claim value is expected to be a string or array of strings.", - Type: []string{"string"}, - Format: "", + Description: "MinSize is the minimum size of the pool", + Type: []string{"integer"}, + Format: "int32", }, }, - "oidcGroupsPrefix": { + "maxSize": { SchemaProps: spec.SchemaProps{ - Description: "OIDCGroupsPrefix is the prefix prepended to group claims to prevent clashes with existing names (such as 'system:' groups)", - Type: []string{"string"}, - Format: "", + Description: "MaxSize is the maximum size of the pool", + Type: []string{"integer"}, + Format: "int32", }, }, - "oidcIssuerURL": { + "machineType": { SchemaProps: spec.SchemaProps{ - Description: "OIDCIssuerURL is the URL of the OpenID issuer, only HTTPS scheme will be accepted. If set, it will be used to verify the OIDC JSON Web Token (JWT).", + Description: "MachineType is the instance class", Type: []string{"string"}, Format: "", }, }, - "oidcClientID": { + "rootVolumeSize": { SchemaProps: spec.SchemaProps{ - Description: "OIDCClientID is the client ID for the OpenID Connect client, must be set if oidc-issuer-url is set.", - Type: []string{"string"}, - Format: "", + Description: "RootVolumeSize is the size of the EBS root volume to use, in GB", + Type: []string{"integer"}, + Format: "int32", }, }, - "oidcCAFile": { + "rootVolumeType": { SchemaProps: spec.SchemaProps{ - Description: "OIDCCAFile if set, the OpenID server's certificate will be verified by one of the authorities in the oidc-ca-file", + Description: "RootVolumeType is the type of the EBS root volume to use (e.g. gp2)", Type: []string{"string"}, Format: "", }, }, - "proxyClientCertFile": { + "rootVolumeIops": { SchemaProps: spec.SchemaProps{ - Description: "The apiserver's client certificate used for outbound requests.", - Type: []string{"string"}, - Format: "", + Description: "If volume type is io1, then we need to specify the number of Iops.", + Type: []string{"integer"}, + Format: "int32", }, }, - "proxyClientKeyFile": { + "rootVolumeOptimization": { SchemaProps: spec.SchemaProps{ - Description: "The apiserver's client key used for outbound requests.", - Type: []string{"string"}, + Description: "RootVolumeOptimization enables EBS optimization for an instance", + Type: []string{"boolean"}, Format: "", }, }, - "auditLogFormat": { + "hooks": { SchemaProps: spec.SchemaProps{ - Description: "AuditLogFormat flag specifies the format type for audit log files.", - Type: []string{"string"}, - Format: "", + Description: "Hooks is a list of hooks for this instanceGroup, note: these can override the cluster wide ones if required", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.HookSpec"), + }, + }, + }, }, }, - "auditLogPath": { + "maxPrice": { SchemaProps: spec.SchemaProps{ - Description: "If set, all requests coming to the apiserver will be logged to this file.", + Description: "MaxPrice indicates this is a spot-pricing group, with the specified value as our max-price bid", Type: []string{"string"}, Format: "", }, }, - "auditLogMaxAge": { - SchemaProps: spec.SchemaProps{ - Description: "The maximum number of days to retain old audit log files based on the timestamp encoded in their filename.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "auditLogMaxBackups": { - SchemaProps: spec.SchemaProps{ - Description: "The maximum number of old audit log files to retain.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "auditLogMaxSize": { - SchemaProps: spec.SchemaProps{ - Description: "The maximum size in megabytes of the audit log file before it gets rotated. Defaults to 100MB.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "auditPolicyFile": { + "associatePublicIp": { SchemaProps: spec.SchemaProps{ - Description: "AuditPolicyFile is the full path to a advanced audit configuration file a.g. /srv/kubernetes/audit.conf", - Type: []string{"string"}, + Description: "AssociatePublicIP is true if we want instances to have a public IP", + Type: []string{"boolean"}, Format: "", }, }, - "authenticationTokenWebhook": { + "additionalSecurityGroups": { SchemaProps: spec.SchemaProps{ - Description: "AuthenticationTokenWebhook enables bearer token authentication on kubelet.", - Type: []string{"boolean"}, - Format: "", + Description: "AdditionalSecurityGroups attaches additional security groups (e.g. i-123456)", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "authenticationTokenWebhookConfigFile": { + "cloudLabels": { SchemaProps: spec.SchemaProps{ - Description: "File with webhook configuration for token authentication in kubeconfig format. The API server will query the remote service to determine authentication for bearer tokens.", - Type: []string{"string"}, - Format: "", + Description: "CloudLabels indicates the labels for instances in this group, at the AWS level", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "authenticationTokenWebhookCacheTtl": { + "nodeLabels": { SchemaProps: spec.SchemaProps{ - Description: "The duration to cache responses from the webhook token authenticator. Default is 2m. (default 2m0s)", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "NodeLabels indicates the kubernetes labels for nodes in this group", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "authorizationMode": { + "fileAssets": { SchemaProps: spec.SchemaProps{ - Description: "AuthorizationMode is the authorization mode the kubeapi is running in", - Type: []string{"string"}, - Format: "", + Description: "A collection of files assets for deployed cluster wide", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.FileAssetSpec"), + }, + }, + }, }, }, - "authorizationRbacSuperUser": { + "tenancy": { SchemaProps: spec.SchemaProps{ - Description: "AuthorizationRBACSuperUser is the name of the superuser for default rbac", + Description: "Describes the tenancy of the instance group. Can be either default or dedicated. Currently only applies to AWS.", Type: []string{"string"}, Format: "", }, }, - "experimentalEncryptionProviderConfig": { + "kubelet": { SchemaProps: spec.SchemaProps{ - Description: "ExperimentalEncryptionProviderConfig enables encryption at rest for secrets.", - Type: []string{"string"}, - Format: "", + Description: "Kubelet overrides kubelet config from the ClusterSpec", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.KubeletConfigSpec"), }, }, - "requestheaderUsernameHeaders": { + "taints": { SchemaProps: spec.SchemaProps{ - Description: "List of request headers to inspect for usernames. X-Remote-User is common.", + Description: "Taints indicates the kubernetes taints for nodes in this group", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -27180,23 +27048,22 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA }, }, }, - "requestheaderGroupHeaders": { + "additionalUserData": { SchemaProps: spec.SchemaProps{ - Description: "List of request headers to inspect for groups. X-Remote-Group is suggested.", + Description: "AdditionalUserData is any additional user-data to be passed to the host", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.UserData"), }, }, }, }, }, - "requestheaderExtraHeaderPrefixes": { + "zones": { SchemaProps: spec.SchemaProps{ - Description: "List of request header prefixes to inspect. X-Remote-Extra- is suggested.", + Description: "Zones is the names of the Zones where machines in this instance group should be placed This is needed for regional subnets (e.g. GCE), to restrict placement to particular zones", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -27208,16 +27075,9 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA }, }, }, - "requestheaderClientCAFile": { - SchemaProps: spec.SchemaProps{ - Description: "Root certificate bundle to use to verify client certificates on incoming requests before trusting usernames in headers specified by --requestheader-username-headers", - Type: []string{"string"}, - Format: "", - }, - }, - "requestheaderAllowedNames": { + "suspendProcesses": { SchemaProps: spec.SchemaProps{ - Description: "List of client certificate common names to allow to provide usernames in headers specified by --requestheader-username-headers. If empty, any client certificate validated by the authorities in --requestheader-client-ca-file is allowed.", + Description: "SuspendProcesses disables the listed Scaling Policies", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -27229,194 +27089,282 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA }, }, }, - "featureGates": { + "externalLoadBalancers": { SchemaProps: spec.SchemaProps{ - Description: "FeatureGates is set of key=value pairs that describe feature gates for alpha/experimental features.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ + Description: "ExternalLoadBalancers define loadbalancers that should be attached to the instancegroup", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.LoadBalancer"), }, }, }, }, }, - "maxRequestsInflight": { + "detailedInstanceMonitoring": { SchemaProps: spec.SchemaProps{ - Description: "MaxRequestsInflight The maximum number of non-mutating requests in flight at a given time.", - Type: []string{"integer"}, - Format: "int32", + Description: "DetailedInstanceMonitoring defines if detailed-monitoring is enabled (AWS only)", + Type: []string{"boolean"}, + Format: "", }, }, - "etcdQuorumRead": { + "iam": { SchemaProps: spec.SchemaProps{ - Description: "EtcdQuorumRead configures the etcd-quorum-read flag, which forces consistent reads from etcd", - Type: []string{"boolean"}, - Format: "", + Description: "IAMProfileSpec defines the identity of the cloud group iam profile (AWS only).", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.IAMProfileSpec"), }, }, }, }, }, Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + "k8s.io/kops/pkg/apis/kops/v1alpha1.FileAssetSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.HookSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.IAMProfileSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.KubeletConfigSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.LoadBalancer", "k8s.io/kops/pkg/apis/kops/v1alpha1.UserData"}, }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.KubeControllerManagerConfig": { + "k8s.io/kops/pkg/apis/kops/v1alpha1.KopeioAuthenticationSpec": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "KubeControllerManagerConfig is the configuration for the controller", + Properties: map[string]spec.Schema{}, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.KopeioNetworkingSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "KopeioNetworkingSpec declares that we want Kopeio networking", + Properties: map[string]spec.Schema{}, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.KubeAPIServerConfig": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "KubeAPIServerConfig defines the configuration for the kube api", Properties: map[string]spec.Schema{ - "master": { + "image": { SchemaProps: spec.SchemaProps{ - Description: "Master is the url for the kube api master", + Description: "Image is the docker container used", Type: []string{"string"}, Format: "", }, }, "logLevel": { SchemaProps: spec.SchemaProps{ - Description: "LogLevel is the defined logLevel", + Description: "LogLevel is the logging level of the api", Type: []string{"integer"}, Format: "int32", }, }, - "serviceAccountPrivateKeyFile": { + "cloudProvider": { SchemaProps: spec.SchemaProps{ - Description: "ServiceAccountPrivateKeyFile the location for a certificate for service account signing", + Description: "CloudProvider is the name of the cloudProvider we are using, aws, gce etcd", Type: []string{"string"}, Format: "", }, }, - "image": { + "securePort": { SchemaProps: spec.SchemaProps{ - Description: "Image is the docker image to use", - Type: []string{"string"}, - Format: "", + Description: "SecurePort is the port the kube runs on", + Type: []string{"integer"}, + Format: "int32", }, }, - "cloudProvider": { + "insecurePort": { SchemaProps: spec.SchemaProps{ - Description: "CloudProvider is the provider for cloud services.", + Description: "InsecurePort is the port the insecure api runs", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "address": { + SchemaProps: spec.SchemaProps{ + Description: "Address is the binding address for the kube api: Deprecated - use insecure-bind-address and bind-address", Type: []string{"string"}, Format: "", }, }, - "clusterName": { + "bindAddress": { SchemaProps: spec.SchemaProps{ - Description: "ClusterName is the instance prefix for the cluster.", + Description: "BindAddress is the binding address for the secure kubernetes API", Type: []string{"string"}, Format: "", }, }, - "clusterCIDR": { + "insecureBindAddress": { SchemaProps: spec.SchemaProps{ - Description: "ClusterCIDR is CIDR Range for Pods in cluster.", + Description: "InsecureBindAddress is the binding address for the InsecurePort for the insecure kubernetes API", Type: []string{"string"}, Format: "", }, }, - "allocateNodeCIDRs": { + "enableBootstrapTokenAuth": { SchemaProps: spec.SchemaProps{ - Description: "AllocateNodeCIDRs enables CIDRs for Pods to be allocated and, if ConfigureCloudRoutes is true, to be set on the cloud provider.", + Description: "EnableBootstrapAuthToken enables 'bootstrap.kubernetes.io/token' in the 'kube-system' namespace to be used for TLS bootstrapping authentication", Type: []string{"boolean"}, Format: "", }, }, - "configureCloudRoutes": { + "enableAggregatorRouting": { SchemaProps: spec.SchemaProps{ - Description: "ConfigureCloudRoutes enables CIDRs allocated with to be configured on the cloud provider.", + Description: "EnableAggregatorRouting enables aggregator routing requests to endpoints IP rather than cluster IP", Type: []string{"boolean"}, Format: "", }, }, - "cidrAllocatorType": { + "admissionControl": { SchemaProps: spec.SchemaProps{ - Description: "CIDRAllocatorType specifies the type of CIDR allocator to use.", + Description: "Deprecated: AdmissionControl is a list of admission controllers to use", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "enableAdmissionPlugins": { + SchemaProps: spec.SchemaProps{ + Description: "EnableAdmissionPlugins is a list of enabled admission plugins", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "disableAdmissionPlugins": { + SchemaProps: spec.SchemaProps{ + Description: "DisableAdmissionPlugins is a list of disabled admission plugins", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "serviceClusterIPRange": { + SchemaProps: spec.SchemaProps{ + Description: "ServiceClusterIPRange is the service address range", Type: []string{"string"}, Format: "", }, }, - "rootCAFile": { + "serviceNodePortRange": { SchemaProps: spec.SchemaProps{ - Description: "rootCAFile is the root certificate authority will be included in service account's token secret. This must be a valid PEM-encoded CA bundle.", + Description: "Passed as --service-node-port-range to kube-apiserver. Expects 'startPort-endPort' format. Eg. 30000-33000", Type: []string{"string"}, Format: "", }, }, - "leaderElection": { + "etcdServers": { SchemaProps: spec.SchemaProps{ - Description: "LeaderElection defines the configuration of leader election client.", - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.LeaderElectionConfiguration"), + Description: "EtcdServers is a list of the etcd service to connect", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "attachDetachReconcileSyncPeriod": { + "etcdServersOverrides": { SchemaProps: spec.SchemaProps{ - Description: "ReconcilerSyncLoopPeriod is the amount of time the reconciler sync states loop wait between successive executions. Is set to 1 min by kops by default", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "EtcdServersOverrides is per-resource etcd servers overrides, comma separated. The individual override format: group/resource#servers, where servers are http://ip:port, semicolon separated", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "terminatedPodGCThreshold": { + "etcdCaFile": { SchemaProps: spec.SchemaProps{ - Description: "TerminatedPodGCThreshold is the number of terminated pods that can exist before the terminated pod garbage collector starts deleting terminated pods. If <= 0, the terminated pod garbage collector is disabled.", - Type: []string{"integer"}, - Format: "int32", + Description: "EtcdCAFile is the path to a ca certificate", + Type: []string{"string"}, + Format: "", }, }, - "nodeMonitorPeriod": { + "etcdCertFile": { SchemaProps: spec.SchemaProps{ - Description: "NodeMonitorPeriod is the period for syncing NodeStatus in NodeController. (default 5s)", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "EtcdCertFile is the path to a certificate", + Type: []string{"string"}, + Format: "", }, }, - "nodeMonitorGracePeriod": { + "etcdKeyFile": { SchemaProps: spec.SchemaProps{ - Description: "NodeMonitorGracePeriod is the amount of time which we allow running Node to be unresponsive before marking it unhealthy. (default 40s) Must be N-1 times more than kubelet's nodeStatusUpdateFrequency, where N means number of retries allowed for kubelet to post node status.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "EtcdKeyFile is the path to a private key", + Type: []string{"string"}, + Format: "", }, }, - "podEvictionTimeout": { + "basicAuthFile": { SchemaProps: spec.SchemaProps{ - Description: "PodEvictionTimeout is the grace period for deleting pods on failed nodes. (default 5m0s)", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Type: []string{"string"}, + Format: "", }, }, - "useServiceAccountCredentials": { + "clientCAFile": { SchemaProps: spec.SchemaProps{ - Description: "UseServiceAccountCredentials controls whether we use individual service account credentials for each controller.", - Type: []string{"boolean"}, - Format: "", + Type: []string{"string"}, + Format: "", }, }, - "horizontalPodAutoscalerSyncPeriod": { + "tlsCertFile": { SchemaProps: spec.SchemaProps{ - Description: "HorizontalPodAutoscalerSyncPeriod is the amount of time between syncs During each period, the controller manager queries the resource utilization against the metrics specified in each HorizontalPodAutoscaler definition.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Type: []string{"string"}, + Format: "", }, }, - "horizontalPodAutoscalerDownscaleDelay": { + "tlsPrivateKeyFile": { SchemaProps: spec.SchemaProps{ - Description: "HorizontalPodAutoscalerDownscaleDelay is a duration that specifies how long the autoscaler has to wait before another downscale operation can be performed after the current one has completed.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Type: []string{"string"}, + Format: "", }, }, - "horizontalPodAutoscalerUpscaleDelay": { + "tokenAuthFile": { SchemaProps: spec.SchemaProps{ - Description: "HorizontalPodAutoscalerUpscaleDelay is a duration that specifies how long the autoscaler has to wait before another upscale operation can be performed after the current one has completed.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Type: []string{"string"}, + Format: "", }, }, - "horizontalPodAutoscalerUseRestClients": { + "allowPrivileged": { SchemaProps: spec.SchemaProps{ - Description: "HorizontalPodAutoscalerUseRestClients determines if the new-style clients should be used if support for custom metrics is enabled.", + Description: "AllowPrivileged indicates if we can run privileged containers", Type: []string{"boolean"}, Format: "", }, }, - "featureGates": { + "apiServerCount": { SchemaProps: spec.SchemaProps{ - Description: "FeatureGates is set of key=value pairs that describe feature gates for alpha/experimental features.", + Description: "APIServerCount is the number of api servers", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "runtimeConfig": { + SchemaProps: spec.SchemaProps{ + Description: "RuntimeConfig is a series of keys/values are parsed into the `--runtime-config` parameters", Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ Schema: &spec.Schema{ @@ -27428,90 +27376,30 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA }, }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/kops/pkg/apis/kops/v1alpha1.LeaderElectionConfiguration"}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.KubeDNSConfig": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "KubeDNSConfig defines the kube dns configuration", - Properties: map[string]spec.Schema{ - "cacheMaxSize": { - SchemaProps: spec.SchemaProps{ - Description: "CacheMaxSize is the maximum entries to keep in dnsmaq", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "cacheMaxConcurrent": { - SchemaProps: spec.SchemaProps{ - Description: "CacheMaxConcurrent is the maximum number of concurrent queries for dnsmasq", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "domain": { + "kubeletClientCertificate": { SchemaProps: spec.SchemaProps{ - Description: "Domain is the dns domain", + Description: "KubeletClientCertificate is the path of a certificate for secure communication between api and kubelet", Type: []string{"string"}, Format: "", }, }, - "image": { + "kubeletClientKey": { SchemaProps: spec.SchemaProps{ - Description: "Image is the name of the docker image to run - @deprecated as this is now in the addon", + Description: "KubeletClientKey is the path of a private to secure communication between api and kubelet", Type: []string{"string"}, Format: "", }, }, - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "Replicas is the number of pod replicas - @deprecated as this is now in the addon, and controlled by autoscaler", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "provider": { + "anonymousAuth": { SchemaProps: spec.SchemaProps{ - Description: "Provider indicates whether CoreDNS or kube-dns will be the default service discovery.", - Type: []string{"string"}, + Description: "AnonymousAuth indicates if anonymous authentication is permitted", + Type: []string{"boolean"}, Format: "", }, }, - "serverIP": { - SchemaProps: spec.SchemaProps{ - Description: "ServerIP is the server ip", - Type: []string{"string"}, - Format: "", - }, - }, - "stubDomains": { - SchemaProps: spec.SchemaProps{ - Description: "StubDomains redirects a domains to another DNS service", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - "upstreamNameservers": { + "kubeletPreferredAddressTypes": { SchemaProps: spec.SchemaProps{ - Description: "UpstreamNameservers sets the upstream nameservers for queries not on the cluster domain", + Description: "KubeletPreferredAddressTypes is a list of the preferred NodeAddressTypes to use for kubelet connections", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -27523,322 +27411,292 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA }, }, }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.KubeProxyConfig": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "KubeProxyConfig defines the configuration for a proxy", - Properties: map[string]spec.Schema{ - "image": { + "storageBackend": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "StorageBackend is the backend storage", + Type: []string{"string"}, + Format: "", }, }, - "cpuRequest": { + "oidcUsernameClaim": { SchemaProps: spec.SchemaProps{ - Description: "CPURequest, cpu request compute resource for kube proxy e.g. \"20m\"", + Description: "OIDCUsernameClaim is the OpenID claim to use as the user name. Note that claims other than the default ('sub') is not guaranteed to be unique and immutable.", Type: []string{"string"}, Format: "", }, }, - "cpuLimit": { + "oidcUsernamePrefix": { SchemaProps: spec.SchemaProps{ - Description: "CPULimit, cpu limit compute resource for kube proxy e.g. \"30m\"", + Description: "OIDCUsernamePrefix is the prefix prepended to username claims to prevent clashes with existing names (such as 'system:' users).", Type: []string{"string"}, Format: "", }, }, - "memoryRequest": { + "oidcGroupsClaim": { SchemaProps: spec.SchemaProps{ - Description: "MemoryRequest, memory request compute resource for kube proxy e.g. \"30Mi\"", + Description: "OIDCGroupsClaim if provided, the name of a custom OpenID Connect claim for specifying user groups. The claim value is expected to be a string or array of strings.", Type: []string{"string"}, Format: "", }, }, - "memoryLimit": { + "oidcGroupsPrefix": { SchemaProps: spec.SchemaProps{ - Description: "MemoryLimit, memory limit compute resource for kube proxy e.g. \"30Mi\"", + Description: "OIDCGroupsPrefix is the prefix prepended to group claims to prevent clashes with existing names (such as 'system:' groups)", Type: []string{"string"}, Format: "", }, }, - "logLevel": { + "oidcIssuerURL": { SchemaProps: spec.SchemaProps{ - Description: "LogLevel is the logging level of the proxy", - Type: []string{"integer"}, - Format: "int32", + Description: "OIDCIssuerURL is the URL of the OpenID issuer, only HTTPS scheme will be accepted. If set, it will be used to verify the OIDC JSON Web Token (JWT).", + Type: []string{"string"}, + Format: "", }, }, - "clusterCIDR": { + "oidcClientID": { SchemaProps: spec.SchemaProps{ - Description: "ClusterCIDR is the CIDR range of the pods in the cluster", + Description: "OIDCClientID is the client ID for the OpenID Connect client, must be set if oidc-issuer-url is set.", Type: []string{"string"}, Format: "", }, }, - "hostnameOverride": { + "oidcCAFile": { SchemaProps: spec.SchemaProps{ - Description: "HostnameOverride, if non-empty, will be used as the identity instead of the actual hostname.", + Description: "OIDCCAFile if set, the OpenID server's certificate will be verified by one of the authorities in the oidc-ca-file", Type: []string{"string"}, Format: "", }, }, - "bindAddress": { + "proxyClientCertFile": { SchemaProps: spec.SchemaProps{ - Description: "BindAddress is IP address for the proxy server to serve on", + Description: "The apiserver's client certificate used for outbound requests.", Type: []string{"string"}, Format: "", }, }, - "master": { + "proxyClientKeyFile": { SchemaProps: spec.SchemaProps{ - Description: "Master is the address of the Kubernetes API server (overrides any value in kubeconfig)", + Description: "The apiserver's client key used for outbound requests.", Type: []string{"string"}, Format: "", }, }, - "enabled": { + "auditLogFormat": { SchemaProps: spec.SchemaProps{ - Description: "Enabled allows enabling or disabling kube-proxy", - Type: []string{"boolean"}, + Description: "AuditLogFormat flag specifies the format type for audit log files.", + Type: []string{"string"}, Format: "", }, }, - "proxyMode": { + "auditLogPath": { SchemaProps: spec.SchemaProps{ - Description: "Which proxy mode to use: (userspace, iptables(default), ipvs)", + Description: "If set, all requests coming to the apiserver will be logged to this file.", Type: []string{"string"}, Format: "", }, }, - "featureGates": { + "auditLogMaxAge": { SchemaProps: spec.SchemaProps{ - Description: "FeatureGates is a series of key pairs used to switch on features for the proxy", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "The maximum number of days to retain old audit log files based on the timestamp encoded in their filename.", + Type: []string{"integer"}, + Format: "int32", }, }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.KubeSchedulerConfig": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "KubeSchedulerConfig is the configuration for the kube-scheduler", - Properties: map[string]spec.Schema{ - "master": { + "auditLogMaxBackups": { SchemaProps: spec.SchemaProps{ - Description: "Master is a url to the kube master", - Type: []string{"string"}, - Format: "", + Description: "The maximum number of old audit log files to retain.", + Type: []string{"integer"}, + Format: "int32", }, }, - "logLevel": { + "auditLogMaxSize": { SchemaProps: spec.SchemaProps{ - Description: "LogLevel is the logging level", + Description: "The maximum size in megabytes of the audit log file before it gets rotated. Defaults to 100MB.", Type: []string{"integer"}, Format: "int32", }, }, - "image": { + "auditPolicyFile": { SchemaProps: spec.SchemaProps{ - Description: "Image is the docker image to use", + Description: "AuditPolicyFile is the full path to a advanced audit configuration file a.g. /srv/kubernetes/audit.conf", Type: []string{"string"}, Format: "", }, }, - "leaderElection": { - SchemaProps: spec.SchemaProps{ - Description: "LeaderElection defines the configuration of leader election client.", - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.LeaderElectionConfiguration"), - }, - }, - "usePolicyConfigMap": { + "authenticationTokenWebhook": { SchemaProps: spec.SchemaProps{ - Description: "UsePolicyConfigMap enable setting the scheduler policy from a configmap", + Description: "AuthenticationTokenWebhook enables bearer token authentication on kubelet.", Type: []string{"boolean"}, Format: "", }, }, - "featureGates": { - SchemaProps: spec.SchemaProps{ - Description: "FeatureGates is set of key=value pairs that describe feature gates for alpha/experimental features.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/kops/pkg/apis/kops/v1alpha1.LeaderElectionConfiguration"}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.KubeletConfigSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "KubeletConfigSpec defines the kubelet configuration", - Properties: map[string]spec.Schema{ - "apiServers": { + "authenticationTokenWebhookConfigFile": { SchemaProps: spec.SchemaProps{ - Description: "APIServers is not used for clusters version 1.6 and later - flag removed", + Description: "File with webhook configuration for token authentication in kubeconfig format. The API server will query the remote service to determine authentication for bearer tokens.", Type: []string{"string"}, Format: "", }, }, - "anonymousAuth": { + "authenticationTokenWebhookCacheTtl": { SchemaProps: spec.SchemaProps{ - Description: "AnonymousAuth permits you to control auth to the kubelet api", - Type: []string{"boolean"}, - Format: "", + Description: "The duration to cache responses from the webhook token authenticator. Default is 2m. (default 2m0s)", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, "authorizationMode": { SchemaProps: spec.SchemaProps{ - Description: "AuthorizationMode is the authorization mode the kubelet is running in", + Description: "AuthorizationMode is the authorization mode the kubeapi is running in", Type: []string{"string"}, Format: "", }, }, - "bootstrapKubeconfig": { + "authorizationRbacSuperUser": { SchemaProps: spec.SchemaProps{ - Description: "BootstrapKubeconfig is the path to a kubeconfig file that will be used to get client certificate for kube", + Description: "AuthorizationRBACSuperUser is the name of the superuser for default rbac", Type: []string{"string"}, Format: "", }, }, - "clientCaFile": { + "experimentalEncryptionProviderConfig": { SchemaProps: spec.SchemaProps{ - Description: "ClientCAFile is the path to a CA certificate", + Description: "ExperimentalEncryptionProviderConfig enables encryption at rest for secrets.", Type: []string{"string"}, Format: "", }, }, - "tlsCertFile": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "tlsPrivateKeyFile": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "kubeconfigPath": { + "requestheaderUsernameHeaders": { SchemaProps: spec.SchemaProps{ - Description: "KubeconfigPath is the path of kubeconfig for the kubelet", - Type: []string{"string"}, - Format: "", + Description: "List of request headers to inspect for usernames. X-Remote-User is common.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "requireKubeconfig": { + "requestheaderGroupHeaders": { SchemaProps: spec.SchemaProps{ - Description: "RequireKubeconfig indicates a kubeconfig is required", - Type: []string{"boolean"}, - Format: "", + Description: "List of request headers to inspect for groups. X-Remote-Group is suggested.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "logLevel": { + "requestheaderExtraHeaderPrefixes": { SchemaProps: spec.SchemaProps{ - Description: "LogLevel is the logging level of the kubelet", - Type: []string{"integer"}, - Format: "int32", + Description: "List of request header prefixes to inspect. X-Remote-Extra- is suggested.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "podManifestPath": { + "requestheaderClientCAFile": { SchemaProps: spec.SchemaProps{ - Description: "config is the path to the config file or directory of files", + Description: "Root certificate bundle to use to verify client certificates on incoming requests before trusting usernames in headers specified by --requestheader-username-headers", Type: []string{"string"}, Format: "", }, }, - "hostnameOverride": { + "requestheaderAllowedNames": { SchemaProps: spec.SchemaProps{ - Description: "HostnameOverride is the hostname used to identify the kubelet instead of the actual hostname.", - Type: []string{"string"}, - Format: "", + Description: "List of client certificate common names to allow to provide usernames in headers specified by --requestheader-username-headers. If empty, any client certificate validated by the authorities in --requestheader-client-ca-file is allowed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "podInfraContainerImage": { + "featureGates": { SchemaProps: spec.SchemaProps{ - Description: "PodInfraContainerImage is the image whose network/ipc containers in each pod will use.", - Type: []string{"string"}, - Format: "", + Description: "FeatureGates is set of key=value pairs that describe feature gates for alpha/experimental features.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - "seccompProfileRoot": { + "maxRequestsInflight": { SchemaProps: spec.SchemaProps{ - Description: "SeccompProfileRoot is the directory path for seccomp profiles.", - Type: []string{"string"}, - Format: "", + Description: "MaxRequestsInflight The maximum number of non-mutating requests in flight at a given time.", + Type: []string{"integer"}, + Format: "int32", }, }, - "allowPrivileged": { + "etcdQuorumRead": { SchemaProps: spec.SchemaProps{ - Description: "AllowPrivileged enables containers to request privileged mode (defaults to false)", + Description: "EtcdQuorumRead configures the etcd-quorum-read flag, which forces consistent reads from etcd", Type: []string{"boolean"}, Format: "", }, }, - "enableDebuggingHandlers": { + "minRequestTimeout": { SchemaProps: spec.SchemaProps{ - Description: "EnableDebuggingHandlers enables server endpoints for log collection and local running of containers and commands", - Type: []string{"boolean"}, - Format: "", + Description: "MinRequestTimeout configures the minimum number of seconds a handler must keep a request open before timing it out. Currently only honored by the watch request handler", + Type: []string{"integer"}, + Format: "int32", }, }, - "registerNode": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.KubeControllerManagerConfig": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "KubeControllerManagerConfig is the configuration for the controller", + Properties: map[string]spec.Schema{ + "master": { SchemaProps: spec.SchemaProps{ - Description: "RegisterNode enables automatic registration with the apiserver.", - Type: []string{"boolean"}, + Description: "Master is the url for the kube api master", + Type: []string{"string"}, Format: "", }, }, - "nodeStatusUpdateFrequency": { - SchemaProps: spec.SchemaProps{ - Description: "NodeStatusUpdateFrequency Specifies how often kubelet posts node status to master (default 10s) must work with nodeMonitorGracePeriod in KubeControllerManagerConfig.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), - }, - }, - "clusterDomain": { + "logLevel": { SchemaProps: spec.SchemaProps{ - Description: "ClusterDomain is the DNS domain for this cluster", - Type: []string{"string"}, - Format: "", + Description: "LogLevel is the defined logLevel", + Type: []string{"integer"}, + Format: "int32", }, }, - "clusterDNS": { + "serviceAccountPrivateKeyFile": { SchemaProps: spec.SchemaProps{ - Description: "ClusterDNS is the IP address for a cluster DNS server", + Description: "ServiceAccountPrivateKeyFile the location for a certificate for service account signing", Type: []string{"string"}, Format: "", }, }, - "networkPluginName": { + "image": { SchemaProps: spec.SchemaProps{ - Description: "NetworkPluginName is the name of the network plugin to be invoked for various events in kubelet/pod lifecycle", + Description: "Image is the docker image to use", Type: []string{"string"}, Format: "", }, @@ -27850,114 +27708,120 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA Format: "", }, }, - "kubeletCgroups": { + "clusterName": { SchemaProps: spec.SchemaProps{ - Description: "KubeletCgroups is the absolute name of cgroups to isolate the kubelet in.", + Description: "ClusterName is the instance prefix for the cluster.", Type: []string{"string"}, Format: "", }, }, - "runtimeCgroups": { + "clusterCIDR": { SchemaProps: spec.SchemaProps{ - Description: "Cgroups that container runtime is expected to be isolated in.", + Description: "ClusterCIDR is CIDR Range for Pods in cluster.", Type: []string{"string"}, Format: "", }, }, - "readOnlyPort": { + "allocateNodeCIDRs": { SchemaProps: spec.SchemaProps{ - Description: "ReadOnlyPort is the port used by the kubelet api for read-only access (default 10255)", - Type: []string{"integer"}, - Format: "int32", + Description: "AllocateNodeCIDRs enables CIDRs for Pods to be allocated and, if ConfigureCloudRoutes is true, to be set on the cloud provider.", + Type: []string{"boolean"}, + Format: "", }, }, - "systemCgroups": { + "configureCloudRoutes": { SchemaProps: spec.SchemaProps{ - Description: "SystemCgroups is absolute name of cgroups in which to place all non-kernel processes that are not already in a container. Empty for no container. Rolling back the flag requires a reboot.", - Type: []string{"string"}, + Description: "ConfigureCloudRoutes enables CIDRs allocated with to be configured on the cloud provider.", + Type: []string{"boolean"}, Format: "", }, }, - "cgroupRoot": { + "cidrAllocatorType": { SchemaProps: spec.SchemaProps{ - Description: "cgroupRoot is the root cgroup to use for pods. This is handled by the container runtime on a best effort basis.", + Description: "CIDRAllocatorType specifies the type of CIDR allocator to use.", Type: []string{"string"}, Format: "", }, }, - "configureCbr0": { + "rootCAFile": { SchemaProps: spec.SchemaProps{ - Description: "configureCBR0 enables the kublet to configure cbr0 based on Node.Spec.PodCIDR.", - Type: []string{"boolean"}, + Description: "rootCAFile is the root certificate authority will be included in service account's token secret. This must be a valid PEM-encoded CA bundle.", + Type: []string{"string"}, Format: "", }, }, - "hairpinMode": { + "leaderElection": { SchemaProps: spec.SchemaProps{ - Description: "How should the kubelet configure the container bridge for hairpin packets. Setting this flag allows endpoints in a Service to loadbalance back to themselves if they should try to access their own Service. Values:\n \"promiscuous-bridge\": make the container bridge promiscuous.\n \"hairpin-veth\": set the hairpin flag on container veth interfaces.\n \"none\": do nothing.\nSetting --configure-cbr0 to false implies that to achieve hairpin NAT one must set --hairpin-mode=veth-flag, because bridge assumes the existence of a container bridge named cbr0.", - Type: []string{"string"}, - Format: "", + Description: "LeaderElection defines the configuration of leader election client.", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.LeaderElectionConfiguration"), }, }, - "babysitDaemons": { + "attachDetachReconcileSyncPeriod": { SchemaProps: spec.SchemaProps{ - Description: "The node has babysitter process monitoring docker and kubelet. Removed as of 1.7", - Type: []string{"boolean"}, - Format: "", + Description: "ReconcilerSyncLoopPeriod is the amount of time the reconciler sync states loop wait between successive executions. Is set to 1 min by kops by default", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "maxPods": { + "terminatedPodGCThreshold": { SchemaProps: spec.SchemaProps{ - Description: "MaxPods is the number of pods that can run on this Kubelet.", + Description: "TerminatedPodGCThreshold is the number of terminated pods that can exist before the terminated pod garbage collector starts deleting terminated pods. If <= 0, the terminated pod garbage collector is disabled.", Type: []string{"integer"}, Format: "int32", }, }, - "nvidiaGPUs": { + "nodeMonitorPeriod": { SchemaProps: spec.SchemaProps{ - Description: "NvidiaGPUs is the number of NVIDIA GPU devices on this node.", - Type: []string{"integer"}, - Format: "int32", + Description: "NodeMonitorPeriod is the period for syncing NodeStatus in NodeController. (default 5s)", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "podCIDR": { + "nodeMonitorGracePeriod": { SchemaProps: spec.SchemaProps{ - Description: "PodCIDR is the CIDR to use for pod IP addresses, only used in standalone mode. In cluster mode, this is obtained from the master.", - Type: []string{"string"}, - Format: "", + Description: "NodeMonitorGracePeriod is the amount of time which we allow running Node to be unresponsive before marking it unhealthy. (default 40s) Must be N-1 times more than kubelet's nodeStatusUpdateFrequency, where N means number of retries allowed for kubelet to post node status.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "resolvConf": { + "podEvictionTimeout": { SchemaProps: spec.SchemaProps{ - Description: "ResolverConfig is the resolver configuration file used as the basis for the container DNS resolution configuration.\"), []", - Type: []string{"string"}, - Format: "", + Description: "PodEvictionTimeout is the grace period for deleting pods on failed nodes. (default 5m0s)", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "reconcileCIDR": { + "useServiceAccountCredentials": { SchemaProps: spec.SchemaProps{ - Description: "ReconcileCIDR is Reconcile node CIDR with the CIDR specified by the API server. No-op if register-node or configure-cbr0 is false.", + Description: "UseServiceAccountCredentials controls whether we use individual service account credentials for each controller.", Type: []string{"boolean"}, Format: "", }, }, - "registerSchedulable": { + "horizontalPodAutoscalerSyncPeriod": { SchemaProps: spec.SchemaProps{ - Description: "registerSchedulable tells the kubelet to register the node as schedulable. No-op if register-node is false.", - Type: []string{"boolean"}, - Format: "", + Description: "HorizontalPodAutoscalerSyncPeriod is the amount of time between syncs During each period, the controller manager queries the resource utilization against the metrics specified in each HorizontalPodAutoscaler definition.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - "serializeImagePulls": { + "horizontalPodAutoscalerDownscaleDelay": { SchemaProps: spec.SchemaProps{ - Description: "// SerializeImagePulls when enabled, tells the Kubelet to pull images one // at a time. We recommend *not* changing the default value on nodes that // run docker daemon with version < 1.9 or an Aufs storage backend. // Issue #10959 has more details.", + Description: "HorizontalPodAutoscalerDownscaleDelay is a duration that specifies how long the autoscaler has to wait before another downscale operation can be performed after the current one has completed.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "horizontalPodAutoscalerUpscaleDelay": { + SchemaProps: spec.SchemaProps{ + Description: "HorizontalPodAutoscalerUpscaleDelay is a duration that specifies how long the autoscaler has to wait before another upscale operation can be performed after the current one has completed.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "horizontalPodAutoscalerUseRestClients": { + SchemaProps: spec.SchemaProps{ + Description: "HorizontalPodAutoscalerUseRestClients determines if the new-style clients should be used if support for custom metrics is enabled.", Type: []string{"boolean"}, Format: "", }, }, - "nodeLabels": { + "featureGates": { SchemaProps: spec.SchemaProps{ - Description: "NodeLabels to add when registering the node in the cluster.", + Description: "FeatureGates is set of key=value pairs that describe feature gates for alpha/experimental features.", Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ Schema: &spec.Schema{ @@ -27969,114 +27833,92 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA }, }, }, - "nonMasqueradeCIDR": { - SchemaProps: spec.SchemaProps{ - Description: "NonMasqueradeCIDR configures masquerading: traffic to IPs outside this range will use IP masquerade.", - Type: []string{"string"}, - Format: "", - }, - }, - "enableCustomMetrics": { - SchemaProps: spec.SchemaProps{ - Description: "Enable gathering custom metrics.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "networkPluginMTU": { + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/kops/pkg/apis/kops/v1alpha1.LeaderElectionConfiguration"}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.KubeDNSConfig": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "KubeDNSConfig defines the kube dns configuration", + Properties: map[string]spec.Schema{ + "cacheMaxSize": { SchemaProps: spec.SchemaProps{ - Description: "NetworkPluginMTU is the MTU to be passed to the network plugin, and overrides the default MTU for cases where it cannot be automatically computed (such as IPSEC).", + Description: "CacheMaxSize is the maximum entries to keep in dnsmaq", Type: []string{"integer"}, Format: "int32", }, }, - "imageGCHighThresholdPercent": { + "cacheMaxConcurrent": { SchemaProps: spec.SchemaProps{ - Description: "ImageGCHighThresholdPercent is the percent of disk usage after which image garbage collection is always run.", + Description: "CacheMaxConcurrent is the maximum number of concurrent queries for dnsmasq", Type: []string{"integer"}, Format: "int32", }, }, - "imageGCLowThresholdPercent": { + "domain": { SchemaProps: spec.SchemaProps{ - Description: "ImageGCLowThresholdPercent is the percent of disk usage before which image garbage collection is never run. Lowest disk usage to garbage collect to.", - Type: []string{"integer"}, - Format: "int32", + Description: "Domain is the dns domain", + Type: []string{"string"}, + Format: "", }, }, - "imagePullProgressDeadline": { + "image": { SchemaProps: spec.SchemaProps{ - Description: "ImagePullProgressDeadline is the timeout for image pulls If no pulling progress is made before this deadline, the image pulling will be cancelled. (default 1m0s)", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "Image is the name of the docker image to run - @deprecated as this is now in the addon", + Type: []string{"string"}, + Format: "", }, }, - "evictionHard": { + "replicas": { SchemaProps: spec.SchemaProps{ - Description: "Comma-delimited list of hard eviction expressions. For example, 'memory.available<300Mi'.", - Type: []string{"string"}, - Format: "", + Description: "Replicas is the number of pod replicas - @deprecated as this is now in the addon, and controlled by autoscaler", + Type: []string{"integer"}, + Format: "int32", }, }, - "evictionSoft": { + "provider": { SchemaProps: spec.SchemaProps{ - Description: "Comma-delimited list of soft eviction expressions. For example, 'memory.available<300Mi'.", + Description: "Provider indicates whether CoreDNS or kube-dns will be the default service discovery.", Type: []string{"string"}, Format: "", }, }, - "evictionSoftGracePeriod": { + "serverIP": { SchemaProps: spec.SchemaProps{ - Description: "Comma-delimited list of grace periods for each soft eviction signal. For example, 'memory.available=30s'.", + Description: "ServerIP is the server ip", Type: []string{"string"}, Format: "", }, }, - "evictionPressureTransitionPeriod": { + "stubDomains": { SchemaProps: spec.SchemaProps{ - Description: "Duration for which the kubelet has to wait before transitioning out of an eviction pressure condition.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), - }, - }, - "evictionMaxPodGracePeriod": { - SchemaProps: spec.SchemaProps{ - Description: "Maximum allowed grace period (in seconds) to use when terminating pods in response to a soft eviction threshold being met.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "evictionMinimumReclaim": { - SchemaProps: spec.SchemaProps{ - Description: "Comma-delimited list of minimum reclaims (e.g. imagefs.available=2Gi) that describes the minimum amount of resource the kubelet will reclaim when performing a pod eviction if that resource is under pressure.", - Type: []string{"string"}, - Format: "", - }, - }, - "volumePluginDirectory": { - SchemaProps: spec.SchemaProps{ - Description: "The full path of the directory in which to search for additional third party volume plugins", - Type: []string{"string"}, - Format: "", - }, - }, - "taints": { - SchemaProps: spec.SchemaProps{ - Description: "Taints to add when registering a node in the cluster", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ + Description: "StubDomains redirects a domains to another DNS service", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, }, }, }, - "featureGates": { + "upstreamNameservers": { SchemaProps: spec.SchemaProps{ - Description: "FeatureGates is set of key=value pairs that describe feature gates for alpha/experimental features.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ + Description: "UpstreamNameservers sets the upstream nameservers for queries not on the cluster domain", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -28086,79 +27928,104 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA }, }, }, - "kubeReserved": { + }, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.KubeProxyConfig": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "KubeProxyConfig defines the configuration for a proxy", + Properties: map[string]spec.Schema{ + "image": { SchemaProps: spec.SchemaProps{ - Description: "Resource reservation for kubernetes system daemons like the kubelet, container runtime, node problem detector, etc.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Type: []string{"string"}, + Format: "", }, }, - "kubeReservedCgroup": { + "cpuRequest": { SchemaProps: spec.SchemaProps{ - Description: "Control group for kube daemons.", + Description: "CPURequest, cpu request compute resource for kube proxy e.g. \"20m\"", Type: []string{"string"}, Format: "", }, }, - "systemReserved": { + "cpuLimit": { SchemaProps: spec.SchemaProps{ - Description: "Capture resource reservation for OS system daemons like sshd, udev, etc.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "CPULimit, cpu limit compute resource for kube proxy e.g. \"30m\"", + Type: []string{"string"}, + Format: "", }, }, - "systemReservedCgroup": { + "memoryRequest": { SchemaProps: spec.SchemaProps{ - Description: "Parent control group for OS system daemons.", + Description: "MemoryRequest, memory request compute resource for kube proxy e.g. \"30Mi\"", Type: []string{"string"}, Format: "", }, }, - "enforceNodeAllocatable": { + "memoryLimit": { SchemaProps: spec.SchemaProps{ - Description: "Enforce Allocatable across pods whenever the overall usage across all pods exceeds Allocatable.", + Description: "MemoryLimit, memory limit compute resource for kube proxy e.g. \"30Mi\"", Type: []string{"string"}, Format: "", }, }, - "runtimeRequestTimeout": { + "logLevel": { SchemaProps: spec.SchemaProps{ - Description: "RuntimeRequestTimeout is timeout for runtime requests on - pull, logs, exec and attach", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "LogLevel is the logging level of the proxy", + Type: []string{"integer"}, + Format: "int32", }, }, - "volumeStatsAggPeriod": { + "clusterCIDR": { SchemaProps: spec.SchemaProps{ - Description: "VolumeStatsAggPeriod is the interval for kubelet to calculate and cache the volume disk usage for all pods and volumes", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "ClusterCIDR is the CIDR range of the pods in the cluster", + Type: []string{"string"}, + Format: "", }, }, - "failSwapOn": { + "hostnameOverride": { SchemaProps: spec.SchemaProps{ - Description: "Tells the Kubelet to fail to start if swap is enabled on the node.", + Description: "HostnameOverride, if non-empty, will be used as the identity instead of the actual hostname.", + Type: []string{"string"}, + Format: "", + }, + }, + "bindAddress": { + SchemaProps: spec.SchemaProps{ + Description: "BindAddress is IP address for the proxy server to serve on", + Type: []string{"string"}, + Format: "", + }, + }, + "master": { + SchemaProps: spec.SchemaProps{ + Description: "Master is the address of the Kubernetes API server (overrides any value in kubeconfig)", + Type: []string{"string"}, + Format: "", + }, + }, + "enabled": { + SchemaProps: spec.SchemaProps{ + Description: "Enabled allows enabling or disabling kube-proxy", Type: []string{"boolean"}, Format: "", }, }, - "experimental_allowed_unsafe_sysctls": { + "proxyMode": { SchemaProps: spec.SchemaProps{ - Description: "ExperimentalAllowedUnsafeSysctls are passed to the kubelet config to whitelist allowable sysctls", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ + Description: "Which proxy mode to use: (userspace, iptables(default), ipvs)", + Type: []string{"string"}, + Format: "", + }, + }, + "featureGates": { + SchemaProps: spec.SchemaProps{ + Description: "FeatureGates is a series of key pairs used to switch on features for the proxy", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -28168,81 +28035,69 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA }, }, }, - "streamingConnectionIdleTimeout": { + "conntrackMaxPerCore": { SchemaProps: spec.SchemaProps{ - Description: "StreamingConnectionIdleTimeout is the maximum time a streaming connection can be idle before the connection is automatically closed", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + Description: "Maximum number of NAT connections to track per CPU core (default: 131072)", + Type: []string{"integer"}, + Format: "int32", }, }, - "dockerDisableSharedPID": { + "conntrackMin": { SchemaProps: spec.SchemaProps{ - Description: "DockerDisableSharedPID uses a shared PID namespace for containers in a pod.", - Type: []string{"boolean"}, - Format: "", + Description: "Minimum number of conntrack entries to allocate, regardless of conntrack-max-per-core", + Type: []string{"integer"}, + Format: "int32", }, }, }, }, }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.KubenetNetworkingSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "KubenetNetworkingSpec is the specification for kubenet networking, largely integrated but intended to replace classic", - Properties: map[string]spec.Schema{}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.KuberouterNetworkingSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "KuberouterNetworkingSpec declares that we want Kube-router networking", - Properties: map[string]spec.Schema{}, - }, - }, Dependencies: []string{}, }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.LeaderElectionConfiguration": { + "k8s.io/kops/pkg/apis/kops/v1alpha1.KubeSchedulerConfig": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "LeaderElectionConfiguration defines the configuration of leader election clients for components that can run with leader election enabled.", + Description: "KubeSchedulerConfig is the configuration for the kube-scheduler", Properties: map[string]spec.Schema{ - "leaderElect": { + "master": { SchemaProps: spec.SchemaProps{ - Description: "leaderElect enables a leader election client to gain leadership before executing the main loop. Enable this when running replicated components for high availability.", - Type: []string{"boolean"}, + Description: "Master is a url to the kube master", + Type: []string{"string"}, Format: "", }, }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.LoadBalancerAccessSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "LoadBalancerAccessSpec provides configuration details related to API LoadBalancer and its access", - Properties: map[string]spec.Schema{ - "type": { + "logLevel": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "LogLevel is the logging level", + Type: []string{"integer"}, + Format: "int32", }, }, - "idleTimeoutSeconds": { + "image": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int64", + Description: "Image is the docker image to use", + Type: []string{"string"}, + Format: "", }, }, - "additionalSecurityGroups": { + "leaderElection": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ + Description: "LeaderElection defines the configuration of leader election client.", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.LeaderElectionConfiguration"), + }, + }, + "usePolicyConfigMap": { + SchemaProps: spec.SchemaProps{ + Description: "UsePolicyConfigMap enable setting the scheduler policy from a configmap", + Type: []string{"boolean"}, + Format: "", + }, + }, + "featureGates": { + SchemaProps: spec.SchemaProps{ + Description: "FeatureGates is set of key=value pairs that describe feature gates for alpha/experimental features.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -28255,616 +28110,1665 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA }, }, }, - Dependencies: []string{}, + Dependencies: []string{ + "k8s.io/kops/pkg/apis/kops/v1alpha1.LeaderElectionConfiguration"}, }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.NetworkingSpec": { + "k8s.io/kops/pkg/apis/kops/v1alpha1.KubeletConfigSpec": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "NetworkingSpec allows selection and configuration of a networking plugin", + Description: "KubeletConfigSpec defines the kubelet configuration", Properties: map[string]spec.Schema{ - "classic": { + "apiServers": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.ClassicNetworkingSpec"), + Description: "APIServers is not used for clusters version 1.6 and later - flag removed", + Type: []string{"string"}, + Format: "", }, }, - "kubenet": { + "anonymousAuth": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.KubenetNetworkingSpec"), - }, - }, - "external": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.ExternalNetworkingSpec"), + Description: "AnonymousAuth permits you to control auth to the kubelet api", + Type: []string{"boolean"}, + Format: "", }, }, - "cni": { + "authorizationMode": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.CNINetworkingSpec"), + Description: "AuthorizationMode is the authorization mode the kubelet is running in", + Type: []string{"string"}, + Format: "", }, }, - "kopeio": { + "bootstrapKubeconfig": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.KopeioNetworkingSpec"), + Description: "BootstrapKubeconfig is the path to a kubeconfig file that will be used to get client certificate for kube", + Type: []string{"string"}, + Format: "", }, }, - "weave": { + "clientCaFile": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.WeaveNetworkingSpec"), + Description: "ClientCAFile is the path to a CA certificate", + Type: []string{"string"}, + Format: "", }, }, - "flannel": { + "tlsCertFile": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.FlannelNetworkingSpec"), + Type: []string{"string"}, + Format: "", }, }, - "calico": { + "tlsPrivateKeyFile": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.CalicoNetworkingSpec"), + Type: []string{"string"}, + Format: "", }, }, - "canal": { + "kubeconfigPath": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.CanalNetworkingSpec"), + Description: "KubeconfigPath is the path of kubeconfig for the kubelet", + Type: []string{"string"}, + Format: "", }, }, - "kuberouter": { + "requireKubeconfig": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.KuberouterNetworkingSpec"), + Description: "RequireKubeconfig indicates a kubeconfig is required", + Type: []string{"boolean"}, + Format: "", }, }, - "romana": { + "logLevel": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.RomanaNetworkingSpec"), + Description: "LogLevel is the logging level of the kubelet", + Type: []string{"integer"}, + Format: "int32", }, }, - "amazonvpc": { + "podManifestPath": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.AmazonVPCNetworkingSpec"), + Description: "config is the path to the config file or directory of files", + Type: []string{"string"}, + Format: "", }, }, - "cilium": { + "hostnameOverride": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.CiliumNetworkingSpec"), + Description: "HostnameOverride is the hostname used to identify the kubelet instead of the actual hostname.", + Type: []string{"string"}, + Format: "", }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/kops/pkg/apis/kops/v1alpha1.AmazonVPCNetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.CNINetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.CalicoNetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.CanalNetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.CiliumNetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.ClassicNetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.ExternalNetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.FlannelNetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.KopeioNetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.KubenetNetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.KuberouterNetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.RomanaNetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.WeaveNetworkingSpec"}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.RBACAuthorizationSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.RomanaNetworkingSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "RomanaNetworkingSpec declares that we want Romana networking", - Properties: map[string]spec.Schema{ - "daemonServiceIP": { + "podInfraContainerImage": { SchemaProps: spec.SchemaProps{ - Description: "DaemonServiceIP is the Kubernetes Service IP for the romana-daemon pod", + Description: "PodInfraContainerImage is the image whose network/ipc containers in each pod will use.", Type: []string{"string"}, Format: "", }, }, - "etcdServiceIP": { + "seccompProfileRoot": { SchemaProps: spec.SchemaProps{ - Description: "EtcdServiceIP is the Kubernetes Service IP for the etcd backend used by Romana", + Description: "SeccompProfileRoot is the directory path for seccomp profiles.", Type: []string{"string"}, Format: "", }, }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.SSHCredential": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SSHCredential represent a set of kops secrets", - Properties: map[string]spec.Schema{ - "kind": { + "allowPrivileged": { SchemaProps: spec.SchemaProps{ - 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/api-conventions.md#types-kinds", - Type: []string{"string"}, + Description: "AllowPrivileged enables containers to request privileged mode (defaults to false)", + Type: []string{"boolean"}, Format: "", }, }, - "apiVersion": { + "enableDebuggingHandlers": { SchemaProps: spec.SchemaProps{ - 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/api-conventions.md#resources", - Type: []string{"string"}, + Description: "EnableDebuggingHandlers enables server endpoints for log collection and local running of containers and commands", + Type: []string{"boolean"}, Format: "", }, }, - "metadata": { + "registerNode": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "RegisterNode enables automatic registration with the apiserver.", + Type: []string{"boolean"}, + Format: "", }, }, - "spec": { + "nodeStatusUpdateFrequency": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.SSHCredentialSpec"), + Description: "NodeStatusUpdateFrequency Specifies how often kubelet posts node status to master (default 10s) must work with nodeMonitorGracePeriod in KubeControllerManagerConfig.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/kops/pkg/apis/kops/v1alpha1.SSHCredentialSpec"}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.SSHCredentialList": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{ - "kind": { + "clusterDomain": { SchemaProps: spec.SchemaProps{ - 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/api-conventions.md#types-kinds", + Description: "ClusterDomain is the DNS domain for this cluster", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "clusterDNS": { SchemaProps: spec.SchemaProps{ - 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/api-conventions.md#resources", + Description: "ClusterDNS is the IP address for a cluster DNS server", Type: []string{"string"}, Format: "", }, }, - "metadata": { + "networkPluginName": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Description: "NetworkPluginName is the name of the network plugin to be invoked for various events in kubelet/pod lifecycle", + Type: []string{"string"}, + Format: "", }, }, - "items": { + "cloudProvider": { SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.SSHCredential"), - }, - }, - }, + Description: "CloudProvider is the provider for cloud services.", + Type: []string{"string"}, + Format: "", }, }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/kops/pkg/apis/kops/v1alpha1.SSHCredential"}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.SSHCredentialSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{ - "publicKey": { + "kubeletCgroups": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "KubeletCgroups is the absolute name of cgroups to isolate the kubelet in.", + Type: []string{"string"}, + Format: "", }, }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.TargetSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TargetSpec allows for specifying target config in an extensible way", - Properties: map[string]spec.Schema{ - "terraform": { + "runtimeCgroups": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.TerraformSpec"), + Description: "Cgroups that container runtime is expected to be isolated in.", + Type: []string{"string"}, + Format: "", }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/kops/pkg/apis/kops/v1alpha1.TerraformSpec"}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.TerraformSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TerraformSpec allows us to specify terraform config in an extensible way", - Properties: map[string]spec.Schema{ - "providerExtraConfig": { + "readOnlyPort": { SchemaProps: spec.SchemaProps{ - Description: "ProviderExtraConfig contains key/value pairs to add to the rendered terraform \"provider\" block", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, + Description: "ReadOnlyPort is the port used by the kubelet api for read-only access (default 10255)", + Type: []string{"integer"}, + Format: "int32", }, }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.TopologySpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{ - "masters": { + "systemCgroups": { SchemaProps: spec.SchemaProps{ - Description: "The environment to launch the Kubernetes masters in public|private", + Description: "SystemCgroups is absolute name of cgroups in which to place all non-kernel processes that are not already in a container. Empty for no container. Rolling back the flag requires a reboot.", Type: []string{"string"}, Format: "", }, }, - "nodes": { + "cgroupRoot": { SchemaProps: spec.SchemaProps{ - Description: "The environment to launch the Kubernetes nodes in public|private", + Description: "cgroupRoot is the root cgroup to use for pods. This is handled by the container runtime on a best effort basis.", Type: []string{"string"}, Format: "", }, }, - "bastion": { + "configureCbr0": { SchemaProps: spec.SchemaProps{ - Description: "Bastion provide an external facing point of entry into a network containing private network instances. This host can provide a single point of fortification or audit and can be started and stopped to enable or disable inbound SSH communication from the Internet, some call bastion as the \"jump server\".", - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.BastionSpec"), + Description: "configureCBR0 enables the kublet to configure cbr0 based on Node.Spec.PodCIDR.", + Type: []string{"boolean"}, + Format: "", }, }, - "dns": { + "hairpinMode": { SchemaProps: spec.SchemaProps{ - Description: "DNS configures options relating to DNS, in particular whether we use a public or a private hosted zone", - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.DNSSpec"), + Description: "How should the kubelet configure the container bridge for hairpin packets. Setting this flag allows endpoints in a Service to loadbalance back to themselves if they should try to access their own Service. Values:\n \"promiscuous-bridge\": make the container bridge promiscuous.\n \"hairpin-veth\": set the hairpin flag on container veth interfaces.\n \"none\": do nothing.\nSetting --configure-cbr0 to false implies that to achieve hairpin NAT one must set --hairpin-mode=veth-flag, because bridge assumes the existence of a container bridge named cbr0.", + Type: []string{"string"}, + Format: "", }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/kops/pkg/apis/kops/v1alpha1.BastionSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.DNSSpec"}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.UserData": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "UserData defines a user-data section", - Properties: map[string]spec.Schema{ - "name": { + "babysitDaemons": { SchemaProps: spec.SchemaProps{ - Description: "Name is the name of the user-data", - Type: []string{"string"}, + Description: "The node has babysitter process monitoring docker and kubelet. Removed as of 1.7", + Type: []string{"boolean"}, Format: "", }, }, - "type": { + "maxPods": { SchemaProps: spec.SchemaProps{ - Description: "Type is the type of user-data", + Description: "MaxPods is the number of pods that can run on this Kubelet.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "nvidiaGPUs": { + SchemaProps: spec.SchemaProps{ + Description: "NvidiaGPUs is the number of NVIDIA GPU devices on this node.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "podCIDR": { + SchemaProps: spec.SchemaProps{ + Description: "PodCIDR is the CIDR to use for pod IP addresses, only used in standalone mode. In cluster mode, this is obtained from the master.", Type: []string{"string"}, Format: "", }, }, - "content": { + "resolvConf": { SchemaProps: spec.SchemaProps{ - Description: "Content is the user-data content", + Description: "ResolverConfig is the resolver configuration file used as the basis for the container DNS resolution configuration.\"), []", Type: []string{"string"}, Format: "", }, }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha1.WeaveNetworkingSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "WeaveNetworkingSpec declares that we want Weave networking", - Properties: map[string]spec.Schema{ - "mtu": { + "reconcileCIDR": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int32", + Description: "ReconcileCIDR is Reconcile node CIDR with the CIDR specified by the API server. No-op if register-node or configure-cbr0 is false.", + Type: []string{"boolean"}, + Format: "", }, }, - "connLimit": { + "registerSchedulable": { SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int32", + Description: "registerSchedulable tells the kubelet to register the node as schedulable. No-op if register-node is false.", + Type: []string{"boolean"}, + Format: "", }, }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha2.AccessSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AccessSpec provides configuration details related to kubeapi dns and ELB access", - Properties: map[string]spec.Schema{ - "dns": { + "serializeImagePulls": { SchemaProps: spec.SchemaProps{ - Description: "DNS will be used to provide config on kube-apiserver elb dns", - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha2.DNSAccessSpec"), + Description: "// SerializeImagePulls when enabled, tells the Kubelet to pull images one // at a time. We recommend *not* changing the default value on nodes that // run docker daemon with version < 1.9 or an Aufs storage backend. // Issue #10959 has more details.", + Type: []string{"boolean"}, + Format: "", }, }, - "loadBalancer": { + "nodeLabels": { SchemaProps: spec.SchemaProps{ - Description: "LoadBalancer is the configuration for the kube-apiserver ELB", - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha2.LoadBalancerAccessSpec"), + Description: "NodeLabels to add when registering the node in the cluster.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/kops/pkg/apis/kops/v1alpha2.DNSAccessSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.LoadBalancerAccessSpec"}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha2.AddonSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AddonSpec defines an addon that we want to install in the cluster", - Properties: map[string]spec.Schema{ - "manifest": { + "nonMasqueradeCIDR": { SchemaProps: spec.SchemaProps{ - Description: "Manifest is a path to the manifest that defines the addon", + Description: "NonMasqueradeCIDR configures masquerading: traffic to IPs outside this range will use IP masquerade.", Type: []string{"string"}, Format: "", }, }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha2.AlwaysAllowAuthorizationSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{}, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha2.AmazonVPCNetworkingSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AmazonVPCNetworkingSpec declares that we want Amazon VPC CNI networking", - Properties: map[string]spec.Schema{ - "imageName": { + "enableCustomMetrics": { SchemaProps: spec.SchemaProps{ - Description: "The container image name to use, which by default is: 602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon-k8s-cni:1.0.0", - Type: []string{"string"}, + Description: "Enable gathering custom metrics.", + Type: []string{"boolean"}, Format: "", }, }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha2.Assets": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Assets defined the privately hosted assets", - Properties: map[string]spec.Schema{ - "containerRegistry": { + "networkPluginMTU": { SchemaProps: spec.SchemaProps{ - Description: "ContainerRegistry is a url for to a docker registry", + Description: "NetworkPluginMTU is the MTU to be passed to the network plugin, and overrides the default MTU for cases where it cannot be automatically computed (such as IPSEC).", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "imageGCHighThresholdPercent": { + SchemaProps: spec.SchemaProps{ + Description: "ImageGCHighThresholdPercent is the percent of disk usage after which image garbage collection is always run.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "imageGCLowThresholdPercent": { + SchemaProps: spec.SchemaProps{ + Description: "ImageGCLowThresholdPercent is the percent of disk usage before which image garbage collection is never run. Lowest disk usage to garbage collect to.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "imagePullProgressDeadline": { + SchemaProps: spec.SchemaProps{ + Description: "ImagePullProgressDeadline is the timeout for image pulls If no pulling progress is made before this deadline, the image pulling will be cancelled. (default 1m0s)", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "evictionHard": { + SchemaProps: spec.SchemaProps{ + Description: "Comma-delimited list of hard eviction expressions. For example, 'memory.available<300Mi'.", Type: []string{"string"}, Format: "", }, }, - "fileRepository": { + "evictionSoft": { SchemaProps: spec.SchemaProps{ - Description: "FileRepository is the url for a private file serving repository", + Description: "Comma-delimited list of soft eviction expressions. For example, 'memory.available<300Mi'.", Type: []string{"string"}, Format: "", }, }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha2.AuthenticationSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{ - "kopeio": { + "evictionSoftGracePeriod": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha2.KopeioAuthenticationSpec"), + Description: "Comma-delimited list of grace periods for each soft eviction signal. For example, 'memory.available=30s'.", + Type: []string{"string"}, + Format: "", }, }, - "heptio": { + "evictionPressureTransitionPeriod": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha2.HeptioAuthenticationSpec"), + Description: "Duration for which the kubelet has to wait before transitioning out of an eviction pressure condition.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/kops/pkg/apis/kops/v1alpha2.HeptioAuthenticationSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.KopeioAuthenticationSpec"}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha2.AuthorizationSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{ - "alwaysAllow": { + "evictionMaxPodGracePeriod": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha2.AlwaysAllowAuthorizationSpec"), + Description: "Maximum allowed grace period (in seconds) to use when terminating pods in response to a soft eviction threshold being met.", + Type: []string{"integer"}, + Format: "int32", }, }, - "rbac": { + "evictionMinimumReclaim": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha2.RBACAuthorizationSpec"), + Description: "Comma-delimited list of minimum reclaims (e.g. imagefs.available=2Gi) that describes the minimum amount of resource the kubelet will reclaim when performing a pod eviction if that resource is under pressure.", + Type: []string{"string"}, + Format: "", }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/kops/pkg/apis/kops/v1alpha2.AlwaysAllowAuthorizationSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.RBACAuthorizationSpec"}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha2.BastionSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{ - "bastionPublicName": { + "volumePluginDirectory": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Description: "The full path of the directory in which to search for additional third party volume plugins", + Type: []string{"string"}, + Format: "", }, }, - "idleTimeoutSeconds": { + "taints": { SchemaProps: spec.SchemaProps{ - Description: "IdleTimeoutSeconds is the bastion's Loadbalancer idle timeout", - Type: []string{"integer"}, - Format: "int64", + Description: "Taints to add when registering a node in the cluster", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, }, }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha2.CNINetworkingSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CNINetworkingSpec is the specification for networking that is implemented by a Daemonset Networking is not managed by kops - we can create options here that directly configure e.g. weave but this is useful for arbitrary network modes or for modes that don't need additional configuration.", + "featureGates": { + SchemaProps: spec.SchemaProps{ + Description: "FeatureGates is set of key=value pairs that describe feature gates for alpha/experimental features.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "kubeReserved": { + SchemaProps: spec.SchemaProps{ + Description: "Resource reservation for kubernetes system daemons like the kubelet, container runtime, node problem detector, etc.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "kubeReservedCgroup": { + SchemaProps: spec.SchemaProps{ + Description: "Control group for kube daemons.", + Type: []string{"string"}, + Format: "", + }, + }, + "systemReserved": { + SchemaProps: spec.SchemaProps{ + Description: "Capture resource reservation for OS system daemons like sshd, udev, etc.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "systemReservedCgroup": { + SchemaProps: spec.SchemaProps{ + Description: "Parent control group for OS system daemons.", + Type: []string{"string"}, + Format: "", + }, + }, + "enforceNodeAllocatable": { + SchemaProps: spec.SchemaProps{ + Description: "Enforce Allocatable across pods whenever the overall usage across all pods exceeds Allocatable.", + Type: []string{"string"}, + Format: "", + }, + }, + "runtimeRequestTimeout": { + SchemaProps: spec.SchemaProps{ + Description: "RuntimeRequestTimeout is timeout for runtime requests on - pull, logs, exec and attach", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "volumeStatsAggPeriod": { + SchemaProps: spec.SchemaProps{ + Description: "VolumeStatsAggPeriod is the interval for kubelet to calculate and cache the volume disk usage for all pods and volumes", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "failSwapOn": { + SchemaProps: spec.SchemaProps{ + Description: "Tells the Kubelet to fail to start if swap is enabled on the node.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "experimental_allowed_unsafe_sysctls": { + SchemaProps: spec.SchemaProps{ + Description: "ExperimentalAllowedUnsafeSysctls are passed to the kubelet config to whitelist allowable sysctls", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "streamingConnectionIdleTimeout": { + SchemaProps: spec.SchemaProps{ + Description: "StreamingConnectionIdleTimeout is the maximum time a streaming connection can be idle before the connection is automatically closed", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "dockerDisableSharedPID": { + SchemaProps: spec.SchemaProps{ + Description: "DockerDisableSharedPID uses a shared PID namespace for containers in a pod.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "rootDir": { + SchemaProps: spec.SchemaProps{ + Description: "RootDir is the directory path for managing kubelet files (volume mounts,etc)", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.KubenetNetworkingSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "KubenetNetworkingSpec is the specification for kubenet networking, largely integrated but intended to replace classic", Properties: map[string]spec.Schema{}, }, }, Dependencies: []string{}, }, - "k8s.io/kops/pkg/apis/kops/v1alpha2.CalicoNetworkingSpec": { + "k8s.io/kops/pkg/apis/kops/v1alpha1.KuberouterNetworkingSpec": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "CalicoNetworkingSpec declares that we want Calico networking", + Description: "KuberouterNetworkingSpec declares that we want Kube-router networking", + Properties: map[string]spec.Schema{}, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.LeaderElectionConfiguration": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "LeaderElectionConfiguration defines the configuration of leader election clients for components that can run with leader election enabled.", Properties: map[string]spec.Schema{ - "crossSubnet": { + "leaderElect": { + SchemaProps: spec.SchemaProps{ + Description: "leaderElect enables a leader election client to gain leadership before executing the main loop. Enable this when running replicated components for high availability.", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.LoadBalancer": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "LoadBalancers defines a load balancer", + Properties: map[string]spec.Schema{ + "loadBalancerName": { + SchemaProps: spec.SchemaProps{ + Description: "LoadBalancerName to associate with this instance group (AWS ELB)", + Type: []string{"string"}, + Format: "", + }, + }, + "targetGroupArn": { + SchemaProps: spec.SchemaProps{ + Description: "TargetGroupARN to associate with this instance group (AWS ALB/NLB)", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.LoadBalancerAccessSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "LoadBalancerAccessSpec provides configuration details related to API LoadBalancer and its access", + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "idleTimeoutSeconds": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int64", + }, + }, + "additionalSecurityGroups": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "useForInternalApi": { SchemaProps: spec.SchemaProps{ Type: []string{"boolean"}, Format: "", }, }, - "logSeverityScreen": { + "sslCertificate": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.NetworkingSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NetworkingSpec allows selection and configuration of a networking plugin", + Properties: map[string]spec.Schema{ + "classic": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.ClassicNetworkingSpec"), + }, + }, + "kubenet": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.KubenetNetworkingSpec"), + }, + }, + "external": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.ExternalNetworkingSpec"), + }, + }, + "cni": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.CNINetworkingSpec"), + }, + }, + "kopeio": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.KopeioNetworkingSpec"), + }, + }, + "weave": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.WeaveNetworkingSpec"), + }, + }, + "flannel": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.FlannelNetworkingSpec"), + }, + }, + "calico": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.CalicoNetworkingSpec"), + }, + }, + "canal": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.CanalNetworkingSpec"), + }, + }, + "kuberouter": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.KuberouterNetworkingSpec"), + }, + }, + "romana": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.RomanaNetworkingSpec"), + }, + }, + "amazonvpc": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.AmazonVPCNetworkingSpec"), + }, + }, + "cilium": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.CiliumNetworkingSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/kops/pkg/apis/kops/v1alpha1.AmazonVPCNetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.CNINetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.CalicoNetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.CanalNetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.CiliumNetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.ClassicNetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.ExternalNetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.FlannelNetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.KopeioNetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.KubenetNetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.KuberouterNetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.RomanaNetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.WeaveNetworkingSpec"}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.NodeAuthorizationSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeAuthorizationSpec is used to node authorization", + Properties: map[string]spec.Schema{ + "nodeAuthorizer": { + SchemaProps: spec.SchemaProps{ + Description: "NodeAuthorizer defined the configuration for the node authorizer", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.NodeAuthorizerSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/kops/pkg/apis/kops/v1alpha1.NodeAuthorizerSpec"}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.NodeAuthorizerSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeAuthorizerSpec defines the configuration for a node authorizer", + Properties: map[string]spec.Schema{ + "authorizer": { + SchemaProps: spec.SchemaProps{ + Description: "Authorizer is the authorizer to use", + Type: []string{"string"}, + Format: "", + }, + }, + "features": { + SchemaProps: spec.SchemaProps{ + Description: "Features is a series of authorizer features to enable or disable", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "image": { + SchemaProps: spec.SchemaProps{ + Description: "Image is the location of container", + Type: []string{"string"}, + Format: "", + }, + }, + "nodeURL": { + SchemaProps: spec.SchemaProps{ + Description: "NodeURL is the node authorization service url", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Description: "Port is the port the service is running on the master", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "timeout": { + SchemaProps: spec.SchemaProps{ + Description: "Timeout the max time for authorization request", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "tokenTTL": { + SchemaProps: spec.SchemaProps{ + Description: "TokenTTL is the max ttl for an issued token", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.RBACAuthorizationSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Properties: map[string]spec.Schema{}, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.RomanaNetworkingSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RomanaNetworkingSpec declares that we want Romana networking", + Properties: map[string]spec.Schema{ + "daemonServiceIP": { + SchemaProps: spec.SchemaProps{ + Description: "DaemonServiceIP is the Kubernetes Service IP for the romana-daemon pod", + Type: []string{"string"}, + Format: "", + }, + }, + "etcdServiceIP": { + SchemaProps: spec.SchemaProps{ + Description: "EtcdServiceIP is the Kubernetes Service IP for the etcd backend used by Romana", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.SSHCredential": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SSHCredential represent a set of kops secrets", + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + 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/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + 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/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.SSHCredentialSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/kops/pkg/apis/kops/v1alpha1.SSHCredentialSpec"}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.SSHCredentialList": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + 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/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + 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/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.SSHCredential"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/kops/pkg/apis/kops/v1alpha1.SSHCredential"}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.SSHCredentialSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Properties: map[string]spec.Schema{ + "publicKey": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.TargetSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TargetSpec allows for specifying target config in an extensible way", + Properties: map[string]spec.Schema{ + "terraform": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.TerraformSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/kops/pkg/apis/kops/v1alpha1.TerraformSpec"}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.TerraformSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TerraformSpec allows us to specify terraform config in an extensible way", + Properties: map[string]spec.Schema{ + "providerExtraConfig": { + SchemaProps: spec.SchemaProps{ + Description: "ProviderExtraConfig contains key/value pairs to add to the rendered terraform \"provider\" block", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.TopologySpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Properties: map[string]spec.Schema{ + "masters": { + SchemaProps: spec.SchemaProps{ + Description: "The environment to launch the Kubernetes masters in public|private", + Type: []string{"string"}, + Format: "", + }, + }, + "nodes": { + SchemaProps: spec.SchemaProps{ + Description: "The environment to launch the Kubernetes nodes in public|private", + Type: []string{"string"}, + Format: "", + }, + }, + "bastion": { + SchemaProps: spec.SchemaProps{ + Description: "Bastion provide an external facing point of entry into a network containing private network instances. This host can provide a single point of fortification or audit and can be started and stopped to enable or disable inbound SSH communication from the Internet, some call bastion as the \"jump server\".", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.BastionSpec"), + }, + }, + "dns": { + SchemaProps: spec.SchemaProps{ + Description: "DNS configures options relating to DNS, in particular whether we use a public or a private hosted zone", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha1.DNSSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/kops/pkg/apis/kops/v1alpha1.BastionSpec", "k8s.io/kops/pkg/apis/kops/v1alpha1.DNSSpec"}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.UserData": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "UserData defines a user-data section", + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the name of the user-data", + Type: []string{"string"}, + Format: "", + }, + }, + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type is the type of user-data", + Type: []string{"string"}, + Format: "", + }, + }, + "content": { + SchemaProps: spec.SchemaProps{ + Description: "Content is the user-data content", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha1.WeaveNetworkingSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "WeaveNetworkingSpec declares that we want Weave networking", + Properties: map[string]spec.Schema{ + "mtu": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + "connLimit": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha2.AccessSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AccessSpec provides configuration details related to kubeapi dns and ELB access", + Properties: map[string]spec.Schema{ + "dns": { + SchemaProps: spec.SchemaProps{ + Description: "DNS will be used to provide config on kube-apiserver elb dns", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha2.DNSAccessSpec"), + }, + }, + "loadBalancer": { + SchemaProps: spec.SchemaProps{ + Description: "LoadBalancer is the configuration for the kube-apiserver ELB", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha2.LoadBalancerAccessSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/kops/pkg/apis/kops/v1alpha2.DNSAccessSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.LoadBalancerAccessSpec"}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha2.AddonSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AddonSpec defines an addon that we want to install in the cluster", + Properties: map[string]spec.Schema{ + "manifest": { + SchemaProps: spec.SchemaProps{ + Description: "Manifest is a path to the manifest that defines the addon", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha2.AlwaysAllowAuthorizationSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Properties: map[string]spec.Schema{}, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha2.AmazonVPCNetworkingSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AmazonVPCNetworkingSpec declares that we want Amazon VPC CNI networking", + Properties: map[string]spec.Schema{ + "imageName": { + SchemaProps: spec.SchemaProps{ + Description: "The container image name to use, which by default is: 602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon-k8s-cni:1.0.0", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha2.Assets": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Assets defined the privately hosted assets", + Properties: map[string]spec.Schema{ + "containerRegistry": { + SchemaProps: spec.SchemaProps{ + Description: "ContainerRegistry is a url for to a docker registry", + Type: []string{"string"}, + Format: "", + }, + }, + "fileRepository": { + SchemaProps: spec.SchemaProps{ + Description: "FileRepository is the url for a private file serving repository", + Type: []string{"string"}, + Format: "", + }, + }, + "containerProxy": { + SchemaProps: spec.SchemaProps{ + Description: "ContainerProxy is a url for a pull-through proxy of a docker registry", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha2.AuthenticationSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Properties: map[string]spec.Schema{ + "kopeio": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha2.KopeioAuthenticationSpec"), + }, + }, + "aws": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha2.AwsAuthenticationSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/kops/pkg/apis/kops/v1alpha2.AwsAuthenticationSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.KopeioAuthenticationSpec"}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha2.AuthorizationSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Properties: map[string]spec.Schema{ + "alwaysAllow": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha2.AlwaysAllowAuthorizationSpec"), + }, + }, + "rbac": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha2.RBACAuthorizationSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/kops/pkg/apis/kops/v1alpha2.AlwaysAllowAuthorizationSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.RBACAuthorizationSpec"}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha2.AwsAuthenticationSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Properties: map[string]spec.Schema{}, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha2.BastionSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Properties: map[string]spec.Schema{ + "bastionPublicName": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "idleTimeoutSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "IdleTimeoutSeconds is the bastion's Loadbalancer idle timeout", + Type: []string{"integer"}, + Format: "int64", + }, + }, + }, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha2.CNINetworkingSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CNINetworkingSpec is the specification for networking that is implemented by a Daemonset Networking is not managed by kops - we can create options here that directly configure e.g. weave but this is useful for arbitrary network modes or for modes that don't need additional configuration.", + Properties: map[string]spec.Schema{ + "usesSecondaryIP": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha2.CalicoNetworkingSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CalicoNetworkingSpec declares that we want Calico networking", + Properties: map[string]spec.Schema{ + "crossSubnet": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "logSeverityScreen": { + SchemaProps: spec.SchemaProps{ + Description: "LogSeverityScreen lets us set the desired log level. (Default: info)", + Type: []string{"string"}, + Format: "", + }, + }, + "mtu": { + SchemaProps: spec.SchemaProps{ + Description: "MTU to be set in the cni-network-config for calico.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "prometheusMetricsEnabled": { + SchemaProps: spec.SchemaProps{ + Description: "PrometheusMetricsEnabled can be set to enable the experimental Prometheus metrics server (default: false)", + Type: []string{"boolean"}, + Format: "", + }, + }, + "prometheusMetricsPort": { + SchemaProps: spec.SchemaProps{ + Description: "PrometheusMetricsPort is the TCP port that the experimental Prometheus metrics server should bind to (default: 9091)", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "prometheusGoMetricsEnabled": { + SchemaProps: spec.SchemaProps{ + Description: "PrometheusGoMetricsEnabled enables Prometheus Go runtime metrics collection", + Type: []string{"boolean"}, + Format: "", + }, + }, + "prometheusProcessMetricsEnabled": { + SchemaProps: spec.SchemaProps{ + Description: "PrometheusProcessMetricsEnabled enables Prometheus process metrics collection", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha2.CanalNetworkingSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CanalNetworkingSpec declares that we want Canal networking", + Properties: map[string]spec.Schema{ + "chainInsertMode": { + SchemaProps: spec.SchemaProps{ + Description: "ChainInsertMode controls whether Felix inserts rules to the top of iptables chains, or appends to the bottom. Leaving the default option is safest to prevent accidentally breaking connectivity. Default: 'insert' (other options: 'append')", + Type: []string{"string"}, + Format: "", + }, + }, + "defaultEndpointToHostAction": { + SchemaProps: spec.SchemaProps{ + Description: "DefaultEndpointToHostAction allows users to configure the default behaviour for traffic between pod to host after calico rules have been processed. Default: ACCEPT (other options: DROP, RETURN)", + Type: []string{"string"}, + Format: "", + }, + }, + "logSeveritySys": { + SchemaProps: spec.SchemaProps{ + Description: "LogSeveritySys the severity to set for logs which are sent to syslog Default: INFO (other options: DEBUG, WARNING, ERROR, CRITICAL, NONE)", + Type: []string{"string"}, + Format: "", + }, + }, + "prometheusGoMetricsEnabled": { + SchemaProps: spec.SchemaProps{ + Description: "PrometheusGoMetricsEnabled enables Prometheus Go runtime metrics collection", + Type: []string{"boolean"}, + Format: "", + }, + }, + "prometheusMetricsEnabled": { + SchemaProps: spec.SchemaProps{ + Description: "PrometheusMetricsEnabled can be set to enable the experimental Prometheus metrics server (default: false)", + Type: []string{"boolean"}, + Format: "", + }, + }, + "prometheusMetricsPort": { + SchemaProps: spec.SchemaProps{ + Description: "PrometheusMetricsPort is the TCP port that the experimental Prometheus metrics server should bind to (default: 9091)", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "prometheusProcessMetricsEnabled": { + SchemaProps: spec.SchemaProps{ + Description: "PrometheusProcessMetricsEnabled enables Prometheus process metrics collection", + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha2.CiliumNetworkingSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CiliumNetworkingSpec declares that we want Cilium networking", + Properties: map[string]spec.Schema{ + "version": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "accessLog": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "agentLabels": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "allowLocalhost": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "autoIpv6NodeRoutes": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "bpfRoot": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "containerRuntime": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "containerRuntimeEndpoint": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "debug": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "debugVerbose": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "device": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "disableConntrack": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "disableIpv4": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "disableK8sServices": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "enablePolicy": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "enableTracing": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "envoyLog": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "ipv4ClusterCidrMaskSize": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + "ipv4Node": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "ipv4Range": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "ipv4ServiceRange": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "ipv6ClusterAllocCidr": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "ipv6Node": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "ipv6Range": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "ipv6ServiceRange": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "k8sApiServer": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "k8sKubeconfigPath": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "keepBpfTemplates": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "keepConfig": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "labelPrefixFile": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "labels": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "lb": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "libDir": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "logDriver": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "logOpt": { + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "logstash": { SchemaProps: spec.SchemaProps{ - Description: "LogSeverityScreen lets us set the desired log level. (Default: info)", - Type: []string{"string"}, - Format: "", + Type: []string{"boolean"}, + Format: "", }, }, - "prometheusMetricsEnabled": { + "logstashAgent": { SchemaProps: spec.SchemaProps{ - Description: "PrometheusMetricsEnabled can be set to enable the experimental Prometheus metrics server (default: false)", - Type: []string{"boolean"}, - Format: "", + Type: []string{"string"}, + Format: "", }, }, - "prometheusMetricsPort": { + "logstashProbeTimer": { SchemaProps: spec.SchemaProps{ - Description: "PrometheusMetricsPort is the TCP port that the experimental Prometheus metrics server should bind to (default: 9091)", - Type: []string{"integer"}, - Format: "int32", + Type: []string{"integer"}, + Format: "int64", }, }, - "prometheusGoMetricsEnabled": { + "disableMasquerade": { SchemaProps: spec.SchemaProps{ - Description: "PrometheusGoMetricsEnabled enables Prometheus Go runtime metrics collection", - Type: []string{"boolean"}, - Format: "", + Type: []string{"boolean"}, + Format: "", }, }, - "prometheusProcessMetricsEnabled": { + "nat46Range": { SchemaProps: spec.SchemaProps{ - Description: "PrometheusProcessMetricsEnabled enables Prometheus process metrics collection", - Type: []string{"boolean"}, - Format: "", + Type: []string{"string"}, + Format: "", }, }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha2.CanalNetworkingSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CanalNetworkingSpec declares that we want Canal networking", - Properties: map[string]spec.Schema{ - "chainInsertMode": { + "pprof": { SchemaProps: spec.SchemaProps{ - Description: "ChainInsertMode controls whether Felix inserts rules to the top of iptables chains, or appends to the bottom. Leaving the default option is safest to prevent accidentally breaking connectivity. Default: 'insert' (other options: 'append')", - Type: []string{"string"}, - Format: "", + Type: []string{"boolean"}, + Format: "", }, }, - "defaultEndpointToHostAction": { + "prefilterDevice": { SchemaProps: spec.SchemaProps{ - Description: "DefaultEndpointToHostAction allows users to configure the default behaviour for traffic between pod to host after calico rules have been processed. Default: ACCEPT (other options: DROP, RETURN)", - Type: []string{"string"}, - Format: "", + Type: []string{"string"}, + Format: "", }, }, - "logSeveritySys": { + "prometheusServeAddr": { SchemaProps: spec.SchemaProps{ - Description: "LogSeveritySys the severity to set for logs which are sent to syslog Default: INFO (other options: DEBUG, WARNING, ERROR, CRITICAL, NONE)", - Type: []string{"string"}, - Format: "", + Type: []string{"string"}, + Format: "", }, }, - "prometheusGoMetricsEnabled": { + "restore": { SchemaProps: spec.SchemaProps{ - Description: "PrometheusGoMetricsEnabled enables Prometheus Go runtime metrics collection", - Type: []string{"boolean"}, - Format: "", + Type: []string{"boolean"}, + Format: "", }, }, - "prometheusMetricsEnabled": { + "singleClusterRoute": { SchemaProps: spec.SchemaProps{ - Description: "PrometheusMetricsEnabled can be set to enable the experimental Prometheus metrics server (default: false)", - Type: []string{"boolean"}, - Format: "", + Type: []string{"boolean"}, + Format: "", }, }, - "prometheusMetricsPort": { + "socketPath": { SchemaProps: spec.SchemaProps{ - Description: "PrometheusMetricsPort is the TCP port that the experimental Prometheus metrics server should bind to (default: 9091)", - Type: []string{"integer"}, - Format: "int32", + Type: []string{"string"}, + Format: "", }, }, - "prometheusProcessMetricsEnabled": { + "stateDir": { SchemaProps: spec.SchemaProps{ - Description: "PrometheusProcessMetricsEnabled enables Prometheus process metrics collection", - Type: []string{"boolean"}, - Format: "", + Type: []string{"string"}, + Format: "", }, }, - }, - }, - }, - Dependencies: []string{}, - }, - "k8s.io/kops/pkg/apis/kops/v1alpha2.CiliumNetworkingSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CiliumNetworkingSpec declares that we want Cilium networking", - Properties: map[string]spec.Schema{ - "debug": { + "tracePayloadlen": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", + Type: []string{"integer"}, + Format: "int32", }, }, "tunnel": { @@ -29502,6 +30406,12 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha2.AuthorizationSpec"), }, }, + "nodeAuthorization": { + SchemaProps: spec.SchemaProps{ + Description: "NodeAuthorization defined the custom node authorization configuration", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha2.NodeAuthorizationSpec"), + }, + }, "cloudLabels": { SchemaProps: spec.SchemaProps{ Description: "Tags for AWS resources", @@ -29558,7 +30468,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA }, }, Dependencies: []string{ - "k8s.io/kops/pkg/apis/kops/v1alpha2.AccessSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.AddonSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.Assets", "k8s.io/kops/pkg/apis/kops/v1alpha2.AuthenticationSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.AuthorizationSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.CloudConfiguration", "k8s.io/kops/pkg/apis/kops/v1alpha2.CloudControllerManagerConfig", "k8s.io/kops/pkg/apis/kops/v1alpha2.ClusterSubnetSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.DockerConfig", "k8s.io/kops/pkg/apis/kops/v1alpha2.EgressProxySpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.EtcdClusterSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.ExternalDNSConfig", "k8s.io/kops/pkg/apis/kops/v1alpha2.FileAssetSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.HookSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.IAMSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.KubeAPIServerConfig", "k8s.io/kops/pkg/apis/kops/v1alpha2.KubeControllerManagerConfig", "k8s.io/kops/pkg/apis/kops/v1alpha2.KubeDNSConfig", "k8s.io/kops/pkg/apis/kops/v1alpha2.KubeProxyConfig", "k8s.io/kops/pkg/apis/kops/v1alpha2.KubeSchedulerConfig", "k8s.io/kops/pkg/apis/kops/v1alpha2.KubeletConfigSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.NetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.TargetSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.TopologySpec"}, + "k8s.io/kops/pkg/apis/kops/v1alpha2.AccessSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.AddonSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.Assets", "k8s.io/kops/pkg/apis/kops/v1alpha2.AuthenticationSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.AuthorizationSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.CloudConfiguration", "k8s.io/kops/pkg/apis/kops/v1alpha2.CloudControllerManagerConfig", "k8s.io/kops/pkg/apis/kops/v1alpha2.ClusterSubnetSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.DockerConfig", "k8s.io/kops/pkg/apis/kops/v1alpha2.EgressProxySpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.EtcdClusterSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.ExternalDNSConfig", "k8s.io/kops/pkg/apis/kops/v1alpha2.FileAssetSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.HookSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.IAMSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.KubeAPIServerConfig", "k8s.io/kops/pkg/apis/kops/v1alpha2.KubeControllerManagerConfig", "k8s.io/kops/pkg/apis/kops/v1alpha2.KubeDNSConfig", "k8s.io/kops/pkg/apis/kops/v1alpha2.KubeProxyConfig", "k8s.io/kops/pkg/apis/kops/v1alpha2.KubeSchedulerConfig", "k8s.io/kops/pkg/apis/kops/v1alpha2.KubeletConfigSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.NetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.NodeAuthorizationSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.TargetSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.TopologySpec"}, }, "k8s.io/kops/pkg/apis/kops/v1alpha2.ClusterSubnetSpec": { Schema: spec.Schema{ @@ -29678,6 +30588,13 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA Format: "", }, }, + "dataRoot": { + SchemaProps: spec.SchemaProps{ + Description: "DataRoot is the root directory of persistent docker state (default \"/var/lib/docker\")", + Type: []string{"string"}, + Format: "", + }, + }, "defaultUlimit": { SchemaProps: spec.SchemaProps{ Description: "DefaultUlimit is the ulimits for containers", @@ -29692,6 +30609,13 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA }, }, }, + "execRoot": { + SchemaProps: spec.SchemaProps{ + Description: "ExecRoot is the root directory for execution state files (default \"/var/run/docker\")", + Type: []string{"string"}, + Format: "", + }, + }, "hosts": { SchemaProps: spec.SchemaProps{ Description: "Hosts enables you to configure the endpoints the docker daemon listens on i.e tcp://0.0.0.0.2375 or unix:///var/run/docker.sock etc", @@ -29804,6 +30728,13 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA }, }, }, + "userNamespaceRemap": { + SchemaProps: spec.SchemaProps{ + Description: "UserNamespaceRemap sets the user namespace remapping option for the docker daemon", + Type: []string{"string"}, + Format: "", + }, + }, "version": { SchemaProps: spec.SchemaProps{ Description: "Version is consumed by the nodeup and used to pick the docker version", @@ -30195,14 +31126,6 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA }, Dependencies: []string{}, }, - "k8s.io/kops/pkg/apis/kops/v1alpha2.HeptioAuthenticationSpec": { - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Properties: map[string]spec.Schema{}, - }, - }, - Dependencies: []string{}, - }, "k8s.io/kops/pkg/apis/kops/v1alpha2.HookSpec": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -30403,7 +31326,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "k8s.io/kops/pkg/apis/kops/v1alpha2.InstanceGroupSpec": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "InstanceGroupSpec is the specification for a instanceGroup", + Description: "InstanceGroupSpec is the specification for an instanceGroup", Properties: map[string]spec.Schema{ "role": { SchemaProps: spec.SchemaProps{ @@ -30632,6 +31555,19 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA }, }, }, + "externalLoadBalancers": { + SchemaProps: spec.SchemaProps{ + Description: "ExternalLoadBalancers define loadbalancers that should be attached to the instancegroup", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha2.LoadBalancer"), + }, + }, + }, + }, + }, "detailedInstanceMonitoring": { SchemaProps: spec.SchemaProps{ Description: "DetailedInstanceMonitoring defines if detailed-monitoring is enabled (AWS only)", @@ -30649,7 +31585,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA }, }, Dependencies: []string{ - "k8s.io/kops/pkg/apis/kops/v1alpha2.FileAssetSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.HookSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.IAMProfileSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.KubeletConfigSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.UserData"}, + "k8s.io/kops/pkg/apis/kops/v1alpha2.FileAssetSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.HookSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.IAMProfileSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.KubeletConfigSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.LoadBalancer", "k8s.io/kops/pkg/apis/kops/v1alpha2.UserData"}, }, "k8s.io/kops/pkg/apis/kops/v1alpha2.Keyset": { Schema: spec.Schema{ @@ -30876,6 +31812,13 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA Format: "", }, }, + "enableAggregatorRouting": { + SchemaProps: spec.SchemaProps{ + Description: "EnableAggregatorRouting enables aggregator routing requests to endpoints IP rather than cluster IP", + Type: []string{"boolean"}, + Format: "", + }, + }, "admissionControl": { SchemaProps: spec.SchemaProps{ Description: "Deprecated: AdmissionControl is a list of admission controllers to use", @@ -31318,6 +32261,13 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA Format: "", }, }, + "minRequestTimeout": { + SchemaProps: spec.SchemaProps{ + Description: "MinRequestTimeout configures the minimum number of seconds a handler must keep a request open before timing it out. Currently only honored by the watch request handler", + Type: []string{"integer"}, + Format: "int32", + }, + }, }, }, }, @@ -31691,6 +32641,20 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA }, }, }, + "conntrackMaxPerCore": { + SchemaProps: spec.SchemaProps{ + Description: "Maximum number of NAT connections to track per CPU core (default: 131072)", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "conntrackMin": { + SchemaProps: spec.SchemaProps{ + Description: "Minimum number of conntrack entries to allocate, regardless of conntrack-max-per-core", + Type: []string{"integer"}, + Format: "int32", + }, + }, }, }, }, @@ -32242,6 +33206,13 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA Format: "", }, }, + "rootDir": { + SchemaProps: spec.SchemaProps{ + Description: "RootDir is the directory path for managing kubelet files (volume mounts,etc)", + Type: []string{"string"}, + Format: "", + }, + }, }, }, }, @@ -32283,6 +33254,30 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA }, Dependencies: []string{}, }, + "k8s.io/kops/pkg/apis/kops/v1alpha2.LoadBalancer": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "LoadBalancer defines a load balancer", + Properties: map[string]spec.Schema{ + "loadBalancerName": { + SchemaProps: spec.SchemaProps{ + Description: "LoadBalancerName to associate with this instance group (AWS ELB)", + Type: []string{"string"}, + Format: "", + }, + }, + "targetGroupArn": { + SchemaProps: spec.SchemaProps{ + Description: "TargetGroupARN to associate with this instance group (AWS ALB/NLB)", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{}, + }, "k8s.io/kops/pkg/apis/kops/v1alpha2.LoadBalancerAccessSpec": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -32313,6 +33308,18 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA }, }, }, + "useForInternalApi": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "sslCertificate": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, }, }, }, @@ -32394,6 +33401,88 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA Dependencies: []string{ "k8s.io/kops/pkg/apis/kops/v1alpha2.AmazonVPCNetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.CNINetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.CalicoNetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.CanalNetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.CiliumNetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.ClassicNetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.ExternalNetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.FlannelNetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.KopeioNetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.KubenetNetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.KuberouterNetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.RomanaNetworkingSpec", "k8s.io/kops/pkg/apis/kops/v1alpha2.WeaveNetworkingSpec"}, }, + "k8s.io/kops/pkg/apis/kops/v1alpha2.NodeAuthorizationSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeAuthorizationSpec is used to node authorization", + Properties: map[string]spec.Schema{ + "nodeAuthorizer": { + SchemaProps: spec.SchemaProps{ + Description: "NodeAuthorizer defined the configuration for the node authorizer", + Ref: ref("k8s.io/kops/pkg/apis/kops/v1alpha2.NodeAuthorizerSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/kops/pkg/apis/kops/v1alpha2.NodeAuthorizerSpec"}, + }, + "k8s.io/kops/pkg/apis/kops/v1alpha2.NodeAuthorizerSpec": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NodeAuthorizerSpec defines the configuration for a node authorizer", + Properties: map[string]spec.Schema{ + "authorizer": { + SchemaProps: spec.SchemaProps{ + Description: "Authorizer is the authorizer to use", + Type: []string{"string"}, + Format: "", + }, + }, + "features": { + SchemaProps: spec.SchemaProps{ + Description: "Features is a series of authorizer features to enable or disable", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "image": { + SchemaProps: spec.SchemaProps{ + Description: "Image is the location of container", + Type: []string{"string"}, + Format: "", + }, + }, + "nodeURL": { + SchemaProps: spec.SchemaProps{ + Description: "NodeURL is the node authorization service url", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Description: "Port is the port the service is running on the master", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "timeout": { + SchemaProps: spec.SchemaProps{ + Description: "Timeout the max time for authorization request", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + "tokenTTL": { + SchemaProps: spec.SchemaProps{ + Description: "TokenTTL is the max ttl for an issued token", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, + }, "k8s.io/kops/pkg/apis/kops/v1alpha2.RBACAuthorizationSpec": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ diff --git a/vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/BUILD.bazel b/vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/BUILD.bazel new file mode 100644 index 0000000000000..ed95d9d207bca --- /dev/null +++ b/vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/BUILD.bazel @@ -0,0 +1,21 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") + +go_library( + name = "go_default_library", + srcs = ["main.go"], + importmap = "vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen", + importpath = "github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen", + visibility = ["//visibility:private"], + deps = [ + "//vendor/github.com/golang/glog:go_default_library", + "//vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators:go_default_library", + "//vendor/k8s.io/apiserver/pkg/util/logs:go_default_library", + "//vendor/k8s.io/gengo/args:go_default_library", + ], +) + +go_binary( + name = "apiregister-gen", + embed = [":go_default_library"], + visibility = ["//visibility:public"], +) diff --git a/vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/BUILD.bazel b/vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/BUILD.bazel new file mode 100644 index 0000000000000..f364acceb0eeb --- /dev/null +++ b/vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/BUILD.bazel @@ -0,0 +1,28 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "go_default_library", + srcs = [ + "apis_generator.go", + "controller_generator.go", + "install_generator.go", + "package.go", + "parser.go", + "unversioned_generator.go", + "util.go", + "versioned_generator.go", + ], + importmap = "vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators", + importpath = "github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators", + visibility = ["//visibility:public"], + deps = [ + "//vendor/github.com/markbates/inflect:go_default_library", + "//vendor/github.com/pkg/errors:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", + "//vendor/k8s.io/gengo/args:go_default_library", + "//vendor/k8s.io/gengo/generator:go_default_library", + "//vendor/k8s.io/gengo/namer:go_default_library", + "//vendor/k8s.io/gengo/types:go_default_library", + ], +) diff --git a/vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/apis_generator.go b/vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/apis_generator.go new file mode 100644 index 0000000000000..8eae5f250d8b6 --- /dev/null +++ b/vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/apis_generator.go @@ -0,0 +1,100 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package generators + +import ( + "io" + "text/template" + + "fmt" + + "k8s.io/gengo/generator" +) + +type apiGenerator struct { + generator.DefaultGen + apis *APIs +} + +var _ generator.Generator = &apiGenerator{} + +func CreateApisGenerator(apis *APIs, filename string) generator.Generator { + return &apiGenerator{ + generator.DefaultGen{OptionalName: filename}, + apis, + } +} + +func (d *apiGenerator) Imports(c *generator.Context) []string { + imports := []string{ + "github.com/kubernetes-incubator/apiserver-builder/pkg/builders", + } + for _, group := range d.apis.Groups { + imports = append(imports, group.PkgPath) + for _, version := range group.Versions { + imports = append(imports, fmt.Sprintf( + "%s%s \"%s\"", group.Group, version.Version, version.Pkg.Path)) + } + } + return imports +} + +func (d *apiGenerator) Finalize(context *generator.Context, w io.Writer) error { + temp := template.Must(template.New("apis-template").Parse(APIsTemplate)) + err := temp.Execute(w, d.apis) + if err != nil { + return err + } + return err +} + +var APIsTemplate = ` +// GetAllApiBuilders returns all known APIGroupBuilders +// so they can be registered with the apiserver +func GetAllApiBuilders() []*builders.APIGroupBuilder { + return []*builders.APIGroupBuilder{ + {{ range $group := .Groups -}} + Get{{ $group.GroupTitle }}APIBuilder(), + {{ end -}} + } +} + +{{ range $group := .Groups -}} +var {{ $group.Group }}ApiGroup = builders.NewApiGroupBuilder( + "{{ $group.Group }}.{{ $group.Domain }}", + "{{ $group.PkgPath}}"). + WithUnVersionedApi({{ $group.Group }}.ApiVersion). + WithVersionedApis( + {{ range $version := $group.Versions -}} + {{ $group.Group }}{{ $version.Version }}.ApiVersion, + {{ end -}} + ). + WithRootScopedKinds( + {{ range $version := $group.Versions -}} + {{ range $res := $version.Resources -}} + {{ if $res.NonNamespaced -}} + "{{ $res.Kind }}", + {{ end -}} + {{ end -}} + {{ end -}} + ) + +func Get{{ $group.GroupTitle }}APIBuilder() *builders.APIGroupBuilder { + return {{ $group.Group }}ApiGroup +} +{{ end -}} +` diff --git a/vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/controller_generator.go b/vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/controller_generator.go new file mode 100644 index 0000000000000..a2f2cba715094 --- /dev/null +++ b/vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/controller_generator.go @@ -0,0 +1,357 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package generators + +import ( + "io" + "strings" + "text/template" + + "github.com/markbates/inflect" + "k8s.io/gengo/generator" +) + +type controllerGenerator struct { + generator.DefaultGen + controller Controller +} + +var _ generator.Generator = &controllerGenerator{} + +func CreateControllerGenerator(controller Controller, filename string) generator.Generator { + return &controllerGenerator{ + generator.DefaultGen{OptionalName: filename}, + controller, + } +} + +func (d *controllerGenerator) Imports(c *generator.Context) []string { + im := []string{ + "github.com/golang/glog", + "github.com/kubernetes-incubator/apiserver-builder/pkg/controller", + "k8s.io/apimachinery/pkg/api/errors", + "k8s.io/client-go/rest", + "k8s.io/client-go/tools/cache", + "k8s.io/client-go/util/workqueue", + d.controller.Repo + "/pkg/controller/sharedinformers", + } + + return im +} + +func (d *controllerGenerator) Finalize(context *generator.Context, w io.Writer) error { + temp := template.Must(template.New("controller-template").Funcs( + template.FuncMap{ + "title": strings.Title, + "plural": inflect.NewDefaultRuleset().Pluralize, + }, + ).Parse(ControllerAPITemplate)) + return temp.Execute(w, d.controller) +} + +var ControllerAPITemplate = ` +// {{.Target.Kind}}Controller implements the controller.{{.Target.Kind}}Controller interface +type {{.Target.Kind}}Controller struct { + queue *controller.QueueWorker + + // Handles messages + controller *{{.Target.Kind}}ControllerImpl + + Name string + + BeforeReconcile func(key string) + AfterReconcile func(key string, err error) + + Informers *sharedinformers.SharedInformers +} + +// NewController returns a new {{.Target.Kind}}Controller for responding to {{.Target.Kind}} events +func New{{.Target.Kind}}Controller(config *rest.Config, si *sharedinformers.SharedInformers) *{{.Target.Kind}}Controller { + q := workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "{{.Target.Kind}}") + + queue := &controller.QueueWorker{q, 10, "{{.Target.Kind}}", nil} + c := &{{.Target.Kind}}Controller{queue, nil, "{{.Target.Kind}}", nil, nil, si} + + // For non-generated code to add events + uc := &{{.Target.Kind}}ControllerImpl{} + var ci sharedinformers.Controller = uc + + // Call the Init method that is implemented. + // Support multiple Init methods for backwards compatibility + if i, ok := ci.(sharedinformers.LegacyControllerInit); ok { + i.Init(config, si, c.LookupAndReconcile) + } else if i, ok := ci.(sharedinformers.ControllerInit); ok { + i.Init(&sharedinformers.ControllerInitArgumentsImpl{si, config, c.LookupAndReconcile}) + } + + c.controller = uc + + queue.Reconcile = c.reconcile + if c.Informers.WorkerQueues == nil { + c.Informers.WorkerQueues = map[string]*controller.QueueWorker{} + } + c.Informers.WorkerQueues["{{.Target.Kind}}"] = queue + si.Factory.{{title .Target.Group}}().{{title .Target.Version}}().{{plural .Target.Kind }}().Informer(). + AddEventHandler(&controller.QueueingEventHandler{q, nil, false}) + return c +} + +func (c *{{.Target.Kind}}Controller) GetName() string { + return c.Name +} + +func (c *{{.Target.Kind}}Controller) LookupAndReconcile(key string) (err error) { + return c.reconcile(key) +} + +func (c *{{.Target.Kind}}Controller) reconcile(key string) (err error) { + var namespace, name string + + if c.BeforeReconcile != nil { + c.BeforeReconcile(key) + } + if c.AfterReconcile != nil { + // Wrap in a function so err is evaluated after it is set + defer func() { c.AfterReconcile(key, err) }() + } + + namespace, name, err = cache.SplitMetaNamespaceKey(key) + if err != nil { + return + } + + u, err := c.controller.Get(namespace, name) + if errors.IsNotFound(err) { + glog.Infof("Not doing work for {{.Target.Kind}} %v because it has been deleted", key) + // Set error so it is picked up by AfterReconcile and the return function + err = nil + return + } + if err != nil { + glog.Errorf("Unable to retrieve {{.Target.Kind}} %v from store: %v", key, err) + return + } + + // Set error so it is picked up by AfterReconcile and the return function + err = c.controller.Reconcile(u) + + return +} + +func (c *{{.Target.Kind}}Controller) Run(stopCh <-chan struct{}) { + for _, q := range c.Informers.WorkerQueues { + q.Run(stopCh) + } + controller.GetDefaults(c.controller).Run(stopCh) +} +` + +type allControllerGenerator struct { + generator.DefaultGen + Controllers []Controller +} + +var _ generator.Generator = &allControllerGenerator{} + +func CreateAllControllerGenerator(controllers []Controller, filename string) generator.Generator { + return &allControllerGenerator{ + generator.DefaultGen{OptionalName: filename}, + controllers, + } +} + +func (d *allControllerGenerator) Imports(c *generator.Context) []string { + if len(d.Controllers) == 0 { + return []string{} + } + + repo := d.Controllers[0].Repo + im := []string{ + "k8s.io/client-go/rest", + "github.com/kubernetes-incubator/apiserver-builder/pkg/controller", + repo + "/pkg/controller/sharedinformers", + } + + // Import package for each controller + repos := map[string]string{} + for _, c := range d.Controllers { + repos[c.Pkg.Path] = "" + } + for k, _ := range repos { + im = append(im, k) + } + + return im +} + +func (d *allControllerGenerator) Finalize(context *generator.Context, w io.Writer) error { + temp := template.Must(template.New("all-controller-template").Funcs( + template.FuncMap{ + "title": strings.Title, + "plural": inflect.NewDefaultRuleset().Pluralize, + }, + ).Parse(AllControllerAPITemplate)) + return temp.Execute(w, d) +} + +var AllControllerAPITemplate = ` + +func GetAllControllers(config *rest.Config) ([]controller.Controller, chan struct{}) { + shutdown := make(chan struct{}) + si := sharedinformers.NewSharedInformers(config, shutdown) + return []controller.Controller{ + {{ range $c := .Controllers -}} + {{ $c.Pkg.Name }}.New{{ $c.Target.Kind }}Controller(config, si), + {{ end -}} + }, shutdown +} + +` + +type informersGenerator struct { + generator.DefaultGen + Controllers []Controller +} + +var _ generator.Generator = &informersGenerator{} + +func CreateInformersGenerator(controllers []Controller, filename string) generator.Generator { + return &informersGenerator{ + generator.DefaultGen{OptionalName: filename}, + controllers, + } +} + +func (d *informersGenerator) Imports(c *generator.Context) []string { + if len(d.Controllers) == 0 { + return []string{} + } + + repo := d.Controllers[0].Repo + return []string{ + "time", + "github.com/kubernetes-incubator/apiserver-builder/pkg/controller", + "k8s.io/client-go/rest", + repo + "/pkg/client/clientset_generated/clientset", + repo + "/pkg/client/informers_generated/externalversions", + "k8s.io/client-go/tools/cache", + } +} + +func (d *informersGenerator) Finalize(context *generator.Context, w io.Writer) error { + temp := template.Must(template.New("informersGenerator-template").Funcs( + template.FuncMap{ + "title": strings.Title, + "plural": inflect.NewDefaultRuleset().Pluralize, + }, + ).Parse(InformersTemplate)) + return temp.Execute(w, d.Controllers) +} + +var InformersTemplate = ` +// SharedInformers wraps all informers used by controllers so that +// they are shared across controller implementations +type SharedInformers struct { + controller.SharedInformersDefaults + Factory externalversions.SharedInformerFactory +} + +// newSharedInformers returns a set of started informers +func NewSharedInformers(config *rest.Config, shutdown <-chan struct{}) *SharedInformers { + si := &SharedInformers{ + controller.SharedInformersDefaults{}, + externalversions.NewSharedInformerFactory(clientset.NewForConfigOrDie(config), 10*time.Minute), + } + if si.SetupKubernetesTypes() { + si.InitKubernetesInformers(config) + } + si.Init() + si.startInformers(shutdown) + si.StartAdditionalInformers(shutdown) + return si +} + +// startInformers starts all of the informers +func (si *SharedInformers) startInformers(shutdown <-chan struct{}) { + {{ range $c := . -}} + go si.Factory.{{title $c.Target.Group}}().{{title $c.Target.Version}}().{{plural $c.Target.Kind}}().Informer().Run(shutdown) + {{ end -}} +} + +// ControllerInitArguments are arguments provided to the Init function for a new controller. +type ControllerInitArguments interface { + // GetSharedInformers returns the SharedInformers that can be used to access + // informers and listers for watching and indexing Kubernetes Resources + GetSharedInformers() *SharedInformers + + // GetRestConfig returns the Config to create new client-go clients + GetRestConfig() *rest.Config + + // Watch uses resourceInformer to watch a resource. When create, update, or deletes + // to the resource type are encountered, watch uses watchResourceToReconcileResourceKey + // to lookup the key for the resource reconciled by the controller (maybe a different type + // than the watched resource), and enqueue it to be reconciled. + // watchName: name of the informer. may appear in logs + // resourceInformer: gotten from the SharedInformer. controls which resource type is watched + // getReconcileKey: takes an instance of the watched resource and returns + // a key for the reconciled resource type to enqueue. + Watch(watchName string, resourceInformer cache.SharedIndexInformer, + getReconcileKey func(interface{}) (string, error)) +} + +type ControllerInitArgumentsImpl struct { + Si *SharedInformers + Rc *rest.Config + Rk func(key string) error +} + +func (c ControllerInitArgumentsImpl) GetSharedInformers() *SharedInformers { + return c.Si +} + +func (c ControllerInitArgumentsImpl) GetRestConfig() *rest.Config { + return c.Rc +} + +// Watch uses resourceInformer to watch a resource. When create, update, or deletes +// to the resource type are encountered, watch uses watchResourceToReconcileResourceKey +// to lookup the key for the resource reconciled by the controller (maybe a different type +// than the watched resource), and enqueue it to be reconciled. +// watchName: name of the informer. may appear in logs +// resourceInformer: gotten from the SharedInformer. controls which resource type is watched +// getReconcileKey: takes an instance of the watched resource and returns +// a key for the reconciled resource type to enqueue. +func (c ControllerInitArgumentsImpl) Watch( + watchName string, resourceInformer cache.SharedIndexInformer, + getReconcileKey func(interface{}) (string, error)) { + c.Si.Watch(watchName, resourceInformer, getReconcileKey, c.Rk) +} + +type Controller interface {} + +// LegacyControllerInit old controllers may implement this, and we keep +// it for backwards compatibility. +type LegacyControllerInit interface { + Init(config *rest.Config, si *SharedInformers, r func(key string) error) +} + +// ControllerInit new controllers should implement this. It is more flexible in +// allowing additional options to be passed in +type ControllerInit interface { + Init(args ControllerInitArguments) +} +` diff --git a/vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/install_generator.go b/vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/install_generator.go new file mode 100644 index 0000000000000..4de6bba67ab24 --- /dev/null +++ b/vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/install_generator.go @@ -0,0 +1,68 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package generators + +import ( + "io" + "text/template" + + "path" + + "k8s.io/gengo/generator" +) + +type installGenerator struct { + generator.DefaultGen + apigroup *APIGroup +} + +var _ generator.Generator = &unversionedGenerator{} + +func CreateInstallGenerator(apigroup *APIGroup, filename string) generator.Generator { + return &installGenerator{ + generator.DefaultGen{OptionalName: filename}, + apigroup, + } +} + +func (d *installGenerator) Imports(c *generator.Context) []string { + return []string{ + "k8s.io/apimachinery/pkg/apimachinery/announced", + "k8s.io/apimachinery/pkg/apimachinery/registered", + "k8s.io/apimachinery/pkg/runtime", + path.Dir(d.apigroup.Pkg.Path), + } +} + +func (d *installGenerator) Finalize(context *generator.Context, w io.Writer) error { + temp := template.Must(template.New("install-template").Parse(InstallAPITemplate)) + err := temp.Execute(w, d.apigroup) + if err != nil { + return err + } + return err +} + +var InstallAPITemplate = ` +func Install( + groupFactoryRegistry announced.APIGroupFactoryRegistry, + registry *registered.APIRegistrationManager, + scheme *runtime.Scheme) { + + apis.Get{{ .GroupTitle }}APIBuilder().Install(groupFactoryRegistry, registry, scheme) +} +` diff --git a/vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/package.go b/vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/package.go new file mode 100644 index 0000000000000..ac5c1f61b1ed7 --- /dev/null +++ b/vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/package.go @@ -0,0 +1,178 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package generators + +import ( + "path" + "path/filepath" + "strings" + + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/gengo/args" + "k8s.io/gengo/generator" + "k8s.io/gengo/namer" + "k8s.io/gengo/types" + + "github.com/pkg/errors" +) + +// CustomArgs is used tby the go2idl framework to pass args specific to this +// generator. +type CustomArgs struct{} + +type Gen struct { + p []generator.Package +} + +func (g *Gen) Execute(arguments *args.GeneratorArgs) error { + return arguments.Execute( + g.NameSystems(), + g.DefaultNameSystem(), + g.Packages) +} + +// DefaultNameSystem returns the default name system for ordering the types to be +// processed by the generators in this package. +func (g *Gen) DefaultNameSystem() string { + return "public" +} + +// NameSystems returns the name system used by the generators in this package. +func (g *Gen) NameSystems() namer.NameSystems { + return namer.NameSystems{ + "public": namer.NewPublicNamer(1), + "raw": namer.NewRawNamer("", nil), + } +} + +func (g *Gen) ParsePackages(context *generator.Context, arguments *args.GeneratorArgs) (sets.String, sets.String, string, string) { + versionedPkgs := sets.NewString() + unversionedPkgs := sets.NewString() + mainPkg := "" + apisPkg := "" + for _, o := range context.Order { + if IsAPIResource(o) { + versioned := o.Name.Package + versionedPkgs.Insert(versioned) + unversioned := filepath.Dir(versioned) + unversionedPkgs.Insert(unversioned) + + if apis := filepath.Dir(unversioned); apis != apisPkg && len(apisPkg) > 0 { + panic(errors.Errorf( + "Found multiple apis directory paths: %v and %v", apisPkg, apis)) + } else { + apisPkg = apis + mainPkg = filepath.Dir(apisPkg) + } + } + } + return versionedPkgs, unversionedPkgs, apisPkg, mainPkg +} + +func (g *Gen) Packages(context *generator.Context, arguments *args.GeneratorArgs) generator.Packages { + g.p = generator.Packages{} + + b := NewAPIsBuilder(context, arguments) + for _, apigroup := range b.APIs.Groups { + for _, apiversion := range apigroup.Versions { + factory := &packageFactory{apiversion.Pkg.Path, arguments} + // Add generators for versioned types + gen := CreateVersionedGenerator(apiversion, apigroup, arguments.OutputFileBaseName) + g.p = append(g.p, factory.createPackage(gen)) + } + + factory := &packageFactory{apigroup.Pkg.Path, arguments} + gen := CreateUnversionedGenerator(apigroup, arguments.OutputFileBaseName) + g.p = append(g.p, factory.createPackage(gen)) + + factory = &packageFactory{path.Join(apigroup.Pkg.Path, "install"), arguments} + gen = CreateInstallGenerator(apigroup, arguments.OutputFileBaseName) + g.p = append(g.p, factory.createPackage(gen)) + } + + factory := &packageFactory{b.APIs.Pkg.Path, arguments} + gen := CreateApisGenerator(b.APIs, arguments.OutputFileBaseName) + g.p = append(g.p, factory.createPackage(gen)) + + // Add generators for Controllers. + repo := "" + for _, c := range b.Controllers { + repo = c.Repo + factory = &packageFactory{c.Pkg.Path, arguments} + cgen := CreateControllerGenerator(c, arguments.OutputFileBaseName) + g.p = append(g.p, factory.createPackage(cgen)) + } + + if len(b.Controllers) > 0 { + factory = &packageFactory{context.Universe[repo+"/pkg/controller"].Path, arguments} + cgen := CreateAllControllerGenerator(b.Controllers, arguments.OutputFileBaseName) + g.p = append(g.p, factory.createPackage(cgen)) + } + + if len(b.Controllers) > 0 { + factory = &packageFactory{context.Universe[repo+"/pkg/controller/sharedinformers"].Path, arguments} + cgen := CreateInformersGenerator(b.Controllers, arguments.OutputFileBaseName) + g.p = append(g.p, factory.createPackage(cgen)) + } + return g.p +} + +type packageFactory struct { + path string + arguments *args.GeneratorArgs +} + +// Creates a package with a generator +func (f *packageFactory) createPackage(gen generator.Generator) generator.Package { + path := f.path + name := strings.Split(filepath.Base(f.path), ".")[0] + return &generator.DefaultPackage{ + PackageName: name, + PackagePath: path, + HeaderText: f.getHeader(), + GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { + return []generator.Generator{gen} + }, + FilterFunc: func(c *generator.Context, t *types.Type) bool { + return t.Name.Package == f.path + }, + } +} + +// Returns the header for generated files +func (f *packageFactory) getHeader() []byte { + header := []byte(`/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by apiregister-gen. Do not edit it manually! + +`) + return header +} diff --git a/vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/parser.go b/vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/parser.go new file mode 100644 index 0000000000000..6444415e27765 --- /dev/null +++ b/vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/parser.go @@ -0,0 +1,761 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package generators + +import ( + "fmt" + "log" + "path" + "path/filepath" + "strings" + + "github.com/pkg/errors" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/gengo/args" + "k8s.io/gengo/generator" + "k8s.io/gengo/types" +) + +type APIs struct { + // Domain is the domain portion of the group - e.g. k8s.io + Domain string + // Package is the name of the go package the api group is under - e.g. github.com/pwittrock/apiserver-helloworld/apis + Package string + Pkg *types.Package + // Groups is a list of API groups + Groups map[string]*APIGroup +} + +type Controller struct { + Target schema.GroupVersionKind + Resource string + Pkg *types.Package + Repo string +} + +type APIGroup struct { + // Package is the name of the go package the api group is under - e.g. github.com/pwittrock/apiserver-helloworld/apis + Package string + // Domain is the domain portion of the group - e.g. k8s.io + Domain string + // Group is the short name of the group - e.g. mushroomkingdom + Group string + GroupTitle string + // Versions is the list of all versions for this group keyed by name + Versions map[string]*APIVersion + + UnversionedResources map[string]*APIResource + + // Structs is a list of unversioned definitions that must be generated + Structs []*Struct + Pkg *types.Package + PkgPath string +} + +type Struct struct { + // Name is the name of the type + Name string + // GenClient + GenClient bool + GenDeepCopy bool + NonNamespaced bool + + GenUnversioned bool + // Fields is the list of fields appearing in the struct + Fields []*Field +} + +type Field struct { + // Name is the name of the field + Name string + // For versioned Kubernetes types, this is the versioned package + VersionedPackage string + // For versioned Kubernetes types, this is the unversioned package + UnversionedImport string + UnversionedType string +} + +type APIVersion struct { + // Domain is the group domain - e.g. k8s.io + Domain string + // Group is the group name - e.g. mushroomkingdom + Group string + // Version is the api version - e.g. v1beta1 + Version string + // Resources is a list of resources appearing in the API version keyed by name + Resources map[string]*APIResource + // Pkg is the Package object from code-gen + Pkg *types.Package +} + +type APIResource struct { + // Domain is the group domain - e.g. k8s.io + Domain string + // Group is the group name - e.g. mushroomkingdom + Group string + // Version is the api version - e.g. v1beta1 + Version string + // Kind is the resource name - e.g. PeachesCastle + Kind string + // Resource is the resource name - e.g. peachescastles + Resource string + // REST is the rest.Storage implementation used to handle requests + // This field is optional. The standard REST implementation will be used + // by default. + REST string + // Subresources is a map of subresources keyed by name + Subresources map[string]*APISubresource + // Type is the Type object from code-gen + Type *types.Type + // Strategy is name of the struct to use for the strategy + Strategy string + // Strategy is name of the struct to use for the strategy + StatusStrategy string + // NonNamespaced indicates that the resource kind is non namespaced + NonNamespaced bool +} + +type APISubresource struct { + // Domain is the group domain - e.g. k8s.io + Domain string + // Group is the group name - e.g. mushroomkingdom + Group string + // Version is the api version - e.g. v1beta1 + Version string + // Kind is the resource name - e.g. PeachesCastle + Kind string + // Resource is the resource name - e.g. peachescastles + Resource string + // Request is the subresource request type - e.g. ScaleCastle + Request string + // REST is the rest.Storage implementation used to handle requests + REST string + // Path is the subresource path - e.g. scale + Path string + + // ImportPackage is the import statement that must appear for the Request + ImportPackage string + + // RequestType is the type of the request + RequestType *types.Type + + // RESTType is the type of the request handler + RESTType *types.Type +} + +type APIsBuilder struct { + context *generator.Context + arguments *args.GeneratorArgs + Domain string + VersionedPkgs sets.String + UnversionedPkgs sets.String + APIsPkg string + APIsPkgRaw *types.Package + GroupNames sets.String + + APIs *APIs + Controllers []Controller + + ByGroupKindVersion map[string]map[string]map[string]*APIResource + ByGroupVersionKind map[string]map[string]map[string]*APIResource + SubByGroupVersionKind map[string]map[string]map[string]*types.Type + Groups map[string]types.Package +} + +func NewAPIsBuilder(context *generator.Context, arguments *args.GeneratorArgs) *APIsBuilder { + b := &APIsBuilder{ + context: context, + arguments: arguments, + } + b.ParsePackages() + b.ParseDomain() + b.ParseGroupNames() + b.ParseIndex() + b.ParseControllers() + b.ParseAPIs() + + return b +} + +func (b *APIsBuilder) ParseControllers() { + for _, c := range b.context.Order { + if IsController(c) { + tags := ParseControllerTag(b.GetControllerTag(c)) + repo := strings.Split(c.Name.Package, "/pkg/controller")[0] + pkg := b.context.Universe[c.Name.Package] + b.Controllers = append(b.Controllers, Controller{ + tags.gvk, tags.resource, pkg, repo}) + } + } +} + +func (b *APIsBuilder) ParseAPIs() { + apis := &APIs{ + Domain: b.Domain, + Package: b.APIsPkg, + Groups: map[string]*APIGroup{}, + } + + for group, versionMap := range b.ByGroupVersionKind { + apiGroup := &APIGroup{ + Group: group, + GroupTitle: strings.Title(group), + Domain: b.Domain, + Versions: map[string]*APIVersion{}, + UnversionedResources: map[string]*APIResource{}, + } + + for version, kindMap := range versionMap { + apiVersion := &APIVersion{ + Domain: b.Domain, + Group: group, + Version: version, + Resources: map[string]*APIResource{}, + } + for kind, resource := range kindMap { + apiResource := &APIResource{ + Domain: resource.Domain, + Version: resource.Version, + Group: resource.Group, + Resource: resource.Resource, + Type: resource.Type, + REST: resource.REST, + Kind: resource.Kind, + Subresources: resource.Subresources, + StatusStrategy: resource.StatusStrategy, + Strategy: resource.Strategy, + NonNamespaced: resource.NonNamespaced, + } + apiVersion.Resources[kind] = apiResource + // Set the package for the api version + apiVersion.Pkg = b.context.Universe[resource.Type.Name.Package] + // Set the package for the api group + apiGroup.Pkg = b.context.Universe[filepath.Dir(resource.Type.Name.Package)] + apiGroup.PkgPath = apiGroup.Pkg.Path + + apiGroup.UnversionedResources[kind] = apiResource + } + + apiGroup.Versions[version] = apiVersion + } + b.ParseStructs(apiGroup) + apis.Groups[group] = apiGroup + } + apis.Pkg = b.context.Universe[b.APIsPkg] + b.APIs = apis +} + +// ParseIndex indexes all types with the comment "// +resource=RESOURCE" by GroupVersionKind and +// GroupKindVersion +func (b *APIsBuilder) ParseIndex() { + b.ByGroupVersionKind = map[string]map[string]map[string]*APIResource{} + b.ByGroupKindVersion = map[string]map[string]map[string]*APIResource{} + + b.SubByGroupVersionKind = map[string]map[string]map[string]*types.Type{} + for _, c := range b.context.Order { + if IsAPISubresource(c) { + group := GetGroup(c) + version := GetVersion(c, group) + kind := GetKind(c, group) + if _, f := b.SubByGroupVersionKind[group]; !f { + b.SubByGroupVersionKind[group] = map[string]map[string]*types.Type{} + } + if _, f := b.SubByGroupVersionKind[group][version]; !f { + b.SubByGroupVersionKind[group][version] = map[string]*types.Type{} + } + b.SubByGroupVersionKind[group][version][kind] = c + } + + if !IsAPIResource(c) { + continue + } + + r := &APIResource{ + Type: c, + NonNamespaced: IsNonNamespaced(c), + } + r.Group = GetGroup(c) + r.Version = GetVersion(c, r.Group) + r.Kind = GetKind(c, r.Group) + r.Domain = b.Domain + + rt := ParseResourceTag(b.GetResourceTag(c)) + + r.Resource = rt.Resource + r.REST = rt.REST + + r.Strategy = rt.Strategy + + // If not defined, default the strategy to the {{.Kind}}Strategy for backwards compatibility + if len(r.Strategy) == 0 { + r.Strategy = fmt.Sprintf("%sStrategy", r.Kind) + } + + // Copy the Status strategy to mirror the non-status strategy + r.StatusStrategy = strings.TrimSuffix(r.Strategy, "Strategy") + r.StatusStrategy = fmt.Sprintf("%sStatusStrategy", r.StatusStrategy) + + if _, f := b.ByGroupKindVersion[r.Group]; !f { + b.ByGroupKindVersion[r.Group] = map[string]map[string]*APIResource{} + } + if _, f := b.ByGroupKindVersion[r.Group][r.Kind]; !f { + b.ByGroupKindVersion[r.Group][r.Kind] = map[string]*APIResource{} + } + if _, f := b.ByGroupVersionKind[r.Group]; !f { + b.ByGroupVersionKind[r.Group] = map[string]map[string]*APIResource{} + } + if _, f := b.ByGroupVersionKind[r.Group][r.Version]; !f { + b.ByGroupVersionKind[r.Group][r.Version] = map[string]*APIResource{} + } + + b.ByGroupKindVersion[r.Group][r.Kind][r.Version] = r + b.ByGroupVersionKind[r.Group][r.Version][r.Kind] = r + + // Do subresources + if !HasSubresource(c) { + continue + } + r.Type = c + r.Subresources = b.GetSubresources(r) + } +} + +func (b *APIsBuilder) GetSubresources(c *APIResource) map[string]*APISubresource { + r := map[string]*APISubresource{} + subresources := b.GetSubresourceTags(c.Type) + + if len(subresources) == 0 { + // Not a subresource + return r + } + for _, subresource := range subresources { + // Parse the values for each subresource + tags := ParseSubresourceTag(c, subresource) + sr := &APISubresource{ + Kind: tags.Kind, + Request: tags.RequestKind, + Path: tags.Path, + REST: tags.REST, + Domain: b.Domain, + Version: c.Version, + Resource: c.Resource, + Group: c.Group, + } + if !b.IsInPackage(tags) { + // Out of package Request types require an import and are prefixed with the + // package name - e.g. v1.Scale + sr.Request, sr.ImportPackage = b.GetNameAndImport(tags) + } + if v, found := r[sr.Path]; found { + log.Fatalf("Multiple subresources registered for path %s: %v %v", + sr.Path, v, subresource) + } + r[sr.Path] = sr + } + return r +} + +// Returns true if the subresource Request type is in the same package as the resource type +func (b *APIsBuilder) IsInPackage(tags SubresourceTags) bool { + return !strings.Contains(tags.RequestKind, ".") +} + +// GetNameAndImport converts +func (b *APIsBuilder) GetNameAndImport(tags SubresourceTags) (string, string) { + last := strings.LastIndex(tags.RequestKind, ".") + importPackage := tags.RequestKind[:last] + + // Set the request kind to the struct name + tags.RequestKind = tags.RequestKind[last+1:] + // Find the package + pkg := filepath.Base(importPackage) + // Prefix the struct name with the package it is in + return strings.Join([]string{pkg, tags.RequestKind}, "."), importPackage +} + +// ResourceTags contains the tags present in a "+resource=" comment +type ResourceTags struct { + Resource string + REST string + Strategy string +} + +// ParseResourceTag parses the tags in a "+resource=" comment into a ResourceTags struct +func ParseResourceTag(tag string) ResourceTags { + result := ResourceTags{} + for _, elem := range strings.Split(tag, ",") { + kv := strings.Split(elem, "=") + if len(kv) != 2 { + log.Fatalf("// +resource: tags must be key value pairs. Expected "+ + "keys [path=] "+ + "Got string: [%s]", tag) + } + value := kv[1] + switch kv[0] { + case "rest": + result.REST = value + case "path": + result.Resource = value + case "strategy": + result.Strategy = value + } + } + return result +} + +// ResourceTags contains the tags present in a "+resource=" comment +type ControllerTags struct { + gvk schema.GroupVersionKind + resource string +} + +// ParseResourceTag parses the tags in a "+resource=" comment into a ResourceTags struct +func ParseControllerTag(tag string) ControllerTags { + result := ControllerTags{} + for _, elem := range strings.Split(tag, ",") { + kv := strings.Split(elem, "=") + if len(kv) != 2 { + log.Fatalf("// +controller: tags must be key value pairs. Expected "+ + "keys [group=,version=,kind=,resource=] "+ + "Got string: [%s]", tag) + } + value := kv[1] + switch kv[0] { + case "group": + result.gvk.Group = value + case "version": + result.gvk.Version = value + case "kind": + result.gvk.Kind = value + case "resource": + result.resource = value + } + } + return result +} + +// SubresourceTags contains the tags present in a "+subresource=" comment +type SubresourceTags struct { + Path string + Kind string + RequestKind string + REST string +} + +// ParseSubresourceTag parses the tags in a "+subresource=" comment into a SubresourceTags struct +func ParseSubresourceTag(c *APIResource, tag string) SubresourceTags { + result := SubresourceTags{} + for _, elem := range strings.Split(tag, ",") { + kv := strings.Split(elem, "=") + if len(kv) != 2 { + log.Fatalf("// +subresource: tags must be key value pairs. Expected "+ + "keys [request=,rest=,path=] "+ + "Got string: [%s]", tag) + } + value := kv[1] + switch kv[0] { + case "request": + result.RequestKind = value + case "rest": + result.REST = value + case "path": + // Strip the parent resource + result.Path = strings.Replace(value, c.Resource+"/", "", -1) + } + } + return result +} + +// GetResourceTag returns the value of the "+resource=" comment tag +func (b *APIsBuilder) GetResourceTag(c *types.Type) string { + comments := Comments(c.CommentLines) + resource := comments.GetTag("resource", ":") + if len(resource) == 0 { + panic(errors.Errorf("Must specify +resource comment for type %v", c.Name)) + } + return resource +} + +func (b *APIsBuilder) GenClient(c *types.Type) bool { + comments := Comments(c.CommentLines) + resource := comments.GetTag("resource", ":") + return len(resource) > 0 +} + +func (b *APIsBuilder) GenDeepCopy(c *types.Type) bool { + comments := Comments(c.CommentLines) + return comments.HasTag("subresource-request") +} + +func (b *APIsBuilder) GetControllerTag(c *types.Type) string { + comments := Comments(c.CommentLines) + resource := comments.GetTag("controller", ":") + if len(resource) == 0 { + panic(errors.Errorf("Must specify +controller comment for type %v", c.Name)) + } + return resource +} + +func (b *APIsBuilder) GetSubresourceTags(c *types.Type) []string { + comments := Comments(c.CommentLines) + return comments.GetTags("subresource", ":") +} + +// ParseGroupNames initializes b.GroupNames with the set of all groups +func (b *APIsBuilder) ParseGroupNames() { + b.GroupNames = sets.String{} + for p := range b.UnversionedPkgs { + pkg := b.context.Universe[p] + if pkg == nil { + // If the input had no Go files, for example. + continue + } + b.GroupNames.Insert(filepath.Base(p)) + } +} + +// ParsePackages parses out the sets of Versioned, Unversioned packages and identifies the root Apis package. +func (b *APIsBuilder) ParsePackages() { + b.VersionedPkgs = sets.NewString() + b.UnversionedPkgs = sets.NewString() + for _, o := range b.context.Order { + if IsAPIResource(o) { + versioned := o.Name.Package + b.VersionedPkgs.Insert(versioned) + + unversioned := filepath.Dir(versioned) + b.UnversionedPkgs.Insert(unversioned) + + if apis := filepath.Dir(unversioned); apis != b.APIsPkg && len(b.APIsPkg) > 0 { + panic(errors.Errorf( + "Found multiple apis directory paths: %v and %v. "+ + "Do you have a +resource tag on a resource that is not in a version "+ + "directory?", b.APIsPkg, apis)) + } else { + b.APIsPkg = apis + } + } + } +} + +// ParseDomain parses the domain from the apis/doc.go file comment "// +domain=YOUR_DOMAIN". +func (b *APIsBuilder) ParseDomain() { + pkg := b.context.Universe[b.APIsPkg] + if pkg == nil { + // If the input had no Go files, for example. + panic(errors.Errorf("Missing apis package.")) + } + comments := Comments(pkg.Comments) + b.Domain = comments.GetTag("domain", "=") + if len(b.Domain) == 0 { + panic("Could not find string matching // +domain=.+ in apis/doc.go") + } +} + +type GenUnversionedType struct { + Type *types.Type + Resource *APIResource +} + +func (b *APIsBuilder) ParseStructs(apigroup *APIGroup) { + remaining := []GenUnversionedType{} + for _, version := range apigroup.Versions { + for _, resource := range version.Resources { + remaining = append(remaining, GenUnversionedType{resource.Type, resource}) + } + } + for _, version := range b.SubByGroupVersionKind[apigroup.Group] { + for _, kind := range version { + remaining = append(remaining, GenUnversionedType{kind, nil}) + } + } + + done := sets.String{} + for len(remaining) > 0 { + // Pop the next element from the list + next := remaining[0] + remaining[0] = remaining[len(remaining)-1] + remaining = remaining[:len(remaining)-1] + + // Already processed this type. Skip it + if done.Has(next.Type.Name.Name) { + continue + } + done.Insert(next.Type.Name.Name) + + // Generate the struct and append to the list + result, additionalTypes := apigroup.DoType(next.Type) + + // This is a resource, so generate the client + if b.GenClient(next.Type) { + result.GenClient = true + result.GenDeepCopy = true + } + + if next.Resource != nil { + result.NonNamespaced = IsNonNamespaced(next.Type) + } + + if b.GenDeepCopy(next.Type) { + result.GenDeepCopy = true + } + apigroup.Structs = append(apigroup.Structs, result) + + // Add the newly discovered subtypes + for _, at := range additionalTypes { + remaining = append(remaining, GenUnversionedType{at, nil}) + } + } +} + +func (apigroup *APIGroup) DoType(t *types.Type) (*Struct, []*types.Type) { + remaining := []*types.Type{} + + s := &Struct{ + Name: t.Name.Name, + GenClient: false, + GenUnversioned: true, // Generate unversioned structs by default + } + + for _, c := range t.CommentLines { + if strings.Contains(c, "+genregister:unversioned=false") { + // Don't generate the unversioned struct + s.GenUnversioned = false + } + } + + for _, member := range t.Members { + uType := member.Type.Name.Name + memberName := member.Name + uImport := "" + + // Use the element type for Pointers, Maps and Slices + mSubType := member.Type + hasElem := false + for mSubType.Elem != nil { + mSubType = mSubType.Elem + hasElem = true + } + if hasElem { + // Strip the package from the field type + uType = strings.Replace(member.Type.String(), mSubType.Name.Package+".", "", 1) + } + + base := filepath.Base(member.Type.String()) + samepkg := t.Name.Package == mSubType.Name.Package + + // If not in the same package, calculate the import pkg + if !samepkg { + parts := strings.Split(base, ".") + if len(parts) > 1 { + // Don't generate unversioned types for core types, just use the versioned types + if strings.HasPrefix(mSubType.Name.Package, "k8s.io/api/") { + // Import the package under an alias so it doesn't conflict with other groups + // having the same version + importAlias := path.Base(path.Dir(mSubType.Name.Package)) + path.Base(mSubType.Name.Package) + uImport = fmt.Sprintf("%s \"%s\"", importAlias, mSubType.Name.Package) + if hasElem { + // Replace the full package with the alias when referring to the type + uType = strings.Replace(member.Type.String(), mSubType.Name.Package, importAlias, 1) + } else { + // Replace the full package with the alias when referring to the type + uType = fmt.Sprintf("%s.%s", importAlias, parts[1]) + } + } else { + switch member.Type.Name.Package { + case "k8s.io/apimachinery/pkg/apis/meta/v1": + // Use versioned types for meta/v1 + uImport = fmt.Sprintf("%s \"%s\"", "metav1", "k8s.io/apimachinery/pkg/apis/meta/v1") + uType = "metav1." + parts[1] + default: + // Use unversioned types for everything else + t := member.Type + + if t.Elem != nil { + // Handle Pointers, Maps, Slices + + // We need to parse the package from the Type String + t = t.Elem + str := member.Type.String() + startPkg := strings.LastIndexAny(str, "*]") + endPkg := strings.LastIndexAny(str, ".") + pkg := str[startPkg+1 : endPkg] + name := str[endPkg+1:] + prefix := str[:startPkg+1] + + uImportBase := path.Base(pkg) + uImportName := path.Base(path.Dir(pkg)) + uImportBase + uImport = fmt.Sprintf("%s \"%s\"", uImportName, pkg) + + uType = prefix + uImportName + "." + name + + //fmt.Printf("\nDifferent Parent Package: %s\nChild Package: %s\nKind: %s (Kind.String() %s)\nImport stmt: %s\nType: %s\n\n", + // pkg, + // member.Type.Name.Package, + // member.Type.Kind, + // member.Type.String(), + // uImport, + // uType) + } else { + // Handle non- Pointer, Maps, Slices + pkg := t.Name.Package + name := t.Name.Name + + // Come up with the alias the package is imported under + // Concatenate with directory package to reduce naming collisions + uImportBase := path.Base(pkg) + uImportName := path.Base(path.Dir(pkg)) + uImportBase + + // Create the import statement + uImport = fmt.Sprintf("%s \"%s\"", uImportName, pkg) + + // Create the field type name - should be . + uType = uImportName + "." + name + + //fmt.Printf("\nDifferent Parent Package: %s\nChild Package: %s\nKind: %s (Kind.String() %s)\nImport stmt: %s\nType: %s\n\n", + // pkg, + // member.Type.Name.Package, + // member.Type.Kind, + // member.Type.String(), + // uImport, + // uType) + } + } + } + } + } + + if member.Embedded { + memberName = "" + } + + s.Fields = append(s.Fields, &Field{ + Name: memberName, + VersionedPackage: member.Type.Name.Package, + UnversionedImport: uImport, + UnversionedType: uType, + }) + + // Add this member Type for processing if it isn't a primitive and + // is part of the same API group + if !mSubType.IsPrimitive() && GetGroup(mSubType) == GetGroup(t) { + remaining = append(remaining, mSubType) + } + } + return s, remaining +} diff --git a/vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/unversioned_generator.go b/vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/unversioned_generator.go new file mode 100644 index 0000000000000..174856a7106f2 --- /dev/null +++ b/vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/unversioned_generator.go @@ -0,0 +1,292 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package generators + +import ( + "io" + "text/template" + + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/gengo/generator" +) + +type unversionedGenerator struct { + generator.DefaultGen + apigroup *APIGroup +} + +var _ generator.Generator = &unversionedGenerator{} + +func CreateUnversionedGenerator(apigroup *APIGroup, filename string) generator.Generator { + return &unversionedGenerator{ + generator.DefaultGen{OptionalName: filename}, + apigroup, + } +} + +func (d *unversionedGenerator) Imports(c *generator.Context) []string { + imports := sets.NewString( + "fmt", + "github.com/kubernetes-incubator/apiserver-builder/pkg/builders", + "k8s.io/apimachinery/pkg/apis/meta/internalversion", + "k8s.io/apimachinery/pkg/runtime", + "k8s.io/apimachinery/pkg/runtime/schema", + "k8s.io/apiserver/pkg/endpoints/request", + "k8s.io/apiserver/pkg/registry/rest") + + // Get imports for all fields + for _, s := range d.apigroup.Structs { + for _, f := range s.Fields { + if len(f.UnversionedImport) > 0 { + imports.Insert(f.UnversionedImport) + } + } + } + + return imports.List() +} + +func (d *unversionedGenerator) Finalize(context *generator.Context, w io.Writer) error { + temp := template.Must(template.New("unversioned-wiring-template").Parse(UnversionedAPITemplate)) + err := temp.Execute(w, d.apigroup) + if err != nil { + return err + } + return err +} + +var UnversionedAPITemplate = ` +var ( + {{ range $api := .UnversionedResources -}} + Internal{{ $api.Kind }} = builders.NewInternalResource( + "{{ $api.Resource }}", + "{{ $api.Kind }}", + func() runtime.Object { return &{{ $api.Kind }}{} }, + func() runtime.Object { return &{{ $api.Kind }}List{} }, + ) + Internal{{ $api.Kind }}Status = builders.NewInternalResourceStatus( + "{{ $api.Resource }}", + "{{ $api.Kind }}Status", + func() runtime.Object { return &{{ $api.Kind }}{} }, + func() runtime.Object { return &{{ $api.Kind }}List{} }, + ) + {{ range $subresource := .Subresources -}} + Internal{{$subresource.REST}} = builders.NewInternalSubresource( + "{{$subresource.Resource}}", "{{$subresource.Request}}", "{{$subresource.Path}}", + func() runtime.Object { return &{{$subresource.Request}}{} }, + ) + {{ end -}} + {{ end -}} + + // Registered resources and subresources + ApiVersion = builders.NewApiGroup("{{.Group}}.{{.Domain}}").WithKinds( + {{ range $api := .UnversionedResources -}} + Internal{{$api.Kind}}, + Internal{{$api.Kind}}Status, + {{ range $subresource := $api.Subresources -}} + Internal{{$subresource.REST}}, + {{ end -}} + {{ end -}} + ) + + // Required by code generated by go2idl + AddToScheme = ApiVersion.SchemaBuilder.AddToScheme + SchemeBuilder = ApiVersion.SchemaBuilder + localSchemeBuilder = &SchemeBuilder + SchemeGroupVersion = ApiVersion.GroupVersion +) + +// Required by code generated by go2idl +// Kind takes an unqualified kind and returns a Group qualified GroupKind +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Required by code generated by go2idl +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +{{ range $s := .Structs -}} +{{ if $s.GenUnversioned -}} +{{ if $s.GenClient }}// +genclient{{end}} +{{ if $s.GenClient }}// +genclient{{ if $s.NonNamespaced }}:nonNamespaced{{end}}{{end}} +{{ if $s.GenDeepCopy }}// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object{{end}} + +type {{ $s.Name }} struct { +{{ range $f := $s.Fields -}} + {{ $f.Name }} {{ $f.UnversionedType }} +{{ end -}} +} +{{ end -}} +{{ end -}} + +{{ range $api := .UnversionedResources -}} +// +// {{.Kind}} Functions and Structs +// +// +k8s:deepcopy-gen=false +type {{.Strategy}} struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type {{.StatusStrategy}} struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type {{$api.Kind}}List struct { + metav1.TypeMeta + metav1.ListMeta + Items []{{$api.Kind}} +} + +{{ range $subresource := $api.Subresources -}} +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type {{$subresource.Request}}List struct { + metav1.TypeMeta + metav1.ListMeta + Items []{{$subresource.Request}} +} +{{ end -}} + +func ({{$api.Kind}}) NewStatus() interface{} { + return {{$api.Kind}}Status{} +} + +func (pc *{{$api.Kind}}) GetStatus() interface{} { + return pc.Status +} + +func (pc *{{$api.Kind}}) SetStatus(s interface{}) { + pc.Status = s.({{$api.Kind}}Status) +} + +func (pc *{{$api.Kind}}) GetSpec() interface{} { + return pc.Spec +} + +func (pc *{{$api.Kind}}) SetSpec(s interface{}) { + pc.Spec = s.({{$api.Kind}}Spec) +} + +func (pc *{{$api.Kind}}) GetObjectMeta() *metav1.ObjectMeta { + return &pc.ObjectMeta +} + +func (pc *{{$api.Kind}}) SetGeneration(generation int64) { + pc.ObjectMeta.Generation = generation +} + +func (pc {{$api.Kind}}) GetGeneration() int64 { + return pc.ObjectMeta.Generation +} + +// Registry is an interface for things that know how to store {{.Kind}}. +// +k8s:deepcopy-gen=false +type {{.Kind}}Registry interface { + List{{.Kind}}s(ctx request.Context, options *internalversion.ListOptions) (*{{.Kind}}List, error) + Get{{.Kind}}(ctx request.Context, id string, options *metav1.GetOptions) (*{{.Kind}}, error) + Create{{.Kind}}(ctx request.Context, id *{{.Kind}}) (*{{.Kind}}, error) + Update{{.Kind}}(ctx request.Context, id *{{.Kind}}) (*{{.Kind}}, error) + Delete{{.Kind}}(ctx request.Context, id string) (bool, error) +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic. +func New{{.Kind}}Registry(sp builders.StandardStorageProvider) {{.Kind}}Registry { + return &storage{{.Kind}}{sp} +} + +// Implement Registry +// storage puts strong typing around storage calls +// +k8s:deepcopy-gen=false +type storage{{.Kind}} struct { + builders.StandardStorageProvider +} + +func (s *storage{{.Kind}}) List{{.Kind}}s(ctx request.Context, options *internalversion.ListOptions) (*{{.Kind}}List, error) { + if options != nil && options.FieldSelector != nil && !options.FieldSelector.Empty() { + return nil, fmt.Errorf("field selector not supported yet") + } + st := s.GetStandardStorage() + obj, err := st.List(ctx, options) + if err != nil { + return nil, err + } + return obj.(*{{.Kind}}List), err +} + +func (s *storage{{.Kind}}) Get{{.Kind}}(ctx request.Context, id string, options *metav1.GetOptions) (*{{.Kind}}, error) { + st := s.GetStandardStorage() + obj, err := st.Get(ctx, id, options) + if err != nil { + return nil, err + } + return obj.(*{{.Kind}}), nil +} + +func (s *storage{{.Kind}}) Create{{.Kind}}(ctx request.Context, object *{{.Kind}}) (*{{.Kind}}, error) { + st := s.GetStandardStorage() + obj, err := st.Create(ctx, object, nil, true) + if err != nil { + return nil, err + } + return obj.(*{{.Kind}}), nil +} + +func (s *storage{{.Kind}}) Update{{.Kind}}(ctx request.Context, object *{{.Kind}}) (*{{.Kind}}, error) { + st := s.GetStandardStorage() + obj, _, err := st.Update(ctx, object.Name, rest.DefaultUpdatedObjectInfo(object), nil, nil) + if err != nil { + return nil, err + } + return obj.(*{{.Kind}}), nil +} + +func (s *storage{{.Kind}}) Delete{{.Kind}}(ctx request.Context, id string) (bool, error) { + st := s.GetStandardStorage() + _, sync, err := st.Delete(ctx, id, nil) + return sync, err +} + +{{ end -}} +` + +var installTemplate = ` +{{.BoilerPlate}} + +package install + +import ( + "github.com/kubernetes-incubator/apiserver-builder/example/pkg/apis" + "k8s.io/apimachinery/pkg/apimachinery/announced" + "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" +) + +func Install( + groupFactoryRegistry announced.APIGroupFactoryRegistry, + registry *registered.APIRegistrationManager, + scheme *runtime.Scheme) { + + apis.{{ title .Group }}APIBuilder().Install(groupFactoryRegistry, registry, scheme) +} +` diff --git a/vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/util.go b/vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/util.go new file mode 100644 index 0000000000000..fe656ba5c8c54 --- /dev/null +++ b/vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/util.go @@ -0,0 +1,167 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package generators + +import ( + "fmt" + "path/filepath" + "strings" + + "github.com/pkg/errors" + + "k8s.io/gengo/types" +) + +// IsAPIResource returns true if t has a +resource comment tag +func IsAPIResource(t *types.Type) bool { + for _, c := range t.CommentLines { + if strings.Contains(c, "+resource") { + return true + } + } + return false +} + +// IsNonNamespaced returns true if t has a +nonNamespaced comment tag +func IsNonNamespaced(t *types.Type) bool { + if !IsAPIResource(t) { + return false + } + + for _, c := range t.CommentLines { + if strings.Contains(c, "+genclient:nonNamespaced") { + return true + } + } + + for _, c := range t.SecondClosestCommentLines { + if strings.Contains(c, "+genclient:nonNamespaced") { + return true + } + } + + return false +} + +func IsController(t *types.Type) bool { + for _, c := range t.CommentLines { + if strings.Contains(c, "+controller") { + return true + } + } + return false +} + +// IsAPISubresource returns true if t has a +subresource-request comment tag +func IsAPISubresource(t *types.Type) bool { + for _, c := range t.CommentLines { + if strings.Contains(c, "+subresource-request") { + return true + } + } + return false +} + +// HasSubresource returns true if t is an APIResource with one or more Subresources +func HasSubresource(t *types.Type) bool { + if !IsAPIResource(t) { + return false + } + for _, c := range t.CommentLines { + if strings.Contains(c, "+subresource") { + return true + } + } + return false +} + +func IsUnversioned(t *types.Type, group string) bool { + return IsApisDir(filepath.Base(filepath.Dir(t.Name.Package))) && GetGroup(t) == group +} + +func IsVersioned(t *types.Type, group string) bool { + dir := filepath.Base(filepath.Dir(filepath.Dir(t.Name.Package))) + return IsApisDir(dir) && GetGroup(t) == group +} + +func GetVersion(t *types.Type, group string) string { + if !IsVersioned(t, group) { + panic(errors.Errorf("Cannot get version for unversioned type %v", t.Name)) + } + return filepath.Base(t.Name.Package) +} + +func GetGroup(t *types.Type) string { + return filepath.Base(GetGroupPackage(t)) +} + +func GetGroupPackage(t *types.Type) string { + if IsApisDir(filepath.Base(filepath.Dir(t.Name.Package))) { + return t.Name.Package + } + return filepath.Dir(t.Name.Package) +} + +func GetKind(t *types.Type, group string) string { + if !IsVersioned(t, group) && !IsUnversioned(t, group) { + panic(errors.Errorf("Cannot get kind for type not in group %v", t.Name)) + } + return t.Name.Name +} + +// IsApisDir returns true if a directory path is a Kubernetes api directory +func IsApisDir(dir string) bool { + return dir == "apis" || dir == "api" +} + +// Comments is a structure for using comment tags on go structs and fields +type Comments []string + +// GetTags returns the value for the first comment with a prefix matching "+name=" +// e.g. "+name=foo\n+name=bar" would return "foo" +func (c Comments) GetTag(name, sep string) string { + for _, c := range c { + prefix := fmt.Sprintf("+%s%s", name, sep) + if strings.HasPrefix(c, prefix) { + return strings.Replace(c, prefix, "", 1) + } + } + return "" +} + +func (c Comments) HasTag(name string) bool { + for _, c := range c { + prefix := fmt.Sprintf("+%s", name) + if strings.HasPrefix(c, prefix) { + return true + } + } + return false +} + +// GetTags returns the value for all comments with a prefix and separator. E.g. for "name" and "=" +// "+name=foo\n+name=bar" would return []string{"foo", "bar"} +func (c Comments) GetTags(name, sep string) []string { + tags := []string{} + for _, c := range c { + prefix := fmt.Sprintf("+%s%s", name, sep) + if strings.HasPrefix(c, prefix) { + tags = append(tags, strings.Replace(c, prefix, "", 1)) + } + } + return tags +} diff --git a/vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/versioned_generator.go b/vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/versioned_generator.go new file mode 100644 index 0000000000000..9b9cb0f0b9a09 --- /dev/null +++ b/vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators/versioned_generator.go @@ -0,0 +1,173 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package generators + +import ( + "io" + "text/template" + + "k8s.io/gengo/generator" +) + +type versionedGenerator struct { + generator.DefaultGen + apiversion *APIVersion + apigroup *APIGroup +} + +var _ generator.Generator = &versionedGenerator{} + +func CreateVersionedGenerator(apiversion *APIVersion, apigroup *APIGroup, filename string) generator.Generator { + return &versionedGenerator{ + generator.DefaultGen{OptionalName: filename}, + apiversion, + apigroup, + } +} + +func hasSubresources(version *APIVersion) bool { + for _, v := range version.Resources { + if len(v.Subresources) != 0 { + return true + } + } + return false +} + +func (d *versionedGenerator) Imports(c *generator.Context) []string { + imports := []string{ + "metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"", + "k8s.io/apimachinery/pkg/runtime", + "github.com/kubernetes-incubator/apiserver-builder/pkg/builders", + "k8s.io/apimachinery/pkg/runtime/schema", + d.apigroup.Pkg.Path, + } + if hasSubresources(d.apiversion) { + imports = append(imports, "k8s.io/apiserver/pkg/registry/rest") + } + + return imports +} + +func (d *versionedGenerator) Finalize(context *generator.Context, w io.Writer) error { + temp := template.Must(template.New("versioned-template").Parse(VersionedAPITemplate)) + return temp.Execute(w, d.apiversion) +} + +var VersionedAPITemplate = ` +var ( + {{ range $api := .Resources -}} + + {{ if $api.REST -}} + {{$api.Group}}{{$api.Kind}}Storage = builders.NewApiResourceWithStorage( // Resource status endpoint + {{ $api.Group }}.Internal{{ $api.Kind }}, + {{.Kind}}SchemeFns{}, + func() runtime.Object { return &{{ $api.Kind }}{} }, // Register versioned resource + func() runtime.Object { return &{{ $api.Kind }}List{} }, // Register versioned resource list + New{{ $api.REST }}, + ) + {{ else -}} + {{$api.Group}}{{$api.Kind}}Storage = builders.NewApiResource( // Resource status endpoint + {{ $api.Group }}.Internal{{ $api.Kind }}, + {{.Kind}}SchemeFns{}, + func() runtime.Object { return &{{ $api.Kind }}{} }, // Register versioned resource + func() runtime.Object { return &{{ $api.Kind }}List{} }, // Register versioned resource list + &{{ $api.Strategy }}{builders.StorageStrategySingleton}, + ) + {{ end -}} + {{ end -}} + + ApiVersion = builders.NewApiVersion("{{.Group}}.{{.Domain}}", "{{.Version}}").WithResources( + {{ range $api := .Resources -}} + {{$api.Group}}{{$api.Kind}}Storage, + {{ if $api.REST }}{{ else -}} + builders.NewApiResource( // Resource status endpoint + {{ $api.Group }}.Internal{{ $api.Kind }}Status, + {{.Kind}}SchemeFns{}, + func() runtime.Object { return &{{ $api.Kind }}{} }, // Register versioned resource + func() runtime.Object { return &{{ $api.Kind }}List{} }, // Register versioned resource list + &{{ $api.StatusStrategy }}{builders.StatusStorageStrategySingleton}, + ),{{ end -}} + + {{ range $subresource := $api.Subresources -}} + builders.NewApiResourceWithStorage( + {{ $api.Group }}.Internal{{ $subresource.REST }}, + builders.SchemeFnsSingleton, + func() runtime.Object { return &{{ $subresource.Request }}{} }, // Register versioned resource + nil, + func() rest.Storage { return &{{ $subresource.REST }}{ {{$api.Group}}.New{{$api.Kind}}Registry({{$api.Group}}{{$api.Kind}}Storage) } }, + ), + {{ end -}} + {{ end -}} + ) + + // Required by code generated by go2idl + AddToScheme = ApiVersion.SchemaBuilder.AddToScheme + SchemeBuilder = ApiVersion.SchemaBuilder + localSchemeBuilder = &SchemeBuilder + SchemeGroupVersion = ApiVersion.GroupVersion +) + +// Required by code generated by go2idl +// Kind takes an unqualified kind and returns a Group qualified GroupKind +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Required by code generated by go2idl +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +{{ range $api := .Resources -}} +// +// {{.Kind}} Functions and Structs +// +// +k8s:deepcopy-gen=false +type {{.Kind}}SchemeFns struct { + builders.DefaultSchemeFns +} + +// +k8s:deepcopy-gen=false +type {{.Strategy}} struct { + builders.DefaultStorageStrategy +} + +// +k8s:deepcopy-gen=false +type {{.StatusStrategy}} struct { + builders.DefaultStatusStorageStrategy +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type {{$api.Kind}}List struct { + metav1.TypeMeta ` + "`json:\",inline\"`" + ` + metav1.ListMeta ` + "`json:\"metadata,omitempty\"`" + ` + Items []{{$api.Kind}} ` + "`json:\"items\"`" + ` +} + +{{ range $subresource := $api.Subresources -}} +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type {{$subresource.Request}}List struct { + metav1.TypeMeta ` + "`json:\",inline\"`" + ` + metav1.ListMeta ` + "`json:\"metadata,omitempty\"`" + ` + Items []{{$subresource.Request}} ` + "`json:\"items\"`" + ` +} +{{ end }}{{ end -}} +` diff --git a/vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/main.go b/vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/main.go new file mode 100644 index 0000000000000..3b7ca93b1bf14 --- /dev/null +++ b/vendor/github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/main.go @@ -0,0 +1,51 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package main + +import ( + "os" + "runtime" + + "github.com/golang/glog" + "github.com/kubernetes-incubator/apiserver-builder/cmd/apiregister-gen/generators" + "k8s.io/apiserver/pkg/util/logs" + "k8s.io/gengo/args" +) + +func main() { + logs.InitLogs() + defer logs.FlushLogs() + + if len(os.Getenv("GOMAXPROCS")) == 0 { + runtime.GOMAXPROCS(runtime.NumCPU()) + } + + arguments := args.Default() + + // Override defaults. + arguments.OutputFileBaseName = "zz_generated.api.register" + + // Custom args. + customArgs := &generators.CustomArgs{} + arguments.CustomArgs = customArgs + + g := generators.Gen{} + if err := g.Execute(arguments); err != nil { + glog.Fatalf("Error: %v", err) + } + glog.V(2).Info("Completed successfully.") +}