# Lab Intranet - Static site served by nginx
# ArgoCD managed - BlueJay Lab
---
apiVersion: v1
kind: Namespace
metadata:
name: intranet
labels:
app.kubernetes.io/part-of: bluejay-infra
---
# nginx configuration
apiVersion: v1
kind: ConfigMap
metadata:
name: intranet-nginx-conf
namespace: intranet
data:
default.conf: |
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ =404;
}
location /healthz {
access_log off;
return 200 "ok";
add_header Content-Type text/plain;
}
}
---
# Placeholder HTML content
apiVersion: v1
kind: ConfigMap
metadata:
name: intranet-html
namespace: intranet
data:
index.html: |
BlueJay Lab - Intranet
🐦
BlueJay Lab
Intranet Portal
Intranet content coming soon.
Replace this ConfigMap with lab-intranet.html content.
---
# nginx Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: intranet
namespace: intranet
labels:
app: intranet
spec:
replicas: 1
selector:
matchLabels:
app: intranet
template:
metadata:
labels:
app: intranet
spec:
containers:
- name: nginx
image: nginx:alpine
ports:
- containerPort: 80
name: http
volumeMounts:
- name: nginx-conf
mountPath: /etc/nginx/conf.d/default.conf
subPath: default.conf
- name: html
mountPath: /usr/share/nginx/html
resources:
requests:
memory: 16Mi
cpu: 5m
limits:
memory: 64Mi
cpu: 50m
livenessProbe:
httpGet:
path: /healthz
port: 80
initialDelaySeconds: 5
periodSeconds: 10
readinessProbe:
httpGet:
path: /healthz
port: 80
initialDelaySeconds: 3
periodSeconds: 5
volumes:
- name: nginx-conf
configMap:
name: intranet-nginx-conf
- name: html
configMap:
name: intranet-html
---
apiVersion: v1
kind: Service
metadata:
name: intranet
namespace: intranet
spec:
selector:
app: intranet
ports:
- port: 80
targetPort: 80
name: http
---
# TLS Certificate via cert-manager
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: intranet-tls
namespace: intranet
spec:
secretName: intranet-tls
issuerRef:
name: step-ca-acme
kind: ClusterIssuer
dnsNames:
- intranet.iamworkin.lan
---
# Traefik IngressRoute
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: intranet
namespace: intranet
spec:
entryPoints:
- websecure
routes:
- match: Host(`intranet.iamworkin.lan`)
kind: Rule
services:
- name: intranet
port: 80
tls:
secretName: intranet-tls