Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
1105 Внедрение механизмов обеспечения безопасности цепочки поставки программных проектов
Legacy
scanned-projects
helm
Commits
2cee4c68
Commit
2cee4c68
authored
7 years ago
by
Paolo Mainardi
Browse files
Options
Download
Patches
Plain Diff
add appsv1beta1 and appsv1beta2 apiVersion
parent
d757d981
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pkg/kube/wait.go
+30
-0
pkg/kube/wait.go
with
30 additions
and
0 deletions
+30
-0
pkg/kube/wait.go
+
30
−
0
View file @
2cee4c68
...
@@ -88,6 +88,36 @@ func (c *Client) waitForResources(timeout time.Duration, created Result) error {
...
@@ -88,6 +88,36 @@ func (c *Client) waitForResources(timeout time.Duration, created Result) error {
currentDeployment
,
currentDeployment
,
}
}
deployments
=
append
(
deployments
,
newDeployment
)
deployments
=
append
(
deployments
,
newDeployment
)
case
*
appsv1beta1
.
Deployment
:
currentDeployment
,
err
:=
kcs
.
ExtensionsV1beta1
()
.
Deployments
(
value
.
Namespace
)
.
Get
(
value
.
Name
,
metav1
.
GetOptions
{})
if
err
!=
nil
{
return
false
,
err
}
// Find RS associated with deployment
newReplicaSet
,
err
:=
deploymentutil
.
GetNewReplicaSet
(
currentDeployment
,
kcs
.
ExtensionsV1beta1
())
if
err
!=
nil
||
newReplicaSet
==
nil
{
return
false
,
err
}
newDeployment
:=
deployment
{
newReplicaSet
,
currentDeployment
,
}
deployments
=
append
(
deployments
,
newDeployment
)
case
*
appsv1beta2
.
Deployment
:
currentDeployment
,
err
:=
kcs
.
ExtensionsV1beta1
()
.
Deployments
(
value
.
Namespace
)
.
Get
(
value
.
Name
,
metav1
.
GetOptions
{})
if
err
!=
nil
{
return
false
,
err
}
// Find RS associated with deployment
newReplicaSet
,
err
:=
deploymentutil
.
GetNewReplicaSet
(
currentDeployment
,
kcs
.
ExtensionsV1beta1
())
if
err
!=
nil
||
newReplicaSet
==
nil
{
return
false
,
err
}
newDeployment
:=
deployment
{
newReplicaSet
,
currentDeployment
,
}
deployments
=
append
(
deployments
,
newDeployment
)
case
*
extensions
.
Deployment
:
case
*
extensions
.
Deployment
:
currentDeployment
,
err
:=
kcs
.
ExtensionsV1beta1
()
.
Deployments
(
value
.
Namespace
)
.
Get
(
value
.
Name
,
metav1
.
GetOptions
{})
currentDeployment
,
err
:=
kcs
.
ExtensionsV1beta1
()
.
Deployments
(
value
.
Namespace
)
.
Get
(
value
.
Name
,
metav1
.
GetOptions
{})
if
err
!=
nil
{
if
err
!=
nil
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets