Cleanup
All checks were successful
/ build-abitibi-image (push) Successful in 45s
/ build-website-image (push) Successful in 29s

This commit is contained in:
Aram 🍐 2025-08-23 13:34:28 -04:00
parent 78ce354771
commit 1e704444ab
77 changed files with 10 additions and 2681 deletions

3
.gitignore vendored
View file

@ -1 +1,2 @@
.idea/
.vscode/
*.swp

View file

@ -1,245 +0,0 @@
variables:
WEBSITE_SRC: ${CI_PROJECT_DIR}/website
INFRA_SRC: ${CI_PROJECT_DIR}/infra
TEAMSPEAK_SRC: ${CI_PROJECT_DIR}/teamspeak
DEFIANT_SRC: ${CI_PROJECT_DIR}/defiant
CHARTMUSEUM_SRC: ${CI_PROJECT_DIR}/chartmuseum
ABITIBI_SRC: ${CI_PROJECT_DIR}/abitibi
ONETUN_SRC: ${CI_PROJECT_DIR}/onetun
TWITTON_SRC: ${CI_PROJECT_DIR}/twitton
TSACTIVITY_SRC: ${CI_PROJECT_DIR}/ts-activity
IMAGE_PREFIX: registry.gitlab.com/momothereal/momoperes.ca
WEBSITE_IMAGE: ${IMAGE_PREFIX}/website
DEFIANT_IMAGE: ${IMAGE_PREFIX}/defiant
ABITIBI_IMAGE: ${IMAGE_PREFIX}/abitibi
KUBECONFIG_PARENT: /etc/deploy
KUBECONFIG: ${KUBECONFIG_PARENT}/config
DEPLOY_NAMESPACE: public
stages:
- build
- release
- deploy
### WEBSITE ###
website:release:
stage: release
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- echo "Building to ${WEBSITE_IMAGE}:${CI_COMMIT_TAG}"
- echo "{\"auths\":{\"${CI_REGISTRY}\":{\"username\":\"${CI_REGISTRY_USER}\",\"password\":\"${CI_REGISTRY_PASSWORD}\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context ${WEBSITE_SRC} --dockerfile ${WEBSITE_SRC}/docker/Dockerfile --destination ${WEBSITE_IMAGE}:${CI_COMMIT_REF_SLUG}-${CI_COMMIT_SHORT_SHA} --destination ${WEBSITE_IMAGE}:${CI_COMMIT_REF_SLUG}
only:
changes:
- website/**/*
website:deploy:
stage: deploy
image: wavyfm/helm-kubectl-docker:v1.19.3-v3.4.2
script:
- mkdir -p ${KUBECONFIG_PARENT}
- echo ${K8S_CLUSTER_CONFIG} | base64 -d > ${KUBECONFIG}
# Deploy using helm chart
- cd ${WEBSITE_SRC}
- helm upgrade --install --namespace ${DEPLOY_NAMESPACE} --set image.name=${WEBSITE_IMAGE},image.tag=${CI_COMMIT_REF_SLUG}-${CI_COMMIT_SHORT_SHA} website ./chart/website
only:
refs:
- master
changes:
- website/**/*
### ABITIBI ###
abitibi:release:
stage: release
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- echo "Building to ${ABITIBI_IMAGE}:${CI_COMMIT_TAG}"
- echo "{\"auths\":{\"${CI_REGISTRY}\":{\"username\":\"${CI_REGISTRY_USER}\",\"password\":\"${CI_REGISTRY_PASSWORD}\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context ${ABITIBI_SRC} --dockerfile ${ABITIBI_SRC}/docker/Dockerfile --destination ${ABITIBI_IMAGE}:${CI_COMMIT_REF_SLUG}-${CI_COMMIT_SHORT_SHA} --destination ${ABITIBI_IMAGE}:${CI_COMMIT_REF_SLUG}
only:
changes:
- abitibi/**/*
abitibi:deploy:
stage: deploy
image: wavyfm/helm-kubectl-docker:v1.19.3-v3.4.2
script:
- mkdir -p ${KUBECONFIG_PARENT}
- echo ${K8S_CLUSTER_CONFIG} | base64 -d > ${KUBECONFIG}
# Deploy using helm chart
- cd ${ABITIBI_SRC}
- helm upgrade --install --namespace ${DEPLOY_NAMESPACE} --set image.name=${ABITIBI_IMAGE},image.tag=${CI_COMMIT_REF_SLUG}-${CI_COMMIT_SHORT_SHA} abitibi ./chart/abitibi
only:
refs:
- master
changes:
- abitibi/**/*
onetun-ntc-pdf-converter:deploy:
stage: deploy
image: wavyfm/helm-kubectl-docker:v1.19.3-v3.4.2
script:
- mkdir -p ${KUBECONFIG_PARENT}
- echo ${K8S_CLUSTER_CONFIG} | base64 -d > ${KUBECONFIG}
# Deploy using helm chart
- cd ${ONETUN_SRC}
- helm upgrade --install -n ${DEPLOY_NAMESPACE} -f ./ntc-pdf-converter.yml ntc-pdf-converter ./chart/onetun
only:
refs:
- master
changes:
- onetun/**/*
twitton:deploy:
stage: deploy
image: wavyfm/helm-kubectl-docker:v1.19.3-v3.4.2
script:
- mkdir -p ${KUBECONFIG_PARENT}
- echo ${K8S_CLUSTER_CONFIG} | base64 -d > ${KUBECONFIG}
# Deploy using helm chart
- cd ${TWITTON_SRC}
- helm upgrade --install -n ${DEPLOY_NAMESPACE} -f ./values.yaml twitton ./chart/twitton
only:
refs:
- master
changes:
- twitton/**/*
# INFRA #
infra:deploy:
stage: deploy
image: wavyfm/helm-kubectl-docker:v1.19.3-v3.4.2
script:
- mkdir -p ${KUBECONFIG_PARENT}
- echo ${K8S_CLUSTER_CONFIG} | base64 -d > ${KUBECONFIG}
# Deploy nginx ingress
# Note: Temporarily disabled due to issue with nginx-ingress and helm3 upgrades.
# - helm init --client-only && helm repo update
# - helm upgrade nginx-ingress stable/nginx-ingress --install --namespace ${DEPLOY_NAMESPACE} --set controller.publishService.enabled=true
# Deploy infra manifests directly
- cd ${INFRA_SRC}/
- kubectl apply --namespace ${DEPLOY_NAMESPACE} -R -f manifests/
only:
refs:
- master
changes:
- infra/**/*
# TEAMSPEAK #
teamspeak:deploy:
stage: deploy
image: wavyfm/helm-kubectl-docker:v1.19.3-v3.4.2
script:
- mkdir -p ${KUBECONFIG_PARENT}
- echo ${K8S_CLUSTER_CONFIG} | base64 -d > ${KUBECONFIG}
# Deploy using helm chart
- cd ${TEAMSPEAK_SRC}
- helm upgrade --install --namespace ${DEPLOY_NAMESPACE} teamspeak ./chart/teamspeak
only:
refs:
- master
changes:
- teamspeak/**/*
# TS-ACTIVITY #
ts-activity:deploy:
stage: deploy
image: wavyfm/helm-kubectl-docker:v1.19.3-v3.4.2
script:
- mkdir -p ${KUBECONFIG_PARENT}
- echo ${K8S_CLUSTER_CONFIG} | base64 -d > ${KUBECONFIG}
# Deploy using helm chart
- cd ${TSACTIVITY_SRC}
- helm repo add momoperes https://charts.momoperes.ca
- helm repo update
- helm upgrade --install --namespace ${DEPLOY_NAMESPACE} -f values.yaml ts-activity momoperes/ts-activity
only:
refs:
- master
changes:
- ts-activity/**/*
# DEFIANT #
#defiant:build:
# stage: build
# image: debian
# script:
# - apt-get update && apt-get install -y git
# - cd ${DEFIANT_SRC}/src
# - git clone https://github.com/momothereal/code-jam-2.git defiant
# - cp main_config.yaml defiant/config/main_config.yaml
# artifacts:
# paths:
# - ${DEFIANT_SRC}/src
# only:
# changes:
# - defiant/**/*
#defiant:release:
# stage: release
# image:
# name: gcr.io/kaniko-project/executor:debug
# entrypoint: [""]
# script:
# - echo "Building to ${DEFIANT_IMAGE}:${CI_COMMIT_TAG}"
# - echo "{\"auths\":{\"${CI_REGISTRY}\":{\"username\":\"${CI_REGISTRY_USER}\",\"password\":\"${CI_REGISTRY_PASSWORD}\"}}}" > /kaniko/.docker/config.json
# - /kaniko/executor --context ${DEFIANT_SRC}/src/defiant --dockerfile ${DEFIANT_SRC}/src/defiant/Dockerfile --destination ${DEFIANT_IMAGE}:${CI_COMMIT_REF_SLUG}-${CI_COMMIT_SHORT_SHA} --destination ${DEFIANT_IMAGE}:${CI_COMMIT_REF_SLUG}
# only:
# changes:
# - defiant/**/*
#defiant:deploy:
# stage: deploy
# image: wavyfm/helm-kubectl-docker:v1.18.8-v3.4.2
# script:
# - mkdir -p ${KUBECONFIG_PARENT}
# - echo ${K8S_CLUSTER_CONFIG} | base64 -d > ${KUBECONFIG}
#
# # Deploy using helm chart
# - cd ${DEFIANT_SRC}
# - helm init --client-only && helm repo update
# - helm upgrade --install --force --namespace ${DEPLOY_NAMESPACE} --set image.name=${DEFIANT_IMAGE},image.tag=${CI_COMMIT_REF_SLUG}-${CI_COMMIT_SHORT_SHA} defiant ./chart/defiant
# only:
# refs:
# - master
# changes:
# - defiant/**/*
# CHART MUSEUM #
chartmuseum:deploy:
stage: deploy
image: wavyfm/helm-kubectl-docker:v1.19.3-v3.4.2
script:
- mkdir -p ${KUBECONFIG_PARENT}
- echo ${K8S_CLUSTER_CONFIG} | base64 -d > ${KUBECONFIG}
# Deploy using helm chart
- cd ${CHARTMUSEUM_SRC}
- helm repo add chartmuseum https://chartmuseum.github.io/charts && helm repo update
- helm upgrade --install --namespace ${DEPLOY_NAMESPACE} -f values.yaml chartmuseum chartmuseum/chartmuseum
only:
refs:
- master
changes:
- chartmuseum/**/*

