-
Notifications
You must be signed in to change notification settings - Fork 48
Conversation
c669822
to
ba2b390
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one question, otherwise LGTM.
7c95444
to
7e68844
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
In 5. of release notes, I would add "... otherwise metrics from those components won't be collected."
done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In step 2 of the PR description:
kubectl delete pvc/<PersistenceVolumeClaim name> -n monitoring
I think we know what the PVCs are called in monitoring namespace we should list them explicitly. If user has their own stuff here we just add a caveat that they handle them on their own.
In step 1 & step 3:
Since we already know the names of PVCs we can extract PV names from those PVCs, user does not have to bother with finding names.
The names we found in step 1 can be used in step 3.
assets/charts/control-plane/kubernetes/templates/etcd-endpoints.yaml
Outdated
Show resolved
Hide resolved
@surajssd For step 1, would this be legible ?
and similar for step 3. |
@ipochi yes for step1 it works fine. But then in step3 we won't have those PVs then above steps won't work. So we might need to save it in an intermediate vars. |
@surajssd For step 3, we need to change the name of the PVCs.
|
Why use |
That works too. My question is "Is it still legible ?" |
Seems like a common pattern to me, so I don't mind. More common than using |
7e68844
to
ed46b72
Compare
I think changelog can be still simplified by using OR operator to just run one command instead of two. |
This step doesnt work if PVC name is used to get the PV.
Not sure whats the problem here. Command works, but the status of second PVC changes to Bound state if the first command is applied and vice-versa. Changing the |
I'll have a look. |
We could do the following to perform just one patch operation 😄 But it seems less readable to me:
|
For sure names in 3. are wrong: -kubectl patch pv --type json -p='[{"op": "remove", "path": "/spec/claimRef"}]' $(kubectl get pv -o jsonpath='{.items[?(@.spec.claimRef.name=="data-prometheus-prometheus-operator-kube-p-prometheus-0")].metadata.name}')
-kubectl patch pv --type json -p='[{"op": "remove", "path": "/spec/claimRef"}]' $(kubectl get pv -o jsonpath='{.items[?(@.spec.claimRef.name=="data-alertmanager-prometheus-operator-kube-p-alertmanager-0")].metadata.name}')
+kubectl patch pv --type json -p='[{"op": "remove", "path": "/spec/claimRef"}]' $(kubectl get pv -o jsonpath='{.items[?(@.spec.claimRef.name=="data-prometheus-prometheus-operator-prometheus-0")].metadata.name}')
+kubectl patch pv --type json -p='[{"op": "remove", "path": "/spec/claimRef"}]' $(kubectl get pv -o jsonpath='{.items[?(@.spec.claimRef.name=="data-alertmanager-prometheus-operator-alertmanager-0")].metadata.name}') |
0cbc489
to
7645a64
Compare
This commit also updates sub-charts : grafana, kube-state-metrics and node-exporter New versions: * Grafana to 7.2.1 * Prometheus Operator to v0.43.2 * kube-state-metrics to v1.9.7 * node_exporter to v1.0.1 Signed-off-by: Imran Pochi <imran@kinvolk.io>
This commit updates the name of the resources such as Deployments, StatefulSets, DaemonSet and Pod whereever needed to reflect the new name in the Helm chart. Signed-off-by: Imran Pochi <imran@kinvolk.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small nits otherwise LGTM
assets/charts/components/contour/templates/alerts-for-prometheus-operator-0.43.2.yaml
Outdated
Show resolved
Hide resolved
...arts/components/rook/templates/prometheus-ceph-v14-rules-for-prometheus-operator-0.43.2.yaml
Outdated
Show resolved
Hide resolved
7fb6924
to
d788908
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I added a comment in #1212, that maybe we can structure the commit here, that for the next release we only need to revert this commit without manual changes.
This commit updates labels used by dependent components and etcd for scraping metrics. This change is due to the Prometheus operator helm chart is now renamed to Kube-prometheus-stack and as a result uses a new label to pick up custom alerts. old label: ``` app: prometheus-operator ``` new label: ``` app:kube-prometheus-stack ``` Signed-off-by: Imran Pochi <imran@kinvolk.io>
NOTE - This commit is to be removed from the branch once a newer version of Lokomotive post v0.6.0 is released. This commit is added to ensure backwards compatibility with older Prometheus-operator component by undoing the changes made in the previous commit, hence it is a temporary commit in th branch. This commit creates the following addtional resources: - Endpoint and Service objects for etcd. - PrometheusRule object for Contour. - PrometheusRule object for Rook. - PrometheusRule object for Metallb. New resources created above differ in name and the label only offering compatibility with updated Prometheus Operator. The old resources offer backward compatibility, meaning if the the cluster is updated etcd metrics collection won't be broken and if prometheus-operator component is updated then the metrics collection of contour, rook and metallb wont be broken even if those components are updated before updating prometheus-operator. Old label: ``` app: prometheus-operator ``` New label: ``` app: kube-prometheus-stack ``` Signed-off-by: Imran Pochi <imran@kinvolk.io>
Signed-off-by: Imran Pochi <imran@kinvolk.io>
d788908
to
63fa436
Compare
@invidian Just did that :) Now the commit should be removed from the branch once we are ready to roll out a newer version of Lokomotive > 0.6.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR updates the Prometheus operator component to the latest upstream chart that is now renamed from
prometheus-operator
tokube-prometheus-stack
.Release notes:
Steps(1-4) must be performed before updating the cluster i.e before running
lokoctl cluster apply
.Steps 5,6 must be performed after updating the cluster ie after running
lokoctl cluster apply
.Upgrading this component requires downtime and some steps to be executed manually before upgrading:
Patch the PersistenceVolume created/used by the prometheus-operator chart to
Retain
claim policy:Note: To execute the above command, the user must have a cluster wide permission.
Uninstall the prometheus-operator release and delete the existing PersistentVolumeClaim, and verify PV become Released.
You can choose to remove all your existing CRDs (ServiceMonitors, Podmonitors, etc.) if you want to.
Remove current
spec.claimRef
values to change the PV's status from Released to Available.Note: To execute the above command, the user must have a cluster wide permission.
Make sure that the
storage_class
andprometheus.storage_size
are unchanged during the upgrade process.If monitoring was enabled for rook, contour, metallb components, then the user needs to update the said components as well. Backwards compatibility exists and its not mandatory to update the said components before installing updated prometheus-operator component.
Proceed to a fresh prometheus-operator component installation. The new release should now re-attach your previously released PV with its content.
Closes #1079