Skip to content

Commit c695e39

Browse files
authored
Merge pull request #74645 from eromanova97/OBSDOCS-547
OBSDOCS-547: Remove explicit mention of local persistent storage volu…
2 parents 60295a5 + cde156c commit c695e39

6 files changed

+183
-309
lines changed

modules/monitoring-configuring-a-local-persistent-volume-claim.adoc renamed to modules/monitoring-configuring-a-persistent-volume-claim.adoc

Lines changed: 19 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,11 @@
33
// * observability/monitoring/configuring-the-monitoring-stack.adoc
44

55
:_mod-docs-content-type: PROCEDURE
6-
[id="configuring-a-local-persistent-volume-claim_{context}"]
7-
ifndef::openshift-dedicated,openshift-rosa[]
8-
= Configuring a local persistent volume claim
9-
endif::openshift-dedicated,openshift-rosa[]
10-
ifdef::openshift-dedicated,openshift-rosa[]
6+
[id="configuring-a-persistent-volume-claim_{context}"]
7+
118
= Configuring a persistent volume claim
12-
endif::openshift-dedicated,openshift-rosa[]
139

14-
For monitoring components to use a persistent volume (PV), you must configure a persistent volume claim (PVC).
10+
To use a persistent volume (PV) for monitoring components, you must configure a persistent volume claim (PVC).
1511

1612
.Prerequisites
1713

@@ -52,18 +48,21 @@ metadata:
5248
namespace: openshift-monitoring
5349
data:
5450
config.yaml: |
55-
<component>:
51+
<component>: #<1>
5652
volumeClaimTemplate:
5753
spec:
58-
storageClassName: <storage_class>
54+
storageClassName: <storage_class> #<2>
5955
resources:
6056
requests:
61-
storage: <amount_of_storage>
57+
storage: <amount_of_storage> #<3>
6258
----
59+
<1> Specify the core monitoring component for which you want to configure the PVC.
60+
<2> Specify an existing storage class. If a storage class is not specified, the default storage class is used.
61+
<3> Specify the amount of required storage.
6362
+
6463
See the link:https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims[Kubernetes documentation on PersistentVolumeClaims] for information on how to specify `volumeClaimTemplate`.
6564
+
66-
The following example configures a PVC that claims local persistent storage for the Prometheus instance that monitors core {product-title} components:
65+
The following example configures a PVC that claims persistent storage for the Prometheus instance that monitors core {product-title} components:
6766
+
6867
[source,yaml]
6968
----
@@ -77,33 +76,11 @@ data:
7776
prometheusK8s:
7877
volumeClaimTemplate:
7978
spec:
80-
storageClassName: local-storage
79+
storageClassName: my-storage-class
8180
resources:
8281
requests:
8382
storage: 40Gi
8483
----
85-
+
86-
In the above example, the storage class created by the Local Storage Operator is called `local-storage`.
87-
+
88-
The following example configures a PVC that claims local persistent storage for Alertmanager:
89-
+
90-
[source,yaml]
91-
----
92-
apiVersion: v1
93-
kind: ConfigMap
94-
metadata:
95-
name: cluster-monitoring-config
96-
namespace: openshift-monitoring
97-
data:
98-
config.yaml: |
99-
alertmanagerMain:
100-
volumeClaimTemplate:
101-
spec:
102-
storageClassName: local-storage
103-
resources:
104-
requests:
105-
storage: 10Gi
106-
----
10784

