Skip to content
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

chore: update securityContext #99

Merged
merged 11 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/sdfactorypipeline.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#################################################################################
# Copyright (c) 2022,2023 T-Systems International GmbH
# Copyright (c) 2022,2023 Contributors to the Eclipse Foundation
# Copyright (c) 2022,2024 T-Systems International GmbH
# Copyright (c) 2022,2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
Expand Down Expand Up @@ -51,6 +51,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

# Create SemVer or ref tags dependent of trigger event
- name: Docker meta
Expand Down Expand Up @@ -80,6 +84,7 @@ jobs:
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
# Build image for verification purposes on every trigger event. Only push if event is not a PR
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
## [Unreleased]
### Changed
- Updated Spring Boot and its transitive dependencies

- Provided multi-arch image of sdfactory
- Updated default imagePullPolicy
- Updated probes in values file so that it can be configurable
- Updated security context

## [2.1.9] - 2024-01-30

Expand Down
12 changes: 6 additions & 6 deletions charts/sdfactory/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#################################################################################
# Copyright (c) 2022,2023 T-Systems International GmbH
# Copyright (c) 2022,2023 Contributors to the Eclipse Foundation
# Copyright (c) 2022,2024 T-Systems International GmbH
# Copyright (c) 2022,2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
Expand Down Expand Up @@ -117,13 +117,13 @@ spec:
readinessProbe:
tcpSocket:
port: {{ .Values.service.targetPort }}
initialDelaySeconds: 10
periodSeconds: 10
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
livenessProbe:
tcpSocket:
port: {{ .Values.service.targetPort }}
initialDelaySeconds: 10
periodSeconds: 10
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}

resources:
{{- toYaml .Values.resources | nindent 12 }}
28 changes: 16 additions & 12 deletions charts/sdfactory/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#################################################################################
# Copyright (c) 2022,2023 T-Systems International GmbH
# Copyright (c) 2022,2023 Contributors to the Eclipse Foundation
# Copyright (c) 2022,2024 T-Systems International GmbH
# Copyright (c) 2022,2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
Expand All @@ -25,12 +25,11 @@
# -- Number of Replicas for pods
replicaCount: 1


image:
# -- Image to use for deploying an application
repository: "tractusx/sdfactory"
# -- Set the Image Pull Policy
pullPolicy: Always
pullPolicy: IfNotPresent
# -- Image tage is defined in chart appVersion.
tag: ""

Expand All @@ -49,19 +48,18 @@ serviceAccount:

podAnnotations: {}


podSecurityContext:
fsGroup: 2000

securityContext:
# -- Controls whether a process can gain more privileges
capabilities:
drop:
- ALL
allowPrivilegeEscalation: false
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
runAsUser: 1000
runAsNonRoot: true
runAsUser: 1001
runAsGroup: 3000
adkumar1 marked this conversation as resolved.
Show resolved Hide resolved

sdfactory:
secret:
Expand Down Expand Up @@ -90,7 +88,6 @@ sdfactory:
# -- Details for Clearing House Client Secret
clearingHouseClientSecret: ""


service:
# -- Type of service
type: ClusterIP
Expand Down Expand Up @@ -129,6 +126,13 @@ resources:
# -- set a minimum amount of allows memory utilization by specifying a limit on the container.
memory: 700Mi

readinessProbe:
initialDelaySeconds: 10
periodSeconds: 10
livenessProbe:
initialDelaySeconds: 10
periodSeconds: 10

autoscaling:
enabled: false
minReplicas: 1
Expand Down
Loading