-
Notifications
You must be signed in to change notification settings - Fork 1
Helm integration #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
landon-metzger
wants to merge
41
commits into
main
Choose a base branch
from
compose
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Helm integration #35
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 6e66b5b
add index and package chart to make repo a viable helm chart repo
landon-metzger deda1fa
add index and packaged chart to push to artifact hub
landon-metzger 7405ecb
add start of helm repo docs
landon-metzger 2befbc8
change helm-relese to run on pr
landon-metzger d87270a
change when helm-chart action runs
landon-metzger be2e7c1
add gh action readme guide to useing the helm repo
landon-metzger 6123364
change chart vershion
landon-metzger 18e4c8d
add skip existing to the deployment
landon-metzger 1379fad
add skip existing to the deployment
landon-metzger 9a1abf7
greenscout on updated chart
landon-metzger 4b220fd
publish the build chart to the gh-pages branch
landon-metzger b2bf2f5
add helpers for the service accout template
landon-metzger 959117c
re add skip existing
landon-metzger cce6ca9
add greenscout.backend name helper
landon-metzger 90a8fa3
fix nil pointer evaluating interface {}.enabled
landon-metzger 4367488
fix nil pointer evaluating interface {}.enabled
landon-metzger a90a6f8
hopfilly really fix it this time we will see
landon-metzger 9aeb62b
change charts dir
landon-metzger 3e8537e
change charts dir
landon-metzger 5c1f008
config secrets to manage all in vault
landon-metzger bcc084a
configs uses one secret not threee oops
landon-metzger 3a6c4df
we dont have the mount path in secret name anymore
landon-metzger f3d4ee1
add missing keys
landon-metzger 9f65bae
fix bad indentation
landon-metzger 0388051
chage secret name to a valid default
landon-metzger 64e6058
add args for test mode
landon-metzger a0dee12
add databaces volume claim
landon-metzger 5471198
add databaces volume claim
landon-metzger 5f7491e
add nfs mounted databaces FOR NOW quick fix
landon-metzger fab917d
fix args lables
landon-metzger a7ebe9c
test the test
landon-metzger 810ffd5
app vershion
landon-metzger 4bb6e9a
databaces mount path fix
landon-metzger 1b85592
databaces mount path fix
landon-metzger 78cb6bd
vershion change
landon-metzger 8c61548
fix volumes pvc's pv's and mounts
landon-metzger 69054f0
fix moutPaths for run mount
landon-metzger adfc4f8
add debuging
landon-metzger 1575873
add proper volumes
landon-metzger 6331bac
fix values template
landon-metzger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,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 }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -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: | ||||||||||
|
|
||||||||||
| helm install my-<chart-name> greenscout/greenscout-backend | ||||||||||
|
|
||||||||||
| To uninstall the chart: | ||||||||||
|
|
||||||||||
| helm uninstall my-<chart-name> | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,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 }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,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 }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,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 }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,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 }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,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" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.