|
| 1 | +--- |
| 2 | +apiVersion: v1 |
| 3 | +kind: ConfigMap |
| 4 | +metadata: |
| 5 | + name: cluster-monitoring-config |
| 6 | + namespace: openshift-monitoring |
| 7 | + annotations: |
| 8 | + argocd.argoproj.io/sync-wave: "0" |
| 9 | +data: |
| 10 | + config.yaml: | |
| 11 | + enableUserWorkload: true |
| 12 | +--- |
| 13 | +apiVersion: v1 |
| 14 | +kind: ConfigMap |
| 15 | +metadata: |
| 16 | + name: blackbox-exporter-config |
| 17 | + namespace: grafana |
| 18 | + annotations: |
| 19 | + argocd.argoproj.io/sync-wave: "1" |
| 20 | +data: |
| 21 | + blackbox.yml: | |
| 22 | + modules: |
| 23 | + http_2xx: |
| 24 | + prober: http |
| 25 | + timeout: 10s |
| 26 | + http: |
| 27 | + method: GET |
| 28 | + preferred_ip_protocol: ip4 |
| 29 | + valid_http_versions: ["HTTP/1.1", "HTTP/2.0"] |
| 30 | +--- |
| 31 | +apiVersion: apps/v1 |
| 32 | +kind: Deployment |
| 33 | +metadata: |
| 34 | + name: blackbox-exporter |
| 35 | + namespace: grafana |
| 36 | + annotations: |
| 37 | + argocd.argoproj.io/sync-wave: "1" |
| 38 | + ignore-check.kube-linter.io/unset-memory-requirements: "No limits on single-node cluster" |
| 39 | +spec: |
| 40 | + replicas: 1 |
| 41 | + selector: |
| 42 | + matchLabels: |
| 43 | + app: blackbox-exporter |
| 44 | + template: |
| 45 | + metadata: |
| 46 | + labels: |
| 47 | + app: blackbox-exporter |
| 48 | + spec: |
| 49 | + securityContext: |
| 50 | + runAsNonRoot: true |
| 51 | + seccompProfile: |
| 52 | + type: RuntimeDefault |
| 53 | + containers: |
| 54 | + - name: blackbox-exporter |
| 55 | + image: quay.io/prometheus/blackbox-exporter:v0.26.0 |
| 56 | + args: |
| 57 | + - --config.file=/etc/blackbox/blackbox.yml |
| 58 | + ports: |
| 59 | + - containerPort: 9115 |
| 60 | + name: http |
| 61 | + resources: |
| 62 | + requests: |
| 63 | + cpu: "50m" |
| 64 | + memory: "64Mi" |
| 65 | + securityContext: |
| 66 | + allowPrivilegeEscalation: false |
| 67 | + capabilities: |
| 68 | + drop: |
| 69 | + - ALL |
| 70 | + readOnlyRootFilesystem: true |
| 71 | + runAsNonRoot: true |
| 72 | + runAsUser: 65534 |
| 73 | + volumeMounts: |
| 74 | + - name: config |
| 75 | + mountPath: /etc/blackbox |
| 76 | + volumes: |
| 77 | + - name: config |
| 78 | + configMap: |
| 79 | + name: blackbox-exporter-config |
| 80 | +--- |
| 81 | +apiVersion: v1 |
| 82 | +kind: Service |
| 83 | +metadata: |
| 84 | + name: blackbox-exporter |
| 85 | + namespace: grafana |
| 86 | + annotations: |
| 87 | + argocd.argoproj.io/sync-wave: "1" |
| 88 | +spec: |
| 89 | + selector: |
| 90 | + app: blackbox-exporter |
| 91 | + ports: |
| 92 | + - name: http |
| 93 | + port: 9115 |
| 94 | + targetPort: http |
| 95 | +--- |
| 96 | +apiVersion: monitoring.coreos.com/v1 |
| 97 | +kind: Probe |
| 98 | +metadata: |
| 99 | + name: status-endpoints |
| 100 | + namespace: grafana |
| 101 | + annotations: |
| 102 | + argocd.argoproj.io/sync-wave: "1" |
| 103 | +spec: |
| 104 | + interval: 30s |
| 105 | + module: http_2xx |
| 106 | + prober: |
| 107 | + path: /probe |
| 108 | + url: blackbox-exporter.grafana.svc:9115 |
| 109 | + targets: |
| 110 | + staticConfig: |
| 111 | + static: |
| 112 | + - https://argocd.makeitwork.cloud |
| 113 | + - https://grafana.makeitwork.cloud |
| 114 | + - https://ansible.makeitwork.cloud |
| 115 | + - https://status.makeitwork.cloud |
| 116 | +--- |
| 117 | +apiVersion: v1 |
| 118 | +kind: ServiceAccount |
| 119 | +metadata: |
| 120 | + name: grafana-status-metrics-reader |
| 121 | + namespace: grafana |
| 122 | + annotations: |
| 123 | + argocd.argoproj.io/sync-wave: "1" |
| 124 | +--- |
| 125 | +apiVersion: v1 |
| 126 | +kind: Secret |
| 127 | +metadata: |
| 128 | + name: grafana-status-metrics-reader-token |
| 129 | + namespace: grafana |
| 130 | + annotations: |
| 131 | + kubernetes.io/service-account.name: grafana-status-metrics-reader |
| 132 | + argocd.argoproj.io/sync-wave: "1" |
| 133 | +type: kubernetes.io/service-account-token |
| 134 | +--- |
| 135 | +apiVersion: rbac.authorization.k8s.io/v1 |
| 136 | +kind: ClusterRoleBinding |
| 137 | +metadata: |
| 138 | + name: grafana-status-metrics-reader |
| 139 | + annotations: |
| 140 | + argocd.argoproj.io/sync-wave: "1" |
| 141 | +roleRef: |
| 142 | + apiGroup: rbac.authorization.k8s.io |
| 143 | + kind: ClusterRole |
| 144 | + name: cluster-monitoring-view |
| 145 | +subjects: |
| 146 | + - kind: ServiceAccount |
| 147 | + name: grafana-status-metrics-reader |
| 148 | + namespace: grafana |
0 commit comments