View file

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2019 Aram Peres
Copyright (c) 2025 Aram Peres
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View file

@ -1,21 +1,14 @@
# [momoperes.ca](https://momoperes.ca/)
# [poire.dev](https://poire.dev)
This repository contains the source code and deployment configurations for my open-source web projects.
All the services in this repository are deployed to a Kubernetes cluster using Helm charts and GitLab CI.
This repository contains the source code and deployment configurations for my open-source websites.
All the services in this repository are build and deployed using [Forgejo Actions](https://git.poire.dev/aramperes/poire.dev/actions).
## Projects
* Personal website (`website`)
* URL: https://momoperes.ca / https://aramperes.ca / https://poire.dev
* Source code: https://gitlab.com/momothereal/momoperes.ca/tree/master/website/src
* Source code: https://git.poire.dev/aramperes/poire.dev/src/branch/master/website
* Abitibi Temiscamingue Esports (`abitibi`)
* URL: https://abitibitemiscamingueesports.club/
* Source code: https://gitlab.com/momothereal/momoperes.ca/-/tree/master/abitibi/src
## Hosted services
* TeamSpeak server (`teamspeak`)
* Helm Chart repository (`chartmuseum`)
* Hosted at `https://charts.momoperes.ca`
* URL: https://abitibi.momoperes.ca
* Source code: https://git.poire.dev/aramperes/poire.dev/src/branch/master/abitibi

2
abitibi/.gitignore vendored
View file

@ -1,2 +0,0 @@
.idea/
chart/abitibi/manifests/

View file

@ -1,5 +0,0 @@
apiVersion: v1
appVersion: "1.0"
description: Helm chart for my personal abitibi
name: abitibi
version: 0.1.0

View file

@ -1,45 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "abitibi.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 "abitibi.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 "abitibi.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "abitibi.labels" -}}
app.kubernetes.io/name: {{ include "abitibi.name" . }}
helm.sh/chart: {{ include "abitibi.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}

View file

@ -1,52 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "abitibi.fullname" . }}
labels:
{{ include "abitibi.labels" . | indent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "abitibi.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
template:
metadata:
labels:
app.kubernetes.io/name: {{ include "abitibi.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.name }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 80
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}

View file

@ -1,19 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "abitibi.fullname" . }}
labels:
{{ include "abitibi.labels" . | indent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
{{- if (eq .Values.service.type "ClusterIP") }}
nodePort: null
{{- end }}
selector:
app.kubernetes.io/name: {{ include "abitibi.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}

View file

@ -1,15 +0,0 @@
replicaCount: 2
image:
name: notset
tag: latest
pullPolicy: Always
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
service:
type: ClusterIP
port: 9000

View file

@ -1,3 +1,3 @@
FROM nginx:alpine
FROM docker.io/library/nginx:alpine
COPY src/ /usr/share/nginx/html
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf

View file

@ -1 +0,0 @@
secret.yaml

View file

@ -1,11 +0,0 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: chartmuseum-chartmuseum
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storageClassName: do-block-storage

View file

@ -1,8 +0,0 @@
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: chartmuseum-credentials
data:
username: ${USERNAME}
password: ${PASSWORD}

View file

@ -1,26 +0,0 @@
env:
open:
AUTH_ANONYMOUS_GET: true
DISABLE_API: false
existingSecret: chartmuseum-credentials
existingSecretMappings:
BASIC_AUTH_USER: username
BASIC_AUTH_PASS: password
service:
servicename: chartmuseum
resources:
limits:
cpu: 100m
memory: 128Mi
requests:
cpu: 10m
memory: 64Mi
persistence:
enabled: true
accessMode: ReadWriteOnce
size: 1Gi
storageClass: do-block-storage
existingClaim: chartmuseum-chartmuseum

2
defiant/.gitignore vendored
View file

@ -1,2 +0,0 @@
.idea/
chart/defiant/manifests/

View file

@ -1,5 +0,0 @@
apiVersion: v1
description: DefiantSails entry for PythonDiscord code jam number 2
engine: gotpl
name: defiant
version: 0.1.0

View file

@ -1,48 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}
labels:
app: defiant
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: 1
selector:
matchLabels:
app: defiant
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
template:
metadata:
{{- if .Values.podAnnotations }}
annotations:
{{ toYaml .Values.podAnnotations | indent 8 }}
{{- end }}
labels:
app: defiant
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
containers:
- name: defiant
image: "{{ .Values.image.name }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- containerPort: 80
protocol: TCP

View file

@ -1,59 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: rethinkdb-{{ .Release.Name }}
labels:
app: defiant
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: 1
selector:
matchLabels:
app: rethinkdb
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
template:
metadata:
{{- if .Values.podAnnotations }}
annotations:
{{ toYaml .Values.podAnnotations | indent 8 }}
{{- end }}
labels:
app: rethinkdb
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
containers:
- name: defiant
image: "rethinkdb:2.3.6"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- containerPort: 28015
protocol: TCP
volumeMounts:
- mountPath: /data
name: rethinkdb-data
volumes:
- name: rethinkdb-data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ .Values.persistence.existingClaim | default (printf "%s-%s" (.Release.Name) "data") | quote }}
{{- else }}
emptyDir: {}
{{- end }}

View file

@ -1,28 +0,0 @@
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ .Release.Name }}-data
labels:
app: checkmk
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.persistence.annotations }}
annotations:
{{ toYaml .Values.persistence.annotations | indent 4 }}
{{- end }}
spec:
accessModes:
- {{ .Values.persistence.accessMode | quote }}
resources:
requests:
storage: {{ .Values.persistence.storageSize | quote }}
{{- if .Values.persistence.storageClass }}
{{- if (eq "-" .Values.persistence.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.persistence.storageClass }}"
{{- end }}
{{- end }}
{{- end }}

View file

@ -1,19 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: rethinkdb-{{ .Release.Name }}
labels:
app: rethinkdb
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: ClusterIP
ports:
- targetPort: 28015
protocol: TCP
name: rethinkdb
port: 28015
selector:
app: rethinkdb
release: {{ .Release.Name }}

View file

@ -1,19 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}
labels:
app: defiant
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: ClusterIP
ports:
- targetPort: 80
protocol: TCP
name: defiant-voice
port: 80
selector:
app: defiant
release: {{ .Release.Name }}

