Skip to content

Commit 49656f1

Browse files
authored
Merge pull request #554 from brianredbeard/brb-pr554
fix(helm): Improve security settings and add templated image configuration
2 parents ba148c0 + c7fb1bd commit 49656f1

File tree

7 files changed

+23
-14
lines changed

7 files changed

+23
-14
lines changed

charts/all/config-demo/templates/config-demo-deployment.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ spec:
1212
deploymentconfig: config-demo
1313
template:
1414
metadata:
15-
creationTimestamp: null
1615
labels:
1716
app: config-demo
1817
deploymentconfig: config-demo
@@ -24,8 +23,8 @@ spec:
2423
type: RuntimeDefault
2524
containers:
2625
- name: apache
27-
image: registry.access.redhat.com/ubi10/httpd-24:10.0-1755779646
28-
#imagePullPolicy: Always
26+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
27+
imagePullPolicy: {{ .Values.image.pullPolicy }}
2928
ports:
3029
- containerPort: 8080
3130
name: http
@@ -51,7 +50,7 @@ spec:
5150
memory: 256Mi
5251
securityContext:
5352
allowPrivilegeEscalation: false
54-
readOnlyRootFilesystem: false
53+
readOnlyRootFilesystem: true
5554
runAsNonRoot: true
5655
capabilities:
5756
drop:

charts/all/config-demo/templates/config-demo-route.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ spec:
1313
weight: 100
1414
wildcardPolicy: None
1515
tls:
16-
insecureEdgeTerminationPolicy: Allow
16+
insecureEdgeTerminationPolicy: Redirect
1717
termination: edge

charts/all/config-demo/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,8 @@ global:
1313

1414
clusterGroup:
1515
isHubCluster: true
16+
17+
image:
18+
repository: registry.access.redhat.com/ubi10/httpd-24
19+
tag: "10.0-1755779646"
20+
pullPolicy: IfNotPresent

charts/all/hello-world/templates/hello-world-deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ spec:
2323
type: RuntimeDefault
2424
containers:
2525
- name: apache
26-
image: registry.access.redhat.com/ubi10/httpd-24:10.0-1755779646
27-
#imagePullPolicy: Always
26+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
27+
imagePullPolicy: {{ .Values.image.pullPolicy }}
2828
ports:
2929
- containerPort: 8080
3030
name: http

charts/all/hello-world/templates/hello-world-route.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ spec:
1313
weight: 100
1414
wildcardPolicy: None
1515
tls:
16-
insecureEdgeTerminationPolicy: Allow
16+
insecureEdgeTerminationPolicy: Redirect
1717
termination: edge

charts/all/hello-world/values.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
---
22
global:
33
hubClusterDomain: hub.example.com
4-
localCluster: local.example.com
4+
localClusterDomain: local.example.com
5+
6+
image:
7+
repository: registry.access.redhat.com/ubi10/httpd-24
8+
tag: "10.0-1755779646"
9+
pullPolicy: IfNotPresent

values-standalone.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ clusterGroup:
77
- config-demo
88
- hello-world
99
subscriptions: {}
10-
projects:
10+
argoProjects:
1111
- hub
1212
- config-demo
1313
- hello-world
@@ -26,24 +26,24 @@ clusterGroup:
2626
vault:
2727
name: vault
2828
namespace: vault
29-
project: hub
29+
argoProject: hub
3030
chart: hashicorp-vault
3131
chartVersion: 0.1.*
3232
golang-external-secrets:
3333
name: golang-external-secrets
3434
namespace: golang-external-secrets
35-
project: hub
35+
argoProject: hub
3636
chart: golang-external-secrets
3737
chartVersion: 0.1.*
3838
config-demo:
3939
name: config-demo
4040
namespace: config-demo
41-
project: config-demo
41+
argoProject: config-demo
4242
path: charts/all/config-demo
4343
hello-world:
4444
name: hello-world
4545
namespace: hello-world
46-
project: hello-world
46+
argoProject: hello-world
4747
path: charts/all/hello-world
4848
imperative:
4949
# NOTE: We *must* use lists and not hashes. As hashes lose ordering once parsed by helm

0 commit comments

Comments
 (0)