Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
d7c7454
feat: Making big steps in Makefile understanding, but it's still messy
sunib Feb 26, 2026
4affc1e
ci: Let's see if we can e2e in GH again
sunib Feb 27, 2026
6c99fd2
ci: Small steps towards the end of this Makefile ride
sunib Feb 27, 2026
353a56e
ci: Would this help?
sunib Feb 27, 2026
22420fd
ci: Now we can run in any namespace
sunib Feb 27, 2026
2590ded
fix: Getting the image insertion at least a little bit straight
sunib Feb 27, 2026
34bfcf4
chore: Cleaning it up a bit more
sunib Feb 27, 2026
684e039
chore: Sunsetting run-quickstart.sh, Makefile to the rescue
sunib Feb 27, 2026
3861938
fix: Kind and docker outside docker
sunib Feb 27, 2026
7668531
chore: Move kubectl calls to functions so that we always can add the …
sunib Mar 2, 2026
831127c
chore: Stripping unneeded stuff, and allowing to run the three scenar…
sunib Mar 2, 2026
a066280
chore: Clean local removal guides, only reuse same installation method
sunib Mar 2, 2026
94c3b61
chore: Preparing something else than Kind
sunib Mar 2, 2026
92df8f8
chore: Trying to run on k3d instead of kind
sunib Mar 2, 2026
d7ca9cb
chore: That will help
sunib Mar 2, 2026
92ab85f
fix: preventing warning on k3d creation DoD style
sunib Mar 2, 2026
0987302
chore: completing migrating to k3d
sunib Mar 2, 2026
10f7092
fix: Getting all paths right
sunib Mar 2, 2026
73e6e3b
chore: Let's see if it's just slower or that we have a difference
sunib Mar 2, 2026
55bc5ee
chore: Does this help then?
sunib Mar 2, 2026
25d4d96
chore: Now it's behaving better with local source changes
sunib Mar 2, 2026
5f9c572
chore: cleaning up seperate clusters (we now can 'clean' the cluster …
sunib Mar 2, 2026
fbeaddb
fix: The order in which the dependencies is (perhaps to?) important
sunib Mar 2, 2026
23c7a52
fix: Let's get the linter happy again
sunib Mar 2, 2026
dc250ba
chore: Cleaning up, let's do a one Makefile approach first
sunib Mar 3, 2026
7882a21
fix: Always check these things yourself
sunib Mar 3, 2026
73680a3
fix: Now we can really uninstall, also multiple if that would already…
sunib Mar 3, 2026
a3560c1
fix: Mistake in Makefile syntax
sunib Mar 3, 2026
ebc18aa
fix: Some tweaks to cleaning existing installs, and moving to a seper…
sunib Mar 3, 2026
0750e88
chore: More errors while switching back and forth
sunib Mar 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"permissions": {
"allow": [
"Bash(make fmt)",
"Bash(make vet)",
"Bash(make lint)",
"Bash(make test)",
"Bash(make test-e2e)",
"Bash(make --dry-run test-e2e-quickstart-manifest)",
"Bash(make test-e2e-quickstart-manifest)",
"Bash(make test-e2e-quickstart-helm)",
"Bash(kubectl --context kind-gitops-reverser-test-e2e-quickstart-helm get clusterrole,clusterrolebinding,crd)",
"Bash(make --dry-run test-e2e-quickstart-helm)",
"Bash(make --dry-run test-e2e)",
"Bash(grep -n \"setupSOPSAgeSecret\\\\|generateAgeKey\\\\|e2eAgeKeyPath\" /workspaces/gitops-reverser2/test/e2e/*.go)",
"Bash(grep -n \"readSOPSAgeKeyFromFile\" /workspaces/gitops-reverser2/test/e2e/*.go)",
"Bash(grep -r \"make\\\\|Make\" /workspaces/gitops-reverser2/test/e2e/*.go)",
"Bash(make .stamps/image/controller.id)",
"Bash(docker version)",
"Bash(docker buildx version)",
"Bash(go build ./test/e2e/tools/gen-age-key/...)",
"Bash(make cleanup-cluster)",
"Bash(make -n prepare-e2e INSTALL_MODE=helm)",
"Bash(checkmake Makefile)",
"Bash(docker info)",
"Bash(make fmt vet)",
"Bash(kubectl --context k3d-gitops-reverser-test-e2e get clusterrole,clusterrolebinding -l app.kubernetes.io/part-of=gitops-reverser --no-headers)",
"Read(//workspaces/gitops-reverser2/**)",
"Bash(kubectl --context k3d-gitops-reverser-test-e2e get crd gitproviders.configbutler.ai gittargets.configbutler.ai watchrules.configbutler.ai clusterwatchrules.configbutler.ai -o jsonpath='{range .items[*]}{.metadata.name}: managedFields manager={.metadata.managedFields[0].manager}{\"\"\\\\n\"\"}{end}')",
"Bash(helm upgrade --help)",
"Bash(kubectl --context k3d-gitops-reverser-test-e2e delete ns gitops-reverser --ignore-not-found=true)",
"Bash(kubectl --context k3d-gitops-reverser-test-e2e wait --for=delete ns/gitops-reverser --timeout=120s)",
"Bash(kubectl --context k3d-gitops-reverser-test-e2e delete validatingwebhookconfiguration gitops-reverser-validating-webhook-configuration --ignore-not-found=true)",
"Bash(kubectl --context k3d-gitops-reverser-test-e2e delete crd gitproviders.configbutler.ai gittargets.configbutler.ai watchrules.configbutler.ai clusterwatchrules.configbutler.ai --ignore-not-found=true)",
"Bash(grep -l \"managedFields\" charts/gitops-reverser/crds/*.yaml)",
"Bash(grep -l \"managedFields\" config/crd/bases/*.yaml)",
"Bash(helm install gitops-reverser charts/gitops-reverser --kube-context k3d-gitops-reverser-test-e2e --namespace gitops-reverser --create-namespace --debug)",
"Bash(helm version)"
]
}
}
12 changes: 7 additions & 5 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ RUN apt-get update \
vim \
less \
jq \
yq \
sudo \
acl \
rsync \
Expand All @@ -36,7 +37,7 @@ ENV KUBECTL_VERSION=v1.35.0 \
KUBEBUILDER_VERSION=4.11.1 \
GOLANGCI_LINT_VERSION=v2.10.1 \
HELM_VERSION=v4.0.0 \
KIND_VERSION=v0.31.0
K3D_VERSION=v5.8.3

