feat(zipline): added initial chart
This commit is contained in:
9 files changed
+187
No files matched your search
@@ -0,0 +1,23 @@
|
||||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*.orig
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
||||
@@ -0,0 +1,24 @@
|
||||
apiVersion: v2
|
||||
name: zipline
|
||||
description: A Helm chart for deploying Zipline on Kubernetes
|
||||
|
||||
# A chart can be either an 'application' or a 'library' chart.
|
||||
#
|
||||
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||
# to be deployed.
|
||||
#
|
||||
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||
type: application
|
||||
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 1.2.0-release-4-4-1
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
# It is recommended to use it with quotes.
|
||||
appVersion: "4.4.1"
|
||||
@@ -0,0 +1,6 @@
|
||||
apiVersion: onepassword.com/v1
|
||||
kind: OnePasswordItem
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-{{ .Chart.Name }}-db-secret
|
||||
spec:
|
||||
itemPath: {{ required "A secret-reference for the DB-Secret must be provided" .Values.config.secretRef.db }}
|
||||
@@ -0,0 +1,25 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-{{ .Chart.Name }}-ingress
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: letsencrypt-issuer
|
||||
nginx.ingress.kubernetes.io/proxy-body-size: {{ .Values.config.maxUploadFileSize }}
|
||||
nginx.org/client-max-body-size: {{ .Values.config.maxUploadFileSize }}
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
rules:
|
||||
- host: {{ required "A Domain/Host must be provided" .Values.config.domain }}
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
service:
|
||||
name: {{ .Release.Name }}-{{ .Chart.Name }}-service
|
||||
port:
|
||||
name: http
|
||||
path: /
|
||||
pathType: Prefix
|
||||
tls:
|
||||
- hosts:
|
||||
- {{ required "A Domain/Host must be provided" .Values.config.domain }}
|
||||
secretName: tls-{{ .Release.Name }}-{{ .Chart.Name }}-{{ .Values.config.domain }}-ingress
|
||||
@@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-{{ .Chart.Name }}-vc
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ required "A storage-amount must be provided" .Values.config.storage }}
|
||||
storageClassName: {{ required "A storage-class must be provided" .Values.config.storageClass }}
|
||||
@@ -0,0 +1,6 @@
|
||||
apiVersion: onepassword.com/v1
|
||||
kind: OnePasswordItem
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-{{ .Chart.Name }}-core-secret
|
||||
spec:
|
||||
itemPath: {{ required "A secret-reference for the DB-Secret must be provided" .Values.config.secretRef.zipline }}
|
||||
@@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-{{ .Chart.Name }}-service
|
||||
spec:
|
||||
selector:
|
||||
app: {{ .Release.Name }}-{{ .Chart.Name }}-sfs
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 80
|
||||
targetPort: zipline-server
|
||||
name: http
|
||||
type: ClusterIP
|
||||
@@ -0,0 +1,61 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}-{{ .Chart.Name }}-sfs"
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: "{{ .Release.Name }}-{{ .Chart.Name }}-sfs"
|
||||
serviceName: "{{ .Release.Name }}-{{ .Chart.Name }}-service"
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: "{{ .Release.Name }}-{{ .Chart.Name }}-sfs"
|
||||
spec:
|
||||
containers:
|
||||
- name: "{{ .Release.Name }}-{{ .Chart.Name }}-sfs"
|
||||
image: "ghcr.io/diced/zipline:{{ .Chart.AppVersion }}"
|
||||
env:
|
||||
- name: DATABASE_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Release.Name }}-{{ .Chart.Name }}-db-secret
|
||||
key: connection-url
|
||||
- name: CORE_DEFAULT_DOMAIN
|
||||
value: "{{ .Values.config.domain }}"
|
||||
- name: CORE_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Release.Name }}-{{ .Chart.Name }}-core-secret
|
||||
key: server-secret
|
||||
- name: UPLOADER_ADMIN_LIMIT
|
||||
value: 500mb
|
||||
resources:
|
||||
requests:
|
||||
memory: "{{ .Values.zipline.resources.requests.memory }}"
|
||||
cpu: "{{ .Values.zipline.resources.requests.cpu }}"
|
||||
ephemeral-storage: "{{ .Values.zipline.resources.requests.ephemeralStorage }}"
|
||||
limits:
|
||||
memory: "{{ .Values.zipline.resources.limits.memory }}"
|
||||
cpu: "{{ .Values.zipline.resources.limits.cpu }}"
|
||||
ephemeral-storage: "{{ .Values.zipline.resources.limits.ephemeralStorage }}"
|
||||
ports:
|
||||
- name: "zipline-server"
|
||||
containerPort: 3000
|
||||
protocol: TCP
|
||||
volumeMounts:
|
||||
- name: zipline-volume
|
||||
mountPath: /zipline/uploads
|
||||
subPath: uploads/
|
||||
- name: zipline-volume
|
||||
mountPath: /zipline/public
|
||||
subPath: public/
|
||||
- name: zipline-volume
|
||||
mountPath: /zipline/themes
|
||||
subPath: themes/
|
||||
automountServiceAccountToken: false
|
||||
volumes:
|
||||
- name: zipline-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ .Release.Name }}-{{ .Chart.Name }}-vc
|
||||
@@ -0,0 +1,18 @@
|
||||
config:
|
||||
storage: 50Gi
|
||||
storageClass: longhorn
|
||||
secretRef:
|
||||
db: null
|
||||
zipline: null
|
||||
domain: null
|
||||
maxUploadFileSize: 30m
|
||||
zipline:
|
||||
resources:
|
||||
requests:
|
||||
cpu: 0.1
|
||||
memory: 265Mi
|
||||
ephemeralStorage: 10Mi
|
||||
limits:
|
||||
cpu: 1
|
||||
memory: 768Mi
|
||||
ephemeralStorage: 10Mi
|
||||
Reference in new issue
Block a user