Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
水淹萌龙
kubesphere
提交
91bca3cf
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看板
未验证
提交
91bca3cf
编写于
9月 02, 2019
作者:
R
runzexia
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix comment
Signed-off-by:
N
runzexia
<
runzexia@yunify.com
>
上级
3156362f
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
8 addition
and
7 deletion
+8
-7
pkg/apis/devops/v1alpha2/register.go
pkg/apis/devops/v1alpha2/register.go
+3
-2
pkg/controller/s2ibinary/s2ibinary_controller.go
pkg/controller/s2ibinary/s2ibinary_controller.go
+3
-3
pkg/controller/s2irun/s2irun_controller.go
pkg/controller/s2irun/s2irun_controller.go
+1
-1
pkg/models/devops/s2ibinary_handler.go
pkg/models/devops/s2ibinary_handler.go
+1
-1
未找到文件。
pkg/apis/devops/v1alpha2/register.go
浏览文件 @
91bca3cf
...
@@ -22,7 +22,7 @@ import (
...
@@ -22,7 +22,7 @@ import (
"github.com/emicklei/go-restful"
"github.com/emicklei/go-restful"
"github.com/emicklei/go-restful-openapi"
"github.com/emicklei/go-restful-openapi"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/runtime/schema"
v1alpha1devops
"kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1"
devopsv1alpha1
"kubesphere.io/kubesphere/pkg/apis/devops/v1alpha1"
devopsapi
"kubesphere.io/kubesphere/pkg/apiserver/devops"
devopsapi
"kubesphere.io/kubesphere/pkg/apiserver/devops"
"kubesphere.io/kubesphere/pkg/apiserver/runtime"
"kubesphere.io/kubesphere/pkg/apiserver/runtime"
"kubesphere.io/kubesphere/pkg/constants"
"kubesphere.io/kubesphere/pkg/constants"
...
@@ -622,7 +622,7 @@ The last one is encrypted info, such as the password of the username-password ty
...
@@ -622,7 +622,7 @@ The last one is encrypted info, such as the password of the username-password ty
Param
(
webservice
.
PathParameter
(
"s2ibinary"
,
"the name of s2ibinary"
))
.
Param
(
webservice
.
PathParameter
(
"s2ibinary"
,
"the name of s2ibinary"
))
.
Param
(
webservice
.
FormParameter
(
"s2ibinary"
,
"file to upload"
))
.
Param
(
webservice
.
FormParameter
(
"s2ibinary"
,
"file to upload"
))
.
Param
(
webservice
.
FormParameter
(
"md5"
,
"md5 of file"
))
.
Param
(
webservice
.
FormParameter
(
"md5"
,
"md5 of file"
))
.
Returns
(
http
.
StatusOK
,
RespOK
,
v1alpha1devops
.
S2iBinary
{}))
Returns
(
http
.
StatusOK
,
RespOK
,
devopsv1alpha1
.
S2iBinary
{}))
webservice
.
Route
(
webservice
.
GET
(
"/namespaces/{namespace}/s2ibinaries/{s2ibinary}/file/{file}"
)
.
webservice
.
Route
(
webservice
.
GET
(
"/namespaces/{namespace}/s2ibinaries/{s2ibinary}/file/{file}"
)
.
To
(
devopsapi
.
DownloadS2iBinary
)
.
To
(
devopsapi
.
DownloadS2iBinary
)
.
...
@@ -630,6 +630,7 @@ The last one is encrypted info, such as the password of the username-password ty
...
@@ -630,6 +630,7 @@ The last one is encrypted info, such as the password of the username-password ty
Doc
(
"Download S2iBinary file"
)
.
Doc
(
"Download S2iBinary file"
)
.
Param
(
webservice
.
PathParameter
(
"namespace"
,
"the name of namespaces"
))
.
Param
(
webservice
.
PathParameter
(
"namespace"
,
"the name of namespaces"
))
.
Param
(
webservice
.
PathParameter
(
"s2ibinary"
,
"the name of s2ibinary"
))
.
Param
(
webservice
.
PathParameter
(
"s2ibinary"
,
"the name of s2ibinary"
))
.
Param
(
webservice
.
PathParameter
(
"file"
,
"the name of binary file"
))
.
Returns
(
http
.
StatusOK
,
RespOK
,
nil
))
Returns
(
http
.
StatusOK
,
RespOK
,
nil
))
// TODO are not used in this version. will be added in 2.1.0
// TODO are not used in this version. will be added in 2.1.0
...
...
pkg/controller/s2ibinary/s2ibinary_controller.go
浏览文件 @
91bca3cf
...
@@ -119,7 +119,7 @@ func (c *S2iBinaryController) processNextWorkItem() bool {
...
@@ -119,7 +119,7 @@ func (c *S2iBinaryController) processNextWorkItem() bool {
return
fmt
.
Errorf
(
"error syncing '%s': %s, requeuing"
,
key
,
err
.
Error
())
return
fmt
.
Errorf
(
"error syncing '%s': %s, requeuing"
,
key
,
err
.
Error
())
}
}
c
.
workqueue
.
Forget
(
obj
)
c
.
workqueue
.
Forget
(
obj
)
klog
.
Infof
(
"Successfully synced '%s'"
,
key
)
klog
.
V
(
5
)
.
Infof
(
"Successfully synced '%s'"
,
key
)
return
nil
return
nil
}(
obj
)
}(
obj
)
...
@@ -191,7 +191,7 @@ func (c *S2iBinaryController) syncHandler(key string) error {
...
@@ -191,7 +191,7 @@ func (c *S2iBinaryController) syncHandler(key string) error {
}
else
{
}
else
{
if
sliceutil
.
HasString
(
s2ibin
.
ObjectMeta
.
Finalizers
,
devopsv1alpha1
.
S2iBinaryFinalizerName
)
{
if
sliceutil
.
HasString
(
s2ibin
.
ObjectMeta
.
Finalizers
,
devopsv1alpha1
.
S2iBinaryFinalizerName
)
{
if
err
:=
c
.
D
eleteBinaryInS3
(
s2ibin
);
err
!=
nil
{
if
err
:=
c
.
d
eleteBinaryInS3
(
s2ibin
);
err
!=
nil
{
klog
.
Error
(
err
,
fmt
.
Sprintf
(
"failed to delete resource %s in s3"
,
key
))
klog
.
Error
(
err
,
fmt
.
Sprintf
(
"failed to delete resource %s in s3"
,
key
))
return
err
return
err
}
}
...
@@ -209,7 +209,7 @@ func (c *S2iBinaryController) syncHandler(key string) error {
...
@@ -209,7 +209,7 @@ func (c *S2iBinaryController) syncHandler(key string) error {
return
nil
return
nil
}
}
func
(
c
*
S2iBinaryController
)
D
eleteBinaryInS3
(
s2ibin
*
devopsv1alpha1
.
S2iBinary
)
error
{
func
(
c
*
S2iBinaryController
)
d
eleteBinaryInS3
(
s2ibin
*
devopsv1alpha1
.
S2iBinary
)
error
{
s3client
:=
s2is3
.
Client
()
s3client
:=
s2is3
.
Client
()
input
:=
&
s3
.
DeleteObjectInput
{
input
:=
&
s3
.
DeleteObjectInput
{
Bucket
:
s2is3
.
Bucket
(),
Bucket
:
s2is3
.
Bucket
(),
...
...
pkg/controller/s2irun/s2irun_controller.go
浏览文件 @
91bca3cf
...
@@ -126,7 +126,7 @@ func (c *S2iRunController) processNextWorkItem() bool {
...
@@ -126,7 +126,7 @@ func (c *S2iRunController) processNextWorkItem() bool {
return
fmt
.
Errorf
(
"error syncing '%s': %s, requeuing"
,
key
,
err
.
Error
())
return
fmt
.
Errorf
(
"error syncing '%s': %s, requeuing"
,
key
,
err
.
Error
())
}
}
c
.
workqueue
.
Forget
(
obj
)
c
.
workqueue
.
Forget
(
obj
)
klog
.
Infof
(
"Successfully synced '%s'"
,
key
)
klog
.
V
(
5
)
.
Infof
(
"Successfully synced '%s'"
,
key
)
return
nil
return
nil
}(
obj
)
}(
obj
)
...
...
pkg/models/devops/s2ibinary_handler.go
浏览文件 @
91bca3cf
...
@@ -22,7 +22,7 @@ import (
...
@@ -22,7 +22,7 @@ import (
)
)
const
(
const
(
GetS2iBinaryURL
=
"
http://ks-apiserver.kubesphere-system.svc/
kapis/devops.kubesphere.io/v1alpha2/namespaces/%s/s2ibinaries/%s/file/%s"
GetS2iBinaryURL
=
"kapis/devops.kubesphere.io/v1alpha2/namespaces/%s/s2ibinaries/%s/file/%s"
)
)
func
UploadS2iBinary
(
namespace
,
name
,
md5
string
,
fileHeader
*
multipart
.
FileHeader
)
(
*
v1alpha1
.
S2iBinary
,
error
)
{
func
UploadS2iBinary
(
namespace
,
name
,
md5
string
,
fileHeader
*
multipart
.
FileHeader
)
(
*
v1alpha1
.
S2iBinary
,
error
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录