Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Syntax3rror404 committed Aug 24, 2024
1 parent 1b439f3 commit f8bc071
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 0 deletions.
5 changes: 5 additions & 0 deletions chart/chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v2
name: dev-machine
description: A Helm chart for deploying the dev environment container
version: 0.1.0
appVersion: "1.0"
30 changes: 30 additions & 0 deletions chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-deployment
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ .Release.Name }}
spec:
containers:
- name: {{ .Release.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- containerPort: {{ .Values.service.port }}
volumeMounts:
- name: home-volume
mountPath: /home/dev
resources:
{{ toYaml .Values.resources | indent 10 }}
volumes:
- name: home-volume
persistentVolumeClaim:
claimName: {{ .Release.Name }}-pvc
11 changes: 11 additions & 0 deletions chart/templates/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ .Release.Name }}-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: {{ .Values.persistence.size }}
storageClassName: {{ .Values.persistence.storageClass | quote }}
11 changes: 11 additions & 0 deletions chart/templates/svc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}-service
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: 2222
selector:
app: {{ .Release.Name }}
17 changes: 17 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
replicaCount: 1

image:
repository: docker pull ghcr.io/syntax3rror404/k8s-devmachine
tag: b180370a1d42efea8b3c6e630e4eab1cc9207ddd95b8a1f29929ae235e9f3e7c
pullPolicy: IfNotPresent

service:
type: LoadBalancer
port: 22

persistence:
enabled: true
size: 10Gi
storageClass: "longhorn"

resources: {}

0 comments on commit f8bc071

Please sign in to comment.