View file

@ -1,18 +0,0 @@
image:
name: registry.gitlab.com/momothereal/momoperes.ca/defiant
tag: latest
pullPolicy: Always
podAnnotations: {}
nodeSelector: {}
tolerations: []
affinity: {}
persistence:
enabled: true
accessMode: ReadWriteOnce
annotations:
"helm.sh/resource-policy": keep
storageClass: do-block-storage
storageSize: 1Gi

View file

@ -1,26 +0,0 @@
web:
# Flask (web) configuration
ip: "0.0.0.0"
port: 80
database:
# RethinkDB configuration
ip: "rethinkdb-defiant.public"
port: 28015
database_name: "battle_myth_theater"
admin:
username: "admin" #Insecure, change from example credentials.
password: "admin" #Insecure, change from example credentials.
game:
max_stat_points: 20
debug: true
stories:
# Path to FFMPEG executable
ffmpeg: "/usr/bin/ffmpeg"
# Max story count per user.
# Note: this is ignored when 'debug' is set to true
max_story_count: 10

View file

@ -1,75 +0,0 @@
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: public-ingress
annotations:
kubernetes.io/ingress.class: nginx
spec:
tls:
- hosts:
- momoperes.ca
- defiant.momoperes.ca
- charts.momoperes.ca
- abitibi.momoperes.ca
secretName: momoperes.ca-wildcard-tls
- hosts:
- poire.dev
secretName: poire.dev-wildcard-tls
- hosts:
- aramperes.ca
secretName: aramperes.ca-wildcard-tls
rules:
- host: momoperes.ca
http:
paths:
- path: /
backend:
serviceName: website
servicePort: 9000
- path: /files
backend:
serviceName: website-files
servicePort: 9000
- host: defiant.momoperes.ca
http:
paths:
- path: /
backend:
serviceName: defiant
servicePort: 80
- host: charts.momoperes.ca
http:
paths:
- path: /
backend:
serviceName: chartmuseum
servicePort: 8080
- host: abitibi.momoperes.ca
http:
paths:
- path: /
backend:
serviceName: abitibi
servicePort: 9000
- host: poire.dev
http:
paths:
- path: /
backend:
serviceName: website
servicePort: 9000
- path: /files
backend:
serviceName: website-files
servicePort: 9000
- host: aramperes.ca
http:
paths:
- path: /
backend:
serviceName: website
servicePort: 9000
- path: /files
backend:
serviceName: website-files
servicePort: 9000

