hello app, managed by argocd
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: hello
|
||||
@@ -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>
|
||||
@@ -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 }
|
||||
@@ -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 }
|
||||
Reference in New Issue
Block a user