Skip to content

Commit

Permalink
chore!: Helm2 removal (#8313)
Browse files Browse the repository at this point in the history
* chore: remove helm2

Reorder test/container/Dockerfile to mitigate issue of being unable to create
.gitconfig since the homedir is not present

chore: cleanup helm2 and tests related to it
Remove helm2 init. Fix unused import
Use helm 3 structure for CRDs
Remove helm2-dependency testdata
Address PR comments
Add back values-production and value.yaml on helm tests
Remove helm2 from openapi.

Signed-off-by: Shyukri Shyukriev <[email protected]>

	modified:   util/helm/cmd_test.go

* fix: generated openapi

Signed-off-by: Michael Crenshaw <[email protected]>

Co-authored-by: Michael Crenshaw <[email protected]>
  • Loading branch information
shuker85 and crenshaw-dev authored Apr 9, 2022
1 parent 1a47fa2 commit 6b783af
Show file tree
Hide file tree
Showing 62 changed files with 125 additions and 1,152 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/ci-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,6 @@ jobs:
make install-codegen-tools-local
make install-go-tools-local
working-directory: /home/runner/go/src/github.com/argoproj/argo-cd
- name: Initialize local Helm
run: |
helm2 init --client-only
- name: Run codegen
run: |
set -x
Expand Down
21 changes: 9 additions & 12 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ name: Create ArgoCD release
on:
push:
tags:
- 'release-v*'
- '!release-v1.5*'
- '!release-v1.4*'
- '!release-v1.3*'
- '!release-v1.2*'
- '!release-v1.1*'
- '!release-v1.0*'
- '!release-v0*'
- "release-v*"
- "!release-v1.5*"
- "!release-v1.4*"
- "!release-v1.3*"
- "!release-v1.2*"
- "!release-v1.1*"
- "!release-v1.0*"
- "!release-v0*"

env:
GOLANG_VERSION: '1.17'
Expand Down Expand Up @@ -172,7 +172,6 @@ jobs:
run: |
set -ue
make install-codegen-tools-local
helm2 init --client-only
make manifests-local VERSION=${TARGET_VERSION}
git diff
git commit manifests/ -m "Bump version to ${TARGET_VERSION}"
Expand All @@ -196,7 +195,6 @@ jobs:
docker login --username "${DOCKER_USERNAME}" --password "${DOCKER_TOKEN}"
if: ${{ env.DRY_RUN != 'true' }}


- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
- name: Build and push Docker image for release
Expand All @@ -213,7 +211,7 @@ jobs:
- name: Read release notes file
id: release-notes
uses: juliangruber/read-file-action@v1
with:
with:
path: ${{ env.RELEASE_NOTES }}

- name: Push changes to release branch
Expand Down Expand Up @@ -345,4 +343,3 @@ jobs:
set -ue
git push --delete origin ${SOURCE_TAG}
if: ${{ always() }}

2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ ADD hack/install.sh .
ADD hack/installers installers
ADD hack/tool-versions.sh .

RUN ./install.sh helm2-linux
RUN ./install.sh helm-linux
RUN INSTALL_PATH=/usr/local/bin ./install.sh kustomize
RUN ./install.sh awscli-linux
Expand All @@ -55,7 +54,6 @@ RUN groupadd -g 999 argocd && \

COPY hack/gpg-wrapper.sh /usr/local/bin/gpg-wrapper.sh
COPY hack/git-verify-wrapper.sh /usr/local/bin/git-verify-wrapper.sh
COPY --from=builder /usr/local/bin/helm2 /usr/local/bin/helm2
COPY --from=builder /usr/local/bin/helm /usr/local/bin/helm
COPY --from=builder /usr/local/bin/kustomize /usr/local/bin/kustomize
COPY --from=builder /usr/local/aws-cli/v2/current/dist /usr/local/aws-cli/v2/current/dist
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,6 @@ install-tools-local: install-test-tools-local install-codegen-tools-local instal
.PHONY: install-test-tools-local
install-test-tools-local:
./hack/install.sh kustomize
./hack/install.sh helm2-linux
./hack/install.sh helm-linux

# Installs all tools required for running codegen (Linux packages)
Expand Down
2 changes: 1 addition & 1 deletion assets/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -4951,7 +4951,7 @@
},
"version": {
"type": "string",
"title": "Version is the Helm version to use for templating (either \"2\" or \"3\")"
"title": "Version is the Helm version to use for templating (\"3\")"
}
}
},
Expand Down
1 change: 0 additions & 1 deletion hack/Dockerfile.dev-tools
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ RUN ./install.sh codegen-go-tools
RUN ./install.sh lint-tools

RUN mkdir -p /home/user && chmod 777 /home/user
RUN HELM_HOME=/home/user/.helm helm2 init --client-only

RUN git config --system user.name "ArgoCD Test User"
RUN git config --system user.email "[email protected]"
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion hack/installers/install-codegen-tools.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
set -eux -o pipefail

KUSTOMIZE_VERSION=4.2.0 "$(dirname $0)/../install.sh" helm2-linux kustomize protoc
KUSTOMIZE_VERSION=4.2.0 "$(dirname $0)/../install.sh" kustomize protoc
12 changes: 0 additions & 12 deletions hack/installers/install-helm2-linux.sh

This file was deleted.

1 change: 0 additions & 1 deletion hack/tool-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
# SHA256 sum of the binary.
###############################################################################
awscliv2_version=2.4.6
helm2_version=2.17.0
helm3_version=3.8.1
kubectl_version=1.17.8
kubectx_version=0.6.3
Expand Down
12 changes: 6 additions & 6 deletions manifests/core-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ spec:
type: string
version:
description: Version is the Helm version to use for templating
(either "2" or "3")
("3")
type: string
type: object
kustomize:
Expand Down Expand Up @@ -630,7 +630,7 @@ spec:
type: string
version:
description: Version is the Helm version to use for templating
(either "2" or "3")
("3")
type: string
type: object
kustomize:
Expand Down Expand Up @@ -984,7 +984,7 @@ spec:
type: string
version:
description: Version is the Helm version to use for
templating (either "2" or "3")
templating ("3")
type: string
type: object
kustomize:
Expand Down Expand Up @@ -1355,7 +1355,7 @@ spec:
type: string
version:
description: Version is the Helm version to use
for templating (either "2" or "3")
for templating ("3")
type: string
type: object
kustomize:
Expand Down Expand Up @@ -1700,7 +1700,7 @@ spec:
type: string
version:
description: Version is the Helm version to use for
templating (either "2" or "3")
templating ("3")
type: string
type: object
kustomize:
Expand Down Expand Up @@ -2034,7 +2034,7 @@ spec:
type: string
version:
description: Version is the Helm version to use for
templating (either "2" or "3")
templating ("3")
type: string
type: object
kustomize:
Expand Down
12 changes: 6 additions & 6 deletions manifests/crds/application-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ spec:
type: string
version:
description: Version is the Helm version to use for templating
(either "2" or "3")
("3")
type: string
type: object
kustomize:
Expand Down Expand Up @@ -629,7 +629,7 @@ spec:
type: string
version:
description: Version is the Helm version to use for templating
(either "2" or "3")
("3")
type: string
type: object
kustomize:
Expand Down Expand Up @@ -983,7 +983,7 @@ spec:
type: string
version:
description: Version is the Helm version to use for
templating (either "2" or "3")
templating ("3")
type: string
type: object
kustomize:
Expand Down Expand Up @@ -1354,7 +1354,7 @@ spec:
type: string
version:
description: Version is the Helm version to use
for templating (either "2" or "3")
for templating ("3")
type: string
type: object
kustomize:
Expand Down Expand Up @@ -1699,7 +1699,7 @@ spec:
type: string
version:
description: Version is the Helm version to use for
templating (either "2" or "3")
templating ("3")
type: string
type: object
kustomize:
Expand Down Expand Up @@ -2033,7 +2033,7 @@ spec:
type: string
version:
description: Version is the Helm version to use for
templating (either "2" or "3")
templating ("3")
type: string
type: object
kustomize:
Expand Down
12 changes: 6 additions & 6 deletions manifests/ha/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ spec:
type: string
version:
description: Version is the Helm version to use for templating
(either "2" or "3")
("3")
type: string
type: object
kustomize:
Expand Down Expand Up @@ -630,7 +630,7 @@ spec:
type: string
version:
description: Version is the Helm version to use for templating
(either "2" or "3")
("3")
type: string
type: object
kustomize:
Expand Down Expand Up @@ -984,7 +984,7 @@ spec:
type: string
version:
description: Version is the Helm version to use for
templating (either "2" or "3")
templating ("3")
type: string
type: object
kustomize:
Expand Down Expand Up @@ -1355,7 +1355,7 @@ spec:
type: string
version:
description: Version is the Helm version to use
for templating (either "2" or "3")
for templating ("3")
type: string
type: object
kustomize:
Expand Down Expand Up @@ -1700,7 +1700,7 @@ spec:
type: string
version:
description: Version is the Helm version to use for
templating (either "2" or "3")
templating ("3")
type: string
type: object
kustomize:
Expand Down Expand Up @@ -2034,7 +2034,7 @@ spec:
type: string
version:
description: Version is the Helm version to use for
templating (either "2" or "3")
templating ("3")
type: string
type: object
kustomize:
Expand Down
12 changes: 6 additions & 6 deletions manifests/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ spec:
type: string
version:
description: Version is the Helm version to use for templating
(either "2" or "3")
("3")
type: string
type: object
kustomize:
Expand Down Expand Up @@ -630,7 +630,7 @@ spec:
type: string
version:
description: Version is the Helm version to use for templating
(either "2" or "3")
("3")
type: string
type: object
kustomize:
Expand Down Expand Up @@ -984,7 +984,7 @@ spec:
type: string
version:
description: Version is the Helm version to use for
templating (either "2" or "3")
templating ("3")
type: string
type: object
kustomize:
Expand Down Expand Up @@ -1355,7 +1355,7 @@ spec:
type: string
version:
description: Version is the Helm version to use
for templating (either "2" or "3")
for templating ("3")
type: string
type: object
kustomize:
Expand Down Expand Up @@ -1700,7 +1700,7 @@ spec:
type: string
version:
description: Version is the Helm version to use for
templating (either "2" or "3")
templating ("3")
type: string
type: object
kustomize:
Expand Down Expand Up @@ -2034,7 +2034,7 @@ spec:
type: string
version:
description: Version is the Helm version to use for
templating (either "2" or "3")
templating ("3")
type: string
type: object
kustomize:
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/application/v1alpha1/generated.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/apis/application/v1alpha1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/apis/application/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ type ApplicationSourceHelm struct {
Values string `json:"values,omitempty" protobuf:"bytes,4,opt,name=values"`
// FileParameters are file parameters to the helm template
FileParameters []HelmFileParameter `json:"fileParameters,omitempty" protobuf:"bytes,5,opt,name=fileParameters"`
// Version is the Helm version to use for templating (either "2" or "3")
// Version is the Helm version to use for templating ("3")
Version string `json:"version,omitempty" protobuf:"bytes,6,opt,name=version"`
// PassCredentials pass credentials to all domains (Helm's --pass-credentials)
PassCredentials bool `json:"passCredentials,omitempty" protobuf:"bytes,7,opt,name=passCredentials"`
Expand Down
6 changes: 3 additions & 3 deletions reposerver/repository/repository_norace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ func TestHelmDependencyWithConcurrency(t *testing.T) {
// https://github.com/argoproj/argo-cd/issues/4728

cleanup := func() {
_ = os.Remove(filepath.Join("../../util/helm/testdata/helm2-dependency", helmDepUpMarkerFile))
_ = os.RemoveAll(filepath.Join("../../util/helm/testdata/helm2-dependency", "charts"))
_ = os.Remove(filepath.Join("../../util/helm/testdata/dependency", helmDepUpMarkerFile))
_ = os.RemoveAll(filepath.Join("../../util/helm/testdata/dependency", "charts"))
}
cleanup()
defer cleanup()
Expand All @@ -33,7 +33,7 @@ func TestHelmDependencyWithConcurrency(t *testing.T) {
wg.Add(3)
for i := 0; i < 3; i++ {
go func() {
res, err := helmTemplate("../../util/helm/testdata/helm2-dependency", "../..", nil, &apiclient.ManifestRequest{
res, err := helmTemplate("../../util/helm/testdata/dependency", "../..", nil, &apiclient.ManifestRequest{
ApplicationSource: &argoappv1.ApplicationSource{},
Repos: []*argoappv1.Repository{&helmRepo},
}, false)
Expand Down
Loading

0 comments on commit 6b783af

Please sign in to comment.