Skip to content

Commit

Permalink
add console component and update Appwrite version
Browse files Browse the repository at this point in the history
  • Loading branch information
schneidermr committed Nov 23, 2024
1 parent 53587f1 commit e901e30
Show file tree
Hide file tree
Showing 10 changed files with 261 additions and 66 deletions.
150 changes: 104 additions & 46 deletions README.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions appwrite/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ keywords:
- "appwrite"
icon: "https://appwrite.io/images/logos/logo.svg"
type: application
version: 0.1.14
appVersion: "1.4.13"
version: 0.2.1
appVersion: "1.6.0"
kubeVersion: ">=1.26"
deprecated: false
dependencies:
Expand Down
2 changes: 1 addition & 1 deletion appwrite/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ containers:
env:
{{ toYaml . | nindent 6 }}
{{- end }}
{{- if eq .component.name "core" }}
{{- if and (eq .component.name "core") (eq "local" (.Values.environments.storage.device | lower)) }}
volumeMounts:
- name: storage
mountPath: /storage
Expand Down
1 change: 1 addition & 0 deletions appwrite/templates/console/console.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- include "appwrite.deployment" (merge (dict "component" (dict "name" "console" "config" .Values.components.console)) .) }}
3 changes: 3 additions & 0 deletions appwrite/templates/console/console_hpa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{- if .Values.components.console.autoscaling.enabled }}
{{- include "appwrite.autoscaling" (merge (dict "component" (dict "name" "console" "config" .Values.components.console)) .)}}
{{- end }}
3 changes: 3 additions & 0 deletions appwrite/templates/console/console_ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{- if .Values.components.console.ingress.enabled }}
{{- include "appwrite.ingress" (merge (dict "component" (dict "name" "console" "config" .Values.components.console)) .)}}
{{- end }}
3 changes: 3 additions & 0 deletions appwrite/templates/console/console_nwp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{- if .Values.components.console.networkPolicy.enabled }}
{{- include "appwrite.firewall" (merge (dict "component" (dict "name" "console" "config" .Values.components.console)) .)}}
{{- end }}
3 changes: 3 additions & 0 deletions appwrite/templates/console/console_pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{- if .Values.components.console.podDisruption.enabled }}
{{- include "appwrite.budget" (merge (dict "component" (dict "name" "console" "config" .Values.components.console)) .)}}
{{- end }}
1 change: 1 addition & 0 deletions appwrite/templates/console/console_service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- include "appwrite.service" (merge (dict "component" (dict "name" "console" "config" .Values.components.console)) .)}}
157 changes: 140 additions & 17 deletions appwrite/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -276,25 +276,13 @@ podAnnotations: {}
components:
#
# CORE
# APPWRITE STUDIO (WEBUI)
#
core:
# -- Core (aka Appwrite Studio - WebUI) component's image data
image:
registry: &appwriteImgReg docker.io
repository: &appwriteImgRep appwrite/appwrite
tag: &appwriteImgTag 1.4.13
tag: &appwriteImgTag 1.6.0
pullPolicy: &appwriteImgPullP IfNotPresent
# -- Startup command for the app
command:
- /bin/sh
- -c
# -- Startup command arguments for the app
args:
- php
- -e
- app/http.php
- -dopcache.preload=opcache.preload=/usr/src/code/app/preload.php
# -- Attach previously defined environment variables to the pod
env: true
# -- The number of instances in which the application will run. Only effect if autoscaling false
Expand Down Expand Up @@ -426,6 +414,143 @@ components:
egress:
- {}


#
# CONSOLE
#
console:
image:
registry: &appwriteImgReg docker.io
repository: &appwriteImgRep appwrite/console
tag: &appwriteImgTag 5.0.12
pullPolicy: &appwriteImgPullP IfNotPresent
# -- Attach previously defined environment variables to the pod
env: false
# -- The number of instances in which the application will run. Only effect if autoscaling false
replicaCount: 1
# -- Setup autoscaling to enable HPA (HorizontalPodAutoscaler).
# To enable autoscaling also need to configure the resource limits
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 5
targetCPU: "60"
targetMemory: ""
behavior: {}
# -- Setup resource limits and requests for the app
resources: {}
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
# -- The labels that the application's pod will get.
# Will be extended with the common pod labels, what is defined in the global.
podLabels: {}
# -- The annotations that the application's pod will get.
# Will be extended with the common pod labels, what is defined in the global.
podAnnotations: {}
deploymentStrategy:
type: RollingUpdate
maxUnavailable: 1
# -- Define the rediness probe
readinessProbe:
httpGet:
path: /
port: 80
# -- Define the liveness probe
livenessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 30
timeoutSeconds: 30
failureThreshold: 10
# -- Choose the right restart condition when the app has to be restarted.
# Available options: Always | OnFailure
restartPolicy: OnFailure
# --
podSecurityContext:
runAsNonRoot: false
runAsUser: 0
runAsGroup: 0
fsGroup: 0
# Enable it when deployed as statefulset
fsGroupChangePolicy: OnRootMismatch
containerSecurityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
nodeSelector: {}
tolerations: []
affinity: {}
ports:
- name: http
containerPort: 80
protocol: TCP

# Service configuration
service:
type: ClusterIP
ports:
- name: http
protocol: TCP
port: 80
targetPort: 80

# Ingress configuration
ingress:
enabled: false
className: ""
annotations: {}
# nginx.ingress.kubernetes.io/rewrite-target: /
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
rules:
- host: *appDomain
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: appwrite-console-svc
port:
number: 80
tls: []
# - secretName: tls-secret-name
# hosts:
# - domain.name

# PodDisruptionBudget configuration
podDisruption:
enabled: false
config:
# minAvailable: 2
# maxUnavailable: 1
# >= 1.27
# unhealthyPodEvictionPolicy: AlwaysAllow

# NetworkPolicy configuration
networkPolicy:
enabled: false
policyTypes:
- Ingress
ingress:
- from:
- ipBlock:
cidr: 0.0.0.0/0
- namespaceSelector:
matchLabels:
namespace: default
ports:
- protocol: TCP
port: 80
egress:
- {}


#
# EXECUTOR
#
Expand Down Expand Up @@ -544,12 +669,10 @@ components:
type: RollingUpdate
maxUnavailable: 1
readinessProbe:
httpGet:
path: /api/health
tcpSocket:
port: 80
livenessProbe:
httpGet:
path: /api/health
tcpSocket:
port: 80
initialDelaySeconds: 30
timeoutSeconds: 30
Expand Down

0 comments on commit e901e30

Please sign in to comment.