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
f1d4d15b
Unverified
Commit
f1d4d15b
authored
5 years ago
by
Matthew Fisher
Committed by
GitHub
5 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #6654 from bacongobbler/fix-6643
fix(kube): fix race condition
parents
c0c2270f
33bb8885
release-2.17
dev-v2
release-2.16
v2.17.0
v2.17.0-rc.1
v2.16.12
v2.16.11
v2.16.10
v2.16.9
v2.16.8
v2.16.7
v2.16.6
v2.16.5
v2.16.4
v2.16.3
v2.16.2
v2.16.1
v2.16.0
v2.16.0-rc.2
v2.16.0-rc.1
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pkg/kube/client.go
+4
-0
pkg/kube/client.go
with
4 additions
and
0 deletions
+4
-0
pkg/kube/client.go
+
4
−
0
View file @
f1d4d15b
...
@@ -218,6 +218,8 @@ func (c *Client) Get(namespace string, reader io.Reader) (string, error) {
...
@@ -218,6 +218,8 @@ func (c *Client) Get(namespace string, reader io.Reader) (string, error) {
// Since we don't know what order the objects come in, let's group them by the types and then sort them, so
// Since we don't know what order the objects come in, let's group them by the types and then sort them, so
// that when we print them, they come out looking good (headers apply to subgroups, etc.).
// that when we print them, they come out looking good (headers apply to subgroups, etc.).
objs
:=
make
(
map
[
string
](
map
[
string
]
runtime
.
Object
))
objs
:=
make
(
map
[
string
](
map
[
string
]
runtime
.
Object
))
mux
:=
&
sync
.
Mutex
{}
infos
,
err
:=
c
.
BuildUnstructured
(
namespace
,
reader
)
infos
,
err
:=
c
.
BuildUnstructured
(
namespace
,
reader
)
if
err
!=
nil
{
if
err
!=
nil
{
return
""
,
err
return
""
,
err
...
@@ -227,6 +229,8 @@ func (c *Client) Get(namespace string, reader io.Reader) (string, error) {
...
@@ -227,6 +229,8 @@ func (c *Client) Get(namespace string, reader io.Reader) (string, error) {
missing
:=
[]
string
{}
missing
:=
[]
string
{}
err
=
perform
(
infos
,
func
(
info
*
resource
.
Info
)
error
{
err
=
perform
(
infos
,
func
(
info
*
resource
.
Info
)
error
{
mux
.
Lock
()
defer
mux
.
Unlock
()
c
.
Log
(
"Doing get for %s: %q"
,
info
.
Mapping
.
GroupVersionKind
.
Kind
,
info
.
Name
)
c
.
Log
(
"Doing get for %s: %q"
,
info
.
Mapping
.
GroupVersionKind
.
Kind
,
info
.
Name
)
if
err
:=
info
.
Get
();
err
!=
nil
{
if
err
:=
info
.
Get
();
err
!=
nil
{
c
.
Log
(
"WARNING: Failed Get for resource %q: %s"
,
info
.
Name
,
err
)
c
.
Log
(
"WARNING: Failed Get for resource %q: %s"
,
info
.
Name
,
err
)
...
...
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