Skip to content

Giant Swarm offered cilium App which can be installed in workload clusters

License

Notifications You must be signed in to change notification settings

giantswarm/cilium-app

Repository files navigation

CircleCI

cilium chart

Giant Swarm offers a cilium App which can be installed in workload clusters.

Installing

There are several ways to install this app onto a workload cluster.

Upgrading cilium version

The contents of the helm folder are being generated by the make target called make update-chart. You can use it like this

APPLICATION=cilium make update-chart

This target uses vendir to fetch the helm chart contained in the fork of the cilium repository that we maintain. Currently, the main branch on the fork contains the upstream tag v1.14.3, with our custom changes on top.

If you want to upgrade this cilium-app to use a newer version of cilium, you need to prepare our fork first. All changes are applied there, and then we use vendir to generate the contents of the helm folder in this repository.

We need to create a new branch on our fork based off the tag of the version we want to upgrade to. For example, if we want to upgrade to cilium v1.14.3, we need to create a new branch based off the upstream tag for that version.

git remote add upstream [email protected]:cilium/cilium.git
git fetch upstream
git checkout upstream/v1.14.3
git checkout -b update-to-1-14-3

Then we need to apply our custom changes on top of that new branch. Since those changes are already on the repository (although a different branch), we can use cherry-pick for apply those same commits to our newly created branch. Before applying them, please make sure they all make sense in the new release. The less custom changes we have, the better. We can apply our commits with

git cherry-pick a4b22dee87ba3663f967f6dd6d8e666c849c742d^..25c449534cc325a5798fc7c839b8ac33591b3516

It's probable that conflicts will happen, so we need to fix those when applying the commits. To update the charts values.schema.json and others, execute make -C install/kubernetes in the upstream repo. Don't forget to commit the changes, if any. Once we are done, we can push our new branch to our fork, and it will be ready to be used by vendir from here.

Then, in this repository, we need to update the vendir configuration in vendir.yml to use the new branch we just pushed, and run the make target APPLICATION=cilium make update-chart. With the generated changes, let's create a new pull request so that everyone can review the changes that will be applied to the cilium chart. If we need further customizations, we can keep adding commits on the new branch on the fork, and re-run APPLICATION=cilium make update-chart here to update the generated files in the app.

Once we are happy with the changes, we need to make the main branch in our fork to point to our latest commit with git branch -f main <new-release-branch>

git branch -f main update-to-1-14-3
git checkout main
git push origin main -f

After this, the main branch in our fork should contain cilium latest release (v1.14.3 on the example) with our customizations on top. Then update our pull request in this repository to use the fork's main branch again, and merge it. Finally, we just need to create a new release of this cilium-app.