Compare commits

..

No commits in common. "master" and "0.1.0" have entirely different histories.

14 changed files with 44 additions and 182 deletions

View file

@ -1,40 +0,0 @@
---
kind: pipeline
type: docker
name: default
steps:
- name: submodules
image: alpine/git
commands:
- git submodule update --init --recursive
- name: build
image: alpine/helm
volumes:
- name: result
path: /output
commands:
- helm lint --set redis.enabled=false
- helm package -d chart .
- mv chart/glitchtip*.tgz /output/glitchtip.tgz
- name: upload
image: curlimages/curl:latest
environment:
GIT_HOST: git.kurocon.nl
GIT_PACKAGE_OWNER: KuroNET
GIT_USER:
from_secret: git_username
GIT_TOKEN:
from_secret: git_password_or_token
volumes:
- name: result
path: /output
commands:
- curl --user $GIT_USER:$GIT_TOKEN -X POST --upload-file /output/glitchtip.tgz https://$GIT_HOST/api/packages/{$GIT_PACKAGE_OWNER}/helm/api/charts
volumes:
- name: result
temp: {}

View file

@ -11,7 +11,7 @@ build:
entrypoint: ["/bin/sh", "-c"]
stage: build
script:
- helm lint --set redis.enabled=false
- helm lint
- helm package -d chart .
- mv chart/glitchtip*.tgz chart/glitchtip.tgz
artifacts:
@ -26,4 +26,14 @@ upload:
script:
- 'curl --request POST --user gitlab-ci-token:$CI_JOB_TOKEN --form "chart=@chart/glitchtip.tgz" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/api/stable/charts"'
only:
- tags
- master
pages:
stage: upload
artifacts:
paths:
- public
script:
- ls public
only:
- master

2
.gitmodules vendored
View file

@ -1,3 +1,3 @@
[submodule "django-helm-chart"]
path = django-helm-chart
url = https://git.kurocon.nl/KuroNET/django-helm-chart.git
url = https://gitlab.com/burke-software/django-helm-chart.git

View file

@ -1,9 +0,0 @@
# Unreleased
# 4.0.0
- (Breaking) Rename value preInstall to migrationJob
- The migration job now runs the migrate script which includes pgpartition. This should help ensure it runs more often as a failsafe should celery fail.
- Add some support for volume mounts, not well tested
- Started this changelog
- Updated chart dependencies to latest versions

View file

@ -1,9 +1,9 @@
dependencies:
- name: postgresql
repository: https://charts.bitnami.com/bitnami
version: 15.5.16
version: 10.7.0
- name: redis
repository: https://charts.bitnami.com/bitnami
version: 19.6.1
digest: sha256:39ccb3c76f7a8587ce6623d8b563cefcb3c63a7376768a901ae8092ca4fd9b82
generated: "2024-07-15T16:16:16.67406353-04:00"
version: 14.8.3
digest: sha256:a4b6ed7141abd51c2215c3b2ca9b84f299cd9fe197db8796d39e1625e6002725
generated: "2021-07-23T16:49:55.824614254-04:00"

View file

@ -14,20 +14,20 @@ 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.
version: 4.0.1
version: 0.1.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 4.1.1
appVersion: 1.0.0
icon: https://glitchtip.gitlab.io/glitchtip-helm-chart/icon.svg
dependencies:
- name: postgresql
version: ^15.2.5
version: ~10.7.0
repository: https://charts.bitnami.com/bitnami
condition: postgresql.enabled
- name: redis
version: ^19.1.0
version: ~14.8.3
repository: https://charts.bitnami.com/bitnami
condition: redis.enabled

View file