# Install kubectl
RUN curl -LO "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl" \
Expand All @@ -62,9 +63,9 @@ RUN curl -fsSL https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz \
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh \
| sh -s -- -b /usr/local/bin ${GOLANGCI_LINT_VERSION}

# Install Kind (needed in CI for e2e cluster creation, and in dev for local clusters)
RUN curl -Lo /usr/local/bin/kind "https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-linux-amd64" \
&& chmod +x /usr/local/bin/kind
# Install k3d (faster and kind alternative, also more stable with our docker-outside-docker setup)
RUN curl -fsSL -o /usr/local/bin/k3d "https://github.com/k3d-io/k3d/releases/download/${K3D_VERSION}/k3d-linux-amd64" \
&& chmod +x /usr/local/bin/k3d

# Set working directory
WORKDIR /workspaces
Expand All @@ -84,7 +85,8 @@ RUN chgrp -R godev /go && \
# Install Go tools used by the project (using @version doesn't need go.mod)
# These run AFTER permissions are set to ensure proper group ownership
RUN go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.19.0 \
&& go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
&& go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest \
&& go install github.com/checkmake/checkmake/cmd/checkmake@latest

# Initialize golangci-lint cache by running it once on an empty directory
# This downloads linter dependencies without needing source code
Expand Down
8 changes: 4 additions & 4 deletions .devcontainer/SETUP_CLUSTER_TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ Get "https://172.19.0.2:6443/livez?timeout=10s": dial tcp 172.19.0.2:6443: conne

## Root cause (current setup)

`test/e2e/kind/start-cluster.sh` generates `test/e2e/kind/cluster.ignore.yaml` from `HOST_PROJECT_PATH`.
`test/e2e/cluster/start-cluster.sh` generates `test/e2e/cluster/cluster.ignore.yaml` from `HOST_PROJECT_PATH`.

In the current devcontainer config, `HOST_PROJECT_PATH` is set from `${localWorkspaceFolder}`.
That produced:

```
hostPath: /home/simon/git/gitops-reverser2/test/e2e/kind/audit
hostPath: /home/simon/git/gitops-reverser2/test/e2e/cluster/audit
```

But that mounted directory exists and is empty in the container, while the real audit files are under:

```
/workspaces/gitops-reverser2/test/e2e/kind/audit
/workspaces/gitops-reverser2/test/e2e/cluster/audit
```

Because the mount source is wrong/empty, kube-apiserver cannot read:
Expand Down Expand Up @@ -56,7 +56,7 @@ Your current config mixes modes and path assumptions, so Kind mount path resolut
Before running `make setup-cluster`, verify generated config points to a path with files:

```bash
cat test/e2e/kind/cluster.ignore.yaml
cat test/e2e/cluster/cluster.ignore.yaml
ls -la <hostPath-from-generated-file>
```

Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ jobs:
helm version
golangci-lint version
controller-gen --version
kind version
k3d version
docker --version
checkmake --version
echo '✅ All CI container tools verified'
"

Expand Down Expand Up @@ -123,8 +124,9 @@ jobs:
kustomize version
helm version
golangci-lint version
kind version
k3d version
docker --version
checkmake --version
echo '✅ All dev container tools verified'
"

Expand Down Expand Up @@ -161,7 +163,7 @@ jobs:

- name: Generate install.yaml from Helm chart
run: |
make build-installer
make dist/install.yaml

- name: Package Helm chart
run: |
Expand Down Expand Up @@ -193,6 +195,9 @@ jobs:
- name: Configure Git safe directory (for now needed as workarround https://github.com/actions/checkout/issues/2031)
run: git config --global --add safe.directory /__w/gitops-reverser/gitops-reverser

- name: checkmake Makefile
run: checkmake Makefile

- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ __debug*
charts/gitops-reverser/crds/*.yaml
charts/gitops-reverser/config/*.yaml

# Keep the install.yaml for distribution
dist/install.yaml
# Generated single-file installer artifact (not tracked).
/dist/install.yaml

*.o.yaml
*.ignore.*
.stamps/*
.stamps/*
Empty file removed .stamps/cluster/pf.running
Empty file.
Loading