mirror of
https://github.com/shadoll/helm-charts.git
synced 2026-11-26 19:30:47 +00:00
Add probara and probara-worker charts
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
125982eda0
commit
4d632dfd58
35 files changed
+3314
No files matched your search
@@ -0,0 +1,9 @@
|
||||
apiVersion: v2
|
||||
name: probara-worker
|
||||
description: Probara check worker for a remote location (connects to the platform over NATS only)
|
||||
type: application
|
||||
version: 1.0.0
|
||||
appVersion: "1.0.0"
|
||||
annotations:
|
||||
version-source: github-release:yassinebenameur/probara
|
||||
version-pattern: "s|^v||"
|
||||
@@ -0,0 +1,107 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ .Release.Name }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ .Chart.Name }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
app.kubernetes.io/component: worker
|
||||
annotations:
|
||||
version-source: {{ index .Chart.Annotations "version-source" | quote }}
|
||||
version-pattern: {{ index .Chart.Annotations "version-pattern" | quote }}
|
||||
spec:
|
||||
replicas: {{ .Values.replicas }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ .Release.Name }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ .Release.Name }}
|
||||
spec:
|
||||
securityContext:
|
||||
fsGroup: 1000
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1000
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: worker
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
command: ["./worker"]
|
||||
ports:
|
||||
- name: metrics
|
||||
containerPort: {{ .Values.metricsPort }}
|
||||
protocol: TCP
|
||||
- name: http
|
||||
containerPort: {{ .Values.httpPort }}
|
||||
protocol: TCP
|
||||
env:
|
||||
- name: SERVICE_NAME
|
||||
value: worker
|
||||
- name: HTTP_PORT
|
||||
value: {{ .Values.httpPort | quote }}
|
||||
- name: METRICS_PORT
|
||||
value: {{ .Values.metricsPort | quote }}
|
||||
- name: LOG_LEVEL
|
||||
value: {{ .Values.logLevel | quote }}
|
||||
- name: NATS_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ required "existingSecret is required" .Values.existingSecret }}
|
||||
key: {{ .Values.natsUrlKey }}
|
||||
- name: LOCATION_CREDENTIAL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.existingSecret }}
|
||||
key: {{ .Values.credentialKey }}
|
||||
- name: WORKER_LOCATION_ID
|
||||
value: {{ required "locationId is required" .Values.locationId | quote }}
|
||||
- name: CHECK_JOB_STREAM
|
||||
value: {{ .Values.checkJobStream | quote }}
|
||||
- name: CHECK_JOB_SUBJECT
|
||||
value: {{ .Values.checkJobSubject | quote }}
|
||||
# The scheduler pre-creates this per-location durable consumer.
|
||||
- name: NATS_CONSUMER_NAME
|
||||
value: {{ .Values.consumerName | quote }}
|
||||
- name: WORKER_CONCURRENCY
|
||||
value: {{ .Values.concurrency | quote }}
|
||||
{{- with .Values.extraEnv }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: metrics
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 3
|
||||
failureThreshold: 3
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /readyz
|
||||
port: metrics
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 3
|
||||
failureThreshold: 3
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
readOnlyRootFilesystem: false
|
||||
@@ -0,0 +1,22 @@
|
||||
{{- if .Values.meshService.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-mesh
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ .Chart.Name }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- with .Values.meshService.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.meshService.type }}
|
||||
selector:
|
||||
app: {{ .Release.Name }}
|
||||
ports:
|
||||
- name: http
|
||||
port: {{ .Values.httpPort }}
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
{{- end }}
|
||||
@@ -0,0 +1,50 @@
|
||||
# Probara location worker. Runs checks from this cluster and sends results to
|
||||
# the platform over NATS. It needs no database access.
|
||||
image:
|
||||
repository: ghcr.io/yassinebenameur/probara-worker
|
||||
# Empty = Chart.AppVersion
|
||||
tag: ""
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
replicas: 1
|
||||
concurrency: "10"
|
||||
logLevel: info
|
||||
|
||||
httpPort: 8080
|
||||
metricsPort: 9090
|
||||
|
||||
# Location UUID from the platform's Locations page
|
||||
locationId: ""
|
||||
|
||||
# Secret with the keys below, from the location deploy info of the platform:
|
||||
# nats_url authenticated NATS URL
|
||||
# credential LOCATION_CREDENTIAL
|
||||
existingSecret: ""
|
||||
natsUrlKey: nats_url
|
||||
credentialKey: credential
|
||||
|
||||
# Must match the platform (scheduler and worker values)
|
||||
checkJobStream: check-jobs
|
||||
checkJobSubject: check.job
|
||||
consumerName: check-workers
|
||||
|
||||
# Expose the mesh echo port so other locations can probe this one
|
||||
meshService:
|
||||
enabled: false
|
||||
type: ClusterIP
|
||||
annotations: {}
|
||||
|
||||
# Additional environment variables (Kubernetes EnvVar entries)
|
||||
extraEnv: []
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: "100m"
|
||||
memory: "128Mi"
|
||||
limits:
|
||||
cpu: "500m"
|
||||
memory: "256Mi"
|
||||
|
||||
nodeSelector: {}
|
||||
tolerations: []
|
||||
affinity: {}
|
||||
Reference in new issue
Block a user