Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
水淹萌龙
kubesphere
提交
f8d3b227
K
kubesphere
项目概览
水淹萌龙
/
kubesphere
与 Fork 源项目一致
Fork自
KubeSphere / kubesphere
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kubesphere
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
未验证
提交
f8d3b227
编写于
7月 31, 2019
作者:
R
runzexia
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add network crd doc gen
Signed-off-by:
N
runzexia
<
runzexia@yunify.com
>
上级
34ddd349
变更
8
展开全部
隐藏空白更改
内联
并排
Showing
8 changed file
with
13706 addition
and
43 deletion
+13706
-43
api/api-rules/violation_exceptions.list
api/api-rules/violation_exceptions.list
+1
-21
api/openapi-spec/swagger.json
api/openapi-spec/swagger.json
+1151
-21
pkg/apis/apis.go
pkg/apis/apis.go
+1
-0
pkg/apis/network/crdinstall/install.go
pkg/apis/network/crdinstall/install.go
+12
-0
pkg/apis/network/v1alpha1/openapi_generated.go
pkg/apis/network/v1alpha1/openapi_generated.go
+12525
-0
pkg/apis/network/v1alpha1/workspacenetworkpolicy_types.go
pkg/apis/network/v1alpha1/workspacenetworkpolicy_types.go
+6
-0
pkg/apis/servicemesh/v1alpha2/strategy_types.go
pkg/apis/servicemesh/v1alpha2/strategy_types.go
+1
-1
tools/cmd/crd-doc-gen/main.go
tools/cmd/crd-doc-gen/main.go
+9
-0
未找到文件。
api/api-rules/violation_exceptions.list
浏览文件 @
f8d3b227
...
...
@@ -44,24 +44,4 @@ API rule violation: names_match,k8s.io/apimachinery/pkg/runtime,Unknown,Raw
API rule violation: names_match,k8s.io/apimachinery/pkg/util/intstr,IntOrString,IntVal
API rule violation: names_match,k8s.io/apimachinery/pkg/util/intstr,IntOrString,StrVal
API rule violation: names_match,k8s.io/apimachinery/pkg/util/intstr,IntOrString,Type
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,DestinationRuleSpecTemplate,ObjectMeta
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,ServicePolicyCondition,LastProbeTime
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,ServicePolicyCondition,LastTransitionTime
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,ServicePolicyCondition,Message
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,ServicePolicyCondition,Reason
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,ServicePolicyCondition,Status
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,ServicePolicyCondition,Type
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,ServicePolicyStatus,CompletionTime
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,ServicePolicyStatus,Conditions
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,ServicePolicyStatus,StartTime
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,StrategyCondition,LastProbeTime
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,StrategyCondition,LastTransitionTime
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,StrategyCondition,Message
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,StrategyCondition,Reason
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,StrategyCondition,Status
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,StrategyCondition,Type
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,StrategySpec,GovernorVersion
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,StrategySpec,PrincipalVersion
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,StrategyStatus,CompletionTime
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,StrategyStatus,Conditions
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2,StrategyStatus,StartTime
API rule violation: names_match,kubesphere.io/kubesphere/pkg/apis/network/v1alpha1,WorkspaceNetworkPolicyEgressRule,To
api/openapi-spec/swagger.json
浏览文件 @
f8d3b227
此差异已折叠。
点击以展开。
pkg/apis/apis.go
浏览文件 @
f8d3b227
...
...
@@ -24,6 +24,7 @@ import (
// Generate openapi for apis
//go:generate go run ../../vendor/k8s.io/kube-openapi/cmd/openapi-gen/openapi-gen.go -O openapi_generated -i ../../vendor/k8s.io/api/core/v1,../../vendor/k8s.io/apimachinery/pkg/apis/meta/v1,../../vendor/k8s.io/apimachinery/pkg/api/resource,../../vendor/k8s.io/apimachinery/pkg/runtime,../../vendor/k8s.io/apimachinery/pkg/util/intstr,k8s.io/apimachinery/pkg/version,./tenant/v1alpha1 -p kubesphere.io/kubesphere/pkg/apis/tenant/v1alpha1 -h ../../hack/boilerplate.go.txt --report-filename ../../api/api-rules/violation_exceptions.list
//go:generate go run ../../vendor/k8s.io/kube-openapi/cmd/openapi-gen/openapi-gen.go -O openapi_generated -i ../../vendor/k8s.io/api/core/v1,../../vendor/k8s.io/apimachinery/pkg/apis/meta/v1,../../vendor/k8s.io/apimachinery/pkg/api/resource,../../vendor/k8s.io/apimachinery/pkg/runtime,../../vendor/k8s.io/apimachinery/pkg/util/intstr,../../vendor/github.com/knative/pkg/apis/istio/v1alpha3,k8s.io/apimachinery/pkg/version,./servicemesh/v1alpha2 -p kubesphere.io/kubesphere/pkg/apis/servicemesh/v1alpha2 -h ../../hack/boilerplate.go.txt --report-filename ../../api/api-rules/violation_exceptions.list
//go:generate go run ../../vendor/k8s.io/kube-openapi/cmd/openapi-gen/openapi-gen.go -O openapi_generated -i ../../vendor/k8s.io/api/core/v1,../../vendor/k8s.io/apimachinery/pkg/apis/meta/v1,../../vendor/k8s.io/apimachinery/pkg/api/resource,../../vendor/k8s.io/api/networking/v1,../../vendor/k8s.io/apimachinery/pkg/runtime,../../vendor/k8s.io/apimachinery/pkg/util/intstr,k8s.io/apimachinery/pkg/version,./network/v1alpha1 -p kubesphere.io/kubesphere/pkg/apis/network/v1alpha1 -h ../../hack/boilerplate.go.txt --report-filename ../../api/api-rules/violation_exceptions.list
// AddToSchemes may be used to add all resources defined in the project to a Scheme
var
AddToSchemes
runtime
.
SchemeBuilder
...
...
pkg/apis/network/crdinstall/install.go
0 → 100644
浏览文件 @
f8d3b227
package
crdinstall
import
(
k8sruntime
"k8s.io/apimachinery/pkg/runtime"
urlruntime
"k8s.io/apimachinery/pkg/util/runtime"
networkv1alpha1
"kubesphere.io/kubesphere/pkg/apis/network/v1alpha1"
)
func
Install
(
scheme
*
k8sruntime
.
Scheme
)
{
urlruntime
.
Must
(
networkv1alpha1
.
AddToScheme
(
scheme
))
urlruntime
.
Must
(
scheme
.
SetVersionPriority
(
networkv1alpha1
.
SchemeGroupVersion
))
}
pkg/apis/network/v1alpha1/openapi_generated.go
0 → 100644
浏览文件 @
f8d3b227
此差异已折叠。
点击以展开。
pkg/apis/network/v1alpha1/workspacenetworkpolicy_types.go
浏览文件 @
f8d3b227
...
...
@@ -21,6 +21,12 @@ import (
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
)
const
(
ResourceKindWorkspaceNetworkPolicy
=
"WorkspaceNetworkPolicy"
ResourceSingularWorkspaceNetworkPolicy
=
"workspacenetworkpolicy"
ResourcePluralWorkspaceNetworkPolicy
=
"workspacenetworkpolicies"
)
// WorkspaceNetworkPolicySpec defines the desired state of WorkspaceNetworkPolicy
type
WorkspaceNetworkPolicySpec
struct
{
// Workspace specify the name of ws to apply this workspace network policy
...
...
pkg/apis/servicemesh/v1alpha2/strategy_types.go
浏览文件 @
f8d3b227
...
...
@@ -27,7 +27,7 @@ import (
const
(
ResourceKindStrategy
=
"Strategy"
ResourceSingularStrategy
=
"strategy"
ResourceSingularStrategy
=
"strategy"
ResourcePluralStrategy
=
"strategies"
)
...
...
tools/cmd/crd-doc-gen/main.go
浏览文件 @
f8d3b227
...
...
@@ -17,6 +17,8 @@ import (
"k8s.io/apimachinery/pkg/runtime/serializer"
urlruntime
"k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/kube-openapi/pkg/common"
networkinstall
"kubesphere.io/kubesphere/pkg/apis/network/crdinstall"
networkv1alpha1
"kubesphere.io/kubesphere/pkg/apis/network/v1alpha1"
servicemeshinstall
"kubesphere.io/kubesphere/pkg/apis/servicemesh/crdinstall"
tenantinstall
"kubesphere.io/kubesphere/pkg/apis/tenant/crdinstall"
tenantv1alpha1
"kubesphere.io/kubesphere/pkg/apis/tenant/v1alpha1"
...
...
@@ -42,6 +44,7 @@ func main() {
servicemeshinstall
.
Install
(
Scheme
)
tenantinstall
.
Install
(
Scheme
)
networkinstall
.
Install
(
Scheme
)
mapper
:=
meta
.
NewDefaultRESTMapper
(
nil
)
...
...
@@ -69,6 +72,10 @@ func main() {
s2iv1alpha1
.
SchemeGroupVersion
.
WithResource
(
s2iv1alpha1
.
ResourcePluralS2iRun
),
s2iv1alpha1
.
SchemeGroupVersion
.
WithResource
(
s2iv1alpha1
.
ResourceSingularS2iRun
),
meta
.
RESTScopeRoot
)
mapper
.
AddSpecific
(
networkv1alpha1
.
SchemeGroupVersion
.
WithKind
(
networkv1alpha1
.
ResourceKindWorkspaceNetworkPolicy
),
networkv1alpha1
.
SchemeGroupVersion
.
WithResource
(
networkv1alpha1
.
ResourcePluralWorkspaceNetworkPolicy
),
networkv1alpha1
.
SchemeGroupVersion
.
WithResource
(
networkv1alpha1
.
ResourceSingularWorkspaceNetworkPolicy
),
meta
.
RESTScopeRoot
)
spec
,
err
:=
lib
.
RenderOpenAPISpec
(
lib
.
Config
{
Scheme
:
Scheme
,
Codecs
:
Codecs
,
...
...
@@ -89,6 +96,7 @@ func main() {
servicemeshv1alpha2
.
GetOpenAPIDefinitions
,
tenantv1alpha1
.
GetOpenAPIDefinitions
,
s2iv1alpha1
.
GetOpenAPIDefinitions
,
networkv1alpha1
.
GetOpenAPIDefinitions
,
},
Resources
:
[]
schema
.
GroupVersionResource
{
//TODO(runzexia) At present, the document generation requires the openapi structure of the go language,
...
...
@@ -100,6 +108,7 @@ func main() {
s2iv1alpha1
.
SchemeGroupVersion
.
WithResource
(
s2iv1alpha1
.
ResourcePluralS2iRun
),
s2iv1alpha1
.
SchemeGroupVersion
.
WithResource
(
s2iv1alpha1
.
ResourcePluralS2iBuilderTemplate
),
s2iv1alpha1
.
SchemeGroupVersion
.
WithResource
(
s2iv1alpha1
.
ResourcePluralS2iBuilder
),
networkv1alpha1
.
SchemeGroupVersion
.
WithResource
(
networkv1alpha1
.
ResourcePluralWorkspaceNetworkPolicy
),
},
Mapper
:
mapper
,
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录