From b12f838b06fb916f9b0b4fa6f3a7705fdea4ecf9 Mon Sep 17 00:00:00 2001 From: abhishek Date: Wed, 26 Aug 2026 13:37:34 +0000 Subject: [PATCH] hello app, managed by argocd --- README.md | 2 ++ apps/hello/00-namespace.yaml | 4 ++++ apps/hello/10-configmap.yaml | 12 ++++++++++++ apps/hello/20-deployment.yaml | 25 +++++++++++++++++++++++++ apps/hello/30-service.yaml | 10 ++++++++++ 5 files changed, 53 insertions(+) create mode 100644 apps/hello/00-namespace.yaml create mode 100644 apps/hello/10-configmap.yaml create mode 100644 apps/hello/20-deployment.yaml create mode 100644 apps/hello/30-service.yaml diff --git a/README.md b/README.md index edf35f6..1eb59ad 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # gitops +ArgoCD watches this repository and makes the cluster match it. +Change a file here, push, and the cluster follows. Do not run kubectl by hand. diff --git a/apps/hello/00-namespace.yaml b/apps/hello/00-namespace.yaml new file mode 100644 index 0000000..bad1eb4 --- /dev/null +++ b/apps/hello/00-namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: hello diff --git a/apps/hello/10-configmap.yaml b/apps/hello/10-configmap.yaml new file mode 100644 index 0000000..e9f34c9 --- /dev/null +++ b/apps/hello/10-configmap.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: hello-page + namespace: hello +data: + index.html: | + gitops + +

deployed by argocd

+

Nobody ran kubectl. This page came from git, version v1.

diff --git a/apps/hello/20-deployment.yaml b/apps/hello/20-deployment.yaml new file mode 100644 index 0000000..bb7d3f0 --- /dev/null +++ b/apps/hello/20-deployment.yaml @@ -0,0 +1,25 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: hello + namespace: hello +spec: + replicas: 2 + selector: + matchLabels: { app: hello } + template: + metadata: + labels: { app: hello } + spec: + containers: + - name: web + image: nginx:alpine + ports: [{ containerPort: 80 }] + volumeMounts: + - { name: page, mountPath: /usr/share/nginx/html } + resources: + requests: { cpu: 10m, memory: 16Mi } + limits: { cpu: 200m, memory: 128Mi } + volumes: + - name: page + configMap: { name: hello-page } diff --git a/apps/hello/30-service.yaml b/apps/hello/30-service.yaml new file mode 100644 index 0000000..4248f31 --- /dev/null +++ b/apps/hello/30-service.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Service +metadata: + name: hello + namespace: hello +spec: + type: NodePort + selector: { app: hello } + ports: + - { port: 80, targetPort: 80, nodePort: 30082 }