View file

@ -1,4 +0,0 @@
apiVersion: v1
kind: Namespace
metadata:
name: public

View file

@ -1,23 +0,0 @@
# 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/

View file

@ -1,6 +0,0 @@
apiVersion: v2
name: onetun
description: A Helm chart for onetun, a WireGuard port-forwarder
type: application
version: 0.2.9
appVersion: "v0.2.9"

View file

@ -1,22 +0,0 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
{{- range .paths }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "onetun.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "onetun.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "onetun.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "onetun.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
{{- end }}

View file

@ -1,62 +0,0 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "onetun.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 "onetun.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 "onetun.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "onetun.labels" -}}
helm.sh/chart: {{ include "onetun.chart" . }}
{{ include "onetun.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "onetun.selectorLabels" -}}
app.kubernetes.io/name: {{ include "onetun.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "onetun.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "onetun.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

View file

@ -1,77 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "onetun.fullname" . }}
labels:
{{- include "onetun.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "onetun.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "onetun.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "onetun.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: tcp
containerPort: 2115
protocol: TCP
resources:
{{- toYaml .Values.resources | nindent 12 }}
env:
- name: ONETUN_LOG
value: {{ .Values.onetun.log | quote }}
- name: ONETUN_PRIVATE_KEY
valueFrom:
secretKeyRef:
key: private-key
name: {{ .Values.onetun.secretName | quote }}
- name: ONETUN_ENDPOINT_PUBLIC_KEY
valueFrom:
secretKeyRef:
key: public-key
name: {{ .Values.onetun.secretName | quote }}
- name: ONETUN_ENDPOINT_ADDR
valueFrom:
secretKeyRef:
key: endpoint
name: {{ .Values.onetun.secretName | quote }}
- name: ONETUN_SOURCE_PEER_IP
value: {{ .Values.onetun.sourcePeerIP | quote }}
- name: ONETUN_KEEP_ALIVE
value: {{ .Values.onetun.keepAlive | quote }}
- name: ONETUN_PORT_FORWARD_1
value: "0.0.0.0:2115:{{ .Values.onetun.destination }}"
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}

View file

@ -1,28 +0,0 @@
{{- if .Values.autoscaling.enabled }}
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "onetun.fullname" . }}
labels:
{{- include "onetun.labels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "onetun.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}

View file

@ -1,61 +0,0 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "onetun.fullname" . -}}
{{- $svcPort := "tcp" -}}
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
{{- end }}
{{- end }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{- include "onetun.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
pathType: {{ .pathType }}
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port:
name: {{ $svcPort }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

View file

@ -1,15 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "onetun.fullname" . }}
labels:
{{- include "onetun.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: tcp
protocol: TCP
name: tcp
selector:
{{- include "onetun.selectorLabels" . | nindent 4 }}

View file

@ -1,12 +0,0 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "onetun.serviceAccountName" . }}
labels:
{{- include "onetun.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}

View file

@ -1,86 +0,0 @@
replicaCount: 1
image:
repository: aramperes/onetun
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
onetun:
# Existing secret name that contains "private-key", "public-key", "endpoint".
secretName: ""
# Keep alive in seconds
keepAlive: ""
# This tunnel's assigned peer IP
sourcePeerIP: ""
# Destination IP and port
destination: ""
# Log level
log: info
imagePullSecrets: [ ]
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: false
# Annotations to add to the service account
annotations: { }
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
podAnnotations: { }
podSecurityContext: { }
# fsGroup: 2000
securityContext:
readOnlyRootFilesystem: true
runAsUser: 1000
service:
type: ClusterIP
port: 2115
ingress:
enabled: false
className: ""
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
resources: { }
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
nodeSelector: { }
tolerations: [ ]
affinity: { }

View file

@ -1,21 +0,0 @@
onetun:
secretName: onetun-ntc-pdf-converter
keepAlive: 10
sourcePeerIP: 192.168.4.7
destination: 192.168.4.2:7000
log: info
ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/proxy-body-size: 50m
hosts:
- host: ntc-pdf-converter.poire.dev
paths:
- path: /
pathType: ImplementationSpecific
tls:
- secretName: poire.dev-wildcard-tls
hosts:
- ntc-pdf-converter.poire.dev

View file

@ -1,2 +0,0 @@
.idea/
chart/teamspeak/manifests/

View file

@ -1,6 +0,0 @@
apiVersion: v1
description: teamspeak
engine: gotpl
name: teamspeak
version: 0.1.0
appVersion: 3.9.1

View file

@ -1,62 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}
labels:
app: teamspeak
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: 1
selector:
matchLabels:
app: teamspeak
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
template:
metadata:
{{- if .Values.podAnnotations }}
annotations:
{{ toYaml .Values.podAnnotations | indent 8 }}
{{- end }}
labels:
app: teamspeak
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
containers:
- name: teamspeak-server
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- containerPort: 9987
protocol: UDP
env:
- name: TS3SERVER_LICENSE
value: accept
volumeMounts:
- mountPath: /var/ts3server/
name: teamspeak-data
volumes:
- name: teamspeak-data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ .Values.persistence.existingClaim | default (printf "%s-%s" (.Release.Name) "data") | quote }}
{{- else }}
emptyDir: {}
{{- end }}

View file

@ -1,28 +0,0 @@
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ .Release.Name }}-data
labels:
app: checkmk
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.persistence.annotations }}
annotations:
{{ toYaml .Values.persistence.annotations | indent 4 }}
{{- end }}
spec:
accessModes:
- {{ .Values.persistence.accessMode | quote }}
resources:
requests:
storage: {{ .Values.persistence.storageSize | quote }}
{{- if .Values.persistence.storageClass }}
{{- if (eq "-" .Values.persistence.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.persistence.storageClass }}"
{{- end }}
{{- end }}
{{- end }}

View file

@ -1,21 +0,0 @@
{{- if .Values.service.queryPort }}
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}-query
labels:
app: teamspeak
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: ClusterIP
ports:
- targetPort: 10011
protocol: TCP
name: teamspeak-query
port: {{ .Values.service.queryPort }}
selector:
app: teamspeak
release: {{ .Release.Name }}
{{- end }}

