Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebase Monitoring to 14.5.0 and update all dependencies #1072

Merged
merged 45 commits into from
Apr 7, 2021

Conversation

aiyengar2
Copy link
Contributor

@aiyengar2 aiyengar2 commented Apr 1, 2021

First commit switches rancher-monitoring to a Git-based package for the next step.

Second commit creates a script that allows commit-by-commit interactive rebases on upstreams for Git-based packages.

Remaining commits were done via scripts in pairs:

  • First commit per pair creates generated-changes based on the existing base
  • Second commit per pair simply modifies the package.yaml to the new base and regenerates generated-changes on that base

Some fixups were added after the fact to each chart when I tested deploying them and found bugs from the rebase.

Related Issue: rancher/rancher#29871

@aiyengar2 aiyengar2 force-pushed the add_rebase_script branch 5 times, most recently from 2a28654 to a4b3b80 Compare April 3, 2021 02:35
@aiyengar2 aiyengar2 changed the title Rebase Monitoring to 14.x.x and introduce new interactive rebase script Rebase Monitoring to 14.5.0 and introduce new interactive rebase script Apr 3, 2021
@aiyengar2 aiyengar2 changed the title Rebase Monitoring to 14.5.0 and introduce new interactive rebase script Rebase Monitoring to 14.5.0, update all dependencies, and introduce new interactive rebase script Apr 3, 2021
@aiyengar2 aiyengar2 force-pushed the add_rebase_script branch 3 times, most recently from 756f66a to 1f30dbf Compare April 4, 2021 02:07
@aiyengar2 aiyengar2 marked this pull request as ready for review April 4, 2021 03:11
Copy link
Contributor Author

@aiyengar2 aiyengar2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this PR is huge and not reviewable in its original form, I have added 3 commits to make this process way easier to review:

Third To Last Commit

I ran:

a) PACKAGE=rancher-monitoring make charts without any changes

b) mv charts/rancher-monitoring/rancher-monitoring/<VERSION> charts/rancher-monitoring/rancher-monitoring/charts

c) mv charts/rancher-monitoring/rancher-monitoring-crd/<VERSION> charts/rancher-monitoring/rancher-monitoring-crd/charts

This represents the state of the chart today.

Second To Last Commit

Same steps as above once my changes were made.

This represents the chart that will be shipped in this commit.

Reviewers should review this commit for changes since this contains the final diff that will be shipped from this PR.

Last Commit

I removed the charts/ directory since we do not want to commit that.

Modifications

If any modifications are requested, I will add further commits to this PR instead of modifying these charts commits.

At the end of the PR, all of this will be squash and merged.

@@ -2486,18 +2771,6 @@ prometheus:
runAsUser: 101
runAsGroup: 101

# Additional volumes on the output StatefulSet definition.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved this back to the original location, shown above

@@ -7,4 +7,4 @@ apiVersion: v1
description: Installs the CRDs for rancher-monitoring.
name: rancher-monitoring-crd
type: application
version: 9.4.204-rc09
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Old chart versions are dropped in #1075

@@ -14,8 +14,63 @@ annotations:
catalog.cattle.io/requests-cpu: 4500m
catalog.cattle.io/requests-memory: 4000Mi
catalog.cattle.io/ui-component: monitoring
apiVersion: v1
appVersion: 0.38.1
apiVersion: v2
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we've moved to apiVersion v2, the dependencies have all been moved to the Chart.yaml

Comment on lines 2 to 6
catalog.cattle.io/hidden: "true"
catalog.cattle.io/os: linux
catalog.rancher.io/certified: rancher
catalog.rancher.io/namespace: cattle-monitoring-system
catalog.rancher.io/release-name: rancher-grafana
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These annotations were added since all dependent charts that track an upstream were split off into top-level charts. This chart needs to be hidden and is only supported by Linux.

replicas: 1
image:
# image-renderer Image repository
repository: rancher/grafana-grafana-image-renderer
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New image repository required and will be added in rancher/image-mirror#83

Comment on lines 1 to 6
annotations:
catalog.cattle.io/hidden: "true"
catalog.cattle.io/os: linux
catalog.rancher.io/certified: rancher
catalog.rancher.io/namespace: cattle-monitoring-system
catalog.rancher.io/release-name: rancher-kube-state-metrics
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These annotations were added since all dependent charts that track an upstream were split off into top-level charts. This chart needs to be hidden and is only supported by Linux.

