diff --git a/deployments/helm/KubeArmorOperator/templates/rolebindng-rbac.yaml b/deployments/helm/KubeArmorOperator/templates/rolebindng-rbac.yaml index a001a50e8..a289b2c44 100644 --- a/deployments/helm/KubeArmorOperator/templates/rolebindng-rbac.yaml +++ b/deployments/helm/KubeArmorOperator/templates/rolebindng-rbac.yaml @@ -16,12 +16,12 @@ subjects: apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: - name: {{ .Values.kubearmorOperator.name }}-manage-snitch-job-role + name: {{ .Values.kubearmorOperator.name }}-manage-snitch-job-rolebinding namespace: {{.Release.Namespace}} roleRef: apiGroup: rbac.authorization.k8s.io kind: Role - name: {{ .Values.kubearmorOperator.name }}-manage-snitch-job-rolebinding + name: {{ .Values.kubearmorOperator.name }}-manage-snitch-job-role subjects: - kind: ServiceAccount name: {{ .Values.kubearmorOperator.name }} diff --git a/pkg/KubeArmorOperator/internal/controller/cluster.go b/pkg/KubeArmorOperator/internal/controller/cluster.go index b4bbe4334..2b2f9783e 100755 --- a/pkg/KubeArmorOperator/internal/controller/cluster.go +++ b/pkg/KubeArmorOperator/internal/controller/cluster.go @@ -144,7 +144,7 @@ func (clusterWatcher *ClusterWatcher) checkJobStatus(job, runtime, nodename stri j, err := clusterWatcher.Client.BatchV1().Jobs(common.Namespace).Get(context.TODO(), job, v1.GetOptions{}) if err != nil { - clusterWatcher.Log.Warnf("cannot get job: %s", job) + clusterWatcher.Log.Warnf("cannot get job: %s err: %s", job, err) return } @@ -157,7 +157,7 @@ func (clusterWatcher *ClusterWatcher) checkJobStatus(job, runtime, nodename stri }) if err != nil { - clusterWatcher.Log.Warnf("Cannot get job pod: %s", job) + clusterWatcher.Log.Warnf("Cannot get job pod: %s err: %s", job, err) return } @@ -168,7 +168,7 @@ func (clusterWatcher *ClusterWatcher) checkJobStatus(job, runtime, nodename stri FieldSelector: fmt.Sprintf("involvedObject.name=%s", pod.Name), }) if err != nil { - clusterWatcher.Log.Warnf("cannot get pod events for pod: %s", pod.Name) + clusterWatcher.Log.Warnf("cannot get pod events for pod: %s err: %s", pod.Name, err) return }