Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
iplakas
First Controller
Commits
20478242
Commit
20478242
authored
Feb 10, 2021
by
Ioannis Plakas
Browse files
Delete commented blocks
parent
f62092b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
6 deletions
+1
-6
controllers/pgouv_controller.go
controllers/pgouv_controller.go
+1
-6
No files found.
controllers/pgouv_controller.go
View file @
20478242
...
...
@@ -104,12 +104,7 @@ func (r *PgouvReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) {
}
else
if
diff
<
0
{
logger
.
Info
(
"need to delete a pod"
)
podlist
:=
&
corev1
.
PodList
{}
//lbs := map[string]string{
// "app": instance.Name,
// }
//labelSelector := labels.SelectorFromSet(lbs)
// lsopt := &client.ListOption{LabelSelector: labelSelector, Namespace: instance.name}
err
:=
r
.
List
(
context
,
podlist
,
client
.
InNamespace
(
req
.
Namespace
),
client
.
MatchingLabels
{
"app"
:
instance
.
Name
})
err
:=
r
.
List
(
context
,
podlist
,
client
.
InNamespace
(
req
.
Namespace
),
client
.
MatchingLabels
{
"app"
:
instance
.
Name
})
if
err
!=
nil
{
if
errors
.
IsNotFound
(
err
)
{
return
reconcile
.
Result
{},
nil
...
...
Write
Preview
Markdown
is supported
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