Skip to content

Helm - Mechanism missing to import local image for testing #2019

@junhaoliao

Description

@junhaoliao

Request

The Helm chart setup scripts (set-up-test.sh, set-up-multi-dedicated-test.sh,
set-up-multi-shared-test.sh) currently have no way to test with a locally-built Docker image.
They always deploy with the default image from values.yaml (the published
ghcr.io/y-scope/clp/clp-package image).

When developing Helm chart changes, we often need to test with a local clp-package image built from the working tree. This requires manually editing the helm install command each time, which is error-prone and not scriptable.

Add a --clp-package-image CLI argument to all setup scripts so that a locally-built image can be loaded into the kind cluster and used for deployment.

Possible implementation

Add two helpers to .set-up-common.sh:

  1. parse_common_args() — parses --clp-package-image <image> from the script arguments and sets CLP_PACKAGE_IMAGE.
  2. get_image_helm_args() — if an image is specified, loads it into the kind cluster via kind load docker-image and prints the --set flags for image.clpPackage.repository, image.clpPackage.tag, and image.clpPackage.pullPolicy=Never.

Update all three set-up-*.sh scripts to call parse_common_args "$@" and pass
"${CLP_PACKAGE_IMAGE}" to get_image_helm_args.

Usage:

bash tools/deployment/package-helm/set-up-test.sh --clp-package-image clp-package:dev-junhao-a6bf

When --clp-package-image is omitted, the scripts behave exactly as before (using the default image from values.yaml).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions