Adopting teams destination based provisioning
This commit is contained in:
@@ -17,17 +17,19 @@ browser ─► hub pe-gatewayapi (demo-vivek-11.apps.lab…) ─► Private Link
|
|||||||
## Apply
|
## Apply
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
khub apply -f deploy/argocd/appproject.yaml
|
|
||||||
khub apply -f deploy/argocd/application.yaml
|
khub apply -f deploy/argocd/application.yaml
|
||||||
khub apply -f deploy/hub/remote-route.yaml
|
khub apply -f deploy/hub/remote-route.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
## Rules the Application must keep
|
## Rules the Application must keep
|
||||||
|
|
||||||
- It lives in namespace **`apps-lab`** on the hub: the agent's namespace.
|
The lab uses argocd-agent's **destination-based mapping**, and this app belongs to team **demo**.
|
||||||
- `destination.name: apps-lab`, **never** `destination.server`, which resolves to the hub itself.
|
|
||||||
- `project: apps-lab`. The `default` project has no `sourceNamespaces`, so it refuses an
|
- It lives in namespace **`team-demo`** on the hub: team demo's namespace. The platform creates it.
|
||||||
Application in `apps-lab`.
|
- `project: team-demo`: the platform's AppProject for the team. It accepts Applications only from
|
||||||
|
`team-demo`, and deploys only to spoke namespaces named **`demo-*`** (this app's is `demo-vivek-11`).
|
||||||
|
- `destination.name: apps-lab`: the agent to deploy to, and the routing key. **Never**
|
||||||
|
`destination.server`, which resolves to the hub itself.
|
||||||
|
|
||||||
## Image
|
## Image
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,20 @@
|
|||||||
# Lives on the HUB, in the agent's namespace. The argocd-agent pushes it to the spoke.
|
# Lives on the HUB, in team demo's namespace. Destination-based mapping routes it to the spoke named
|
||||||
|
# by destination.name, where it keeps this namespace (team-demo) rather than moving to argocd.
|
||||||
apiVersion: argoproj.io/v1alpha1
|
apiVersion: argoproj.io/v1alpha1
|
||||||
kind: Application
|
kind: Application
|
||||||
metadata:
|
metadata:
|
||||||
name: demo-vivek-11
|
name: demo-vivek-11
|
||||||
namespace: apps-lab
|
namespace: team-demo
|
||||||
spec:
|
spec:
|
||||||
project: apps-lab
|
# Created by the platform (argocd-principal teams). Allows deploying only to demo-* on the spoke.
|
||||||
|
project: team-demo
|
||||||
source:
|
source:
|
||||||
repoURL: https://gitea.kyndemo.live/validate/demo-vivek-11.git
|
repoURL: https://gitea.kyndemo.live/validate/demo-vivek-11.git
|
||||||
targetRevision: main
|
targetRevision: main
|
||||||
path: deploy/manifests
|
path: deploy/manifests
|
||||||
destination:
|
destination:
|
||||||
# name, never server: server https://kubernetes.default.svc resolves to the hub itself.
|
# The agent to deploy to -- under destination-based mapping this IS the routing key. Never
|
||||||
|
# server: https://kubernetes.default.svc resolves to the hub itself.
|
||||||
name: apps-lab
|
name: apps-lab
|
||||||
namespace: demo-vivek-11
|
namespace: demo-vivek-11
|
||||||
syncPolicy:
|
syncPolicy:
|
||||||
|
|||||||
Reference in New Issue
Block a user