Grega Bremec 7 mesi fa
parent
commit
f687f30fa1
1 ha cambiato i file con 15 aggiunte e 5 eliminazioni
  1. 15 5
      playbooks/roles/deploy-logging/tasks/main.yml

+ 15 - 5
playbooks/roles/deploy-logging/tasks/main.yml

@@ -1,19 +1,29 @@
 ---
-- name: Ensure the openshift-operators-redhat and openshift-operators project are enabled for monitoring.
+- name: Ensure all the relevant projects are enabled for monitoring
   k8s:
     kubeconfig: tmp/kubeconfig-ocp4
     validate_certs: no
     api_version: v1
     kind: namespace
-    name: openshift-operators-redhat
+    name: "{{ item }}"
     definition:
       metadata:
         labels:
           openshift.io/cluster-monitoring: "true"
+  loop:
+    - openshift-operators-redhat
+    - openshift-operators
+    - openshift-logging
 
-# Ensure openshift-logging namespace is there, and it is enabled for monitoring.
-
-# Create a LokiStack resource if not yet there.
+- name: Create a LokiStack resource if not yet there
+  k8s:
+    kubeconfig: tmp/kubeconfig-ocp4
+    validate_certs: no
+    api_version: loki.grafana.com/v1
+    kind: lokistack
+    name: logging-loki
+    namespace: openshift-logging
+    src: files/loki-stack.yml
 
 # Create a ClusterLogging instance if not yet there.