Skip to content

Configure base images - #861

Merged
filippomc merged 18 commits into
developfrom
feature/CH-287
Sep 2, 2026
Merged

Configure base images#861
filippomc merged 18 commits into
developfrom
feature/CH-287

Conversation

@aranega

@aranega aranega commented Aug 19, 2026

Copy link
Copy Markdown
Member

Closes CH-287

Implemented solution

The solution relies on the addition of an extra entry in the value-template.yaml file which allows the user to declare a mapping to change the base image. The mapping affects the build args which are passed to skaffold to build the images, effectively replacing the base image with the one declared in the value-template.yaml file. The PR also document about the path to override for apps wich do not rely on an accessible Dockerfile (e.g: argo, or the gatekeeper)

Note: Some tests realted to secure secret are failing on develop the same pre-existing failing tests are still failing with this PR.

How to test this PR

To test the PR, the value-template.yaml file can be updated with a specific mapping for the source image, e.g:

source_images:
  MY_BASE_IMAGE: "mybaseimg:123"

and the new deployment configuration generated using harness-deployment.
After the generation, the skaffold.yaml file can be opened to see that buildArgs have been impacted for myapp and that the new base image mybaseimg:123 have been properly referenced.

Sanity checks:

  • The pull request is explicitly linked to the relevant issue(s)
  • The issue is well described: clearly states the problem and the general proposed solution(s)
  • In this PR it is explicitly stated how to test the current change
  • The issue seta the scope and the type of issue (bug, story, task, etc.)
  • The relevant components are indicated in the issue (if any)
  • All the automated test checks are passing
  • All the linked issues are included in one Sprint
  • All the linked issues are in the Review state
  • All the linked issues are assigned

Breaking changes (select one):

  • The present changes do not change the preexisting api in any way
  • This PR and the issue are tagged as a breaking-change and the migration procedure is well described above

Possible deployment updates issues (select one):

  • There is no reason why deployments based on CloudHarness may break after the current update
  • This PR and the issue are tagged as alert:deployment

Test coverage (select one):

  • Tests for the relevant cases are included in this pr
  • The changes included in this pr are out of the current test coverage scope

Documentation (select one):

  • The documentation has been updated to match the current changes
  • The changes included in this PR are out of the current documentation scope

Nice to have (if relevant):

  • Screenshots of the changes
  • Explanatory video/animated gif

@aranega
aranega requested a review from filippomc August 19, 2026 14:21
@aranega aranega added the alert:deployment Something may break in the scope of this issue/pr in existing deployments label Aug 19, 2026

@filippomc filippomc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid the configuration is more complicated that it needs to be, as this is supporting the reuse of the same name in different context, which is unnecessary.

I think it's better to use one name for each image that is used, and make it possible to override it, regardless of where it's used.

For instance, cloudharness-frontend-build needs a node image. I'd do FROM $BASE_NODE and then

image_sources:
  BASE_NODE: node: 22
  GATEKEEPER: quay.io/gogatekeeper: 5.0.0
  KEYCLOAK: quay.io/keycloak: 26.0.0
  ...

We can pass all args to all builds then

Comment thread docs/base-common-images.md Outdated
@filippomc filippomc changed the title Feature/ch 287 Configure base images Aug 31, 2026
Comment thread tools/deployment-cli-tools/ch_cli_tools/helm.py Fixed
Comment thread tools/deployment-cli-tools/ch_cli_tools/helm.py Fixed
Comment thread tools/deployment-cli-tools/tests/test_helm.py Dismissed
Comment thread tools/deployment-cli-tools/tests/test_helm.py Dismissed
Comment thread docs/base-common-images.md Outdated
@aranega
aranega requested a review from filippomc September 2, 2026 10:33
import re
import shutil

from ch_cli_tools.helm import *
@filippomc
filippomc merged commit 6355442 into develop Sep 2, 2026
10 of 11 checks passed
@filippomc
filippomc deleted the feature/CH-287 branch September 2, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

alert:deployment Something may break in the scope of this issue/pr in existing deployments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants