Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Clutch
Commits
14aaca74
Commit
14aaca74
authored
4 years ago
by
Gastón Kleiman
Browse files
Options
Download
Email Patches
Plain Diff
Use clientset's namespace instead of ns passed by param
parent
8e96aafe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
backend/service/k8s/pods.go
+4
-4
backend/service/k8s/pods.go
with
4 additions
and
4 deletions
+4
-4
backend/service/k8s/pods.go
+
4
-
4
View file @
14aaca74
...
...
@@ -17,7 +17,7 @@ func (s *svc) DescribePod(ctx context.Context, clientset, cluster, namespace, na
return
nil
,
err
}
opts
:=
metav1
.
GetOptions
{}
pod
,
err
:=
cs
.
CoreV1
()
.
Pods
(
n
amespace
)
.
Get
(
name
,
opts
)
pod
,
err
:=
cs
.
CoreV1
()
.
Pods
(
cs
.
N
amespace
()
)
.
Get
(
name
,
opts
)
if
err
!=
nil
{
return
nil
,
err
}
...
...
@@ -48,7 +48,7 @@ func (s *svc) ListPods(ctx context.Context, clientset, cluster, namespace string
opts
.
LabelSelector
=
k8slabels
.
FormatLabels
(
listPodsOpts
.
Labels
)
}
podList
,
err
:=
cs
.
CoreV1
()
.
Pods
(
n
amespace
)
.
List
(
opts
)
podList
,
err
:=
cs
.
CoreV1
()
.
Pods
(
cs
.
N
amespace
()
)
.
List
(
opts
)
if
err
!=
nil
{
return
nil
,
err
}
...
...
@@ -68,7 +68,7 @@ func (s *svc) UpdatePodAnnotations(ctx context.Context, clientset, cluster, name
return
err
}
pod
,
err
:=
cs
.
CoreV1
()
.
Pods
(
n
amespace
)
.
Get
(
name
,
metav1
.
GetOptions
{})
pod
,
err
:=
cs
.
CoreV1
()
.
Pods
(
cs
.
N
amespace
()
)
.
Get
(
name
,
metav1
.
GetOptions
{})
if
err
!=
nil
{
return
err
}
...
...
@@ -88,7 +88,7 @@ func (s *svc) UpdatePodAnnotations(ctx context.Context, clientset, cluster, name
}
}
_
,
err
=
cs
.
CoreV1
()
.
Pods
(
n
amespace
)
.
Update
(
pod
)
_
,
err
=
cs
.
CoreV1
()
.
Pods
(
cs
.
N
amespace
()
)
.
Update
(
pod
)
return
err
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment