-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
395 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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 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,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/ |
This file contains 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,6 @@ | ||
dependencies: | ||
- name: common | ||
repository: oci://registry-1.docker.io/bitnamicharts | ||
version: 2.13.3 | ||
digest: sha256:a644d1db2f5945323d6ea7c472e2b61d6667452d160558e3c0d57eadf8dffdf2 | ||
generated: "2023-11-07T13:52:58.386511+02:00" |
This file contains 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,17 @@ | ||
apiVersion: v2 | ||
name: dawn-patrol | ||
description: A Helm chart to deploy DawnPatrol on Kubernetes | ||
|
||
sources: | ||
- https://github.com/didx-xyz/dawn-patrol | ||
|
||
type: application | ||
|
||
version: 0.1.0 | ||
appVersion: latest | ||
|
||
dependencies: | ||
# https://github.com/bitnami/charts/tree/main/bitnami/common | ||
- name: common | ||
version: 2.13.3 | ||
repository: oci://registry-1.docker.io/bitnamicharts |
Empty file.
This file contains 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,62 @@ | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "dawn-patrol.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 "dawn-patrol.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 "dawn-patrol.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "dawn-patrol.labels" -}} | ||
helm.sh/chart: {{ include "dawn-patrol.chart" . }} | ||
{{ include "dawn-patrol.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "dawn-patrol.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "dawn-patrol.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "dawn-patrol.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create }} | ||
{{- default (include "dawn-patrol.fullname" .) .Values.serviceAccount.name }} | ||
{{- else }} | ||
{{- default "default" .Values.serviceAccount.name }} | ||
{{- end }} | ||
{{- end }} |
This file contains 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,79 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "dawn-patrol.fullname" . }} | ||
labels: | ||
{{- include "dawn-patrol.labels" . | nindent 4 }} | ||
{{- with .Values.deploymentLabels }} | ||
{{- include "common.tplvalues.render" (dict "value" . "context" $) | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
{{- if not .Values.autoscaling.enabled }} | ||
replicas: {{ .Values.replicaCount }} | ||
{{- end }} | ||
selector: | ||
matchLabels: | ||
{{- include "dawn-patrol.selectorLabels" . | nindent 6 }} | ||
template: | ||
metadata: | ||
annotations: | ||
checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} | ||
{{- with .Values.podAnnotations }} | ||
{{- include "common.tplvalues.render" (dict "value" . "context" $) | nindent 8 }} | ||
{{- end }} | ||
labels: | ||
{{- include "dawn-patrol.labels" . | nindent 8 }} | ||
{{- with .Values.podLabels }} | ||
{{- include "common.tplvalues.render" (dict "value" . "context" $) | nindent 8 }} | ||
{{- end }} | ||
spec: | ||
{{- with .Values.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
serviceAccountName: {{ include "dawn-patrol.serviceAccountName" . }} | ||
securityContext: | ||
{{- toYaml .Values.podSecurityContext | nindent 8 }} | ||
containers: | ||
- name: dawn-patrol | ||
securityContext: | ||
{{- toYaml .Values.securityContext | nindent 12 }} | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
envFrom: | ||
- secretRef: | ||
name: {{ include "dawn-patrol.fullname" . }} | ||
{{- with .Values.extraEnv }} | ||
env: | ||
{{- range $k,$v := . }} | ||
- name: {{ $k }} | ||
{{- $type := printf "%s" (typeOf $v) }} | ||
{{- if or (eq $type "string") (eq $type "float64") (eq $type "bool") }} | ||
value: {{ tpl (toString $v) $ | quote }} | ||
{{- else }} | ||
{{- tpl (toYaml $v) $ | nindent 14 }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
resources: | ||
{{- toYaml .Values.resources | nindent 12 }} | ||
{{- with .Values.volumeMounts }} | ||
volumeMounts: | ||
{{- toYaml . | nindent 12 }} | ||
{{- end }} | ||
{{- with .Values.volumes }} | ||
volumes: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.affinity }} | ||
affinity: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} |
This file contains 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,32 @@ | ||
{{- if .Values.autoscaling.enabled }} | ||
apiVersion: autoscaling/v2 | ||
kind: HorizontalPodAutoscaler | ||
metadata: | ||
name: {{ include "dawn-patrol.fullname" . }} | ||
labels: | ||
{{- include "dawn-patrol.labels" . | nindent 4 }} | ||
spec: | ||
scaleTargetRef: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: {{ include "dawn-patrol.fullname" . }} | ||
minReplicas: {{ .Values.autoscaling.minReplicas }} | ||
maxReplicas: {{ .Values.autoscaling.maxReplicas }} | ||
metrics: | ||
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }} | ||
- type: Resource | ||
resource: | ||
name: cpu | ||
target: | ||
type: Utilization | ||
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} | ||
{{- end }} | ||
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} | ||
- type: Resource | ||
resource: | ||
name: memory | ||
target: | ||
type: Utilization | ||
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} | ||
{{- end }} | ||
{{- end }} |
This file contains 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,10 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ include "dawn-patrol.fullname" . }} | ||
labels: | ||
{{- include "dawn-patrol.labels" . | nindent 4 }} | ||
stringData: | ||
{{- range $k,$v := .Values.secretEnv }} | ||
{{ $k }}: {{ tpl (toString $v) $ | quote }} | ||
{{- end }} |
This file contains 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,13 @@ | ||
{{- if .Values.serviceAccount.create -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ include "dawn-patrol.serviceAccountName" . }} | ||
labels: | ||
{{- include "dawn-patrol.labels" . | nindent 4 }} | ||
{{- with .Values.serviceAccount.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
automountServiceAccountToken: {{ .Values.serviceAccount.automount }} | ||
{{- end }} |
This file contains 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,104 @@ | ||
# Default values for dawn-patrol. | ||
# This is a YAML-formatted file. | ||
# Declare variables to be passed into your templates. | ||
|
||
replicaCount: 1 | ||
|
||
nameOverride: "" | ||
fullnameOverride: "" | ||
|
||
image: | ||
repository: ghcr.io/didx-xyz/dawn-patrol | ||
pullPolicy: IfNotPresent | ||
# Overrides the image tag whose default is the chart appVersion. | ||
tag: latest | ||
|
||
imagePullSecrets: [] | ||
|
||
serviceAccount: | ||
# Specifies whether a service account should be created | ||
create: true | ||
# Automatically mount a ServiceAccount's API credentials? | ||
automount: 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: "" | ||
|
||
deploymentLabels: | ||
# tags.datadoghq.com/env: <env> | ||
tags.datadoghq.com/service: '{{ include "dawn-patrol.fullname" . }}' | ||
tags.datadoghq.com/version: '{{ .Values.image.tag }}' | ||
podAnnotations: | ||
# gcr.io/datadoghq/dd-lib-java-init | ||
admission.datadoghq.com/java-lib.version: v1.22.0 | ||
podLabels: | ||
# tags.datadoghq.com/env: <env> | ||
tags.datadoghq.com/service: '{{ include "dawn-patrol.fullname" . }}' | ||
tags.datadoghq.com/version: '{{ .Values.image.tag }}' | ||
admission.datadoghq.com/enabled: 'false' | ||
|
||
podSecurityContext: | ||
fsGroup: 1000 | ||
|
||
securityContext: | ||
# readOnlyRootFilesystem: true | ||
runAsNonRoot: true | ||
runAsUser: 1000 | ||
# capabilities: | ||
# drop: | ||
# - ALL | ||
|
||
extraEnv: | ||
DD_LOGS_INJECTION: true | ||
# DD_TRACE_SAMPLE_RATE: 1 | ||
DD_PROFILING_ENABLED: false | ||
DD_RUNTIME_METRICS_ENABLED: true | ||
DD_APPSEC_ENABLED: false | ||
DD_IAST_ENABLED: false | ||
# FOO: bar | ||
# MY_POD_IP: | ||
# valueFrom: | ||
# metadata: | ||
# name: status.podIP | ||
# fieldPath: status.podIP | ||
secretEnv: | ||
HF_API_KEY: "" | ||
OPENAI_TOKEN: "" | ||
|
||
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:'. | ||
# requests: | ||
# cpu: 100m | ||
# memory: 128Mi | ||
# limits: | ||
# cpu: 100m | ||
# memory: 128Mi | ||
|
||
autoscaling: | ||
enabled: false | ||
minReplicas: 1 | ||
maxReplicas: 100 | ||
targetCPUUtilizationPercentage: 80 | ||
# targetMemoryUtilizationPercentage: 80 | ||
|
||
# Additional volumes on the output Deployment definition. | ||
volumes: [] | ||
# - name: foo | ||
# secret: | ||
# secretName: mysecret | ||
# optional: false | ||
|
||
# Additional volumeMounts on the output Deployment definition. | ||
volumeMounts: [] | ||
# - name: foo | ||
# mountPath: "/etc/foo" | ||
# readOnly: true | ||
|
||
nodeSelector: {} | ||
tolerations: [] | ||
affinity: {} |
Oops, something went wrong.