Add openapi generation for the kube-aggregator

This commit is contained in:
bjrara
2020-05-30 17:33:48 +08:00
parent 5dbe3e308a
commit 5e0bd8a44c
14 changed files with 2991 additions and 8 deletions

View File

@@ -53,6 +53,7 @@ filegroup(
"//staging/src/k8s.io/kube-aggregator/pkg/client/listers/apiregistration/v1beta1:all-srcs",
"//staging/src/k8s.io/kube-aggregator/pkg/cmd/server:all-srcs",
"//staging/src/k8s.io/kube-aggregator/pkg/controllers:all-srcs",
"//staging/src/k8s.io/kube-aggregator/pkg/generated/openapi:all-srcs",
"//staging/src/k8s.io/kube-aggregator/pkg/registry/apiservice:all-srcs",
],
tags = ["automanaged"],

View File

@@ -60,6 +60,7 @@ type APIServiceSpec struct {
InsecureSkipTLSVerify bool
// CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate.
// If unspecified, system trust roots on the apiserver are used.
// +listType=atomic
// +optional
CABundle []byte
@@ -123,6 +124,8 @@ type APIServiceCondition struct {
// APIServiceStatus contains derived information about an API server
type APIServiceStatus struct {
// Current service state of apiService.
// +listType=map
// +listMapKey=type
Conditions []APIServiceCondition
}

View File

@@ -91,6 +91,7 @@ message APIServiceSpec {
// CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate.
// If unspecified, system trust roots on the apiserver are used.
// +listType=atomic
// +optional
optional bytes caBundle = 5;
@@ -121,6 +122,8 @@ message APIServiceStatus {
// +optional
// +patchMergeKey=type
// +patchStrategy=merge
// +listType=map
// +listMapKey=type
repeated APIServiceCondition conditions = 1;
}

View File

@@ -60,6 +60,7 @@ type APIServiceSpec struct {
InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty" protobuf:"varint,4,opt,name=insecureSkipTLSVerify"`
// CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate.
// If unspecified, system trust roots on the apiserver are used.
// +listType=atomic
// +optional
CABundle []byte `json:"caBundle,omitempty" protobuf:"bytes,5,opt,name=caBundle"`
@@ -132,6 +133,8 @@ type APIServiceStatus struct {
// +optional
// +patchMergeKey=type
// +patchStrategy=merge
// +listType=map
// +listMapKey=type
Conditions []APIServiceCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}

View File

@@ -91,6 +91,7 @@ message APIServiceSpec {
// CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate.
// If unspecified, system trust roots on the apiserver are used.
// +listType=atomic
// +optional
optional bytes caBundle = 5;
@@ -121,6 +122,8 @@ message APIServiceStatus {
// +optional
// +patchMergeKey=type
// +patchStrategy=merge
// +listType=map
// +listMapKey=type
repeated APIServiceCondition conditions = 1;
}

View File

@@ -63,6 +63,7 @@ type APIServiceSpec struct {
InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty" protobuf:"varint,4,opt,name=insecureSkipTLSVerify"`
// CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate.
// If unspecified, system trust roots on the apiserver are used.
// +listType=atomic
// +optional
CABundle []byte `json:"caBundle,omitempty" protobuf:"bytes,5,opt,name=caBundle"`
@@ -135,6 +136,8 @@ type APIServiceStatus struct {
// +optional
// +patchMergeKey=type
// +patchStrategy=merge
// +listType=map
// +listMapKey=type
Conditions []APIServiceCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}

View File

@@ -0,0 +1,28 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = ["zz_generated.openapi.go"],
importmap = "k8s.io/kubernetes/vendor/k8s.io/kube-aggregator/pkg/generated/openapi",
importpath = "k8s.io/kube-aggregator/pkg/generated/openapi",
visibility = ["//visibility:public"],
deps = [
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/github.com/go-openapi/spec:go_default_library",
"//vendor/k8s.io/kube-openapi/pkg/common:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)

File diff suppressed because it is too large Load Diff