@ -1,38 +1,26 @@
# GlitchTip Helm Chart
Based on https://gitlab.com/burke-software/django-helm-chart/
We use this chart internally. However it's not fully documented yet nor tested in a wide range of scenarios.
If you are a helm and kubernetes expert - feel free to use this and help contribute to this repo.
This helm chart will deploy GlitchTip web, worker, migration job, postgres (if enabled), and redis (if enabled).
Based on https://gitlab.com/burke-software/django-helm-chart/
# Usage
1. Add our Helm chart repo `helm repo add glitchtip https://gitlab.com/api/v4/projects/16325141/packages/helm/stable`
2. Review our values.yaml and values.sample.yaml. At a minimum, decide if using helm postgresql and set env.secret.SECRET_KEY
3. Install the chart `helm install glitchtip glitchtip/glitchtip -f your-values.yaml`. You'll need to specify your own values.yml file or make use of `--set`
2. Review our values.yaml. At a minimum you'll need to set env.secret.DATABASE_URL and env.secret.SECRET_KEY.
3. Install the chart `helm install glitchtip/glitchtip`
For postgresql, we recommend an externally managed database and providing only the DATABASE_URL environment variable. If using helm managed postgresql, then make sure to consider:
The default values assume a externally managed PostgresSQL database and a chart managed Redis. Redis in GlitchTip is ephemeral.
- If you uninstall the chart, it will not delete the pvc. If you reinstall the chart, it won't have the correct password because of this.
- postgresql helm chart does not support major upgrades (such as 14.0 to 15.0). It will fail to start. You could export to a sql file and import if downtime is acceptable. Minor updates are supported.
## Important Tips
# Tips
- Use [helm diff](https://github.com/databus23/helm-diff) to preview changes
- Set image.pullPolicy to `IfNotPresent` after specifying the image.tag
- We don't version this chart at this time
- Set image.tag to the GlitchTip version you wish to install
- Set redis.auth.password to avoid redis being entirely remade on each release
- If updating the chart, carefully review values for any new defaults
## Updating
See changes in this chart on [GitLab](https://gitlab.com/glitchtip/glitchtip-helm-chart/-/releases)
- `helm repo update`
- Set the image.tag to the [latest version](https://gitlab.com/glitchtip/glitchtip-frontend/-/releases)
- `helm diff upgrade glitchtip glitchtip/glitchtip`
- Carefully review diff
- `helm upgrade glitchtip glitchtip/glitchtip -f your-values.yaml`
# Contributing
Please open issues only with potential solutions and be prepared to do some work or else fund it. Contributors are welcome. However, we kindly ask that feature requests and support requests not be opened in this repo.
Please open issues only with potential solutions and be prepared to do some work or else fund it. Contributors are welcome. However, we kindly ask that feature requests and support requests not be opened in this repo. This repo is an internal asset that happens to be open source. We don't recommend using this install method for anyone except advanced Kubernetes experts.

Binary file not shown.

Binary file not shown.

BIN
charts/redis-14.8.3.tgz Normal file

Binary file not shown.

Binary file not shown.

@ -1 +1 @@
Subproject commit 4c7256e5c96d18e4f187074354690a11d65b57fe
Subproject commit 7bbed61a0ee07794eb4239711fda84117f854abd

View file

@ -1,20 +0,0 @@
image:
tag: v2.0.4 # Make this the latest version, then change it to upgrade
pullPolicy: IfNotPresent
env:
normal:
GLITCHTIP_DOMAIN: https://change_this.example.com
secret:
SECRET_KEY: change_this
# Specify if using external postgres (not managed by this chart)
# DATABASE_URL: postgres://postgres:postgres@postgres:5432/postgres
postgresql:
enabled: true # Be careful upgrading. The postgresql helm chart does not support major upgrades.
auth:
postgresPassword: change_this # Without setting this, you'll have to set the password on each upgrade
primary:
persistence:
size: 10Gi # Default is 8, may want this considerably higher
redis:
auth:
password: change_this

View file

@ -1,8 +1,8 @@
# Default values for glitchtip.
image:
repository: glitchtip/glitchtip
tag: v4.1.1
pullPolicy: IfNotPresent
tag: latest
pullPolicy: Always
imagePullSecrets: []
nameOverride: ""
@ -12,26 +12,19 @@ env:
normal:
ENABLE_SOCIAL_AUTH: false
GLITCHTIP_DOMAIN: https://example.com
CELERY_WORKER_AUTOSCALE: "1,3"
CELERY_WORKER_MAX_TASKS_PER_CHILD: "10000"
secret:
SECRET_KEY: # Required
# DATABASE_URL: Specify if using external postgres (not managed by this chart)
# REDIS_URL: Specify if using external redis (not managed by this chart)
migrationJob:
enabled: true
command: ["bin/run-migrate.sh"]
activeDeadlineSeconds: 900
web:
replicaCount: 2
autoscaling:
enabled: false
minReplicas: 2
maxReplicas: 10
targetCPU: 80
# targetMemory: 80
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
budget:
minAvailable: 1
resources:
@ -40,10 +33,9 @@ web:
memory: 512Mi
requests:
cpu: 100m
memory: 256Mi
memory: 128Mi
nodeSelector: {}
tolerations: []
podAnnotations: {}
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
@ -59,7 +51,7 @@ web:
livenessProbe:
failureThreshold: 5
initialDelaySeconds: 5
timeoutSeconds: 3
timeoutSeconds: 2
readinessProbe:
failureThreshold: 10
initialDelaySeconds: 5
@ -90,79 +82,22 @@ worker:
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 10
targetCPU: 100
# targetMemory: 100
livenessProbe:
initialDelaySeconds: 10
periodSeconds: 60
timeoutSeconds: 30
exec:
command:
- "bash"
- "-c"
- "celery -A glitchtip inspect ping -d celery@$HOSTNAME | grep -q OK"
maxReplicas: 100
targetCPUUtilizationPercentage: 90
# targetMemoryUtilizationPercentage: 80
resources:
limits:
cpu: 900m
memory: 768Mi
requests:
cpu: 100m
memory: 350Mi
memory: 128Mi
nodeSelector: {}
tolerations: []
podAnnotations: {}
affinity: {}
beat:
enabled: true
resources:
limits:
cpu: 200m
memory: 150Mi
requests:
cpu: 1m
memory: 130Mi
nodeSelector: {}
tolerations: []
podAnnotations: {}
affinity: {}
flower:
enabled: false
image:
repository: mher/flower
tag: latest
pullPolicy: IfNotPresent
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 50m
memory: 256Mi
nodeSelector: {}
tolerations: []
podAnnotations: {}
affinity: {}
service:
type: ClusterIP
port: 80
ingress:
enabled: false
annotations:
{}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: chart-example.local
paths:
- path: /
pathType: ImplementationSpecific
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
serviceAccount:
# Specifies whether a service account should be created
@ -171,7 +106,7 @@ serviceAccount:
# If not set and create is true, a name is generated using the fullname template
name:
# For configuration options, see https://artifacthub.io/packages/helm/bitnami/redis
redis:
enabled: true
architecture: standalone
@ -182,8 +117,6 @@ redis:
enabled: false
# Default to disabled, use a managed database service. But can be enabled here.
# For configuration options, see https://artifacthub.io/packages/helm/bitnami/postgresql
postgresql:
enabled: false
# auth:
# postgresPassword: # Must be set
postgresqlPassword: # Must be set