Describe the bug
A clear and concise description of what the bug is.
Version of Helm and Kubernetes:
Chart's revision: prometheus-operator-8.5.10
Chart's version: 0.34.0
kubectl version:
Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.0", GitCommit:"70132b0f130acc0bed193d9ba59dd186f0e634cf", GitTreeState:"clean", BuildDate:"2019-12-13T11:52:32Z", GoVersion:"go1.13.4", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"14+", GitVersion:"v1.14.9-eks-c0eccc", GitCommit:"c0eccca51d7500bb03b2f163dd8d534ffeb2f7a2", GitTreeState:"clean", BuildDate:"2019-12-22T23:14:11Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}
helm version:
Client: &version.Version{SemVer:"v2.14.0", GitCommit:"05811b84a3f93603dd6c2fcfe57944dfa7ab7fd0", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.14.0", GitCommit:"05811b84a3f93603dd6c2fcfe57944dfa7ab7fd0", GitTreeState:"clean"}
Which chart:
stable/prometheus-operator
What happened:
Doesn't create it at all. No reaction for the provided variables
What you expected to happen:
PV and PVC are created.
How to reproduce it (as minimally and precisely as possible):
Using Terraform for prometheus-operator stack creation.
Here is the code for PV creation:
resource "helm_release" "prometheus_operator" {
# repository = data.helm_repository.coreos.metadata[0].name
chart = "stable/prometheus-operator"
version = "8.5.10"
name = "prometheus-operator"
namespace = "${local.namespace}"
values = ["${file("values/prometheus-operator.values.yml")}"]
force_update = false
devel = true
disable_webhooks = false
timeout = 500
reuse = true
recreate_pods = false
...
# Perdsistant volume configuration for Prometheus:
set {
name = "prometheus.prometheusSpec.retentionSize"
value = "30GiB"
}
set {
name = "prometheus.prometheusSpec.retention"
value = "180d"
}
set {
name = "prometheus.prometheusSpec.storageSpec.volumeClaimTemplate.spec.accessModes[0]"
value = "ReadWriteOnce"
}
set {
name = "prometheus.prometheusSpec.storageSpec.volumeClaimTemplate.spec.storageClassName"
value = "prometheus"
}
set {
name = "prometheus.prometheusSpec.storageSpec.volumeClaimTemplate.spec.resources.requests.storage"
value = "70GiB"
}
...
Tried also with the values file usage. Just in case TF syntax is messing up:
# Prometheus persistant volume configuration
prometheus:
prometheusSpec:
storageSpec:
volumeClaimTemplate:
spec:
accessModes: ["ReadWriteOnce"]
storageClassName: "prometheus"
resources:
requests:
storage: 50GiB
No reaction.
Anything else we need to know:
It seems to be pretty buggy.
Once per few runs I was managed to create some records with the storage configuration for stateful set object.
Then I changed value of size units from 50GiB to 50Gi. It failed (prometheus-o pod) with the logs saying wrong units. I changed it back to 50GiB. But no changes from the pod level. E.G. Changes are not propagated from run to run.
The issue was in Units.
RtentiosnSize demands it to be GiB.
While Prometheus storage size wants Gi.
E.G. Inconsistency in what is expected for the same Unit.
For those who do helm with Terraform here is working example of how to configure it appropriately. TF v.12.
# Persistent volume configuration for Prometheus:
set {
name = "prometheus.prometheusSpec.retentionSize"
value = "30GiB"
}
set {
name = "prometheus.prometheusSpec.retention"
value = "180d"
}
set {
name = "prometheus.prometheusSpec.storageSpec.volumeClaimTemplate.metadata.name"
value = "prometheus-storage"
}
set {
name = "prometheus.prometheusSpec.storageSpec.volumeClaimTemplate.metadata.namespace"
value = "kube-system"
}
set {
name = "prometheus.prometheusSpec.storageSpec.volumeClaimTemplate.spec.storageClassName"
value = "gp2"
}
set {
name = "prometheus.prometheusSpec.storageSpec.volumeClaimTemplate.spec.accessModes[0]"
value = "ReadWriteOnce"
}
set {
name = "prometheus.prometheusSpec.storageSpec.volumeClaimTemplate.spec.resources.requests.storage"
value = "70Gi"
}
Most helpful comment
The issue was in Units.
RtentiosnSize demands it to be GiB.
While Prometheus storage size wants Gi.
E.G. Inconsistency in what is expected for the same Unit.
For those who do helm with Terraform here is working example of how to configure it appropriately. TF v.12.