-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add helm chart to deploy on Kubernetes clusters
- Loading branch information
Letsplaybar
committed
Dec 17, 2023
1 parent
da133ca
commit cffe965
Showing
6 changed files
with
106 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: v2 | ||
|
||
name: Shaark | ||
description: "Shaark is a self-hosted platform to keep and share your content: web links, posts, passwords and pictures." | ||
|
||
type: application | ||
version: 2.0.0-alpha | ||
|
||
appVersion: 2.0.0-alpha |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "Shaark.name" . }}-deployment | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: {{ include "Shaark.name" . }} | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ include "Shaark.name" . }} | ||
spec: | ||
containers: | ||
- name: shaark | ||
image: {{.Values.deployment.image}} | ||
imagePullPolicy: Always | ||
ports: | ||
- containerPort: 80 | ||
volumeMounts: | ||
- name: env | ||
mountPath: /var/www/laravel/.env | ||
subPath: .env | ||
- name: storage | ||
mountPath: /var/www/laravel/storage | ||
volumes: | ||
- name: env | ||
hostPath: | ||
path: {{ .Values.deployment.files.env }} | ||
- name: storage | ||
hostPath: | ||
path: {{ .Values.deployment.files.storage }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: {{ include "Shaark.name" . }}-ingress | ||
namespace: {{ .Release.Namespace }} | ||
annotations: | ||
nginx.ingress.kubernetes.io/proxy-body-size: 1G | ||
nginx.org/client-max-body-size: 1G | ||
{{- .Values.ingress.annotations | toYaml | indent 4}} | ||
spec: | ||
tls: | ||
- hosts: | ||
- {{ .Values.ingress.url }} | ||
secretName: {{ include "Shaark.name" . }}-secret-tls | ||
rules: | ||
- host: {{ .Values.ingress.url }} | ||
http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: {{ include "Shaark.name" . }}-service | ||
port: | ||
number: 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ include "Shaark.name" . }}-service | ||
labels: | ||
app: {{ include "Shaark.name" . }} | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
selector: | ||
app: {{ include "Shaark.name" . }} | ||
ports: | ||
- protocol: TCP | ||
port: 80 | ||
targetPort: 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
|
||
{{- define "Shaark.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
nameOverride: | ||
|
||
deployment: | ||
image: | ||
files: | ||
# Location of .env file | ||
env: | ||
# Location of storage folder | ||
storage: | ||
|
||
ingress: | ||
url: | ||
#Example | ||
# annotations: | ||
# cert-manager.io/issuer: "letsencrypt-prod" | ||
# nginx.ingress.kubernetes.io/ssl-redirect: true | ||
annotations: |