Skip to content
This repository has been archived by the owner on Aug 19, 2024. It is now read-only.

Fix sonarlint vulnerabilities (initial) #185

Merged
merged 3 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .rhdh/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

#@follow_tag(registry.redhat.io/rhel9/go-toolset:latest)
FROM registry.access.redhat.com/ubi9/go-toolset:1.20.10-6 as builder
FROM registry.access.redhat.com/ubi9/go-toolset:1.20.10-6 AS builder
# hadolint ignore=DL3002
USER 0
ENV GOPATH=/go/
Expand Down
12 changes: 9 additions & 3 deletions config/manager/default-config/db-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ spec:
janus-idp.io/app: backstage-psql-cr1 # placeholder for 'backstage-psql-<cr-name>'
name: backstage-db-cr1 # placeholder for 'backstage-psql-<cr-name>'
spec:
persistentVolumeClaimRetentionPolicy:
whenDeleted: Retain
whenScaled: Retain
automountServiceAccountToken: false
## https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/
## The optional .spec.persistentVolumeClaimRetentionPolicy field controls if and how PVCs are deleted during the lifecycle of a StatefulSet.
## You must enable the StatefulSetAutoDeletePVC feature gate on the API server and the controller manager to use this field.
# persistentVolumeClaimRetentionPolicy:
# whenDeleted: Retain
# whenScaled: Retain
containers:
- env:
- name: POSTGRESQL_PORT_NUMBER
Expand Down Expand Up @@ -73,7 +77,9 @@ spec:
cpu: 250m
memory: 256Mi
limits:
cpu: 250m
memory: 1024Mi
ephemeral-storage: 20Mi
volumeMounts:
- mountPath: /dev/shm
name: dshm
Expand Down
15 changes: 12 additions & 3 deletions config/manager/default-config/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
labels:
janus-idp.io/app: # placeholder for 'backstage-<cr-name>'
spec:
# serviceAccountName: default
automountServiceAccountToken: false
volumes:
- ephemeral:
volumeClaimTemplate:
Expand Down Expand Up @@ -47,7 +47,11 @@ spec:
readOnly: true
subPath: .npmrc
workingDir: /opt/app-root/src

resources:
limits:
cpu: 1000m
memory: 2.5Gi
ephemeral-storage: 5Gi
containers:
- name: backstage-backend
image: <RELATED_IMAGE_backstage> # will be replaced with the actual image quay.io/janus-idp/backstage-showcase:next
Expand Down Expand Up @@ -88,4 +92,9 @@ spec:
# name: backstage-secrets
volumeMounts:
- mountPath: /opt/app-root/src/dynamic-plugins-root
name: dynamic-plugins-root
name: dynamic-plugins-root
resources:
rm3l marked this conversation as resolved.
Show resolved Hide resolved
limits:
cpu: 1000m
memory: 2.5Gi
ephemeral-storage: 5Gi
3 changes: 3 additions & 0 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ spec:
labels:
control-plane: controller-manager
spec:
# Required because the operator does not work without a Service Account Token
automountServiceAccountToken: true # NOSONAR
# TODO(user): Uncomment the following code to configure the nodeAffinity expression
# according to the platforms which are supported by your solution.
# It is considered best practice to support multiple architectures. You can
Expand Down Expand Up @@ -100,6 +102,7 @@ spec:
limits:
cpu: 500m
memory: 128Mi
ephemeral-storage: 20Mi
requests:
cpu: 10m
memory: 64Mi
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

#@follow_tag(registry.redhat.io/rhel9/go-toolset:latest)
FROM registry.access.redhat.com/ubi9/go-toolset:1.20.10-6 as builder
FROM registry.access.redhat.com/ubi9/go-toolset:1.20.10-6 AS builder
# hadolint ignore=DL3002
USER 0
ENV GOPATH=/go/
Expand Down
Loading