Files
k8s-apps/graphviz/graphviz.yaml
2026-04-02 11:37:49 +00:00

118 lines
2.4 KiB
YAML

apiVersion: v1
kind: Namespace
metadata:
name: graphviz
---
apiVersion: v1
kind: ConfigMap
metadata:
name: graphviz-nginx
namespace: graphviz
data:
default.conf: |
server {
listen 80;
listen [::]:80;
server_name _;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: graphviz
namespace: graphviz
spec:
replicas: 1
selector:
matchLabels:
app: graphviz
template:
metadata:
labels:
app: graphviz
spec:
containers:
- name: graphviz
image: vaudience/graphviz-visual-editor:0.6.5
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 80
volumeMounts:
- name: nginx-config
mountPath: /etc/nginx/conf.d/default.conf
subPath: default.conf
readinessProbe:
httpGet:
path: /
port: http
scheme: HTTP
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 3
failureThreshold: 6
livenessProbe:
httpGet:
path: /
port: http
scheme: HTTP
initialDelaySeconds: 15
periodSeconds: 20
timeoutSeconds: 3
failureThreshold: 6
resources:
requests:
cpu: 50m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
volumes:
- name: nginx-config
configMap:
name: graphviz-nginx
---
apiVersion: v1
kind: Service
metadata:
name: graphviz
namespace: graphviz
spec:
selector:
app: graphviz
ports:
- name: http
port: 80
targetPort: http
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: graphviz
namespace: graphviz
annotations:
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: letsencrypt
spec:
tls:
- hosts:
- graphviz.apps.undercloud.dev
secretName: graphviz-tls
rules:
- host: graphviz.apps.undercloud.dev
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: graphviz
port:
number: 80