View file

@ -1,25 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}
labels:
app: teamspeak
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.service.type }}
ports:
- nodePort: {{ .Values.service.voicePort }}
targetPort: 9987
protocol: UDP
name: teamspeak-voice
port: 9987
- nodePort: {{ .Values.service.filePort }}
targetPort: 30033
protocol: TCP
name: teamspeak-file
port: 30033
selector:
app: teamspeak
release: {{ .Release.Name }}

View file

@ -1,27 +0,0 @@
image:
repository: teamspeak
tag: latest
pullPolicy: Always
podAnnotations: {}
service:
type: NodePort
voicePort: 30987
filePort: 30033
queryPort: 10011
nodeSelector:
teamspeak: "1"
tolerations: []
affinity: {}
persistence:
enabled: true
accessMode: ReadWriteOnce
annotations:
"helm.sh/resource-policy": keep
storageClass: do-block-storage
storageSize: 1Gi
existingClaim: teamspeak-data

View file

@ -1,10 +0,0 @@
config:
discordUsername: "TimSpeak"
discordAvatar: "https://i.imgur.com/JQMDe2M.png"
serverQueryAddr: "teamspeak-query:10011"
serverQueryId: 1
serverQuerySecret: "ts-activity"
webhookSecret: "ts-activity"
nameOverride: "ts-activity"
fullnameOverride: "ts-activity"

