Skip to content
This repository was archived by the owner on Feb 22, 2022. It is now read-only.
This repository was archived by the owner on Feb 22, 2022. It is now read-only.

[stable/*] Create and document charts policy for breaking change upgrades #5657

Closed

Description

@scottrigby

Current status

Any breaking (backwards incompatible) changes to a chart should:

  1. Bump the MAJOR version (following semver)
  2. In the README, under a section called "Upgrading", describe the manual steps necessary to upgrade to the new (specified) MAJOR version
  • Decide on policy
  • Document policy
Original summary

Hi everyone,

After @unguiculus reached started a Slack Charts maintainers DM about #5576, an unresolved problem emerged. We don't have a kubernetes/charts policy for how to handle breaking change upgrades.

Considerations

That PR made it clear we have two main choices:

  1. Add logic to the templates for every possible upgrade step (from every past to new version of an app).
    • 🚫 This was deemed to be not only an inelegant way to handle this problem on the whole, but also would make charts more difficult to maintain in the future.
  2. Follow semver to denote breaking changes (bump MAJOR version, even if the upstream project's appVersion itself did not), and somehow clearly communicate the required upgrade steps to chart users who are upgrading from relevant previous versions to the current one (the steps themselves will vary by application and old/new version).
    • ✅ This is the preferred option.

Next steps

We plan to meet about determining some helpful guidelines about this. Possibilities discussed were UPGRADE_NOTES/CHANGELOG files for charts, or adding a new section to the README (perhaps under new section header such as Upgrading, just above Installing the chart so users are more likely to see it?).

The ultimate goal of this issue is to track how we decide upon and document a consistent strategy for communicating additional info about breaking changes to users who want to upgrade from past versions of a chart.

Activity

  1. scottrigby commented on May 19, 2018

    @scottrigby
    MemberAuthor

    @unguiculus @viglesiasce @prydonius @mattfarina @lachie83 please let me know if I missed anything.

  2. stale commented on Aug 19, 2018

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.

  3. added
    lifecycle/stale
    on Aug 19, 2018
  4. stale commented on Sep 2, 2018

    @stale

    This issue is being automatically closed due to inactivity.

  5. removed
    lifecycle/stale
    on Sep 10, 2018
  6. scottrigby commented on Sep 10, 2018

    @scottrigby
    MemberAuthor

    We should keep this issue open till we document this.

  7. desaintmartin commented on Sep 13, 2018

    @desaintmartin
    Collaborator

    Here is an issue where several charts are affected and need breaking changes: #7680

  8. juan131 commented on Sep 17, 2018

    @juan131
    Collaborator

    Hi @scottrigby

    I agree with adding the instructions on a new Upgrading section. We can use sth like:

    ## Upgrading
    
    ### To Y.Y.Y
    
    Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments.
    Use the workaround below to upgrade from versions previous to Y.Y.Y:
    
    <Workaround here>
    
    
  9. javsalgar commented on Sep 18, 2018

    @javsalgar
    Collaborator

    I tried this workaround before upgrading and fixed it:

    kubectl patch deployments <deployment-name> --type=json -p='[{"op": "remove", "path": "/spec/selector/matchLabels/chart"}]'
    
  10. desaintmartin commented on Sep 18, 2018

    @desaintmartin
    Collaborator

    I tried this workaround before upgrading and fixed it:

    kubectl patch deployments <deployment-name> --type=json -p='[{"op": "remove", "path": "/spec/selector/matchLabels/chart"}]'
    

    I've just tried it on a apps/v1beta2 Statefulset (rabbitmq), and the outcome is still the same:

    The StatefulSet "my-rabbitmq" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', and 'updateStrategy' are forbidden.

    Was your Deployment using >=v1beta2 as well?

    For >=apps/v1beta2, the only way I've found is to:
    k delete statefulsets.apps --cascade=false my-rabbitmq
    Then upgrade.

  11. javsalgar commented on Sep 18, 2018

    @javsalgar
    Collaborator

    After checking, I confirm that the way @desaintmartin proposed is the one that works for StatefulSets.

  12. desaintmartin commented on Sep 18, 2018

    @desaintmartin
    Collaborator

    And after checking, I confirm that the "kubectl patch" command line does NOT work either on Deployment apps/v1beta2 and later

  13. desaintmartin commented on Sep 18, 2018

    @desaintmartin
    Collaborator

    I've tried to do a PR for redis as an example, with its own "how to upgrade" in its readme.
    #7686

  14. 2 remaining items

  15. stale commented on Nov 1, 2018

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.

  16. added
    lifecycle/stale
    on Nov 1, 2018
  17. stale commented on Nov 15, 2018

    @stale

    This issue is being automatically closed due to inactivity.

  18. added
    lifecycle/frozen
    and removed
    lifecycle/stale
    on Nov 21, 2018
  19. scottrigby commented on Feb 6, 2019

    @scottrigby
    MemberAuthor

    I should close this - we've adopted the README policy. I'll update the summary above.

  20. scottrigby commented on Feb 6, 2019

    @scottrigby
    MemberAuthor

    Eh, review guidelines still need to be updated

  21. added a commit that references this issue on Feb 6, 2019
    213d3ab
  22. added a commit that references this issue on Feb 14, 2019
    63700be
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/frozen

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions