2026-08-22 17:30:45 +01:00
|
|
|
# A ConfigMap is just a bag of key/value data — in this case, a small HTML
|
|
|
|
|
# file — that lives in the cluster as its own object, separate from the
|
|
|
|
|
# Pod that uses it. We mount it into the nginx container below instead of
|
|
|
|
|
# baking the page into a custom container image.
|
|
|
|
|
#
|
|
|
|
|
# Why this matters for the GitOps story: this is the file you'll edit in
|
2026-08-22 18:25:38 +01:00
|
|
|
# docs/07-your-first-change.md. Change the text here, commit, push, and
|
2026-08-22 17:30:45 +01:00
|
|
|
# watch Argo CD notice the difference in Git and push it into the cluster
|
|
|
|
|
# for you — no `kubectl` command involved. That's the whole loop, proven
|
|
|
|
|
# with one line of HTML.
|
|
|
|
|
apiVersion: v1
|
|
|
|
|
kind: ConfigMap
|
|
|
|
|
metadata:
|
|
|
|
|
name: demo-page
|
|
|
|
|
namespace: demo
|
|
|
|
|
data:
|
|
|
|
|
index.html: |
|
|
|
|
|
<!doctype html>
|
|
|
|
|
<html>
|
2026-10-28 13:05:45 +00:00
|
|
|
<head><title>It twerks!</title></head>
|
2026-08-22 17:30:45 +01:00
|
|
|
<body style="font-family: sans-serif; text-align: center; margin-top: 10%;">
|
|
|
|
|
<h1>It works!</h1>
|
|
|
|
|
<p>This page is being served from a Kubernetes cluster that Argo CD
|
|
|
|
|
deployed straight from Git. Edit <code>apps/demo/configmap.yaml</code>,
|
|
|
|
|
commit, push, and refresh this page.</p>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|