Commit bac7280
feat!: migrate to argocd-operator on k3s; drop OpenShift-isms (Phase A) (#5)
## Summary
Phase A of the k3s migration: re-targets `kustomize-cluster` from
OpenShift Local (CRC) onto vanilla k3s, consumed by `argocd-operator`
(community, upstream of OpenShift GitOps — same `argoproj.io/v1beta1
ArgoCD` CRD, so the existing `repo:` block with KSOPS/Dex/RBAC works
unchanged).
This is the *minimum* set of changes for ArgoCD to bootstrap
successfully on k3s. Phase B (replace OLM Subscriptions for
cert-manager/awx/grafana with upstream Helm) and Phase C (clean up
`openshift-monitoring` Prometheus scrape refs, `system:openshift:scc`
references in workloads) follow as separate PRs.
Bundles the previously-staged repo-local opencode config (the prior
commit on this branch).
### Renames
- namespace `openshift-gitops` → `argocd` (~22 files)
- ArgoCD CR `name: openshift-gitops` → `name: argocd`
- SA `openshift-gitops-argocd-application-controller` →
`argocd-argocd-application-controller`
- directory `workloads/openshift-gitops/` → `workloads/argocd/`
- service ref `argocd-server.openshift-gitops.svc.cluster.local` →
`argocd-server.argocd.svc.cluster.local`
- TunnelBinding subject `openshift-gitops-server` → `argocd-server`
- PostSync hooks: `oc` → `kubectl`, OpenShift CLI ImageStream →
`bitnami/kubectl:latest`
- ci-token-sync image:
`image-registry.openshift-image-registry.svc:5000/public-registry/gh-cli`
→ `ghcr.io/makeitworkcloud/gh-cli`
### Deletions (OpenShift-only constructs)
- `bootstrap/console-branding/` — OpenShift web console branding
- `bootstrap/secrets/openshift-oauth/` — cluster-wide OpenShift OAuth
provider config; ArgoCD's own Dex GitHub SSO remains the SSO path
- `bootstrap/public-registry.yaml` — OpenShift internal-registry-backed
namespace
- `operators/cert-manager/{ingress-patch,openshift-ingress-config}.yaml`
— patched OpenShift's IngressController + componentRoutes
- `operators/cert-manager/wildcard-certificate.yaml` — the wildcard
`*.apps.makeitwork.cloud` LE cert was a CRC ingress workaround. With
public traffic flowing through Cloudflare Tunnels (already in this repo
via `cloudflare-operator` + `TunnelBinding`), TLS terminates at
Cloudflare's edge and an in-cluster wildcard cert is dead code.
- `workloads/arc/imagestream.yaml` — OpenShift ImageStream
### Bootstrap chain
```
tfroot-libvirt k3s cloud-init runcmd:
1. Install k3s
2. Create ns argocd + sops-age-keys Secret (in argocd ns)
3. kubectl apply -k argocd-operator (community)
4. kubectl apply -k kustomize-cluster//bootstrap?ref=main
→ applies argocd-config.yaml (operator reconciles → argocd-server with KSOPS init)
→ applies bootstrap-secrets-app, gitops-operators, gitops-workloads (sit dormant until argocd-server is up)
5. argocd-server starts → picks up Applications → self-manages from here
```
The argocd-operator install + sops-age-keys Secret + bootstrap apply is
in the **companion tfroot-libvirt PR #2**. The `sops_age_key` value
needs to be added to `tfroot-libvirt/secrets/secrets.yaml`
(sops-encrypted; same age recipient as the rest).
## Test plan
- [x] `kustomize build bootstrap/` passes locally
- [x] `kustomize build workloads/apps/` passes locally
- [x] All pre-commit hooks (yaml lint, KubeLinter, EOF/whitespace) pass
- [x] CI `Pre-commit Tests` job passes (now `ubuntu-latest`)
- [x] Apply locally (after tfroot-libvirt is also applied) — verify
ArgoCD comes up, repo-server has KSOPS init-container, root sync starts
- [x] Expected red items in ArgoCD UI after sync: cert-manager / awx /
grafana OLM Subscriptions (Phase B will replace), grafana scrape refs to
`openshift-monitoring` (Phase C)
## Migration notes for operators
- The OLM-installed operators (cert-manager, awx, grafana) **will fail
to sync** on k3s because there's no OLM. Their `operator.yaml`
Subscription resources land in etcd but go nowhere. Expected; see Phase
B.
- The wildcard cert is gone. Anything that previously consumed
`wildcard-apps-makeitwork-cloud-tls` Secret (none currently in repo)
will need re-plumbing through Cloudflare.
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 84e92e5 commit bac7280
44 files changed
Lines changed: 108 additions & 401 deletions
File tree
- .github/workflows
- bootstrap
- console-branding
- secrets
- openshift-oauth
- operators
- arc
- cert-manager
- workloads
- apps
- arc
- argocd-proxy
- argocd
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
33 | 38 | | |
34 | 39 | | |
35 | 40 | | |
36 | 41 | | |
37 | 42 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| 43 | + | |
49 | 44 | | |
50 | | - | |
51 | | - | |
52 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
0 commit comments