View file

@ -1,23 +0,0 @@
# 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/

View file

@ -1,24 +0,0 @@
apiVersion: v2
name: twitton
description: A Helm chart for 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: 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. 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: "0.0.2"

View file

@ -1,22 +0,0 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
{{- range .paths }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "twitton.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "twitton.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "twitton.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "twitton.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
{{- end }}

View file

@ -1,62 +0,0 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "twitton.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 "twitton.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 "twitton.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "twitton.labels" -}}
helm.sh/chart: {{ include "twitton.chart" . }}
{{ include "twitton.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "twitton.selectorLabels" -}}
app.kubernetes.io/name: {{ include "twitton.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "twitton.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "twitton.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

View file

@ -1,84 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "twitton.fullname" . }}
labels:
{{- include "twitton.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "twitton.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "twitton.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "twitton.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default (printf "v%s" .Chart.AppVersion) }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 8080
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
env:
- name: RUST_LOG
value: info
- name: WEB_DOMAIN
value: {{ .Values.twitton.webDomain | required "must configure webDomain" }}
- name: LOCAL_DOMAIN
value: {{ .Values.twitton.localDomain | required "must configure localDomain" }}
- name: ADMIN_USERNAME
value: {{ .Values.twitton.adminUsername | required "must configure adminUsername" }}
{{- if .Values.twitton.adminIconUrl }}
- name: ADMIN_ICON_URL
value: {{ .Values.twitton.adminIconUrl }}
{{- end }}
- name: ADMIN_PUBLIC_KEY_PEM
valueFrom:
secretKeyRef:
name: {{ .Values.twitton.adminKeySecretName | required "must configure adminKeySecretName" }}
key: public.pem
- name: ADMIN_PRIVATE_KEY_PEM
valueFrom:
secretKeyRef:
name: {{ .Values.twitton.adminKeySecretName | required "must configure adminKeySecretName" }}
key: private.pem
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}

View file

@ -1,28 +0,0 @@
{{- if .Values.autoscaling.enabled }}
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "twitton.fullname" . }}
labels:
{{- include "twitton.labels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "twitton.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}

View file

@ -1,61 +0,0 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "twitton.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
{{- end }}
{{- end }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{- include "twitton.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
pathType: {{ .pathType }}
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

View file

@ -1,15 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "twitton.fullname" . }}
labels:
{{- include "twitton.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
{{- include "twitton.selectorLabels" . | nindent 4 }}

View file

@ -1,12 +0,0 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "twitton.serviceAccountName" . }}
labels:
{{- include "twitton.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}

View file

@ -1,15 +0,0 @@
apiVersion: v1
kind: Pod
metadata:
name: "{{ include "twitton.fullname" . }}-test-connection"
labels:
{{- include "twitton.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test
spec:
containers:
- name: wget
image: busybox
command: ['wget']
args: ['{{ include "twitton.fullname" . }}:{{ .Values.service.port }}']
restartPolicy: Never

View file

@ -1,89 +0,0 @@
# Default values for twitton.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
repository: aramperes/twitton
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
podAnnotations: {}
podSecurityContext: {}
# fsGroup: 2000
securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
service:
type: ClusterIP
port: 80
ingress:
enabled: false
className: ""
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
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
nodeSelector: {}
tolerations: []
affinity: {}
twitton: {}
# webDomain
# localDomain
# adminUsername
# adminKeySecretName
# adminIconUrl

View file

@ -1,25 +0,0 @@
image:
tag: latest
pullPolicy: Always
ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/proxy-body-size: 50m
hosts:
- host: twitton.poire.dev
paths:
- path: /
pathType: ImplementationSpecific
tls:
- secretName: poire.dev-wildcard-tls
hosts:
- twitton.poire.dev
twitton:
webDomain: twitton.poire.dev
localDomain: twitton.poire.dev
adminUsername: aram
adminKeySecretName: twitton-admin-keys
adminIconUrl: https://i.imgur.com/DyflGFV.png

View file

@ -1,23 +0,0 @@
# 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/

View file

@ -1,24 +0,0 @@
apiVersion: v2
name: uptrace
description: A Helm chart for 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: 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. 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: "0.0.0"

View file

@ -1,62 +0,0 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "uptrace.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 "uptrace.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 "uptrace.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "uptrace.labels" -}}
helm.sh/chart: {{ include "uptrace.chart" . }}
{{ include "uptrace.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "uptrace.selectorLabels" -}}
app.kubernetes.io/name: {{ include "uptrace.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "uptrace.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "uptrace.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

View file

@ -1,21 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: clickhouse-{{ include "uptrace.fullname" . }}
labels:
app: clickhouse
{{- include "uptrace.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: 8123
targetPort: http
protocol: TCP
name: http
- port: 9000
targetPort: tcp
protocol: TCP
name: tcp
selector:
app: clickhouse
{{- include "uptrace.selectorLabels" . | nindent 4 }}

View file

@ -1,73 +0,0 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: clickhouse-{{ include "uptrace.fullname" . }}
labels:
app: clickhouse
{{- include "uptrace.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: 1
{{- end }}
serviceName: clickhouse-{{ include "uptrace.fullname" . }}
selector:
matchLabels:
app: clickhouse
{{- include "uptrace.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
app: clickhouse
{{- include "uptrace.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.clickhouse.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "uptrace.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.clickhouse.image.repository }}:{{ .Values.clickhouse.image.tag | default "latest" }}"
imagePullPolicy: {{ .Values.clickhouse.image.pullPolicy }}
env:
- name: CLICKHOUSE_DB
value: uptrace
volumeMounts: []
ports:
- name: http
containerPort: 8123
protocol: TCP
- name: tcp
containerPort: 9000
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes: []

View file

@ -1,28 +0,0 @@
{{- if .Values.autoscaling.enabled }}
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "uptrace.fullname" . }}
labels:
{{- include "uptrace.labels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "uptrace.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}

View file

@ -1,61 +0,0 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "uptrace.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
{{- end }}
{{- end }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{- include "uptrace.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
pathType: {{ .pathType }}
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

View file

@ -1,17 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "uptrace.fullname" . }}
labels:
app: uptrace
{{- include "uptrace.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
app: uptrace
{{- include "uptrace.selectorLabels" . | nindent 4 }}

View file

@ -1,12 +0,0 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "uptrace.serviceAccountName" . }}
labels:
{{- include "uptrace.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}

View file

@ -1,9 +0,0 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "uptrace.fullname" . }}
labels:
{{- include "uptrace.labels" . | nindent 4 }}
data:
uptrace.yml: |
{{ .Values.uptrace.config | toYaml | indent 4 }}

View file

@ -1,71 +0,0 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ include "uptrace.fullname" . }}
labels:
app: uptrace
{{- include "uptrace.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
serviceName: {{ include "uptrace.fullname" . }}
selector:
matchLabels:
app: uptrace
{{- include "uptrace.selectorLabels" . | nindent 6 }}
template:
metadata:
annotations:
checksum/config: {{ .Values.uptrace.config | toYaml | sha256sum }}
labels:
app: uptrace
{{- include "uptrace.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "uptrace.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
- name: config
mountPath: /etc/uptrace/uptrace.yml
subPath: uptrace.yml
ports:
- name: http
containerPort: 14318
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: config
configMap:
name: {{ include "uptrace.fullname" . }}

View file

@ -1,302 +0,0 @@
# Default values for uptrace.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
repository: uptrace/uptrace-dev
pullPolicy: Always
tag: latest
clickhouse:
imagePullSecrets: []
image:
repository: clickhouse/clickhouse-server
pullPolicy: IfNotPresent
tag: "22.7"
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
podAnnotations: {}
podSecurityContext: {}
# fsGroup: 2000
securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
service:
type: ClusterIP
port: 80
ingress:
enabled: false
className: ""
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
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
nodeSelector: {}
tolerations: []
affinity: {}
uptrace:
config:
##
## A list of pre-configured projects. Each project is fully isolated.
##
projects:
# Conventionally, the first project is used to monitor Uptrace itself.
- id: 1
name: Uptrace
# Token grants write access to the project. Keep a secret.
token: project1_secret_token
pinned_attrs:
- service.name
- host.name
- deployment.environment
# Other projects can be used to monitor your applications.
# To monitor micro-services or multiple related services, use a single project.
- id: 2
name: My project
token: project2_secret_token
pinned_attrs:
- service.name
- host.name
- deployment.environment
##
## To require authentication, uncomment the following section.
##
# users:
# - username: uptrace
# password: uptrace
# - username: admin
# password: admin
##
## You can also specify auth providers, instead of username+password login.
##
# user_providers:
# # Cloudflare user provider: uses Cloudflare Zero Trust Access (Identity)
# # See https://developers.cloudflare.com/cloudflare-one/identity/ for more info.
# cloudflare:
# # The base URL of the Cloudflare Zero Trust team.
# team_url: https://myteam.cloudflareaccess.com
# # The Application Audience (AUD) Tag for this application.
# # You can retrieve this from the Cloudflare Zero Trust 'Access' Dashboard.
# audience: bea6df23b944e4a0cd178609ba1bb64dc98dfe1f66ae7b918e563f6cf28b37e0
##
## ClickHouse database credentials.
##
ch:
# Connection string for ClickHouse database. For example:
# clickhouse://<user>:<password>@<host>:<port>/<database>?sslmode=disable
#
# See https://clickhouse.uptrace.dev/guide/golang-clickhouse.html#options
dsn: 'clickhouse://default:@clickhouse-uptrace:9000/uptrace?sslmode=disable'
##
## Alerting rules for monitoring metrics.
##
## See https://uptrace.dev/get/alerting.html for details.
##
alerting:
rules:
- name: Network errors
metrics:
- system.network.errors as $net_errors
query:
- $net_errors > 0 group by host.name
# for the last 5 minutes
for: 5m
# in the project id=1
projects: [1]
- name: Filesystem usage >= 90%
metrics:
- system.filesystem.usage as $fs_usage
query:
- group by host.name
- group by device
- where device !~ "loop"
- $fs_usage{state="used"} / $fs_usage >= 0.9
for: 5m
projects: [1]
- name: Uptrace is dropping spans
metrics:
- uptrace.projects.spans as $spans
query:
- $spans{type=dropped} > 0
for: 1m
projects: [1]
- name: Always firing (for fun and testing)
metrics:
- process.runtime.go.goroutines as $goroutines
query:
- $goroutines >= 0 group by host.name
for: 1m
projects: [1]
# Create alerts from error logs and span events.
create_alerts_from_spans:
enabled: true
labels:
alert_kind: error
##
## AlertManager client configuration.
## See https://uptrace.dev/get/alerting.html for details.
##
## Note that this is NOT an AlertManager config and you need to configure AlertManager separately.
## See https://prometheus.io/docs/alerting/latest/configuration/ for details.
##
alertmanager_client:
# AlertManager API endpoints that Uptrace uses to manage alerts.
urls:
- 'http://localhost:9093/api/v2/alerts'
##
## Various options to tweak ClickHouse schema.
## For changes to take effect, you need reset the ClickHouse database with `ch reset`.
##
ch_schema:
# Compression codec, for example, LZ4, ZSTD(3), or Default.
compression: ZSTD(3)
# Whether to use ReplicatedMergeTree instead of MergeTree.
replicated: false
# Cluster name for Distributed tables and ON CLUSTER clause.
#cluster: uptrace1
spans:
storage_policy: 'default'
# Delete spans data after 30 days.
ttl_delete: 30 DAY
metrics:
storage_policy: 'default'
# Delete metrics data after 90 days.
ttl_delete: 90 DAY
##
## Addresses on which Uptrace receives gRPC and HTTP requests.
##
listen:
# OTLP/gRPC API.
grpc:
addr: ':14317'
# tls:
# cert_file: config/tls/uptrace.crt
# key_file: config/tls/uptrace.key
# OTLP/HTTP API and Uptrace API with UI.
http:
addr: ':14318'
# tls:
# cert_file: config/tls/uptrace.crt
# key_file: config/tls/uptrace.key
##
## Various options for Uptrace UI.
##
site:
# Overrides public URL for Vue-powered UI in case you put Uptrace behind a proxy.
#addr: 'https://uptrace.mydomain.com'
##
## Spans processing options.
##
spans:
# The size of the Go chan used to buffer incoming spans.
# If the buffer is full, Uptrace starts to drop spans.
#buffer_size: 100000
# The number of spans to insert in a single query.
#batch_size: 10000
##
## Metrics processing options.
##
metrics:
# List of attributes to drop for being noisy.
drop_attrs:
- telemetry.sdk.language
- telemetry.sdk.name
- telemetry.sdk.version
# The size of the Go chan used to buffer incoming measures.
# If the buffer is full, Uptrace starts to drop measures.
#buffer_size: 100000
# The number of measures to insert in a single query.
#batch_size: 10000
##
## SQLite database that is used to store metadata such us metric names, dashboards, alerts,
## and so on.
##
db:
# SQLite connection string.
#
# Uptrace automatically creates SQLite database file in the current working directory.
# Make sure the directory is writable by Uptrace process.
dsn: 'file:${UPTRACE_DB_FILE:uptrace.sqlite3}?_foreign_keys=1&_busy_timeout=1000'
# Secret key that is used to sign JWT tokens etc.
secret_key: ${UPTRACE_SECRET_KEY}
# Enable to log HTTP requests and database queries.
debug: false

View file

@ -1,6 +0,0 @@
uptrace:
config:
user_providers:
cloudflare:
team_url: https://wavy.cloudflareaccess.com
audience: 75940e2248f7135b7e3a6f9bf44bac3c1c7cae8539f98c4c7df6c08f37d92d33

View file

@ -1,32 +0,0 @@
replicaCount: 1
image:
repository: uptrace/uptrace-dev
pullPolicy: Always
tag: latest
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
create: false
service:
type: ClusterIP
port: 80
ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: nginx
kubernetes.io/tls-acme: "true"
hosts:
- host: trace.poire.dev
paths:
- path: /
pathType: ImplementationSpecific
tls:
- secretName: poire.dev-wildcard-tls
hosts:
- trace.poire.dev

2
website/.gitignore vendored
View file

@ -1,2 +0,0 @@
.idea/
chart/website/manifests/

View file

@ -1,5 +0,0 @@
apiVersion: v1
appVersion: "1.0"
description: Helm chart for my personal website
name: website
version: 0.1.0

View file

@ -1,45 +0,0 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "website.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 "website.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 "website.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "website.labels" -}}
app.kubernetes.io/name: {{ include "website.name" . }}
helm.sh/chart: {{ include "website.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}

View file

@ -1,52 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "website.fullname" . }}
labels:
{{ include "website.labels" . | indent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "website.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
template:
metadata:
labels:
app.kubernetes.io/name: {{ include "website.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.name }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 80
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}

View file

@ -1,19 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "website.fullname" . }}
labels:
{{ include "website.labels" . | indent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
{{- if (eq .Values.service.type "ClusterIP") }}
nodePort: null
{{- end }}
selector:
app.kubernetes.io/name: {{ include "website.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}

View file

@ -1,15 +0,0 @@
replicaCount: 2
image:
name: notset
tag: latest
pullPolicy: Always
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
service:
type: ClusterIP
port: 9000