rke2-charts/packages
Manuel Buil 14561ab158 Update rke2-flannel to use v0.25.4
Signed-off-by: Manuel Buil <mbuil@suse.com>
2024-06-10 19:21:04 +02:00
..
cilium-legacy Change Cilium to consume all variables 2022-03-14 17:14:12 +01:00
harvester-cloud-provider bump harvester-cloud-provider to v0.2.4 2024-05-13 10:01:48 -07:00
harvester-csi-driver Bump Harvester-CSI-driver v0.1.17 2024-01-05 18:04:15 +08:00
rancher-vsphere-cpi Include 1.29 in cpi and csi charts 2024-03-05 23:02:30 +02:00
rancher-vsphere-csi bump up vsphere-csi 2024-04-18 19:10:37 +02:00
rke2-calico Update Calico to v3.28.0 2024-05-22 14:17:18 +02:00
rke2-calico-1.21-1.22 Fix flexvolumepath 2022-05-13 11:10:20 +02:00
rke2-canal chore: Bump to latest flannel and calico version on the chart 2024-06-05 18:23:51 +00:00
rke2-canal-1.19-1.20 Remove dual-stack logic from 1.19&1.20 canal chart 2021-12-23 17:12:20 +01:00
rke2-cilium Update Cilium to v1.15.5 2024-05-21 18:55:28 +02:00
rke2-cilium-legacy Change Cilium to consume all variables 2022-03-14 17:14:12 +01:00
rke2-coredns Update coredns image to fix TLS problem 2024-03-05 18:45:21 +01:00
rke2-flannel Update rke2-flannel to use v0.25.4 2024-06-10 19:21:04 +02:00
rke2-ingress-nginx Update ingress-nginx to v1.10.1 (#465) 2024-05-24 09:23:07 -07:00
rke2-kube-proxy-1.18 Revert "rke2-kube-proxy: correct package name" (#109) 2021-06-17 16:37:09 -07:00
rke2-kube-proxy-1.19 Bump rke2-kube-proxy-1.19 to v1.19.16-rke2r1-build20211028 2021-10-28 09:16:12 -07:00
rke2-kube-proxy-1.20 update to new k8s build (#221) 2022-02-18 14:39:14 -07:00
rke2-kube-proxy-1.21 rke2 june release (#275) 2022-06-17 13:20:04 -05:00
rke2-metrics-server Restore legacy app label to metrics-server pods 2024-04-26 09:26:03 -07:00
rke2-multus Bump whereabouts/multus 2024-05-27 10:04:47 +02:00
rke2-runtimeclasses Added new runtime class chart 2023-12-08 16:11:38 -03:00
rke2-snapshot-controller Add nodeSelector and tolerations to snapshot controller charts 2023-05-22 12:42:59 -07:00
rke2-snapshot-validation-webhook ipFamilyPolicy: PreferDualStack as default 2023-09-21 12:17:37 +02:00
rke2-traefik Add traefik chart 2024-05-22 15:10:16 -07:00
rke2-whereabouts Bump whereabouts/multus 2024-05-27 10:04:47 +02:00
README.md remove execute permissions 2021-03-01 11:16:06 -08:00

README.md

Packages

What is a Package?

A Package represents a grouping of one or more Helm Charts. It is declared within packages/<package>/package.yaml with the following spec:

packageVersion: 00
releaseCandidateVersion: 00
workingDir: # The directory within your package that will contain your working copy of the chart (e.g. charts)
url: # A URL pointing to an UpstreamConfiguration
subdirectory: # Optional field for a specific subdirectory for all upstreams
commit: # Optional field for a specific commit if your URL point to a Github Repository
additionalCharts:
# These contain other charts that you would like to package alongside this chart
- workingDir: # same as above
  upstreamOptions:
    # Mutually exclusive with crdOptions
    url: # same as above
    subdirectory: # optional, same as above
    commit: # optional, same as above
  crdOptions:
    # Mutually exclusive with upstreamOptions
    templateDirectory: # A directory within packages/<package>/template that will contain a template for your CRD chart
    crdDirectory: # Where to place your CRDs within a CRD chart (e.g. crds for default charts)
    addCRDValidationToMainChart: # Whether to add additional validation to your main chart to check that the CRD chart is installed.

As seen in the spec above, every Package must have exactly one Chart designated as a main Chart (multiple main Charts are not supported at this time) and all other Charts will be considered AdditionalCharts.

UpstreamOptions

Charts or AdditionalCharts can provide UpstreamOptions with the following possible configurations:

  • Chart Archive: provide the url and optionally subdirectory
  • Github Repository: provide the url (e.g. https://github.com/rancher/charts-build-scripts.git) and optionally a subdirectory and a commit
  • Package: provide a url: packages/<package> and the main Chart from that package can be pulled. You should ensure that a loop is not introduced.
  • Local: provide url: local and the package will assume the contents of workingDir are exactly the chart you want to use.

[AdditionalCharts] CRDOptions

AdditionalCharts can provide CRDOptions instead of UpstreamOptions. These CRDOptions allow the scripts to automatically construct a CRD chart from your main Chart's contents based on the template provided.

A CRD Chart is a Helm Chart whose sole purpose is to install CRDs onto a cluster before the main Chart is installed.

You should not need a CRD chart if your main chart has the following qualities:

  1. Your main chart does not install any CRDs.
  2. Even if your main chart installs CRDs, it never installs resources of that kind as part of the release. In this case, CRDs can just remain in your templates/ directory to be managed by Helm.
  3. Neither option from above applies to you, but you do not need to facilitate automatically upgrading CRDs or providing a way for a user to cleanly delete CRDs via a second Helm release. In this case, the current Helm feature of having your CRDs placed in the crds/ directory should work for you.

Directory Structure

packages/
  <package>/
    package.yaml # A file that represents your package's overall configuration
    rebase.yaml # Optional, allows you to see the drift between your current upstream and another upstream
    generated-changes/
      additional-charts/
        # Contains one directory per additional chart, keeping track of its dependencies and patches
        <additionalChart>/
          generated-changes/
            # Same as above, but no more additionalCharts
      dependencies/
        # Contains one directory per dependency.
        <dependency>
          dependency.yaml # The UpstreamConfiguration of a particular dependency
      exclude/
        # Files that were excluded from upstream verbatim. Follows the same directory structure as the chart
      overlay/
        # Files that were overlaid onto upstream verbatim. Follows the same directory structure as the chart
      patch/
        # Files that were patches from upstream. Follows the same directory structure as the chart and contains Unified Unix Diffs
    templates/ 
      # Contains any templates. Currently only used by CRDOptions

Developer Workflow

Developers will use the following commands to work with packages:

  • make prepare: Pulls in your charts from upstream and creates a basic generated-changes/ directory with your dependencies from upstream

  • make patch: Updates your generated-changes/ to reflect the difference between upstream and the current working directory of your branch. Requires prepare

  • make charts: Runs prepare and then exports your charts to assets/ and charts/ and generates or updates your index.yaml. Can be used for testing; a Rancher Helm Repository that points to a branch that has these directories with the index.yaml should be able to find and deploy working copies of your chart.

  • make clean: Cleans up all the working directories of charts to get your repository ready for a PR

To update your working copy of the charts-build-scripts after rebasing against upstream, run:

  • make pull-scripts: Pulls in the version of the charts-build-scripts indicated in scripts

To check whether the new packages you are introducing will cause any issues with upstream that you will synchronize with, run:

  • make validate: Validates your current repository branch against all the repository branches indicated in your configuration.yaml

Common Workflow

  • Make or update the `packages//package.yaml to point to your upstream and set any other chart options
    • Note: never update your upstream after generating changes. make pull-scripts; ./bin/charts-build-scripts rebase (experimental) can assist you in figuring out what patches you need to make to rebase to a new upstream Chart by simply placing the new upstream's UpstreamConfiguration in a rebase.yaml file rooted at your package's directory and running the script. It will then generate a generated-changes/rebase/ directory that contains overlay, exclude, and patch, files describing the difference between your current upstream and the new upstream without your changes included in any way. Once you make the necessary changes in an already prepared Chart, replace the package.yaml UpstreamConfiguration with your rebase.yaml UpstreamConfiguration and see whether the generated-changes are appropriately modified
  • Run PACKAGE=<package> make prepare to pull in your upstream repositories
    • Note: On a prepare, the charts-build-scripts will automatically replace your charts existing dependencies with dependencies that will show up in generated-changes/dependencies/<dependency>/dependency.yaml. Since the spec of this file follows the UpstreamConfiguration described above, you can modify this to point your dependencies to a local chart (rooted at generated-changes/dependencies/<dependency>/), another package (make validate and make sync automatically take care of any packageVersion / releasedCandidateVersion dependencies that could be introduced by this), a Chart archive (e.g. point it to a newer version of the dependency), or a Github Repository (at a subdirectory / commit).
    • Note: As part of replacing your dependencies, the Chart.yaml and requirements.yaml are considered "Managed Files". These files are prone to having conflicts and may need to be deleted / recreated on a prepare if there are conflicts. Please open up an issue if you encounter frequent bugs with these files so that we can take a look.
  • Make changes to the relevant working directories
  • Run PACKAGE=<package> make patch to save your changes
  • Run make charts to test your changes by committing the generated directories and pushing it to a branch. Once it is available at such a branch, it can be picked up by any tools that can point to Github based Helm Repositories (e.g. Rancher Cluster Explorer Apps & Marketplace).
  • Repeat above steps if you encounter bugs, otherwise continue.
  • Remove the commit with your newly generated resources (assets/, charts/ and index.yaml) and remove the resources themselves manually
  • Run make clean
  • Commit your changes and push them to another branch to get ready for a PR
  • Run make validate to ensure that your current repository wouldn't introduce any conflicts on a sync. This step can be skipped if a Github Workflow already checks for this on a PR push
  • Open up a PR with your changes

Troubleshooting

Open up an issue on https://github.com/rancher/charts-built-scripts

Maintainers