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

feat(upgrade-job): add support for loki-stack helm chart upgrade #396

Merged
merged 9 commits into from
Jan 9, 2024

Conversation

niladrih
Copy link
Member

@niladrih niladrih commented Dec 22, 2023

Requires #386.

Overview:

  • adds new yq commands to delete objects, append to objects, and append to arrays.
  • adds special upgrade values.yaml update for loki-stack changes from Update loki-stack and set health_check_targets: false. #386. Introduces migrations and set_literal_value updates to alter the existing yaml till it resembles the new one.
  • replaces all &Path is the helm::yaml::yq module with AsRef<Path>.

Changes:

  • removes .loki-stack.loki.config.ingester.lifecycler.ring.kvstore as it
    does not exist in loki-stack v2.9.11
  • adds set value for the grafana/loki container image tag
  • removes .loki-stack.promtail.config.snippets.extraClientConfigs as it
    does not exist in loki-stack v2.9.11
  • removes .loki-stack.promtail.initContainer as it does not exist in loki-stack
    v2.9.11
  • migrates .loki-stack.promtail.config.lokiAddress to .loki-stack.promtail.config.clients
  • adds yq command_output helper function
  • add set value for .loki-stack.promtail.readinessProbe.httpGet.path
  • migrate .loki-stack.promtail.config.snippets.extraClientConfigs to
    .loki-stack.promtail.config.clients

@tiagolobocastro
Copy link
Contributor

Replaces the loki and promtail yaml objects entirely to new defaults. Doesn't honour user's configuration for the older loki/promtail. This should be okay, as this is not a critical storage component (@tiagolobocastro wdyt?).

I don't think this is a good idea, enabled and persistence are in loki, we should not modify these.

@niladrih
Copy link
Member Author

Replaces the loki and promtail yaml objects entirely to new defaults. Doesn't honour user's configuration for the older loki/promtail. This should be okay, as this is not a critical storage component (@tiagolobocastro wdyt?).

I don't think this is a good idea, enabled and persistence are in loki, we should not modify these.

The enabled is in loki-stack. This is preserved. There are 4 items under loki-stack: enabled, localpvScConfig, loki, promtail. The loki and promtail are overwritten. The other 2, are retained.

@niladrih
Copy link
Member Author

I agree that persistence block items should be taken forward.

@niladrih niladrih added wip Indicates that this is a work in progress and removed wip Indicates that this is a work in progress labels Dec 22, 2023
@niladrih niladrih changed the title feat(upgrade-job): add support for yq yaml obj update feat(upgrade-job): add support for loki-stack helm chart upgrade Dec 24, 2023
@niladrih
Copy link
Member Author

This change now handles loki-stack helm chart update like it handles other changes to helm chart default values: it sets the new values to the final values manually.
This means all user configuration is carried forward.

@niladrih niladrih added wip Indicates that this is a work in progress and removed wip Indicates that this is a work in progress labels Jan 2, 2024
@niladrih niladrih added the wip Indicates that this is a work in progress label Jan 8, 2024
Signed-off-by: Niladri Halder <niladri.halder26@gmail.com>
Signed-off-by: Niladri Halder <niladri.halder26@gmail.com>
- removes .loki-stack.loki.config.ingester.lifecycler.ring.kvstore as it
does not exist in loki-stack v2.9.11
- adds set value for the grafana/loki container image tag
- removes .loki-stack.promtail.config.snippets.extraClientConfigs as it
does not exist in loki-stack v2.9.11
- removes .loki-stack.promtail.initContainer as it does not exist in loki-stack
v2.9.11
- migrates .loki-stack.promtail.config.lokiAddress to .loki-stack.promtail.config.clients
- adds yq command_output helper function
- add set value for .loki-stack.promtail.readinessProbe.httpGet.path
- migrate .loki-stack.promtail.config.snippets.extraClientConfigs to
.loki-stack.promtail.config.clients

Signed-off-by: Niladri Halder <niladri.halder26@gmail.com>
Signed-off-by: Niladri Halder <niladri.halder26@gmail.com>
…tainer

Signed-off-by: Niladri Halder <niladri.halder26@gmail.com>
Signed-off-by: Niladri Halder <niladri.halder26@gmail.com>
Signed-off-by: Niladri Halder <niladri.halder26@gmail.com>
Signed-off-by: Niladri Halder <niladri.halder26@gmail.com>
Signed-off-by: Niladri Halder <niladri.halder26@gmail.com>
@niladrih niladrih removed the wip Indicates that this is a work in progress label Jan 9, 2024
@niladrih
Copy link
Member Author

niladrih commented Jan 9, 2024

bors merge

@bors-openebs-mayastor
Copy link
Contributor

🕐 Waiting for PR status (Github check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set.

@bors-openebs-mayastor
Copy link
Contributor

Build succeeded:

@bors-openebs-mayastor bors-openebs-mayastor bot merged commit 7d24590 into develop Jan 9, 2024
5 checks passed
@bors-openebs-mayastor bors-openebs-mayastor bot deleted the upgrade-loki branch January 9, 2024 15:55
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.

4 participants