10885
** *To configure a PVC for a component that monitors user-defined projects*:
10986
endif::openshift-dedicated,openshift-rosa[]
@@ -125,58 +102,21 @@ metadata:
125102
namespace: openshift-user-workload-monitoring
126103
data:
127104
config.yaml: |
128-
<component>:
105+
<component>: #<1>
129106
volumeClaimTemplate:
130107
spec:
131-
storageClassName: <storage_class>
108+
storageClassName: <storage_class> #<2>
132109
resources:
133110
requests:
134-
storage: <amount_of_storage>
111+
storage: <amount_of_storage> #<3>
135112
----
113+
<1> Specify the component for user-defined monitoring for which you want to configure the PVC.
114+
<2> Specify an existing storage class. If a storage class is not specified, the default storage class is used.
115+
<3> Specify the amount of required storage.
136116
+
137117
See the link:https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims[Kubernetes documentation on PersistentVolumeClaims] for information on how to specify `volumeClaimTemplate`.
138118
+
139-
The following example configures a PVC that claims
140-
ifndef::openshift-dedicated,openshift-rosa[]
141-
local
142-
endif::openshift-dedicated,openshift-rosa[]
143-
persistent storage for the Prometheus instance that monitors user-defined projects:
144-
+
145-
[source,yaml]
146-
----
147-
apiVersion: v1
148-
kind: ConfigMap
149-
metadata:
150-
name: user-workload-monitoring-config
151-
namespace: openshift-user-workload-monitoring
152-
data:
153-
config.yaml: |
154-
prometheus:
155-
volumeClaimTemplate:
156-
spec:
157-
ifndef::openshift-dedicated,openshift-rosa[]
158-
storageClassName: local-storage
159-
endif::openshift-dedicated,openshift-rosa[]
160-
ifdef::openshift-dedicated,openshift-rosa[]
161-
storageClassName: gp3
162-
endif::openshift-dedicated,openshift-rosa[]
163-
resources:
164-
requests:
165-
storage: 40Gi
166-
----
167-
+
168-
ifndef::openshift-dedicated,openshift-rosa[]
169-
In the above example, the storage class created by the Local Storage Operator is called `local-storage`.
170-
endif::openshift-dedicated,openshift-rosa[]
171-
ifdef::openshift-dedicated,openshift-rosa[]
172-
The above example uses the `gp3` storage class.
173-
endif::openshift-dedicated,openshift-rosa[]
174-
+
175-
The following example configures a PVC that claims
176-
ifndef::openshift-dedicated,openshift-rosa[]
177-
local
178-
endif::openshift-dedicated,openshift-rosa[]
179-
persistent storage for Thanos Ruler:
119+
The following example configures a PVC that claims persistent storage for Thanos Ruler:
180120
+
181121
[source,yaml]
182122
----
@@ -190,12 +130,7 @@ data:
190130
thanosRuler:
191131
volumeClaimTemplate:
192132
spec:
193-
ifndef::openshift-dedicated,openshift-rosa[]
194-
storageClassName: local-storage
195-
endif::openshift-dedicated,openshift-rosa[]
196-
ifdef::openshift-dedicated,openshift-rosa[]
197-
storageClassName: gp3
198-
endif::openshift-dedicated,openshift-rosa[]
133+
storageClassName: my-storage-class
199134
resources:
200135
requests:
201136
storage: 10Gi

modules/monitoring-configuring-persistent-storage.adoc

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,26 @@ Run cluster monitoring with persistent storage to gain the following benefits:
1111
* Protect your metrics and alerting data from data loss by storing them in a persistent volume (PV). As a result, they can survive pods being restarted or recreated.
1212
* Avoid getting duplicate notifications and losing silences for alerts when the Alertmanager pods are restarted.
1313
14-
For production environments, it is highly recommended to configure persistent storage. Because of the high IO demands, it is advantageous to use local storage.
14+
For production environments, it is highly recommended to configure persistent storage.
1515

16-
[id="persistent-storage-prerequisites"]
16+
[id="persistent-storage-prerequisites_{context}"]
1717
== Persistent storage prerequisites
1818

1919
ifdef::openshift-dedicated,openshift-rosa[]
2020
* Use the block type of storage.
2121
endif::openshift-dedicated,openshift-rosa[]
2222

2323
ifndef::openshift-dedicated,openshift-rosa[]
24-
* Dedicate sufficient local persistent storage to ensure that the disk does not become full. How much storage you need depends on the number of pods.
25-
26-
* Verify that you have a persistent volume (PV) ready to be claimed by the persistent volume claim (PVC), one PV for each replica. Because Prometheus and Alertmanager both have two replicas, you need four PVs to support the entire monitoring stack. The PVs are available from the Local Storage Operator, but not if you have enabled dynamically provisioned storage.
24+
* Dedicate sufficient persistent storage to ensure that the disk does not become full.
2725

2826
* Use `Filesystem` as the storage type value for the `volumeMode` parameter when you configure the persistent volume.
2927
+
30-
[NOTE]
31-
====
32-
If you use a local volume for persistent storage, do not use a raw block volume, which is described with `volumeMode: Block` in the `LocalVolume` object. Prometheus cannot use raw block volumes.
33-
====
34-
+
3528
[IMPORTANT]
3629
====
37-
Prometheus does not support file systems that are not POSIX compliant.
30+
* Do not use a raw block volume, which is described with `volumeMode: Block` in the `PersistentVolume` resource. Prometheus cannot use raw block volumes.
31+
32+
* Prometheus does not support file systems that are not POSIX compliant.
3833
For example, some NFS file system implementations are not POSIX compliant.
3934
If you want to use an NFS file system for storage, verify with the vendor that their NFS implementation is fully POSIX compliant.
4035
====
41-
endif::openshift-dedicated,openshift-rosa[]
36+
endif::openshift-dedicated,openshift-rosa[]

0 commit comments

Comments
 (0)