Comment on lines 1 to 6
annotations:
catalog.cattle.io/hidden: "true"
catalog.cattle.io/os: linux
catalog.rancher.io/certified: rancher
catalog.rancher.io/namespace: cattle-monitoring-system
catalog.rancher.io/release-name: rancher-prometheus-adapter
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These annotations were added since all dependent charts that track an upstream were split off into top-level charts. This chart needs to be hidden and is only supported by Linux.

Comment on lines 1 to 6
annotations:
catalog.cattle.io/hidden: "true"
catalog.cattle.io/os: linux
catalog.rancher.io/certified: rancher
catalog.rancher.io/namespace: cattle-monitoring-system
catalog.rancher.io/release-name: rancher-node-exporter
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These annotations were added since all dependent charts that track an upstream were split off into top-level charts. This chart needs to be hidden and is only supported by Linux.

@@ -1,145 +0,0 @@
dependencies:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was completely removed since we moved to apiVersion v2 charts

@aiyengar2 aiyengar2 force-pushed the add_rebase_script branch 4 times, most recently from bc6a1db to 3cbb181 Compare April 5, 2021 23:12
@aiyengar2
Copy link
Contributor Author

Tested deploying in a hardened cluster, a windows cluster, and a normal cluster and successfully deployed all components.

All images and repositories have been created as well.

@aiyengar2
Copy link
Contributor Author

Script has been moved to #1079.

@aiyengar2 aiyengar2 mentioned this pull request Apr 5, 2021
@aiyengar2 aiyengar2 changed the title Rebase Monitoring to 14.5.0, update all dependencies, and introduce new interactive rebase script Rebase Monitoring to 14.5.0 and update all dependencies Apr 5, 2021
@prachidamle
Copy link
Member

prachidamle commented Apr 7, 2021

@aiyengar2 In upgrade case, doe the deleted CRDs and the CRs get cleaned up? I see a couple of them deleted by the new version?

@aiyengar2
Copy link
Contributor Author

@aiyengar2 In upgrade case, doe the deleted CRDs and the CRs get cleaned up? I see a couple of them deleted by the new version?

I believe those should be cleaned up by the CRD chart upgrade

@aiyengar2
Copy link
Contributor Author

Also, I don't think the CRDs are being deleted, but rather renamed into different files that also have modifications. That's why they appear to show up as deletions

prachidamle
prachidamle previously approved these changes Apr 7, 2021
@aiyengar2
Copy link
Contributor Author

Had to push another commit to patch the CRD version to 14.5.1 (for 14.5.100 to be exposed) as well

Copy link
Contributor

@brendarearden brendarearden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was a huge rebase, well done!!! as far as I could tell everything looks good. You answered all of my questions and it looks like images, versions, and other port or chart.yaml changes were consistent and expected!

@aiyengar2 aiyengar2 merged commit b88bdc6 into rancher:dev-v2.5-source Apr 7, 2021
github-actions bot pushed a commit that referenced this pull request Apr 7, 2021
* Switch rancher-monitoring to Git-based package

Signed-off-by: Arvind Iyengar <arvind.iyengar@rancher.com>

* Move Monitoring dependencies to separate packages

* Switch rancher-grafana to Git-based and add annotations

* Switch rancher-kube-state-metrics to Git-based and add annotations

* Switch rancher-prometheus-adapter to Git-based and add annotations

* Switch rancher-node-exporter to Git-based and add annotations

* Rebase to kube-prometheus-stack-10.0.0

* Update rancher-monitoring to new base kube-prometheus-stack-10.0.0

* Rebase to kube-prometheus-stack-11.0.0

* Update rancher-monitoring to new base kube-prometheus-stack-11.0.0

* Rebase to kube-prometheus-stack-12.0.0

* Update rancher-monitoring to new base kube-prometheus-stack-12.0.0

* Rebase to kube-prometheus-stack-13.0.0

* Update rancher-monitoring to new base kube-prometheus-stack-13.0.0

* Rebase to kube-prometheus-stack-14.0.0

* Update rancher-monitoring to new base kube-prometheus-stack-14.0.0

* Rebase to kube-prometheus-stack-14.5.0

* Update rancher-monitoring to new base kube-prometheus-stack-14.5.0

* fixup rancher-monitoring

* Switch nginx port for Prometheus to 8081

This is necessary since prometheusConfigReloaderImage now takes port 8080 in the Prometheus pod due to a change introduced in Prometheus Operator v0.43.0 in prometheus-operator/prometheus-operator@dcf34c5.

