• Hordur Freyr Yngvason's avatar
    Reuse prometheus chart values when editing alerts · 2416c9f6
    Hordur Freyr Yngvason authored
    Alerts for the GitLab-managed app Prometheus are updated via helm.
    Prior to this change, when alerts were updated, all helm values would
    receive the current contents of `values.yaml`, with the `alerts` section
    overridden, or falling back to the default chart values.
    
    This meant that any time we made changes to `values.yaml` affecting
    component versions (e.g. the versions of prometheus or alertmanager),
    those would trigger a deployment of those component in the cluster,
    potentially breaking the prometheus installation.
    
    This was a very real problem, since we currently have hardcoded versions
    of both prometheus server and alertmanager in `values.yaml`, and would
    like to update the chart and remove the hardcoded versions in a single
    change.
    
    With this change, alert updates no longer take any values from
    `values.yaml`; instead they only update alerts. We avoid reverting to
    default chart values by using helm's `--reuse-values` flag instead of
    the `--reset-values` flag.
    
    See https://gitlab.com/gitlab-org/gitlab/issues/38294
    2416c9f6
patch_command_spec.rb 5.34 KB