Skip to content

Commit

Permalink
logging and namespace updates
Browse files Browse the repository at this point in the history
Signed-off-by: Scott Trent <[email protected]>
  • Loading branch information
trent-s committed Jun 7, 2024
1 parent 8126b2f commit 43a4d7c
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.17
0.0.18
10 changes: 5 additions & 5 deletions bundle/manifests/susql-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ metadata:
]
capabilities: Basic Install
categories: Monitoring
containerImage: quay.io/sustainable_computing_io/susql_operator:0.0.17
createdAt: "2024-06-05T09:27:16Z"
containerImage: quay.io/sustainable_computing_io/susql_operator:0.0.18
createdAt: "2024-06-07T09:21:42Z"
description: 'Aggregates energy data from pods tagged with SusQL labels '
operators.operatorframework.io/builder: operator-sdk-v1.34.1
operators.operatorframework.io/project_layout: go.kubebuilder.io/v4
repository: https://github.com/sustainable-computing-io/susql-operator
support: https://github.com/sustainable-computing-io/susql-operator/issues
name: susql-operator.v0.0.17
name: susql-operator.v0.0.18
namespace: placeholder
spec:
apiservicedefinitions: {}
Expand Down Expand Up @@ -216,7 +216,7 @@ spec:
value: http://0.0.0.0:8082
- name: SAMPLING-RATE
value: "2"
image: quay.io/sustainable_computing_io/susql_operator:0.0.17
image: quay.io/sustainable_computing_io/susql_operator:0.0.18
imagePullPolicy: IfNotPresent
livenessProbe:
httpGet:
Expand Down Expand Up @@ -320,4 +320,4 @@ spec:
provider:
name: SusQL Operator Contributors
url: https://github.com/sustainable-computing-io/susql-operator
version: 0.0.17
version: 0.0.18
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ kind: Kustomization
images:
- name: controller
newName: quay.io/sustainable_computing_io/susql_operator
newTag: 0.0.17
newTag: 0.0.18
2 changes: 2 additions & 0 deletions config/rbac/auth_proxy_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ rules:
resources:
- pods
- pods/status
- namespaces
- namespaces/status
verbs:
- get
- list
Expand Down
2 changes: 2 additions & 0 deletions internal/controller/resource_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package controller

import (
"context"
"fmt"

"sigs.k8s.io/controller-runtime/pkg/client"

Expand All @@ -28,6 +29,7 @@ import (
// Functions to get data from the cluster
func (r *LabelGroupReconciler) GetPodNamesMatchingLabels(ctx context.Context, labelGroup *susqlv1.LabelGroup) ([]string, []string, error) {
pods := &v1.PodList{}
r.Logger.V(5).Info(fmt.Sprintf("[GetPodNamesMatchingLabels] pods: %#v", pods))

if err := r.List(ctx, pods, client.UnsafeDisableDeepCopy, (client.MatchingLabels)(labelGroup.Status.KubernetesLabels)); err != nil {
return nil, nil, err
Expand Down
10 changes: 10 additions & 0 deletions test/rhosaij.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
apiVersion: susql.ibm.com/v1
kind: LabelGroup
metadata:
name: openshiftaij
namespace: rhods-notebooks
spec:
labels:
- openshiftaij
---

0 comments on commit 43a4d7c

Please sign in to comment.