This commit is contained in:
samsep101
2026-01-05 14:49:10 +05:00
parent c652eaeb46
commit 248d292cae
5 changed files with 91 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: static-site-html
namespace: default
data:
index.html: |
<!DOCTYPE html>
<html>
<head><title>Hello from GitOps!</title></head>
<body>
<h1>🚀 First Level: Static Site</h1>
<p>Deployed via Argo CD + Kyverno</p>
<p>Image: harbor.apps.kopikopi.com.ru/drone/test:latest</p>
</body>
</html>

View File

@@ -0,0 +1,31 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: static-site
namespace: default
labels:
app: static-site
app.kubernetes.io/part-of: static-site
spec:
replicas: 1
selector:
matchLabels:
app: static-site
template:
metadata:
labels:
app: static-site
app.kubernetes.io/part-of: static-site
spec:
containers:
- name: nginx
image: harbor.apps.kopikopi.com.ru/drone/test:latest
ports:
- containerPort: 80
volumeMounts:
- name: html
mountPath: /usr/share/nginx/html
volumes:
- name: html
configMap:
name: static-site-html

View File

@@ -0,0 +1,25 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: static-site
namespace: default
annotations:
cert-manager.io/cluster-issuer: "letsencrypt-prod"
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
ingressClassName: nginx
tls:
- hosts:
- static.apps.kopikopi.com.ru
secretName: static-site-tls
rules:
- host: static.apps.kopikopi.com.ru
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: static-site
port:
number: 80

View File

@@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: default
resources:
- deployment.yaml
- service.yaml
- ingress.yaml
- configmap.yaml

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: static-site
namespace: default
spec:
selector:
app: static-site
ports:
- port: 80
targetPort: 80