Add dev-container

This commit is contained in:
Mathis 2024-04-25 19:55:49 +00:00
parent 4cd921b8d8
commit ee75d54667
7 changed files with 89 additions and 1 deletions

View File

@ -1,4 +1,4 @@
FOLDERS := infra/traefik infra/storage infra/monitoring infra/authelia apps/namesny-com apps/mlflow apps/gitea apps/code-server
FOLDERS := infra/traefik infra/storage infra/monitoring infra/authelia apps/namesny-com apps/mlflow apps/gitea apps/code-server apps/dev-container
all: $(FOLDERS)

View File

@ -0,0 +1,32 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: dev-container
namespace: dev
labels:
app: dev-container
spec:
replicas: 1
selector:
matchLabels:
app: dev-container
template:
metadata:
labels:
app: dev-container
spec:
securityContext:
fsGroup: 1000
containers:
- name: dev-container
image: git.namesny.com/mathis/dev-container:2024-04-25
imagePullPolicy: Always
ports:
- containerPort: 7681
volumeMounts:
- name: projects
mountPath: /home/dev/projects
volumes:
- name: projects
persistentVolumeClaim:
claimName: dev-projects

View File

@ -0,0 +1,16 @@
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: dev-cnt-ingress
namespace: dev
spec:
entryPoints:
- websecure
routes:
- match: Host(`dev.namesny.com`)
kind: Rule
middlewares:
- name: "auth-authelia@kubernetescrd"
services:
- name: dev-cnt-svc
port: 7681

View File

@ -0,0 +1,11 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: dev
resources:
- namespace.yaml
- pvc.yaml
- deployment.yaml
- service.yaml
- ingress.yaml

View File

@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: dev

View File

@ -0,0 +1,12 @@
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: dev-projects
namespace: dev
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: retain-local-path

View File

@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: dev-cnt-svc
namespace: dev
spec:
selector:
app: dev-container
type: ClusterIP
ports:
- protocol: TCP
port: 7681
targetPort: 7681