Skip to content

Commit

Permalink
fix kubernetes vulnerabilities
Browse files Browse the repository at this point in the history
On-behalf-of: @SAP angel.kafazov@sap.com
Signed-off-by: Angel Kafazov <akafazov@cst-bg.net>
  • Loading branch information
akafazov committed Feb 13, 2025
1 parent 234b1d6 commit ade479f
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 8 deletions.
4 changes: 4 additions & 0 deletions .kube-linter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
checks:
ignorePaths:
- charts/keycloak/charts/keycloak/**
- charts/openmfp/charts/**
1 change: 1 addition & 0 deletions charts/example-content/templates/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ metadata:
name: {{ include "common.entity.name" . }}
labels:
app: {{ include "common.entity.name" . }}
namespace: {{ .Release.Namespace }}
spec:
strategy:
rollingUpdate:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ matches the snapshot:
labels:
app: RELEASE-NAME-example-content
name: RELEASE-NAME-example-content
namespace: NAMESPACE
spec:
revisionHistoryLimit: 3
selector:
Expand Down Expand Up @@ -170,6 +171,7 @@ matches the snapshot (internalUrl):
labels:
app: RELEASE-NAME-example-content
name: RELEASE-NAME-example-content
namespace: NAMESPACE
spec:
revisionHistoryLimit: 3
selector:
Expand Down
6 changes: 3 additions & 3 deletions charts/extension-manager-operator/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ dependencies:
version: 0.2.0
- name: common
repository: oci://ghcr.io/openmfp/helm-charts
version: 0.2.8
digest: sha256:00b76610b045f6ca44675ce287d551823ca67c7bac847bebdb5ae5c3fed0a318
generated: "2025-02-10T18:48:47.676919501Z"
version: 0.2.10
digest: sha256:c8a77b63c1295e33c8d4ac0cc03bec78b6e57d7c52681a673427eb3e40371da1
generated: "2025-02-13T13:12:03.358427145+02:00"
4 changes: 2 additions & 2 deletions charts/extension-manager-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ apiVersion: v2
name: extension-manager-operator
description: A Helm chart for extension-manager-operator which manages resources like ContentConfigurations and exposes REST `/validate` endpoint
type: application
version: 0.23.5
version: 0.24.0
appVersion: "0.116.0"
dependencies:
- name: extension-manager-operator-crds
version: 0.2.0
condition: crds.enabled
repository: oci://ghcr.io/openmfp/helm-charts
- name: common
version: 0.2.8
version: 0.2.10
repository: oci://ghcr.io/openmfp/helm-charts
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 3 additions & 0 deletions charts/extension-manager-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "common.entity.name" . }}
namespace: {{ .Release.Namespace }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
Expand Down Expand Up @@ -34,6 +35,7 @@ spec:
image: {{ .Values.image.name }}:{{ .Chart.AppVersion }}
imagePullPolicy: {{ include "common.imagePullPolicy" . }}
name: manager
{{- include "common.container.securityContext" . | nindent 10 }}
ports:
{{- include "common.PortsMetricsHealth" . | nindent 10 -}}
{{- include "common.operatorHealthAndReadyness" . | nindent 10 -}}
Expand All @@ -43,6 +45,7 @@ spec:
image: {{ .Values.image.name }}:{{ .Chart.AppVersion }}
imagePullPolicy: {{ include "common.imagePullPolicy" . }}
name: server
{{- include "common.resources" . | nindent 10 }}
{{- include "common.container.securityContext" . | nindent 10 }}
ports:
- containerPort: {{ .Values.validationServer.port }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "common.entity.name" . }}
namespace: {{ .Release.Namespace }}
{{- include "common.imagePullSecret" . }}
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ operator match the snapshot:
kind: Deployment
metadata:
name: extension-manager-operator
namespace: NAMESPACE
spec:
revisionHistoryLimit: 3
selector:
Expand Down Expand Up @@ -117,6 +118,11 @@ operator match the snapshot:
requests:
cpu: 40m
memory: 50Mi
securityContext:
readOnlyRootFilesystem: true
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
startupProbe:
failureThreshold: 30
httpGet:
Expand Down Expand Up @@ -148,6 +154,13 @@ operator match the snapshot:
port: 8081
initialDelaySeconds: 5
periodSeconds: 10
resources:
limits:
cpu: 260m
memory: 512Mi
requests:
cpu: 40m
memory: 50Mi
securityContext:
readOnlyRootFilesystem: true
runAsNonRoot: true
Expand All @@ -172,3 +185,4 @@ operator match the snapshot:
kind: ServiceAccount
metadata:
name: extension-manager-operator
namespace: NAMESPACE
3 changes: 0 additions & 3 deletions charts/extension-manager-operator/tests/deployment_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ tests:
- name: my-secret
- it: with validationServer
template: deployment.yaml
set:
validationServer:
enabled: true
asserts:
- equal:
path: spec.template.spec.containers[1].name
Expand Down

0 comments on commit ade479f

Please sign in to comment.