jackiecloudsec commented on issue #3007:
URL: https://github.com/apache/iggy/issues/3007#issuecomment-4113397070
Proposed solution:
- First add this code block to .github/config/components.yml to meet the req
to validate any changes made “helm/**"
```
helm:
paths:
- "helm/**"
tasks:
- validate
```
- Next adding this block to .github/workflows/_test.yml which grabs and uses
the 4.1.3 AMD64 image of helm and then runs the verify job.
**Do we want arm64?**
```
# - name: Install Helm (pinned)
if: inputs.component == 'helm' && inputs.task == 'validate'
run: |
HELM_VERSION="v4.1.3"
HELM_CHECKSUM="02ce9722d541238f81459938b84cf47df2fdf1187493b4bfb2346754d82a4700"
wget -qO /tmp/helm.tar.gz
"https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz"
echo "${HELM_CHECKSUM} /tmp/helm.tar.gz" | sha256sum -c - || exit
1
tar -zxvf /tmp/helm.tar.gz -C /tmp linux-amd64/helm
chmod +x /tmp/linux-amd64/helm
sudo mv /tmp/linux-amd64/helm /usr/local/bin/helm
- name: Validate Helm chart
if: inputs.component == 'helm' && inputs.task == 'validate'
run: |
set -euo pipefail
C=helm/charts/iggy
helm lint --strict "$C"
# 1 — Defaults (Deployment x2, Service x2, ServiceAccount, Secret)
helm template iggy "$C"
# 2 — All features (+PVC, HPA, Ingress x2, ServiceMonitor)
helm template iggy "$C" \
--set server.persistence.enabled=true \
--set autoscaling.enabled=true \
--set autoscaling.targetCPUUtilizationPercentage=80 \
--set server.ingress.enabled=true \
--set ui.ingress.enabled=true \
--set server.serviceMonitor.enabled=true
# 3 — Legacy K8s 1.18 (Ingress v1beta1, HPA v2beta2)
helm template iggy "$C" \
--kube-version 1.18.0 \
--api-versions networking.k8s.io/v1beta1 \
--api-versions autoscaling/v2beta2 \
--set autoscaling.enabled=true \
--set autoscaling.targetCPUUtilizationPercentage=80 \
--set server.ingress.enabled=true \
--set ui.ingress.enabled=true
# 4 — Server only
helm template iggy "$C" --set ui.enabled=false
# 5 — UI only
helm template iggy "$C" --set server.enabled=false
# 6 — Existing secret (skip createSecret)
helm template iggy "$C" \
--set server.users.root.createSecret=false \
--set server.users.root.existingSecret.name=supersecret
```
I had something a little less verbose but I think this would cover what is
needed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]