Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
2d9b2db
add the start of a helm chart
landon-metzger Mar 19, 2026
6e66b5b
add index and package chart to make repo a viable helm chart repo
landon-metzger Mar 19, 2026
deda1fa
add index and packaged chart to push to artifact hub
landon-metzger Mar 19, 2026
7405ecb
add start of helm repo docs
landon-metzger Mar 19, 2026
2befbc8
change helm-relese to run on pr
landon-metzger Mar 19, 2026
d87270a
change when helm-chart action runs
landon-metzger Mar 19, 2026
be2e7c1
add gh action readme guide to useing the helm repo
landon-metzger Mar 19, 2026
6123364
change chart vershion
landon-metzger Mar 19, 2026
18e4c8d
add skip existing to the deployment
landon-metzger Mar 19, 2026
1379fad
add skip existing to the deployment
landon-metzger Mar 19, 2026
9a1abf7
greenscout on updated chart
landon-metzger Mar 19, 2026
4b220fd
publish the build chart to the gh-pages branch
landon-metzger Mar 19, 2026
b2bf2f5
add helpers for the service accout template
landon-metzger Mar 19, 2026
959117c
re add skip existing
landon-metzger Mar 19, 2026
cce6ca9
add greenscout.backend name helper
landon-metzger Mar 19, 2026
90a8fa3
fix nil pointer evaluating interface {}.enabled
landon-metzger Mar 19, 2026
4367488
fix nil pointer evaluating interface {}.enabled
landon-metzger Mar 19, 2026
a90a6f8
hopfilly really fix it this time we will see
landon-metzger Mar 19, 2026
9aeb62b
change charts dir
landon-metzger Mar 19, 2026
3e8537e
change charts dir
landon-metzger Mar 19, 2026
5c1f008
config secrets to manage all in vault
landon-metzger Mar 19, 2026
bcc084a
configs uses one secret not threee oops
landon-metzger Mar 19, 2026
3a6c4df
we dont have the mount path in secret name anymore
landon-metzger Mar 19, 2026
f3d4ee1
add missing keys
landon-metzger Mar 19, 2026
9f65bae
fix bad indentation
landon-metzger Mar 19, 2026
0388051
chage secret name to a valid default
landon-metzger Mar 19, 2026
64e6058
add args for test mode
landon-metzger Mar 19, 2026
a0dee12
add databaces volume claim
landon-metzger Mar 19, 2026
5471198
add databaces volume claim
landon-metzger Mar 19, 2026
5f7491e
add nfs mounted databaces FOR NOW quick fix
landon-metzger Mar 19, 2026
fab917d
fix args lables
landon-metzger Mar 19, 2026
a7ebe9c
test the test
landon-metzger Mar 19, 2026
810ffd5
app vershion
landon-metzger Mar 19, 2026
4bb6e9a
databaces mount path fix
landon-metzger Mar 19, 2026
1b85592
databaces mount path fix
landon-metzger Mar 19, 2026
78cb6bd
vershion change
landon-metzger Mar 19, 2026
8c61548
fix volumes pvc's pv's and mounts
landon-metzger Mar 19, 2026
69054f0
fix moutPaths for run mount
landon-metzger Mar 19, 2026
adfc4f8
add debuging
landon-metzger Mar 20, 2026
1575873
add proper volumes
landon-metzger Mar 20, 2026
6331bac
fix values template
landon-metzger Mar 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/helm-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release Charts

on:
push:
branches:
- main
- compose

jobs:
release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"

- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.6.0
with:
args: -o ${{ env.owner }} -r ${{ env.repo }}
charts_dir: charts
skip_existing: true
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: Publish Helm chart
uses: stefanprodan/helm-gh-pages@v1.5.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ Thumbs.db

# Other #
######################
*.json
*.pem
*.txt
*.swp
Expand All @@ -29,6 +28,8 @@ GreenScout-Databases/

*.pem
*.yaml
!/charts/greenscout/**/*
!index.yaml

# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode
Expand Down
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,24 @@ Additional documentation on various topics can be found [in the `docs` directory
* Discrepencies for multi-scouting - the only one that is implemented right now is average times being too different
* Greenlogger improvement
* Having the errors also spit out the line of code/method/stacktrace they came from

## Helm Repo Usage

[Helm](https://helm.sh) must be installed to use the charts. Please refer to
Helm's [documentation](https://helm.sh/docs) to get started.

Once Helm has been set up correctly, add the repo as follows:

helm repo add greenscout https://thegreenmachine.github.io/GreenScout-Backend

If you had already added this repo earlier, run `helm repo update` to retrieve
the latest versions of the packages. You can then run `helm search repo
<alias>` to see the charts.

To install the greenscout chart:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To install the greenscout chart:
In the following examples, `my-gs-backend` can be whatever name you want, just be consistent.
To install the greenscout chart:


helm install my-<chart-name> greenscout/greenscout-backend

To uninstall the chart:

helm uninstall my-<chart-name>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
helm uninstall my-<chart-name>
```
# helm uninstall my-gs-backend
```

15 changes: 15 additions & 0 deletions charts/greenscout/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v2
name: greenscout-backend
description: A Helm chart for the GreenScout backend application, a self-hosted scouting solution for FRC teams.
type: application
home: https://github.com/TheGreenMachine/GreenScout-Backend
icon: https://avatars.githubusercontent.com/u/931344?s=200&v=4
keywords:
- greenscout-backend
- edina
- frc
- robotics
- teem 1816
- scouting
version: 0.0.3
appVersion: 1.0.0
82 changes: 82 additions & 0 deletions charts/greenscout/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{{/*
Common labels
*/}}
{{- define "greenscout-backend.labels" -}}
helm.sh/chart: {{ include "greenscout-backend.chart" . }}
{{ include "greenscout-backend.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

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

{{/*
Create the name of the service account to use
*/}}
{{- define "greenscout-backend.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "greenscout-backend.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

{{/*
Return the appropriate apiVersion for deployment
*/}}
{{- define "greenscout-backend.deployment.apiVersion" -}}
{{- if semverCompare ">=1.9-0" .Capabilities.KubeVersion.GitVersion -}}
apps/v1
{{- else -}}
apps/v1beta2
{{- end -}}
{{- end -}}

{{/*
Expand the name of the chart.
*/}}
{{- define "greenscout-backend.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 "greenscout-backend.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 "greenscout-backend.chart" -}}
{{- 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 }}
108 changes: 108 additions & 0 deletions charts/greenscout/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
apiVersion: {{ include "greenscout-backend.deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ include "greenscout-backend.fullname" . }}
{{- with .Values.deploymentAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
{{- include "greenscout-backend.labels" . | nindent 4 }}
spec:
{{- with .Values.deploymentStrategy }}
strategy:
{{- toYaml . | trim | nindent 4 }}
{{- end }}
replicas: {{ .Values.replicaCount }}
{{- with .Values.revisionHistoryLimit }}
revisionHistoryLimit: {{ . }}
{{- end }}
selector:
matchLabels:
{{- include "greenscout-backend.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "greenscout-backend.labels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "greenscout-backend.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 }}
restartPolicy: {{ .Values.restartPolicy | default "OnFailure" }} # Use OnFailure to prevent automatic deletion of the pod I MADE DAM NEAR 500000 COMMITS AND I NEVER THOUGHT TO CHANGE THE RESTART POLICY.
args:
- "test"
ports:
- name: http
containerPort: 80
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http

volumeMounts:
- name: secrets
mountPath: "/app/run/credentials.json"
subPath: {{ .Values.secrets.credentalsKey | default "credentials.json" }}
readOnly: true
- name: secrets
mountPath: "/app/conf/credentials.json"
subPath: {{ .Values.secrets.credentalsKey | default "credentials.json" }}
readOnly: true
- name: secrets
mountPath: "/app/conf/greenscout.config.yaml"
subPath: {{ .Values.secrets.configsKey | default "greenscout.config.yaml" }}
readOnly: true
- name: secrets
mountPath: "/app/run/token.json"
subPath: {{ .Values.secrets.tokenKey | default "token.json" }}
readOnly: true
- name: run
mountPath: "/app/run/"

{{- 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: secrets
secret:
secretName: {{ .Values.secrets.secretName }}
{{- if .Values.volumes.run.enabled }}
- name: run
persistentVolumeClaim:
claimName: {{ .Values.volumes.run.claimName | default "greenscout-backend-run-pvc" }}
{{- end }}
15 changes: 15 additions & 0 deletions charts/greenscout/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "greenscout-backend.fullname" . }}
labels:
{{- include "greenscout-backend.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
{{- include "greenscout-backend.selectorLabels" . | nindent 4 }}
12 changes: 12 additions & 0 deletions charts/greenscout/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "greenscout-backend.serviceAccountName" . }}
labels:
{{- include "greenscout-backend.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
65 changes: 65 additions & 0 deletions charts/greenscout/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Default values for greenscout-backend.
# This is a YAML-formatted file. AUTOGENERATED HELM COMMENTS ACTUALY SUCK BALLS DUDE
# Declare variables to be passed into your templates.

replicaCount: 2

image:
repository: docker.io/landonmmmmmm/greenscoutbackend
tag: "latest"
pullPolicy: IfNotPresent

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
args:
- "test"
restartPolicy: Always

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.
# Generates If not set and create is true,
name: ""

service:
type: ClusterIP
port: 80

resources: {}
# you shouldnt need to touch this unless u are really extreamly low on resorces.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi

######## TODO: Add autoscaling values for the backend, and add a section to the README about how to use it ########
# autoscaling:
# enabled: true
# minReplicas: 1
# maxReplicas: 100
# targetCPUUtilizationPercentage: 80
# # targetMemoryUtilizationPercentage: 80

# nodeSelector: {}

# tolerations: []

affinity: {}

secrets:
enabled: true
secretName: "greenscout-backend-secrets"
credentalsKey: "credentials.json"
configsKey: "greenscout.config.yaml"
tokenKey: "token.json"

volumes:
run:
enabled: false
claimName: "greenscout-backend-run-pvc"
Loading
Loading