Skip to content

Commit

Permalink
Release version RELEASE_36 (#52)
Browse files Browse the repository at this point in the history
Co-authored-by: Build Automation <[email protected]>
  • Loading branch information
acsoric and Build Automation authored Nov 28, 2024
1 parent 894898b commit 00688cc
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 10 deletions.
16 changes: 16 additions & 0 deletions helm_charts/mdcore-custom-svc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@


core_components:
md-core:
serviceSpec: # This will overwrite other service options (ports, type, etc) if configured
ports:
- name: "8008"
port: 8008
targetPort: 8008
nodePort: 30808
type: NodePort
sessionAffinity: None
externalTrafficPolicy: Local
internalTrafficPolicy: Local
selector:
app: "md-core"
4 changes: 2 additions & 2 deletions helm_charts/mdcore/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ long_description: |
type: application

version: 5.12.0
appVersion: 5.12.0
version: 5.12.1
appVersion: 5.12.1
16 changes: 16 additions & 0 deletions helm_charts/mdcore/templates/hpa-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Create an hpa for the md core deployment
{{- if $.Values.hpa.enabled -}}
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: {{ $.Values.hpa.deployment | default "md-core"}}
spec:
minReplicas: {{ $.Values.hpa.minReplicas }}
maxReplicas: {{ $.Values.hpa.maxReplicas }}
targetCPUUtilizationPercentage: {{ $.Values.hpa.cpuTargetUtilization }}
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ $.Values.hpa.deployment | default "md-core" | quote }}
{{ end }}
4 changes: 4 additions & 0 deletions helm_charts/mdcore/templates/services-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ metadata:
{{- toYaml $component.service_annotations | nindent 4 }}
{{- end }}
spec:
{{- if $component.serviceSpec }}
{{- toYaml $component.serviceSpec | nindent 2 }}
{{- else }}
ports:
{{- range $component.ports }}
- name: {{ .port | quote }}
Expand All @@ -29,6 +32,7 @@ spec:
{{- end }}
selector:
app: {{ $component.name | quote }}
{{- end }}
status:
loadBalancer: {}
{{ end }}
Expand Down
13 changes: 10 additions & 3 deletions helm_charts/mdcore/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,13 @@ env: # Set additional
MIGRATE_HISTORY: "false" # Only from version 5.10.1 See Pre-steps in docs.opswat.com
MDCORE_LICENSE_COMMENT: ""

hpa:
deployment: md-core
enabled: false
minReplicas: 1
maxReplicas: 3
cpuTargetUtilization: 85

core_components:
postgres-core:
name: postgres-core
Expand All @@ -154,7 +161,7 @@ core_components:

md-core:
name: md-core
image: opswat/metadefendercore-debian:5.12.0 # Overrides the default docker image for the MD Core service, this value can be changed if you want to set a different version of MD Core
image: opswat/metadefendercore-debian:5.12.1 # Overrides the default docker image for the MD Core service, this value can be changed if you want to set a different version of MD Core
replicas: 1 # Sets the number of replicas if you want to have multiple MD Core instances
env:
- name: MD_USER
Expand Down Expand Up @@ -251,7 +258,7 @@ core_components:
maxSurge: 0
initContainers:
- name: check-db-ready
image: opswat/metadefendercore-debian:5.12.0
image: opswat/metadefendercore-debian:5.12.1
imagePullPolicy: IfNotPresent
envFrom:
- configMapRef:
Expand Down Expand Up @@ -283,7 +290,7 @@ core_components:
defaultMode: 0777
initContainers:
- name: wait-for-hub-services
image: opswat/metadefendercore-debian:5.12.0
image: opswat/metadefendercore-debian:5.12.1
imagePullPolicy: IfNotPresent
command: [ '/wait-for-hub-services.sh' ]
volumeMounts:
Expand Down
19 changes: 18 additions & 1 deletion helm_charts/mdss-README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ helm install my_mdss ./mdss

### From the GitHub helm repo
The installation can also be done using the helm repo which is updated on each release:
```console
```console
helm repo add mdk8s https://opswat.github.io/metadefender-k8s/
helm repo update mdk8s
helm install my_mdss mdk8s/metadefender_storage_security
Expand All @@ -41,6 +41,23 @@ Currently supported modules:

The `debug` module is reserved for deploying debug and maintenance pods.

## Upgrading
The helm upgrade command can be used to upgrade the mdss services using the latest helm chart:
```
helm upgrade my_mdss <path_to_chart>
```
### Database upgrades
**This step is not required when using an external, managed database**

The helm chart is configured by default to use the latest compatible version of MongoDB. Before upgrading an existing deployment with persistent database, make sure that the database is upgraded to the specific version for the coresponding release:
- MDSS 3.5.1 - MongoDB 6.0

The MongoDB upgrade procedure needs to be done sequentially following all intermediate releases.

The following components are non-persistent and can be updated to the latest compatible version by setting the respective image tag:
- RabbitMQ: rabbitmq:3.11.4-management
- Redis Cache: redis:7.0

## Operational Notes
The entire deployment can be customized by overwriting the chart's default configuration values. Here are a few point to look out for when changing these values:
- By default, a MongoDB database is deployed alongside the MDSS deployment
Expand Down
4 changes: 2 additions & 2 deletions helm_charts/mdss/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ long_description: |
type: application

version: 3.5.0
appVersion: 3.5.0
version: 3.5.1
appVersion: 3.5.1
4 changes: 4 additions & 0 deletions helm_charts/mdss/templates/services-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ metadata:
{{- toYaml $component.service_annotations | nindent 4 }}
{{- end }}
spec:
{{- if $component.serviceSpec }}
{{- toYaml $component.serviceSpec | nindent 2 }}
{{- else }}
ports:
{{- range $component.ports }}
- name: {{ .port | quote }}
Expand All @@ -29,6 +32,7 @@ spec:
{{- end }}
selector:
app: {{ $component.name | quote }}
{{- end }}
status:
loadBalancer: {}
{{ end }}
Expand Down
4 changes: 2 additions & 2 deletions helm_charts/mdss/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ mdss-common-environment:
RABBITMQ_SCANNING_PREFETCH_COUNT: "10"

HTTPS_ACTIVE: "no"
BRANCH: "3.5.0" # Set MDSS version (image tag)
BRANCH: "3.5.1" # Set MDSS version (image tag)
# These variables can be changed to reveal debug information in the application
LOG_LEVEL: "4"
APP_LOG_LEVEL: "INFORMATION"
Expand Down Expand Up @@ -223,7 +223,7 @@ mdssHostAliases: # Custom hosts entries
mdss_components:
mongodb:
name: mongodb
image: mongo:3.6
image: mongo:6.0
ports:
- port: 27017
persistentDir: /data/db
Expand Down

0 comments on commit 00688cc

Please sign in to comment.