opea-project / GenAIInfra

Containerization and cloud native suite for OPEA
Apache License 2.0
32 stars 60 forks source link

[Feature] support global setting for new parameters in helm charts #562

Open chensuyue opened 1 week ago

chensuyue commented 1 week ago

Request to support image registry and image tag setting for helm charts install.

yongfengdu commented 6 days ago

These values are replaced by sed in CI script, consider configure options to do this. OPEA_IMAGE_REPO, imagetag, HFTOKEN(Already supported), modelpath(Supported), pullPolicy.

      # insert a prefix before opea/.*, the prefix is OPEA_IMAGE_REPO
      find . -name '*values.yaml' -type f -exec sed -i "s#repository: opea/*#repository: ${OPEA_IMAGE_REPO}opea/#g" {} \;
      # set OPEA image tag to ${{ inputs.tag }}
      find . -name '*values.yaml' -type f -exec sed -i 's#tag: "latest"#tag: ${{ inputs.tag }}#g' {} \;
      # set huggingface token
      find . -name '*values.yaml' -type f -exec sed -i "s#insert-your-huggingface-token-here#${HFTOKEN}#g" {} \;
      # replace the mount dir "Volume: *" with "Volume: $CHART_MOUNT"
      find . -name '*values.yaml' -type f -exec sed -i "s#modelUseHostPath: .*#modelUseHostPath: $CHART_MOUNT#g" {} \;
      # replace the pull policy "IfNotPresent" with "Always"
      find . -name '*values.yaml' -type f -exec sed -i "s#pullPolicy: IfNotPresent#pullPolicy: Always#g" {} \;