Skip to content
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

Kargo Integration #10

Merged
merged 8 commits into from
Dec 5, 2024
Merged

Kargo Integration #10

merged 8 commits into from
Dec 5, 2024

Conversation

jeffmccune
Copy link
Contributor

@jeffmccune jeffmccune commented Dec 5, 2024

  • switch to jeff
  • scripts: apply kargo github app secret if it exists
  • Add kargo projects similar to namespaces
  • kargo: add warehouse for bank frontend
  • kargo: add promotion stages for the bank frontend
  • kargo: prepare argocd application for kargo project
  • kargo: orient holos projects to kargo projects

See: holos-run/holos#372

Manage the Project resource similar to namespaces.

❯ k get project -A
NAME                  READY   STATUS                                     AGE
dev-bank-backend      True    Project is initialized and ready for use   15s
dev-bank-frontend     True    Project is initialized and ready for use   15s
dev-bank-security     True    Project is initialized and ready for use   15s
prod-bank-backend     True    Project is initialized and ready for use   15s
prod-bank-frontend    True    Project is initialized and ready for use   15s
prod-bank-security    True    Project is initialized and ready for use   15s
stage-bank-backend    True    Project is initialized and ready for use   15s
stage-bank-frontend   True    Project is initialized and ready for use   15s
stage-bank-security   True    Project is initialized and ready for use   15s
test-bank-backend     True    Project is initialized and ready for use   15s
test-bank-frontend    True    Project is initialized and ready for use   15s
test-bank-security    True    Project is initialized and ready for use   15s
❯ k get warehouse -A
NAMESPACE             NAME       SHARD   AGE
dev-bank-frontend     frontend           91m
prod-bank-frontend    frontend           91m
stage-bank-frontend   frontend           91m
test-bank-frontend    frontend           91m
This approach writes a kustomization.yaml file to build plan output
directory.  Kargo edits this kustomization.yaml file with the image tag
to promote.
We need to re-orient the bank holos projects to consolidate down to
bank-security, bank-backend, and bank-web from the 12 we have today.
This will align to Kargo's concept of a project which spans multiple
namespaces.
A Kargo Project spans multiple namespaces.  The previous Holos model of
mapping 1 project to 1 env+team doesn't align well with Kargo.

This patch addresses the problem by breaking the bank of holos stack
into 3 projects, one for security, one for the backend, one for the
frontend web.

Each project contains multiple namespaces to support Kargo promotion.
One additional namespace is managed for adoption as a Kargo's Project.

- [x] time ./scripts/full-reset - 1min 16s
- [x] 3 Namespaces with same names and the adoption label
  deploy/clusters/workload/projects/bank-security/components/namespaces/namespaces.gen.yaml
- [x] 3 Kargo Projects bank-security, bank-backend, bank-web.
  deploy/clusters/workload/projects/bank-security/components/projects/projects.gen.yaml
- [x] Stages deployed to the correct namespace.
- [x] ArgoCD comes up from full-reset in a synced state. - Yes, except
  for the Kargo stage branches, which we expect to be out of sync.

ArgoCD Application Authorization

    failed to run step "argocd-update": error getting Argo CD Application
    "bank-web-dev-frontend" in namespace "argocd": Argo CD Application
    "bank-web-dev-frontend" in namespace "argocd" does not permit mutation
    by Kargo Stage dev-frontend in namespace bank-security
@jeffmccune jeffmccune merged commit 7205960 into main Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant