|
@@ -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:
|
|
k8s:
|
|
kubeconfig: tmp/kubeconfig-ocp4
|
|
kubeconfig: tmp/kubeconfig-ocp4
|
|
validate_certs: no
|
|
validate_certs: no
|
|
api_version: v1
|
|
api_version: v1
|
|
kind: namespace
|
|
kind: namespace
|
|
- name: openshift-operators-redhat
|
|
|
|
|
|
+ name: "{{ item }}"
|
|
definition:
|
|
definition:
|
|
metadata:
|
|
metadata:
|
|
labels:
|
|
labels:
|
|
openshift.io/cluster-monitoring: "true"
|
|
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.
|
|
# Create a ClusterLogging instance if not yet there.
|
|
|
|
|