-
Notifications
You must be signed in to change notification settings - Fork 7
322 task create helm subchart for rspamd service #324
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
Draft
Aravinda-HWK
wants to merge
9
commits into
LSFLK:main
Choose a base branch
from
Aravinda-HWK:322-task-create-helm-subchart-for-rspamd-service
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.
Draft
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
9e9ff53
Create Helm subchart for OpenDKIM service with configuration and tempβ¦
Aravinda-HWK ed4fccc
Refactor OpenDKIM Helm chart: remove PVC template and adjust workloadβ¦
Aravinda-HWK 103fb91
feat: Add Redis and Rspamd Helm charts with templates and configurations
Aravinda-HWK 3421095
feat: Update Rspamd and Unbound Helm charts for improved connectivityβ¦
Aravinda-HWK 873c7af
Create Helm subchart for OpenDKIM service with configuration and tempβ¦
Aravinda-HWK 007b08a
Create Helm subchart for OpenDKIM service with configuration and tempβ¦
Aravinda-HWK ad74d7f
Refactor OpenDKIM Helm chart: remove PVC template and adjust workloadβ¦
Aravinda-HWK 6f6445f
chore: remove ClamAV Helm chart as part of cleanup
Aravinda-HWK c24362b
chore: remove emptyDir volume from OpenDKIM StatefulSet workload
Aravinda-HWK 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
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 @@ | ||
| apiVersion: v2 | ||
| name: redis | ||
| description: Redis in-memory data store for rspamd backend | ||
| type: application | ||
| version: 0.1.0 | ||
| appVersion: "7-alpine" | ||
| keywords: | ||
| - redis | ||
| - cache | ||
| - rspamd | ||
| maintainers: | ||
| - name: Silver Team |
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,48 @@ | ||
| # Redis Helm Chart | ||
|
|
||
| Redis in-memory data store for rspamd backend storage. | ||
|
|
||
| ## Installation | ||
|
|
||
| ```bash | ||
| helm install redis ./redis \ | ||
| --set persistence.enabled=true \ | ||
| --set persistence.size=1Gi | ||
| ``` | ||
|
|
||
| ## Configuration | ||
|
|
||
| Key values: | ||
|
|
||
| | Key | Type | Default | Description | | ||
| |-----|------|---------|-------------| | ||
| | `replicaCount` | int | `1` | Number of replicas (always 1 for StatefulSet) | | ||
| | `image.repository` | string | `redis` | Image repository | | ||
| | `image.tag` | string | `7-alpine` | Image tag | | ||
| | `persistence.enabled` | bool | `true` | Enable persistent volume | | ||
| | `persistence.size` | string | `1Gi` | Persistent volume size | | ||
| | `service.port` | int | `6379` | Service port | | ||
| | `securityContext.fsGroup` | int | `999` | Redis user UID | | ||
|
|
||
| ## Usage | ||
|
|
||
| Access Redis within the cluster: | ||
|
|
||
| ```bash | ||
| redis-cli -h <release-name>-redis -p 6379 | ||
| ``` | ||
|
|
||
| For port-forward: | ||
|
|
||
| ```bash | ||
| kubectl port-forward svc/<release-name>-redis 6379:6379 | ||
| redis-cli -h localhost -p 6379 | ||
| ``` | ||
|
|
||
| ## Persistence | ||
|
|
||
| Redis data is stored in `/data` via `volumeClaimTemplates`. The PVC persists across pod restarts. | ||
|
|
||
| ## Dependencies | ||
|
|
||
| Redis chart has no external dependencies. |
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,60 @@ | ||
| {{/* | ||
| Expand the name of the chart. | ||
| */}} | ||
| {{- define "redis.name" -}} | ||
| {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Create a default fully qualified app name. | ||
| */}} | ||
| {{- define "redis.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 "redis.chart" -}} | ||
| {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Common labels | ||
| */}} | ||
| {{- define "redis.labels" -}} | ||
| helm.sh/chart: {{ include "redis.chart" . }} | ||
| {{ include "redis.selectorLabels" . }} | ||
| {{- if .Chart.AppVersion }} | ||
| app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
| {{- end }} | ||
| app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Selector labels | ||
| */}} | ||
| {{- define "redis.selectorLabels" -}} | ||
| app.kubernetes.io/name: {{ include "redis.name" . }} | ||
| app.kubernetes.io/instance: {{ .Release.Name }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Create the name of the service account to use | ||
| */}} | ||
| {{- define "redis.serviceAccountName" -}} | ||
| {{- if .Values.serviceAccount.create }} | ||
| {{- default (include "redis.fullname" .) .Values.serviceAccount.name }} | ||
| {{- else }} | ||
| {{- default "default" .Values.serviceAccount.name }} | ||
| {{- 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,19 @@ | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: {{ include "redis.fullname" . }} | ||
| labels: | ||
| {{- include "redis.labels" . | nindent 4 }} | ||
| {{- with .Values.service.annotations }} | ||
| annotations: | ||
| {{- toYaml . | nindent 4 }} | ||
| {{- end }} | ||
| spec: | ||
| type: {{ .Values.service.type }} | ||
| ports: | ||
| - port: {{ .Values.service.port }} | ||
| targetPort: {{ .Values.service.targetPort }} | ||
| protocol: TCP | ||
| name: redis | ||
| selector: | ||
| {{- include "redis.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 "redis.serviceAccountName" . }} | ||
| labels: | ||
| {{- include "redis.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,71 @@ | ||
| apiVersion: apps/v1 | ||
| kind: StatefulSet | ||
| metadata: | ||
| name: {{ include "redis.fullname" . }} | ||
| labels: | ||
| {{- include "redis.labels" . | nindent 4 }} | ||
| spec: | ||
| serviceName: {{ include "redis.fullname" . }} | ||
| replicas: {{ .Values.replicaCount }} | ||
| selector: | ||
| matchLabels: | ||
| {{- include "redis.selectorLabels" . | nindent 6 }} | ||
| template: | ||
| metadata: | ||
| {{- with .Values.podAnnotations }} | ||
| annotations: | ||
| {{- toYaml . | nindent 8 }} | ||
| {{- end }} | ||
| labels: | ||
| {{- include "redis.selectorLabels" . | nindent 8 }} | ||
| spec: | ||
| {{- with .Values.imagePullSecrets }} | ||
| imagePullSecrets: | ||
| {{- toYaml . | nindent 8 }} | ||
| {{- end }} | ||
| serviceAccountName: {{ include "redis.serviceAccountName" . }} | ||
| securityContext: | ||
| {{- toYaml .Values.podSecurityContext | nindent 8 }} | ||
| containers: | ||
| - name: redis | ||
| securityContext: | ||
| {{- toYaml .Values.securityContext | nindent 12 }} | ||
| image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" | ||
| imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
| ports: | ||
| - name: redis | ||
| containerPort: 6379 | ||
| protocol: TCP | ||
| livenessProbe: | ||
| {{- toYaml .Values.livenessProbe | nindent 12 }} | ||
| readinessProbe: | ||
| {{- toYaml .Values.readinessProbe | nindent 12 }} | ||
| resources: | ||
| {{- toYaml .Values.resources | nindent 12 }} | ||
| volumeMounts: | ||
| - name: data | ||
| mountPath: {{ .Values.persistence.mountPath }} | ||
| {{- with .Values.nodeSelector }} | ||
| nodeSelector: | ||
| {{- toYaml . | nindent 8 }} | ||
| {{- end }} | ||
| {{- with .Values.affinity }} | ||
| affinity: | ||
| {{- toYaml . | nindent 8 }} | ||
| {{- end }} | ||
| {{- with .Values.tolerations }} | ||
| tolerations: | ||
| {{- toYaml . | nindent 8 }} | ||
| {{- end }} | ||
| volumeClaimTemplates: | ||
| - metadata: | ||
| name: data | ||
| spec: | ||
| {{- if .Values.persistence.storageClass }} | ||
| storageClassName: {{ .Values.persistence.storageClass }} | ||
| {{- end }} | ||
| accessModes: | ||
| - {{ .Values.persistence.accessMode }} | ||
| resources: | ||
| requests: | ||
| storage: {{ .Values.persistence.size }} |
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,73 @@ | ||
| replicaCount: 1 | ||
|
|
||
| image: | ||
| repository: redis | ||
| tag: "7-alpine" | ||
| pullPolicy: IfNotPresent | ||
|
|
||
| imagePullSecrets: [] | ||
|
|
||
| nameOverride: "" | ||
| fullnameOverride: "" | ||
|
|
||
| serviceAccount: | ||
| create: true | ||
| annotations: {} | ||
| name: "" | ||
|
|
||
| podAnnotations: {} | ||
|
|
||
| podSecurityContext: | ||
| fsGroup: 999 | ||
| runAsUser: 999 | ||
| runAsNonRoot: true | ||
|
|
||
| securityContext: | ||
| allowPrivilegeEscalation: false | ||
| capabilities: | ||
| drop: | ||
| - ALL | ||
| readOnlyRootFilesystem: false | ||
|
|
||
| service: | ||
| type: ClusterIP | ||
| port: 6379 | ||
| targetPort: 6379 | ||
| annotations: {} | ||
|
|
||
| resources: | ||
| limits: | ||
| cpu: 500m | ||
| memory: 512Mi | ||
| requests: | ||
| cpu: 100m | ||
| memory: 128Mi | ||
|
|
||
| nodeSelector: {} | ||
|
|
||
| tolerations: [] | ||
|
|
||
| affinity: {} | ||
|
|
||
| persistence: | ||
| enabled: true | ||
| storageClass: "" | ||
| accessMode: ReadWriteOnce | ||
| size: 1Gi | ||
| mountPath: /data | ||
|
|
||
| livenessProbe: | ||
| tcpSocket: | ||
| port: 6379 | ||
| initialDelaySeconds: 30 | ||
| periodSeconds: 10 | ||
| timeoutSeconds: 5 | ||
| failureThreshold: 3 | ||
|
|
||
| readinessProbe: | ||
| tcpSocket: | ||
| port: 6379 | ||
| initialDelaySeconds: 10 | ||
| periodSeconds: 10 | ||
| timeoutSeconds: 5 | ||
| failureThreshold: 3 | ||
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,14 @@ | ||
| apiVersion: v2 | ||
| name: rspamd | ||
| description: Rspamd spam/malware filtering engine for mail processing | ||
| type: application | ||
| version: 0.1.0 | ||
| appVersion: "latest" | ||
| keywords: | ||
| - rspamd | ||
| - spam | ||
| - filtering | ||
| - antivirus | ||
| - milter | ||
| maintainers: | ||
| - name: Silver Team |
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.
The Redis chart is implemented as a basic StatefulSet without clustering or sentinel logic. If
replicaCountis set to a value greater than 1, it will result in multiple independent Redis instances, which will cause data inconsistency for Rspamd. This value should remain 1 unless a proper high-availability configuration is implemented.