Skip to content

Commit

Permalink
Merge branch 'main' of github.com:MinaFoundation/helm-charts into PM-…
Browse files Browse the repository at this point in the history
…1506-helm-docs-pre-commit
  • Loading branch information
Smorci committed Apr 29, 2024
2 parents 87b8354 + d6507db commit b09b3ec
Show file tree
Hide file tree
Showing 17 changed files with 513 additions and 4 deletions.
5 changes: 3 additions & 2 deletions delegation-verify-coordinator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,13 @@ The command removes all the Kubernetes components associated with the chart and
| `coordinator.aws.secretAccessKey` | AWS Secret Access Key | `` |
| `coordinator.aws.s3Bucket` | AWS S3 Bucket name that holds submissions | `673156464838-uptime-service-backend` |
| `coordinator.ssl.certfile` | Path to the certfile for AWS Keyspaces | `` |
| `coordinator.envVars` | Environment Variables to pass to the container | `{}` |
| `coordinator.envVars` | Environment Variables to pass to the container | `[]` |
| `serviceAccount.create` | Create or not Service Account | `true` |
| `serviceAccount.automount` | Automatically mount ServiceAccount API credentials | `true` |
| `serviceAccount.coordinator.annotations`| Annotations for the Coordinator Service Account | `{}` |
| `serviceAccount.worker.annotations` | Annotations for the Worker Service Account | `{}` |
| `serviceAccount.name` | If specified, name of the service account | ` ` |
| `serviceAccount.name` | If specified, name of the service account | ` ` |
| `secret.gcpServiceAccount` | JSON data of gcp sa credentials | ` ` |
| `podAnnotations` | Pod annotations | `{}` |
| `podLabels` | Pod labels | `{}` |
| `affinity` | Pod affinity | `{}` |
Expand Down
12 changes: 12 additions & 0 deletions delegation-verify-coordinator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,14 @@ spec:
value: {{ include "delegation-verify-coordinator.fullname" . }}
- name: AUTH_VOLUME_MOUNT_PATH
value: /var/mina-delegation-verify-auth
- name: SPREADSHEET_CREDENTIALS_JSON
value: /usr/src/app/gcloud/gcp-sa.json
{{- if .Values.coordinator.envVars }}
{{- toYaml .Values.coordinator.envVars | nindent 12 }}
{{- end }}
volumeMounts:
- name: {{ .Release.Name }}-gcp-sa
mountPath: /usr/src/app/gcloud
ports:
- name: http
containerPort: {{ .Values.service.port }}
Expand All @@ -134,3 +139,10 @@ spec:
items:
- key: "entrypoint-initdb.sh"
path: "entrypoint-initdb.sh"
- name: {{ .Release.Name }}-gcp-sa
secret:
secretName: {{ .Release.Name }}
defaultMode: 0600
items:
- key: gcp-sa-json
path: gcp-sa.json
9 changes: 9 additions & 0 deletions delegation-verify-coordinator/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
apiVersion: v1
kind: Secret
metadata:
name: {{ include "delegation-verify-coordinator.fullname" . }}
labels:
{{- include "delegation-verify-coordinator.labels" . | nindent 4 }}
data:
gcp-sa-json: {{ .Values.secret.gcpServiceAccount | toString | b64enc }}
4 changes: 3 additions & 1 deletion delegation-verify-coordinator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,16 @@ coordinator:
s3Bucket: "673156464838-uptime-service-backend"
ssl:
certfile:
envVars: {}
envVars: []
# - name: FOO
# value: FOO
# - name: BAR
# valueFrom:
# secretKeyRef:
# name: mySecret
# key: bar offline:
secret:
gcpServiceAccount:

serviceAccount:
coordinator:
Expand Down
23 changes: 23 additions & 0 deletions gpt-survey-summarizer/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# 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/
6 changes: 6 additions & 0 deletions gpt-survey-summarizer/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: redis
repository: https://charts.bitnami.com/bitnami
version: 19.1.0
digest: sha256:b2ddb067b6e67858251f669ac0bc8dc4d443bda71306779b5462bd3aaa5c917d
generated: "2024-04-17T11:00:40.052246745+01:00"
30 changes: 30 additions & 0 deletions gpt-survey-summarizer/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
apiVersion: v2
name: gpt-survey-summarizer
description: A helm chart for the gptSuverySummarizer
home: "https://github.com/MinaFoundation/gptSuverySummarizer"
sources: ["https://github.com/MinaFoundation/gptSuverySummarizer"]
# 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
maintainers:
- email: marton.szekely@minaprotocol.com
name: Marton Szekely
dependencies:
- name: redis
version: "19.1.0"
repository: "https://charts.bitnami.com/bitnami"
# 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: "1.16.0"
60 changes: 60 additions & 0 deletions gpt-survey-summarizer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# gpt-survey-summarizer

