first commit

This commit is contained in:
2026-01-21 17:37:42 +11:00
commit bd1ed71ac4
142 changed files with 18994 additions and 0 deletions

View File

@@ -0,0 +1,150 @@
{{- if .Values.sinkAgent.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "sink-agent.appName" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "sink-agent.labels" . | nindent 4 }}
spec:
replicas: 1
strategy:
type: {{ .Values.sinkAgent.strategy.type }}
rollingUpdate:
maxSurge: {{ .Values.sinkAgent.strategy.rollingUpdate.maxSurge }}
maxUnavailable: {{ .Values.sinkAgent.strategy.rollingUpdate.maxUnavailable }}
selector:
matchLabels:
{{- include "sink-agent.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.sinkAgent.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "sink-agent.selectorLabels" . | nindent 8 }}
spec:
terminationGracePeriodSeconds: {{ .Values.sinkAgent.terminationGracePeriodSeconds }}
{{- with .Values.global.image.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.sinkAgent.serviceAccount.enabled }}
serviceAccountName: {{ include "sink-agent.serviceAccountName" . }}
{{- end }}
{{- if .Values.sinkAgent.podSecurityContextEnabled }}
securityContext:
{{- toYaml .Values.sinkAgent.podSecurityContext | nindent 8 }}
{{- end }}
dnsConfig:
options:
- name: use-vc
initContainers:
- name: {{ .Chart.Name }}-init
securityContext:
{{- toYaml .Values.sinkAgent.securityContext | nindent 12 }}
image: "{{ default .Values.global.image.repository .Values.global.alpinetools.image.repository }}/{{ .Values.global.alpinetools.image.name }}:{{ .Values.global.alpinetools.image.tag }}"
imagePullPolicy: {{ .Values.global.image.pullPolicy }}
env:
- name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
envFrom:
- configMapRef:
name: configmap-common
volumeMounts:
- name: {{ .Values.global.volumeStorageName }}
mountPath: /efs
command:
- "/bin/sh"
- "-c"
- |
{{- if .Values.valkey.internal.enabled }}
{{ include "dataplane.commonInit" (dict "context" . "valkeyOnly" true "internal" true "replicas" .Values.valkey.internal.clusterSize) | nindent 14 }}
{{- else if .Values.valkey.external.enabled }}
{{ include "dataplane.commonInit" (dict "context" . "valkeyOnly" true) | nindent 14 }}
{{- end }}
{{- if .Values.fluentBit.enabled }}
{{ include "dataplane.createLogDirectory" (dict "serviceName" "sinkagent" "efsRoot" "${efs_root}" "podName" "${POD_NAME}" "additionalPathParam" "") | nindent 14 }}
{{- end }}
{{- with .Values.global.initContainers.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
containers:
- name: {{ template "sink-agent.appName" . }}
securityContext:
{{- toYaml .Values.sinkAgent.securityContext | nindent 12 }}
image: "{{ default .Values.global.image.repository .Values.sinkAgent.image.repository }}/{{ .Values.sinkAgent.image.name }}:{{ .Values.sinkAgent.image.buildTag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.global.image.pullPolicy }}
envFrom:
- secretRef:
name: {{ .Values.common.clusterDetails.name }}
{{- if .Values.common.email_authentication }}
- secretRef:
name: {{ .Values.common.fromMail.name }}
{{- end }}
{{- if .Values.valkey.enabled }}
- secretRef:
name: {{ .Values.common.datagridCredentials.name }}
{{- end }}
- configMapRef:
name: configmap-common
- configMapRef:
name: {{ template "sink-agent.appName" . }}
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: local_ip
valueFrom:
fieldRef:
fieldPath: status.podIP
{{- with .Values.sinkAgent.env }}
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- containerPort: 5555
name: agent
- containerPort: 8080
name: internal
volumeMounts:
- name: {{ .Values.global.volumeStorageName }}
mountPath: /efs
- name: tmpdir
mountPath: /tmp
resources:
{{- toYaml .Values.sinkAgent.resources | nindent 12 }}
startupProbe:
{{ toYaml .Values.sinkAgent.startupProbe | nindent 12 }}
livenessProbe:
{{ toYaml .Values.sinkAgent.livenessProbe | nindent 12 }}
readinessProbe:
{{ toYaml .Values.sinkAgent.readinessProbe | nindent 12 }}
livenessProbe: {{- toYaml .Values.sinkAgent.livenessProbe | nindent 12 }}
startupProbe: {{- toYaml .Values.sinkAgent.startupProbe | nindent 12 }}
readinessProbe: {{- toYaml .Values.sinkAgent.readinessProbe | nindent 12 }}
volumes:
- name: tmpdir
emptyDir: {}
- name: {{ .Values.global.volumeStorageName}}
persistentVolumeClaim:
claimName: {{ .Release.Namespace }}-{{ .Values.global.claimName }}
{{- with .Values.sinkAgent.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.sinkAgent.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.sinkAgent.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}