Conversation
Comment on lines
+24
to
+25
| from ..constants import KEY_APPS, KEY_DATABASE, KEY_DEPLOYMENT, KEY_HARNESS, \ | ||
| KEY_SERVICE, KEY_TASK_IMAGES, KEY_TEST_IMAGES |
| from .configurationgenerator import DEFAULT_IGNORE, generate_tag_from_content | ||
|
|
||
| from .utils import app_name_from_path, merge_app_directories, merge_configuration_directories, find_subdirs, read_dockerignore, guess_build_dependencies_from_dockerfile | ||
| from ..utils import app_name_from_path, merge_app_directories, merge_configuration_directories, find_subdirs, read_dockerignore, guess_build_dependencies_from_dockerfile |
|
|
||
| from ch_cli_tools.helm import * | ||
| from ch_cli_tools.configurationgenerator import * | ||
| from ch_cli_tools.configuration.configurationgenerator import * |
| from ch_cli_tools.dockercompose import * | ||
| from ch_cli_tools.configurationgenerator import * | ||
| from ch_cli_tools.preprocessing import preprocess_build_overrides, generate_hash_based_image_tags | ||
| from ch_cli_tools.configuration.configurationgenerator import * |
| from ch_cli_tools.configurationgenerator import * | ||
| from ch_cli_tools import configurationgenerator | ||
| from ch_cli_tools.preprocessing import preprocess_build_overrides, generate_hash_based_image_tags | ||
| from ch_cli_tools.configuration.configurationgenerator import * |
| from ch_cli_tools import configurationgenerator | ||
| from ch_cli_tools.configurationgenerator import * | ||
| from ch_cli_tools.configuration import configurationgenerator | ||
| from ch_cli_tools.configuration.configurationgenerator import * |
| generate_hash_based_image_tags, | ||
| preprocess_build_overrides, | ||
| ) | ||
| from ch_cli_tools.configuration.instances import * |
|
|
||
| from ch_cli_tools.helm import * | ||
| from ch_cli_tools.preprocessing import * | ||
| from ch_cli_tools.configuration.preprocessing import * |
aranega
requested changes
Sep 16, 2026
aranega
left a comment
Member
There was a problem hiding this comment.
Just a couple of comments on the readme, all the rest looks good to me :)
| deployment, database, volume, gatekeeper and configmaps, and is how it is referenced on the command | ||
| line. It runs the image built for `samples` — an instance adds no build, so declare no Dockerfile | ||
| in it. The key must not take over one of the application's task images: an instance named `print` | ||
| on an application with a `tasks/print-file` is rejected, as `samples-print` would own |
Member
There was a problem hiding this comment.
I'm not sure I understand the rejection example and why. It's because print-file would be defined in the samples-print instance? The example is related to samples then? I think I don't get what would own means in this context, or where tasks/print-file is supposed to be. Is it declared for samples or samples-print?
Collaborator
Author
There was a problem hiding this comment.
good point, doesn't sound like a clash to me too
| deploy a database of its own for it instead. | ||
|
|
||
| Instances are deployed together with their application: `harness-deployment -i samples` deploys | ||
| `samples` and all its instances, and `-e samples-instance1` leaves one out. CI builds and tests the |
Member
There was a problem hiding this comment.
is it -e or -ex to remove the deployment of the instance?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes CH-293
Implemented solution
An application can be deployed several times from the same build by declaring instances as directories under its
deploy/instances. Each instance directory holds avalues.yamlwith the values it changes and, optionally,resourcesandtemplatesoverlaid on the application's.An instance is deployed as the application
[application]-[instance](e.g.samples-instance1), on its own subdomain (the instance directory name by default), with its own service, deployment, database, volume claim, secrets and gatekeeper. It runs the image built for the application and inherits its whole configuration. Values are layeredinstances/x/values-[ENV].yaml>instances/x/values.yaml>deploy/values-[ENV].yaml>deploy/values.yaml. What identifies the application (subdomain,aliases,domain, resource names, volume claim name,database.connect_string) is not inherited.-i appincludes the application's instances,-i app-instancepulls in the application,-e app-instanceexcludes one instance. An instance whose key collides with an application or a task image is rejected with an explicit error.Instances are handled in the new
ch_cli_tools/instances.pyand derived while their application is read, so the generators treat them as ordinary applications from there on. Thedeploy/instancesdirectories are the only record of what is an instance; the configuration schema is unchanged. Also included: the Dockerfile filter inutils.is_buildable_dockerfile_pathmatches path segments instead of substrings, and_secrets.tplseparates external secret manager resources with---after each resource. Documentation indocs/applications/README.md.How to test this PR
pytest tests/test_helm.py tests/test_dockercompose.pyintools/deployment-cli-toolswithin thechconda environment; thetest_instance*tests cover the feature.harness-deployment . -i samples -d my.local -e devand check thatdeployment/helm/values.yamlcontainsapps.samples-instance1withsubdomain: samples1,build: falseand the image ofsamples, and thatdeployment/helm/resources/samples-instance1/holds bothexample.yaml(from the instance) andmyConfig.json(inherited).helm template deployment/helmand check thesamples-instance1StatefulSet and Service, the ingress rule forsamples1.my.localand thesamples1-gkgatekeeper.Sanity checks:
Breaking changes (select one):
breaking-changeand the migration procedure is well described abovePossible deployment updates issues (select one):
alert:deploymentTest coverage (select one):
Documentation (select one):
Nice to have (if relevant):