The goal of the workflow is to update the chart (module-chart/chart
) to the newest version, render the resource templates from the newest chart, and create a PR with the changes. The workflow works on two shell scripts:
-
make-module-chart.sh
- downloads the chart from the upstream, from the release tagged aslatest
and places it in themodule-chart/chart
. -
make-module-resources.sh
- uses Helm to render Kubernetes resources templates. As a base, it takes a chart from themodule-chart/chart
and values to override. After Helm finishes templating with the applied overrides, the generated resources are put intomodule-resources/apply
. The resources used in the previous version but not used in the new version are placed undermodule-resource/delete
. During the process of iterating over thesap-btp-service-operator
resources, the script also keeps track of the GVKs to generate RBAC rules inbtpoperator_controller.go
which feeds into RBACClusterRole
in therole.yaml
resource kept in sync withmake manifests
just like any standard kubebuilder operator. The script excludes all resources with a Helm hook "pre-delete" as it is not necessary to apply it. Additionally, all excluded resources are added to themodule-resources/excluded
folder, where you can see what was excluded.
Both scripts are run from the workflow but can also be triggered manually from the developer's computer. They are placed under hack/update/
.
To keep module-chart/chart
in sync with the upstream, you must not apply any manual changes there.
See BTP Manager Release Pipeline to learn more about the release workflow.
This workflow uses the DEV artifact registry, tags the binary image and OCI module image with the PR number, and calls the reusable workflow.
This workflow calls the reusable workflow.
This workflow is triggered daily at midnight and by each PR on the main
branch. It checks for dead links in the repository.
This workflow runs the Govulncheck.
This workflow enables the auto-merge functionality on a PR that is not a draft.
This workflow checks if all jobs, except those excluded in the workflow configuration, have passed.
There are reusable workflows created. Anyone with access to a reusable workflow can call it from another workflow.
This workflow runs the E2E tests on the k3s cluster. You pass the following parameters from the calling workflow:
Parameter name | Required | Description |
---|---|---|
image-repo | yes | binary image registry reference |
image-tag | yes | binary image tag |
last-k3s-versions | no | number of most recent k3s versions to be used for tests, default = 1 |
The workflow:
- Fetches the last-k3s-versions tag versions of k3s releases
- Prepares the last-k3s-versions k3s clusters with the Docker registries using the list of versions from the previous step
- Waits for the binary image to be ready in the registry
- Runs the E2E tests on the clusters
- Waits for all tests to finish
This workflow runs the unit tests. No parameters are passed from the calling workflow (callee).
The workflow:
- Checks out code and sets up the cache
- Sets up the Go environment
- Invokes
make test