This value is hard-coded in the operator in https://github.com/prometheus-operator/prometheus-operator/blob/bcf61aacda782d6c8ffc79f55ea1def9cfd97933/pkg/operator/statefulset.go#L25.

* Rebase to grafana-5.7.7

* Update rancher-grafana to new base grafana-5.7.7

* Rebase to grafana-6.0.0

* Update rancher-grafana to new base grafana-6.0.0

* Rebase to grafana-6.6.4

* Update rancher-grafana to new base grafana-6.6.4

* fixup rancher-grafana

* Add linux annotations to image-renderer

* Use default grafana serviceAccount if unavailable for image-renderer

* Rebase to kube-state-metrics-helm-chart-2.13.1

* Update rancher-kube-state-metrics to new base kube-state-metrics-helm-chart-2.13.1

* fixup kube-state-metrics

* Rebase to prometheus-node-exporter-1.16.2

* Update rancher-node-exporter to new base prometheus-node-exporter-1.16.2

* fixup node-exporter

* Rebase to prometheus-adapter-2.12.1

* Update rancher-prometheus-adapter to new base prometheus-adapter-2.12.1

* fixup prometheus-adapter

* Update CRD chart version

* Add original chart before all commits were made

* Add chart after all commits were made

* Delete charts

* Patch the chart version to 1 and reset packageVersion to 00

* Patch CRD chart version
github-actions bot pushed a commit that referenced this pull request Apr 7, 2021
* Switch rancher-monitoring to Git-based package

Signed-off-by: Arvind Iyengar <arvind.iyengar@rancher.com>

* Move Monitoring dependencies to separate packages

* Switch rancher-grafana to Git-based and add annotations

* Switch rancher-kube-state-metrics to Git-based and add annotations

* Switch rancher-prometheus-adapter to Git-based and add annotations

* Switch rancher-node-exporter to Git-based and add annotations

* Rebase to kube-prometheus-stack-10.0.0

* Update rancher-monitoring to new base kube-prometheus-stack-10.0.0

* Rebase to kube-prometheus-stack-11.0.0

* Update rancher-monitoring to new base kube-prometheus-stack-11.0.0

* Rebase to kube-prometheus-stack-12.0.0

* Update rancher-monitoring to new base kube-prometheus-stack-12.0.0

* Rebase to kube-prometheus-stack-13.0.0

* Update rancher-monitoring to new base kube-prometheus-stack-13.0.0

* Rebase to kube-prometheus-stack-14.0.0

* Update rancher-monitoring to new base kube-prometheus-stack-14.0.0

* Rebase to kube-prometheus-stack-14.5.0

* Update rancher-monitoring to new base kube-prometheus-stack-14.5.0

* fixup rancher-monitoring

* Switch nginx port for Prometheus to 8081

This is necessary since prometheusConfigReloaderImage now takes port 8080 in the Prometheus pod due to a change introduced in Prometheus Operator v0.43.0 in prometheus-operator/prometheus-operator@dcf34c5.

This value is hard-coded in the operator in https://github.com/prometheus-operator/prometheus-operator/blob/bcf61aacda782d6c8ffc79f55ea1def9cfd97933/pkg/operator/statefulset.go#L25.

* Rebase to grafana-5.7.7

* Update rancher-grafana to new base grafana-5.7.7

* Rebase to grafana-6.0.0

* Update rancher-grafana to new base grafana-6.0.0

* Rebase to grafana-6.6.4

* Update rancher-grafana to new base grafana-6.6.4

* fixup rancher-grafana

* Add linux annotations to image-renderer

* Use default grafana serviceAccount if unavailable for image-renderer

* Rebase to kube-state-metrics-helm-chart-2.13.1

* Update rancher-kube-state-metrics to new base kube-state-metrics-helm-chart-2.13.1

* fixup kube-state-metrics

* Rebase to prometheus-node-exporter-1.16.2

* Update rancher-node-exporter to new base prometheus-node-exporter-1.16.2

* fixup node-exporter

* Rebase to prometheus-adapter-2.12.1

* Update rancher-prometheus-adapter to new base prometheus-adapter-2.12.1

* fixup prometheus-adapter

* Update CRD chart version

* Add original chart before all commits were made

* Add chart after all commits were made

* Delete charts

* Patch the chart version to 1 and reset packageVersion to 00

* Patch CRD chart version
@aiyengar2 aiyengar2 mentioned this pull request Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants