-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repo restructure project - Merge helm-locker into local #74
Merged
Merged
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
e31a535
rename example chart to be more specific
mallardduck 8b98ad9
Add helm-locker docs
mallardduck b9a50bf
Reorg more files for project merge
mallardduck bc925c2
Add helm-locker charts
mallardduck 9be3772
Adjust CRD reference yaml generation
mallardduck 10028d7
Adjust default entry point to use explicit name
mallardduck 42eff8b
Rename docker file to be specific
mallardduck 78cec10
Rename docker file to better name
mallardduck 4403c88
Adjust scripts to allow targeting other entrypoints
mallardduck 7b9cc34
simplify docker bin target
mallardduck 6b4cdc3
move CRDs for repo merge
mallardduck bd7c5b9
bring helm-locker code into local repo
mallardduck 5396999
Adjust build target logic on build scripts
mallardduck d11e570
Move helm-project-operator to new cmd
mallardduck 03f32b4
Add helm-locker local CLI
mallardduck 43bad66
Reorg GHA ci files
mallardduck e8e9f46
Add helm-locker GHA into local repo
mallardduck f310e1c
Add go generate step to linter
mallardduck e89bd93
Add make build chart to lint job
mallardduck a8cc125
switch from ioutil to io
mallardduck b99ed1f
Fix linting issues
mallardduck f660e6d
Adjust ignore/keep for git
mallardduck dace9d8
Adjust GHA job names for package delineation
mallardduck 5b7dcf0
update go deps files
mallardduck 0c929cc
correct helm-ci target
mallardduck 9086dbd
correct build scripts
mallardduck e56e833
correct syntax error in GHA workflow
mallardduck b4531f0
rename step name to be more accurate
mallardduck 39dfd50
Adjust how tests are done to only test target command
mallardduck 3a885f3
update target and script path
mallardduck b9b2527
Add missing cluster script
mallardduck a03241f
Bring over tests folder from helm-locker
mallardduck d7a4d99
Adjust more paths for repo re-org
mallardduck ad90f02
tweak publish workflows to work on specific tags for now...
mallardduck 582ff22
Adjust style for easier workflow reading
mallardduck d0616ac
Correct e2e job name
mallardduck 56cf70d
correct last reference to old name
mallardduck 92721ba
fix scirpt job name
mallardduck 3abe679
correct path for delete script
mallardduck 1140ae4
remove duplicate crds file
mallardduck 464f1fd
Merge 2 publish workflows into 1
mallardduck 6d3ae41
Correct job name
mallardduck a24395e
Update readme docs
mallardduck 43c4e68
Only trigger hl-e2e on push to paths related to helm-locker
mallardduck 6cc146b
Test better image tags
mallardduck e69ff8e
Adjust rancher version annotations
mallardduck 8f2a52b
update chart maintainer
mallardduck ec90559
Adjust both charts to use GHCR for images
mallardduck File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
set -x | ||
|
||
K3D_URL=https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | ||
DEFAULT_K3D_VERSION=v5.4.6 | ||
|
||
install_k3d(){ | ||
local k3dVersion=${K3D_VERSION:-${DEFAULT_K3D_VERSION}} | ||
echo -e "Downloading k3d@${k3dVersion} see: ${K3D_URL}" | ||
curl --silent --fail ${K3D_URL} | TAG=${k3dVersion} bash | ||
} | ||
|
||
install_k3d | ||
|
||
k3d version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: "[helm-locker] CI" | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name : Set up Go | ||
uses : actions/setup-go@v5 | ||
with: | ||
go-version: 1.22 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Run CI | ||
run: BUILD_TARGET=helm-locker make ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: "[helm-locker] CI-e2e" | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'go.mod' | ||
- 'charts/helm-locker*/**' | ||
- 'crds/helm-locker/**' | ||
- 'package/Dockerfile-helm-locker' | ||
- 'cmd/helm-locker/**' | ||
- 'pkg/helm-locker/**' | ||
|
||
env: | ||
CLUSTER_NAME : test-cluster | ||
K3S_VERSION : v1.27.9-k3s1 | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name : Set up Go | ||
uses : actions/setup-go@v5 | ||
with: | ||
go-version: 1.22 | ||
- name : Setup up kubectl | ||
run : | | ||
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" | ||
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl | ||
- name: Set up k3d | ||
run : ./.github/workflows/e2e/scripts/install-k3d.sh | ||
- name: build | ||
run: BUILD_TARGET=helm-locker make build | ||
- name : Setup cluster | ||
run : CLUSTER_NAME=${{ env.CLUSTER_NAME }} K3S_VERSION=${{ env.K3S_VERSION }} ./scripts/setup-cluster.sh | ||
# temporary hack to run the helm-locker controller in the k3d cluster | ||
- name : run helm-locker | ||
run : | | ||
kubectl create ns cattle-helm-system | ||
./bin/helm-locker & | ||
- name : run e2e tests | ||
run: | | ||
k3d kubeconfig get ${{ env.CLUSTER_NAME }} > kubeconfig.yaml | ||
export KUBECONFIG=$(pwd)/kubeconfig.yaml | ||
cd tests && KUBECONFIG=$KUBECONFIG go test -v -race -timeout 30m ./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: golangci-lint | ||
on: | ||
pull_request: | ||
paths-ignore: | ||
- 'docs/**' | ||
- '*.md' | ||
- '.gitignore' | ||
- 'CODEOWNERS' | ||
- 'LICENSE' | ||
|
||
permissions: | ||
contents: read | ||
# Optional: allow read access to pull request. Use with `only-new-issues` option. | ||
# pull-requests: read | ||
|
||
jobs: | ||
golangci: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.22' | ||
- run: go generate | ||
- run: make build-chart | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v6 | ||
with: | ||
# Require: The version of golangci-lint to use. | ||
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version. | ||
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit. | ||
version: v1.56 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: "Publish Images" | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
push: | ||
name : Build and push helm-locker & Helm-Project-Operator images | ||
runs-on : ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
attestations: write | ||
id-token: write | ||
steps: | ||
- name : Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name : Setup go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.22 | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name : Build, test & validate | ||
run : BUILD_TARGET=helm-locker make ci | ||
- name: Extract metadata (tags, labels) for helm-locker image | ||
id: meta-locker | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/helm-locker | ||
- name: Build and push helm-locker image | ||
id: push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ./package/Dockerfile-helm-locker | ||
push: true | ||
tags: ${{ steps.meta-locker.outputs.tags }} | ||
labels: ${{ steps.meta-locker.outputs.labels }} | ||
platforms : linux/amd64,linux/arm64 | ||
- name: Extract metadata (tags, labels) for Helm-Project-Operator image | ||
id: meta-hpo | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
- name: Build Helm-Project-Operator image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ./package/Dockerfile-helm-project-operator | ||
push: true | ||
tags: ${{ steps.meta-hpo.outputs.tags }} | ||
labels: ${{ steps.meta-hpo.outputs.labels }} | ||
platforms: linux/amd64,linux/arm64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
/.dapper | ||
/.cache | ||
/bin | ||
!/cmd/helm-project-operator/fs/.gitkeep | ||
/cmd/helm-project-operator/fs/* | ||
/dist | ||
*.swp | ||
.idea | ||
/helm-project-operator | ||
/.vscode | ||
/.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need to keep this dir? Can we recreated it when we need it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah - that's a fair point.
I tend to favor keeping dirs like this around - feels like it keeps things uniform and gives hints to the fact that the dir will be populated as part of a successful build. Not super attached to that though if we think it should just be fully excluded.