![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square)

A helm chart for the gptSuverySummarizer

**Homepage:** <https://github.com/MinaFoundation/gptSuverySummarizer>

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| Marton Szekely | <marton.szekely@minaprotocol.com> | |

## Source Code

* <https://github.com/MinaFoundation/gptSuverySummarizer>

## Requirements

| Repository | Name | Version |
|------------|------|---------|
| https://charts.bitnami.com/bitnami | redis | 19.1.0 |

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | Affinity rules |
| bot.args | list | `["bot"]` | Arguments for the bot container |
| bot.extraEnvVars | list | `[]` | Extra Environment Variables |
| bot.replicaCount | int | `1` | The number of pods to be deployed for bot |
| config.discord.clientId | string | `""` | Discord Application ID |
| config.discord.guildId | string | `""` | Discord Guild/Server ID |
| config.discord.token | string | `""` | Discord API Token |
| config.openAiApiKey | string | `""` | Openai API Key |
| config.summarizeFrequencySeconds | int | `3600` | Summarize Frequency Seconds |
| fullnameOverride | string | `""` | The full release name override |
| image.pullPolicy | string | `"IfNotPresent"` | The pullPolicy used when pulling the image |
| image.repository | string | `"673156464838.dkr.ecr.us-west-2.amazonaws.com/gpt-survey-summarizer"` | The repository of the image |
| image.tag | string | `"latest"` | The tag of the iamge. Overrides the image tag whose default is the chart appVersion. |
| imagePullSecrets | list | `[]` | The secrets used to pull the image |
| nameOverride | string | `""` | The release name override |
| nodeSelector | object | `{}` | Node selector labels |
| podAnnotations | object | `{}` | Annotations to add to the pods |
| podSecurityContext | object | `{}` | SecurityContext used for the pods |
| redis.architecture | string | `"standalone"` | The redis architecture (accepted values are: standalone, replication) |
| redis.auth.password | string | `""` | Redis password |
| resources | object | `{}` | Resource limitations for the pods |
| securityContext | object | `{}` | SecurityContext |
| server.args | list | `["summarizer"]` | Arguments for the server container |
| server.extraEnvVars | list | `[]` | Extra Environment Variables |
| server.replicaCount | int | `1` | The number of pods to be deployed for server |
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created |
| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
| tolerations | list | `[]` | Tolerations |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
Binary file added gpt-survey-summarizer/charts/redis-19.1.0.tgz
Binary file not shown.
66 changes: 66 additions & 0 deletions gpt-survey-summarizer/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "gpt-survey-summarizer.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 "gpt-survey-summarizer.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 "gpt-survey-summarizer.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "gpt-survey-summarizer.labels" -}}
helm.sh/chart: {{ include "gpt-survey-summarizer.chart" . }}
{{ include "gpt-survey-summarizer.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

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

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

{{- define "redisUrl" -}}
redis://:{{ .Values.redis.auth.password }}@{{ include "gpt-survey-summarizer.fullname" . }}-redis-master:6379
{{- end -}}
87 changes: 87 additions & 0 deletions gpt-survey-summarizer/templates/deployment_bot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "gpt-survey-summarizer.fullname" . }}-bot
labels:
{{- include "gpt-survey-summarizer.labels" . | nindent 4 }}-bot
spec:
replicas: {{ .Values.bot.replicaCount }}
selector:
matchLabels:
{{- include "gpt-survey-summarizer.selectorLabels" . | nindent 6 }}-bot
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "gpt-survey-summarizer.selectorLabels" . | nindent 8 }}-bot
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "gpt-survey-summarizer.serviceAccountName" . }}-bot
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: bot
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
{{- toYaml .Values.bot.args | nindent 12 }}
env:
- name: DISCORD_TOKEN
valueFrom:
secretKeyRef:
name: {{ include "gpt-survey-summarizer.fullname" . }}
key: discordToken
- name: CLIENT_ID
valueFrom:
secretKeyRef:
name: {{ include "gpt-survey-summarizer.fullname" . }}
key: discordClientId
- name: GUILD_ID
valueFrom:
secretKeyRef:
name: {{ include "gpt-survey-summarizer.fullname" . }}
key: discordGuildId
- name: REDIS_URL
valueFrom:
secretKeyRef:
name: {{ include "gpt-survey-summarizer.fullname" . }}
key: redisUrl
- name: SUMMARIZE_FREQUENCY_SECONDS
value: {{ .Values.config.summarizeFrequencySeconds | quote }}
{{- if .Values.bot.extraEnvVars }}
{{- toYaml .Values.bot.extraEnvVars | nindent 12 }}
{{- end }}
{{- with .Values.ports }}
ports:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.livenessProbe }}
livenessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.readinessProbe }}
readinessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
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 }}
Loading

0 comments on commit b09b3ec

Please sign in to comment.