Problem updating HAProxy chart
andrewheberle opened this issue · 5 comments
I'm sure its something simple I'm missing with the slightly changed process but after updating the upstream Helm chart version and committing my changes to my local branch I get the following error when running make charts
:
<< SNIP >>
M charts/kubecost/cost-analyzer/1.70.0/Chart.yaml
M charts/federatorai/federatorai/4.5.100+up4.5.1/templates/03-federatorai-operator.deployment.yaml
M charts/instana-agent/instana-agent/1.0.2900+up1.0.29/README.md
M charts/ambassador/ambassador/6.7.1100+up6.7.11/templates/serviceaccount.yaml
M charts/artifactory-jcr/artifactory-jcr/3.4.0/charts/artifactory/requirements.yaml
M charts/artifactory-jcr/artifactory-jcr/3.4.0/charts/artifactory/security-mitigation.yaml
M charts/kubecost/cost-analyzer/1.70.0/charts/prometheus/templates/node-exporter-daemonset.yaml
FATA[0003] Repository must be clean to generate charts
Makefile:7: recipe for target 'charts' failed
make: *** [charts] Error 1
Hello @andrewheberle, the repository must be clean when you run make charts
, so all changes must be committed or removed. Based on the information you provided it looks like changes were present when you ran make charts
. Some of those changes look as if they are coming from other charts, but I don't have enough information to say why (It's specific to your fork because our validation would fail as well). Usually, the flow is to make changes in your specific package, save those off, commit, and then the last step is make charts
to generate the new chart from your package.
It definitely looks that way however I'm not understanding why that would be the case as those files are pre-existing in my fork (which started even with this repo) and in the "main-source" branch in this repo...are there any specific requirements for the build environment that could cause this failure (ie git version etc)?.
I've tried this process using WSL2 (which is how I've done updates in the past) and also via Debian based container (in case WSL2 was causing issues).
Here is some more background that might help...
This is the output of git log
on my branch I'm making changes to (commit 6dfcbb0
is the latest commit to https://github.com/rancher/partner-charts with my initial package update as commit 35c638b
):
$ git log
commit 35c638b929476518185add96d535067676168c5f (HEAD -> haproxy-1.16.1)
Author: Andrew Heberle <andrew.heberle@gmail.com>
Date: Tue Jul 27 08:23:49 2021 +0800
Package version update
commit 6dfcbb04bdf8e3906cb5b43e73362a942a12b33a (origin/main-source, main-source)
Merge: 324b99b 127916d
Author: Steven Crespo <steven.crespo@rancher.com>
Date: Thu Jul 1 16:59:50 2021 -0400
Merge pull request #108 from rancher/PennyScissors-patch-1
Add make charts step to README.md
My "Package version update" commit is as follows:
diff --git a/packages/haproxy/generated-changes/overlay/questions.yml b/packages/haproxy/generated-changes/overlay/questions.yml
index 2983260..693d6e9 100644
--- a/packages/haproxy/generated-changes/overlay/questions.yml
+++ b/packages/haproxy/generated-changes/overlay/questions.yml
@@ -8,7 +8,7 @@ questions:
show_subquestion_if: false
subquestions:
- variable: controller.image.tag
- default: "1.5.4"
+ default: "1.6.5"
description: "HAProxy Ingress Controller Tag"
type: string
label: HAProxy Ingress Controller Tag
@@ -70,4 +70,3 @@ questions:
default: "MYPASSWORD"
description: "HAProxy Enterprise Password"
label: Password
-
diff --git a/packages/haproxy/generated-changes/patch/Chart.yaml.patch b/packages/haproxy/generated-changes/patch/Chart.yaml.patch
index 2a5a29f..130a00a 100644
--- a/packages/haproxy/generated-changes/patch/Chart.yaml.patch
+++ b/packages/haproxy/generated-changes/patch/Chart.yaml.patch
@@ -8,7 +8,7 @@
+name: haproxy
sources:
- https://github.com/haproxytech/kubernetes-ingress
- version: 1.12.5
+ version: 1.16.1
+annotations:
+ catalog.cattle.io/certified: partner
+ catalog.cattle.io/release-name: haproxy
diff --git a/packages/haproxy/package.yaml b/packages/haproxy/package.yaml
index 87ece4e..40e592e 100644
--- a/packages/haproxy/package.yaml
+++ b/packages/haproxy/package.yaml
@@ -1,2 +1,2 @@
-url: https://github.com/haproxytech/helm-charts/releases/download/kubernetes-ingress-1.12.5/kubernetes-ingress-1.12.5.tgz
+url: https://github.com/haproxytech/helm-charts/releases/download/kubernetes-ingress-1.16.1/kubernetes-ingress-1.16.1.tgz
packageVersion: 00
My current working dir:
$ git status
On branch haproxy-1.16.1
nothing to commit, working tree clean
Then I run make charts
:
time="2021-07-27T00:40:08Z" level=warning msg="Git is not clean:
M charts/cockroachdb/cockroachdb/4.1.200+up4.1.2/README.md
M charts/cockroachdb/cockroachdb/4.1.200+up4.1.2/values.yaml
M charts/hpe-flexvolume-driver/hpe-flexvolume-driver/3.1.0/templates/sc.yaml
M charts/kubecost/cost-analyzer/1.70.0/prom-benchmark.json
M charts/streamsets/control-agent/2.0.100+up2.0.1/templates/deployment.yaml
M charts/citrix-cpx-with-ingress-controller/citrix-cpx-with-ingress-controller/1.8.2800+up1.8.28/app-readme.md
M charts/dynatrace-oneagent-operator/dynatrace-oneagent-operator/0.8.0/templates/Common/serviceaccount-webhook.yaml
M charts/kubecost/cost-analyzer/1.70.0/charts/prometheus/charts/kube-state-metrics/templates/psp-clusterrole.yaml
M charts/ambassador/ambassador/6.7.1100+up6.7.11/ci/12-daemonset-values.yaml
M charts/artifactory-ha/artifactory-ha/4.13.0/charts/postgresql/charts/common/templates/_images.tpl
M charts/falcon-sensor/falcon-sensor/0.9.300+up0.9.3/templates/configmap.yaml
M charts/haproxy/haproxy/1.12.500+up1.12.5/templates/default-backend-hpa.yaml
<SNIP>
M charts/artifactory-jcr/artifactory-jcr/3.4.0/charts/artifactory/templates/artifactory-system-yaml.yaml
M charts/cockroachdb/cockroachdb/4.1.200+up4.1.2/templates/poddisruptionbudget.yaml
M charts/haproxy/haproxy/1.12.500+up1.12.5/ci/daemonset-publishservice-values.yaml
M charts/openebs/openebs/1.12.300+up1.12.3/questions.yml
"
time="2021-07-27T00:40:08Z" level=fatal msg="Repository must be clean to generate charts"
make: *** [Makefile:8: charts] Error 1
If it helps, here is the branch I'm working on in my fork: https://github.com/andrewheberle/partner-charts/tree/haproxy-1.16.1
Please try the following, I think somehow you might be using old pull scripts. This worked for me (using your repo and branch) so it should work for you as well.
- Clean up your repo. Commit what's needed for your package, and get rid of the rest. (I just checked out your branch so it's clean for me).
- Run
make pull-scripts
- Run
make charts
(Alternatively, you can set PACKAGE=haproxy to run this for your chart only).
Thanks for the help, but that didn't make any difference...however starting completely from scratch did resolve the problem.
Previously when I had attempted this using Docker (to rule out some weirdness with WSL2) I had bind mounted my existing repo into the container. Doing it again with a completely fresh git clone
allowed this to work.
I'm not sure what the root cause could be here...but it must be somehow related to having the repo on a Windows OS.
I have submitted these changes as PR #125
Thanks again.
Great! Glad to hear you figured it out. Closing this now.