infra/updatebot/pipeline/head This commit looks goodDetails
Since `updatebot` now processes multiple projects in a single run, it no
longer makes sense to have the branch name specified as a command-line
argument. A unique name is needed for each project, in order to create
separate pull requests for each. Thus, we have to infer the branch name
from the project name.
infra/updatebot/pipeline/head This commit looks goodDetails
Naturally, the PR will include the diff of the configuration changes the
update process makes, but that doesn't necessarily show what will
actually change in the cluster. This is true of the `images` setting in
Kustomize configuration, and will become even more important when we
start updating remote manifest references.
To get a better idea of what will actually change when the update is
applied, we now try to run `kubectl diff` for each project after making
all changes. The output is then included in the PR description.
A "project" now refers to an application deployed into Kubernetes, which
includes one or more "images." This is really the grouping I wanted in
the beginning, which I tried to achieve using separate configuration
files. Unfortunately, this made the original "projects" too
independent, making it difficult to produce the manifest diff I wanted
to add to the PR descriptions. It was also cumbersome managing multiple
config files and therefore multiple CronJobs in Kubernetes.
The new data model is a lot deeper than the original one, making TOML a
lot less nice. YAML definitely handles nested data structures better,
despite its shortcomings. Having to repeat nested table names in TOML
is quite cumbersome.
infra/updatebot/pipeline/head This commit looks goodDetails
Repositories on Docker Hub often have images we do not want to consider
when determining the "latest" version of an application, such as
non=container images, development/testing versions, etc. To exclude
these, project sources can now define a `version_re` property that
contains a regular expression. Images that do not match the expression
will be ignored.
Naturally, there will be times when `updatebot` runs and there are no
changes to make, because the deployed applications are already
up-to-date. In this scenario, we need to avoid making empty commits and
attempting to create a PR with no changes.
The `repo.branch` configuration setting controls the branch of the
repote repository to check out. It is also used as the target
branch name for the Gitea pull request.