hello app, managed by argocd

This commit is contained in:
2026-08-26 13:37:34 +00:00
parent 2049b6d11e
commit b12f838b06
5 changed files with 53 additions and 0 deletions
+2
View File
@@ -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.
+4
View File
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: hello
+12
View File
@@ -0,0 +1,12 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: hello-page
namespace: hello
data:
index.html: |
<!doctype html><meta charset=utf-8><title>gitops</title>
<style>body{font-family:system-ui;max-width:34rem;margin:4rem auto;padding:0 1rem;line-height:1.6}
b{background:#eef;padding:.1em .3em;border-radius:3px}</style>
<h1>deployed by argocd</h1>
<p>Nobody ran kubectl. This page came from git, version <b>v1</b>.</p>
+25
View File
@@ -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 }
+10
View File
@@ -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 }