mirror of
https://github.com/carlosedp/cluster-monitoring.git
synced 2024-11-20 19:07:17 +01:00
Add option to configure the StorageClass
This commit is contained in:
parent
c2e91b0ea9
commit
ad1d165158
@ -82,9 +82,8 @@ local vars = import 'vars.jsonnet';
|
||||
pvc.new() +
|
||||
pvc.mixin.spec.withAccessModes('ReadWriteOnce') +
|
||||
pvc.mixin.spec.resources.withRequests({ storage: vars.enablePersistence.prometheusSizePV }) +
|
||||
(if vars.enablePersistence.prometheusPV != null then pvc.mixin.spec.withVolumeName(vars.enablePersistence.prometheusPV)),
|
||||
// Uncomment below to define a StorageClass name
|
||||
//+ pvc.mixin.spec.withStorageClassName('nfs-master-ssd'),
|
||||
(if vars.enablePersistence.prometheusPV != null then pvc.mixin.spec.withVolumeName(vars.enablePersistence.prometheusPV)) +
|
||||
(if vars.enablePersistence.storageClass != null then pvc.mixin.spec.withStorageClassName(vars.enablePersistence.storageClass)),
|
||||
},
|
||||
} else {}),
|
||||
},
|
||||
@ -125,7 +124,9 @@ local vars = import 'vars.jsonnet';
|
||||
pvc.mixin.metadata.withName('grafana-storage') +
|
||||
pvc.mixin.spec.withAccessModes('ReadWriteOnce') +
|
||||
pvc.mixin.spec.resources.withRequests({ storage: vars.enablePersistence.grafanaSizePV }) +
|
||||
(if vars.enablePersistence.grafanaPV != null then pvc.mixin.spec.withVolumeName(vars.enablePersistence.grafanaPV)),
|
||||
(if vars.enablePersistence.grafanaPV != null then pvc.mixin.spec.withVolumeName(vars.enablePersistence.grafanaPV)) +
|
||||
(if vars.enablePersistence.storageClass != null then pvc.mixin.spec.withStorageClassName(vars.enablePersistence.storageClass)),
|
||||
|
||||
} else {},
|
||||
|
||||
grafanaDashboards+:: $._config.grafanaDashboards,
|
||||
|
10
vars.jsonnet
10
vars.jsonnet
@ -52,14 +52,18 @@
|
||||
TLSCertificate: importstr 'server.crt',
|
||||
TLSKey: importstr 'server.key',
|
||||
|
||||
// Setting these to false, defaults to emptyDirs.
|
||||
// If using a pre-created PV, fill in the names. If blank, they will use the default StorageClass
|
||||
// Persistent volume configuration
|
||||
enablePersistence: {
|
||||
// Setting these to false, defaults to emptyDirs.
|
||||
prometheus: false,
|
||||
grafana: false,
|
||||
// If using a pre-created PV, fill in the names below. If blank, they will use the default StorageClass
|
||||
prometheusPV: '',
|
||||
prometheusSizePV: '2Gi',
|
||||
grafanaPV: '',
|
||||
// If required to use a specific storageClass, keep the PV names above blank and fill the storageClass name below.
|
||||
storageClass: '',
|
||||
// Define the PV sizes below
|
||||
prometheusSizePV: '2Gi',
|
||||
grafanaSizePV: '20Gi',
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user