Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions team-share/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# 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
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
8 changes: 8 additions & 0 deletions team-share/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v2
name: team-share
description: Plik for team-container

type: application

version: 0.0.1
appVersion: 0.0.1
13 changes: 13 additions & 0 deletions team-share/templates/02_service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "team-share.fullname" . }}-rc
namespace: default
spec:
ports:
- protocol: TCP
name: web
port: 8080
targetPort: 8080
selector:
app: {{ include "team-share.fullname" . }}-rc
11 changes: 11 additions & 0 deletions team-share/templates/03-storage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "team-share.fullname" . }}-rc-data
spec:
accessModes:
- ReadWriteOnce
storageClassName: local-path
resources:
requests:
storage: {{ .Values.storage.limits.data }}
17 changes: 17 additions & 0 deletions team-share/templates/05-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: ingressroute-{{ include "team-share.fullname" . }}
namespace: default
spec:
entryPoints:
- websecure
routes:
- match: Host(`{{ .Values.app.name }}.{{ .Values.app.domain }}`)
kind: Rule
services:
- name: {{ include "team-share.fullname" . }}-rc
port: 8080
tls:
certResolver: default
63 changes: 63 additions & 0 deletions team-share/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "team-share.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "team-share.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "team-share.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Common labels
*/}}
{{- define "team-share.labels" -}}
helm.sh/chart: {{ include "team-share.chart" . }}
{{ include "team-share.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}

{{/*
Selector labels
*/}}
{{- define "team-share.selectorLabels" -}}
app.kubernetes.io/name: {{ include "team-share.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}

{{/*
Create the name of the service account to use
*/}}
{{- define "team-share.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "team-share.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}
44 changes: 44 additions & 0 deletions team-share/templates/deploy_share.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
kind: Deployment
apiVersion: apps/v1
metadata:
namespace: default
name: {{ include "team-share.fullname" . }}-rc
labels:
app: {{ include "team-share.fullname" . }}-rc
spec:
replicas: 1
selector:
matchLabels:
app: {{ include "team-share.fullname" . }}-rc
template:
metadata:
labels:
app: {{ include "team-share.fullname" . }}-rc
annotations:
timestamp: "{{ now | unixEpoch }}"
spec:
volumes:
- name: rc-uploads-vol
persistentVolumeClaim:
claimName: {{ include "team-share.fullname" . }}-rc-data
restartPolicy: Always
containers:
- name: share
image: rootgg/plik:latest
imagePullPolicy: Always
command:
volumeMounts:
- name: rc-uploads-vol
mountPath: "/home/plik/server/files"
ports:
- name: web
containerPort: 8080
env:
- name: INSTANCE_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: ROOT_URL
value: "https://{{ .Values.app.name }}.{{ .Values.app.domain }}"
- name: PORT
value: "8080"
11 changes: 11 additions & 0 deletions team-share/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Domain and subdomain for this service:
app:
name: share
domain: example.org


# Storage limit for files and database (no need to change):
storage:
limits:
data: 128Gi

11 changes: 11 additions & 0 deletions values-share.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Domain and subdomain for this service:
app:
name: share
domain: example.org


# Storage limit for files and database (no need to change):
storage:
limits:
data: 128Gi