gitops
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: namespace-a
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: gitops-3ns
|
||||
|
||||
source:
|
||||
repoURL: "https://github.com/<tua-org>/gitops-repo.git"
|
||||
targetRevision: main
|
||||
path: gitops/clusters/idc/namespace-A/manifests
|
||||
|
||||
destination:
|
||||
server: "https://kubernetes.default.svc"
|
||||
namespace: namespace-A
|
||||
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
- ServerSideApply=true
|
||||
@@ -0,0 +1,37 @@
|
||||
# =====================================================================
|
||||
# Esempio di manifest reale — sostituiscilo con le tue risorse
|
||||
# effettive. Ogni file .yaml in questa cartella viene applicato
|
||||
# automaticamente da Argo CD (Application "namespace-a").
|
||||
# =====================================================================
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: esempio-app-a
|
||||
namespace: namespace-A
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: esempio-app-a
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: esempio-app-a
|
||||
spec:
|
||||
containers:
|
||||
- name: esempio-app-a
|
||||
image: nginx:1.27
|
||||
ports:
|
||||
- containerPort: 80
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: esempio-app-a
|
||||
namespace: namespace-A
|
||||
spec:
|
||||
selector:
|
||||
app: esempio-app-a
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
Reference in New Issue
Block a user