diff --git a/charts/patchman/Chart.yaml b/charts/patchman/Chart.yaml new file mode 100644 index 0000000..7ab5075 --- /dev/null +++ b/charts/patchman/Chart.yaml @@ -0,0 +1,12 @@ +apiVersion: v2 +name: patchman +description: A Helm chart for patchman +type: application + +version: 0.0.1 + +# App metadata +appVersion: "1.0.0" +maintainers: + - name: elasticroentgen + email: markus.keil@ethereum.org diff --git a/charts/patchman/templates/deployment.yaml b/charts/patchman/templates/deployment.yaml new file mode 100644 index 0000000..800c0d1 --- /dev/null +++ b/charts/patchman/templates/deployment.yaml @@ -0,0 +1,44 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Release.Name }}-patchman + {{- with .Values.commonAnnotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + app: {{ .Release.Name }}-patchman + app.kubernetes.io/component: patchman +spec: + selector: + matchLabels: + app.kubernetes.io/component: patchman + template: + metadata: + annotations: + {{- with .Values.podAnnotations }} + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + app: {{ .Release.Name }}-patchman + app.kubernetes.io/component: patchman + spec: + {{- with .Values.extraInitContainers }} + {{- toYaml . | nindent 6 }} + {{- end }} + containers: + - name: {{ .Release.Name }}-patchman + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + ports: + - name: http + containerPort: 3000 + protocol: TCP + volumeMounts: + - name: sqlite + mountPath: /var/lib/patchman/db + resources: + {{- toYaml .Values.resources | nindent 10 }} + volumes: + - name: sqlite + persistentVolumeClaim: + claimName: {{ .Release.Name }}-sqlite diff --git a/charts/patchman/templates/ingress.yaml b/charts/patchman/templates/ingress.yaml new file mode 100644 index 0000000..83b3563 --- /dev/null +++ b/charts/patchman/templates/ingress.yaml @@ -0,0 +1,32 @@ +{{- if .Values.ingress.enabled -}} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ .Release.Name }}-ingress + {{- if or .Values.commonAnnotations .Values.ingress.annotations }} + annotations: + {{- with .Values.ingress.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.commonAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- end }} +spec: + ingressClassName: {{ .Values.ingress.className }} + tls: + - hosts: + - {{ .Values.baseDomain }} + secretName: {{ .Values.ingress.tls.secretName }} + rules: + - host: {{ .Values.baseDomain }} + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: {{ .Release.Name }}-svc + port: + name: http +{{- end }} diff --git a/charts/patchman/templates/pvc.yaml b/charts/patchman/templates/pvc.yaml new file mode 100644 index 0000000..0367a1e --- /dev/null +++ b/charts/patchman/templates/pvc.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ .Release.Name }}-sqlite +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi diff --git a/charts/patchman/templates/service.yaml b/charts/patchman/templates/service.yaml new file mode 100644 index 0000000..0b4705e --- /dev/null +++ b/charts/patchman/templates/service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Release.Name }}-svc + labels: + app.kubernetes.io/name: {{ .Release.Name }}-patchman +spec: + selector: + app: {{ .Release.Name }}-patchman + ports: + - name: http + port: 80 diff --git a/charts/patchman/values.yaml b/charts/patchman/values.yaml new file mode 100644 index 0000000..c6b6e55 --- /dev/null +++ b/charts/patchman/values.yaml @@ -0,0 +1,13 @@ +baseDomain: patchman.example.com +image: + repository: docker pull ghcr.io/ethdevops/patchman-docker + tag: main +commonAnnotations: {} +podAnnotations: {} +extraInitContainers: {} +ingress: + enabled: false + className: "" + annotations: {} + tls: + secretName: ""