Skip to content

Metrics Service Development and Maintenance Guide📜

To Upgrade the Metrics Server Package📜

NOTE: Metrics Server Renovate updates differ from most other BigBang Renovate updates because Metrics Server uses a wrapper chart, rather than a fork of the upstream chart.

  1. Navigate to the upstream chart repo and folder and find the appropriate tag that corresponds with the latest chart version for this update. The tag should follow this format: metrics-server-helm-chart-x.x.x.
  2. Review the upstream release-notes for important changes and upgrade notices.

  3. git clone the Metrics Server repository from Repo1 and checkout the renovate/ironbank branch.

  4. Modify the chart version in ./chart/Chart.yaml and append -bb.0 (if missing or incorrect) to the chart version from upstream.

  5. Ensure the BB ./chart/Chart.yaml and the target upstream version Chart.yaml align correctly with the following:

  6. Check appVersion and bigbang.dev/applicationVersions in ./chart/Chart.yaml to make sure they match and have updated to the correct version
  7. Check the upstream chart dependencies and compare the dependency versions against the corresponding image tags in ./chart/values.yaml to make sure they match

NOTICE: The upgrade issue may be blocked under one or more of the following conditions: - You are trying to upgrade to a new image or image tag that does not yet exist in Ironbank. - To remediate; Ensure that an Ironbank issue exists that is tracking this upgrade or request. Link the Ironbank issue to your upgrade issue for tracking purposes. - You are trying to upgrade to a newer image tag in Ironbank, but is not yet supported or tested by upstream. - To remediate; Consider opening your own MR to upgrade upstream if the maintainers have not done so in a timely manner.

  1. Update the image tags in BB ./chart/values.yaml to match the target upstream version with their Ironbank equivalent for the following:
  2. upstream.image.tag

  3. Update the ./chart/Chart.yaml annotations helm.sh/images to match the updated tags from previous step.

  4. Update dependencies and binaries using helm dependency update ./chart.

  5. If needed, log into registry1.

    # Note, if you are using Ubuntu on WSL and get an error about storing credentials or about how `The name org.freedesktop.secrets was not
    # provided by any .service files` when you run the command below, install the libsecret-1-dev and gnome-keyring packages. After doing this,
    # you'll be prompted to set a keyring password the first time you run this command.
    #
    helm registry login https://registry1.dso.mil -u ${registry1.username}
    
  6. Pull assets and commit the binaries as well as the Chart.lock file that was generated.

    # Note: You may need to resolve merge conflicts in chart/values.yaml before these commands work. Refer to the "Modifications made to upstream"
    # section below for hints on how to resolve them. Also, you need to be logged in to registry1 thorough docker.
    helm dependency update ./chart
    

    Then log out.

    helm registry logout https://registry1.dso.mil
    
  7. Update ./CHANGELOG.md adding an entry for the new version and noting all changes in a list (at minimum should include - Updated <chart or dependency> to x.x.x).

  8. Generate the ./README.md updates by following the guide in gluon.

  9. Commit and push up your changes, add upgrade notices to the MR if applicable, validate that CI passes.

  10. If there are any failures, follow the information in the pipeline to make the necessary updates.
  11. Add the debug label to the MR for more detailed information.
  12. Reach out to the CODEOWNERS if needed.

  13. As part of your MR that modifies bigbang packages, you should modify the bigbang bigbang/tests/test-values.yaml against your branch for the CI/CD MR testing by enabling your packages.

  14. To do this, at a minimum, you will need to follow the instructions at bigbang/docs/developer/test-package-against-bb.md with changes for Metrics Server enabled (the below is a reference, actual changes could be more depending on what changes where made to Metrics Server in the package MR).

test-values.yaml📜

```yaml
metricsServer:
  enabled: true
  git:
    tag: null
    branch: <my-package-branch-that-needs-testing>
  values:
    istio:
      hardened:
        enabled: true
  ### Additional compononents of Metrics Server should be changed to reflect testing changes introduced in the package MR
```
  1. Perform the steps below for manual testing

Modifications made to upstream📜

Section not applicable as Metrics Server was implemented as a wrapper chart, changes to ./chart/values.yaml should not be lost when upgrading.

Manual Testing📜

NOTE: For these testing steps it is good to do them on both a clean install and an upgrade. For clean install, point metrics-server to your branch. For an upgrade do an install with metrics-server pointing to the latest tag, then perform a helm upgrade with metrics-server pointing to your branch.

  • Deployment of Big Bang with Istio, Monitoring, Network Policies, Authorization Policies, and metrics server enabled will allow the use of kubectl top nodes and kubectl top pods -A to report utilization.

overrides/metrics-server.yaml

addons:
  metricsServer:
    enabled: true
    sourceType: "git"
    git:
      tag: null
      branch: "renovate/ironbank"

When in doubt with any testing or upgrade steps, reach out to the CODEOWNERS for assistance.