diff --git a/.github/scripts/install_dependencies.sh b/.github/scripts/install_dependencies.sh index 7878c02938f55..b7817af9a198b 100755 --- a/.github/scripts/install_dependencies.sh +++ b/.github/scripts/install_dependencies.sh @@ -2,14 +2,29 @@ curr_chart=$1 -if [ -z "$curr_chart" ] -then +if [ -z "$curr_chart" ]; then echo "No chart name provided" exit 1 fi echo "Chart name: $curr_chart" - +values_yaml=$(cat "$curr_chart/values.yaml") +cnpg_enabled=$(go-yq '.cnpg | map(.enabled) | any' <<<"$values_yaml") +ingress_required=$(go-yq '.ingress | map(.required) | any' <<<"$values_yaml") +ingress_enabled=$(go-yq '.ingress | map(.enabled) | any' <<<"$values_yaml") +traefik_needed="false" +if [[ "$ingress_required" == "true" ]] || [[ "$ingress_enabled" == "true" ]]; then + traefik_needed="true" +else + for ci_values in "$curr_chart"/ci/*values.yaml; do + ci_values_yaml=$(cat "$ci_values") + ingress_enabled=$(go-yq '.ingress | map(.enabled) | any' <<<"$ci_values_yaml") + if [[ "$ingress_enabled" == "true" ]]; then + traefik_needed="true" + break + fi + done +fi if [[ "$curr_chart" != "charts/system/prometheus-operator" ]]; then echo "Installing prometheus-operator chart" @@ -21,14 +36,33 @@ if [[ "$curr_chart" != "charts/system/prometheus-operator" ]]; then echo "Done installing prometheus-operator chart" fi +if [[ "$curr_chart" == "charts/premium/traefik" ]]; then + helm install traefik oci://tccr.io/truecharts/traefik-crds --wait + if [[ "$?" != "0" ]]; then + echo "Failed to install traefik-crds chart" + fi + echo "Done installing traefik-crds chart" +fi + +if [[ "$curr_chart" != "charts/premium/traefik" ]] && [[ $traefik_needed == "true" ]]; then + echo "Installing traefik chart" + helm install traefik oci://tccr.io/truecharts/traefik --namespace traefik --create-namespace \ + --set service.tcp.ports.web.port=9080 --set service.tcp.ports.websecure.port=9443 --wait + if [[ "$?" != "0" ]]; then + echo "Failed to install traefik chart" + exit 1 + fi + echo "Done installing traefik chart" +fi + if [[ "$curr_chart" == "charts/premium/volsync" ]]; then - echo "Installing volumesnapshots chart" - helm install volumesnapshots oci://tccr.io/truecharts/volumesnapshots --namespace volumesnapshots --create-namespace --wait - if [[ "$?" != "0" ]]; then - echo "Failed to install volumesnapshots chart" - exit 1 - fi - echo "Done installing volumesnapshots chart" + echo "Installing volumesnapshots chart" + helm install volumesnapshots oci://tccr.io/truecharts/volumesnapshots --namespace volumesnapshots --create-namespace --wait + if [[ "$?" != "0" ]]; then + echo "Failed to install volumesnapshots chart" + exit 1 + fi + echo "Done installing volumesnapshots chart" fi if [[ "$curr_chart" == "charts/premium/metallb-config" ]]; then @@ -41,7 +75,6 @@ if [[ "$curr_chart" == "charts/premium/metallb-config" ]]; then echo "Done installing metallb chart" fi - if [[ "$curr_chart" == "charts/premium/clusterissuer" ]]; then echo "Installing cert-manager chart" helm install cert-manager oci://tccr.io/truecharts/cert-manager --namespace cert-manager --create-namespace --wait @@ -52,8 +85,7 @@ if [[ "$curr_chart" == "charts/premium/clusterissuer" ]]; then echo "Done installing cert-manager chart" fi - -if grep -q "cnpg:" "$curr_chart/values.yaml"; then +if [[ "$cnpg_enabled" == "true" ]]; then echo "Installing cloudnative-pg chart" helm install cloudnative-pg oci://tccr.io/truecharts/cloudnative-pg --namespace cloudnative-pg --create-namespace --wait if [[ "$?" != "0" ]]; then @@ -61,35 +93,24 @@ if grep -q "cnpg:" "$curr_chart/values.yaml"; then exit 1 fi echo "Done installing cloudnative-pg chart" -else - echo "cnpg: not found in $curr_chart/values.yaml, skipping installation." -fi - -if [[ "$curr_chart" == "charts/premium/traefik" ]]; then - echo "Installing traefik-crds chart" - helm install traefik oci://tccr.io/truecharts/traefik-crds --wait - if [[ "$?" != "0" ]]; then - echo "Failed to install traefik-crds chart" - fi - echo "Done installing traefik-crds chart" fi if [[ "$curr_chart" == "charts/system/intel-device-plugins-operator" ]]; then - echo "Installing cert-manager chart" - helm install cert-manager oci://tccr.io/truecharts/cert-manager --namespace cert-manager --create-namespace --wait - if [[ "$?" != "0" ]]; then - echo "Failed to install cert-manager chart" - exit 1 - fi - echo "Done installing cert-manager chart" + echo "Installing cert-manager chart" + helm install cert-manager oci://tccr.io/truecharts/cert-manager --namespace cert-manager --create-namespace --wait + if [[ "$?" != "0" ]]; then + echo "Failed to install cert-manager chart" + exit 1 + fi + echo "Done installing cert-manager chart" fi if [[ "$curr_chart" == "charts/premium/kubernetes-dashboard" ]]; then - echo "Installing metrics-server chart" - helm install metrics-server oci://tccr.io/truecharts/metrics-server --namespace metrics-server --create-namespace --wait - if [[ "$?" != "0" ]]; then - echo "Failed to install metrics-server chart" - exit 1 - fi - echo "Done installing metrics-server chart" + echo "Installing metrics-server chart" + helm install metrics-server oci://tccr.io/truecharts/metrics-server --namespace metrics-server --create-namespace --wait + if [[ "$?" != "0" ]]; then + echo "Failed to install metrics-server chart" + exit 1 + fi + echo "Done installing metrics-server chart" fi diff --git a/.github/workflows/charts-lint.yaml b/.github/workflows/charts-lint.yaml index 66a294338d671..83dcd7e4af696 100644 --- a/.github/workflows/charts-lint.yaml +++ b/.github/workflows/charts-lint.yaml @@ -123,10 +123,10 @@ jobs: continue-on-error: true uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b # v3 with: - filePath: /tmp/lint_result.txt - comment_tag: lint_results + file-path: /tmp/lint_result.txt + comment-tag: lint_results mode: recreate - GITHUB_TOKEN: ${{ github.token }} + github-token: ${{ github.token }} - name: Lint Result if: steps.list-changed.outputs.detected == 'true' diff --git a/.github/workflows/charts-test.yaml b/.github/workflows/charts-test.yaml index 501b5de7d5724..1929fad39c5f6 100644 --- a/.github/workflows/charts-test.yaml +++ b/.github/workflows/charts-test.yaml @@ -139,6 +139,13 @@ jobs: fetch-depth: 1 ref: ${{ inputs.checkoutCommit }} + - name: Install go-yq + run: | + mkdir -p $HOME/.local/bin + wget https://github.com/mikefarah/yq/releases/download/v4.26.1/yq_linux_amd64 -O $HOME/.local/bin/go-yq && \ + chmod +x $HOME/.local/bin/go-yq + echo "$HOME/.local/bin" >> $GITHUB_PATH + - name: Install Helm uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4 with: diff --git a/charts/premium/vaultwarden/Chart.yaml b/charts/premium/vaultwarden/Chart.yaml index a833901b64d68..19f46fbcb27ef 100644 --- a/charts/premium/vaultwarden/Chart.yaml +++ b/charts/premium/vaultwarden/Chart.yaml @@ -26,7 +26,7 @@ keywords: - vaultwarden - password - rust -kubeVersion: '>=1.24.0-0' +kubeVersion: ">=1.24.0-0" maintainers: - name: TrueCharts email: info@truecharts.org @@ -38,4 +38,4 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/premium/vaultwarden - https://hub.docker.com/r/vaultwarden/server type: application -version: 28.5.1 +version: 28.5.2