diff --git a/patterns/gitops/getting-started-argocd/bootstrap/addons.yaml b/patterns/gitops/getting-started-argocd/bootstrap/addons.yaml index 6276ebc659..286d49c696 100644 --- a/patterns/gitops/getting-started-argocd/bootstrap/addons.yaml +++ b/patterns/gitops/getting-started-argocd/bootstrap/addons.yaml @@ -5,12 +5,12 @@ metadata: namespace: argocd spec: syncPolicy: - preserveResourcesOnDeletion: true + preserveResourcesOnDeletion: false generators: - clusters: {} template: metadata: - name: + name: cluster-addons spec: project: default source: diff --git a/patterns/gitops/getting-started-argocd/bootstrap/workloads.yaml b/patterns/gitops/getting-started-argocd/bootstrap/workloads.yaml index b1d105ba3e..7ae1fe43d0 100644 --- a/patterns/gitops/getting-started-argocd/bootstrap/workloads.yaml +++ b/patterns/gitops/getting-started-argocd/bootstrap/workloads.yaml @@ -10,7 +10,11 @@ spec: - clusters: {} template: metadata: - name: 'cluster-addons' + name: workload + finalizers: + # This finalizer is for demo purposes, in production remove apps using argocd CLI "argocd app delete workload --cascade" + # When you invoke argocd app delete with --cascade, the finalizer is added automatically. + - resources-finalizer.argocd.argoproj.io spec: project: default source: @@ -18,7 +22,6 @@ spec: path: '{{metadata.annotations.workload_repo_basepath}}{{metadata.annotations.workload_repo_path}}' targetRevision: '{{metadata.annotations.workload_repo_revision}}' destination: - namespace: 'argocd' name: '{{name}}' syncPolicy: automated: diff --git a/patterns/gitops/getting-started-argocd/k8s/game-2048.yaml b/patterns/gitops/getting-started-argocd/k8s/game-2048.yaml new file mode 100644 index 0000000000..0b2a860582 --- /dev/null +++ b/patterns/gitops/getting-started-argocd/k8s/game-2048.yaml @@ -0,0 +1,66 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: game-2048 +spec: {} +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + namespace: game-2048 + name: deployment-2048 +spec: + selector: + matchLabels: + app.kubernetes.io/name: app-2048 + template: + metadata: + labels: + app.kubernetes.io/name: app-2048 + spec: + containers: + - image: public.ecr.aws/l6m2t8p7/docker-2048 + name: app-2048 + ports: + - containerPort: 80 + name: http +--- +apiVersion: v1 +kind: Service +metadata: + namespace: game-2048 + name: service-2048 +spec: + ports: + - name: http + port: 80 + targetPort: http + protocol: TCP + type: ClusterIP + selector: + app.kubernetes.io/name: app-2048 +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + namespace: game-2048 + name: ingress-2048 + annotations: + alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS":443}]' + alb.ingress.kubernetes.io/scheme: internet-facing + alb.ingress.kubernetes.io/ssl-redirect: '443' + alb.ingress.kubernetes.io/target-type: ip +spec: + ingressClassName: alb + rules: + - http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: service-2048 + port: + number: 80 + tls: + - hosts: [] \ No newline at end of file