Skip to content

Commit b2eba80

Browse files
committed
✨ (extraManifests) added extraManifests to deploy extra resources
Signed-off-by: Llyth <6819575+Llyth@users.noreply.github.com>
1 parent f003eb1 commit b2eba80

File tree

7 files changed

+55
-9
lines changed

7 files changed

+55
-9
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{{ range .Values.extraManifests }}
2+
---
3+
{{ tpl (toYaml .) $ }}
4+
{{ end }}

charts/crowdsec/ci/crowdsec-values.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,16 @@ appsec:
4848
outofband_rules:
4949
- crowdsecurity/crs
5050
inband_rules:
51-
- crowdsecurity/base-config
51+
- crowdsecurity/base-config
5252
- crowdsecurity/vpatch-*
5353
env:
5454
- name: COLLECTIONS
5555
value: "crowdsecurity/appsec-virtual-patching crowdsecurity/appsec-crs"
56+
57+
extraManifests:
58+
- apiVersion: v1
59+
kind: ConfigMap
60+
metadata:
61+
name: extra-configmap
62+
data:
63+
key: value
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{{ range .Values.extraManifests }}
2+
---
3+
{{ tpl (toYaml .) $ }}
4+
{{ end }}

charts/crowdsec/values.yaml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@ podAnnotations: {}
2727
# -- Labels to be added to pods
2828
podLabels: {}
2929

30+
# -- A list of extra manifests to be installed with this chart. This is useful for installing additional resources that are not part of the chart
31+
extraManifests: []
32+
# - apiVersion: v1
33+
# kind: ConfigMap
34+
# metadata:
35+
# name: extra-configmap
36+
# data:
37+
# key: value
38+
3039
# Here you can specify your own custom configuration to be loaded in crowdsec agent or lapi
3140
# Each config needs to be a multi-line using '|' in YAML specs
3241
# for the agent those configs will be loaded : parsers, scenarios, postoverflows, simulation.yaml
@@ -124,11 +133,11 @@ config:
124133
# slack.yaml: ""
125134
# http.yaml: ""
126135
# splunk.yaml: ""
127-
136+
128137
# General configuration (https://docs.crowdsec.net/docs/configuration/crowdsec_configuration/#configuration-example)
129138
# This file is only mounted in the agent pod
130139
agent_config.yaml.local: ""
131-
140+
132141
# General configuration (https://docs.crowdsec.net/docs/configuration/crowdsec_configuration/#configuration-example)
133142
# This file is only mounted in the appsec pod
134143
appsec_config.yaml.local: ""
@@ -359,7 +368,7 @@ lapi:
359368
# postStart:
360369
# exec:
361370
# command: ["/bin/sh", "-c", "echo Hello from the postStart handler > /usr/share/message"]
362-
371+
363372
# -- storeCAPICredentialsInSecret
364373
# -- If set to true, the Central API credentials will be stored in a secret (to use when lapi replicas > 1)
365374
storeCAPICredentialsInSecret: false
@@ -381,7 +390,7 @@ agent:
381390
# -- strategy for agent if isDeployment is set to true
382391
strategy:
383392
type: Recreate
384-
393+
385394
# -- add your custom ports here, by default we expose port 6060 for metrics if metrics is enabled
386395
ports: []
387396
# - name: http-datasource
@@ -598,7 +607,7 @@ appsec:
598607
# outofband_rules:
599608
# - crowdsecurity/crs
600609
# inband_rules:
601-
# - crowdsecurity/base-config
610+
# - crowdsecurity/base-config
602611
# - crowdsecurity/vpatch-*
603612
# -- appsec_configs to disable
604613
# -- appsec_rules (https://docs.crowdsec.net/docs/next/appsec/rules_syntax)
@@ -623,7 +632,7 @@ appsec:
623632
# label: "A good description of the rule"
624633
# classification:
625634
# - cve.CVE-xxxx-xxxxx
626-
# - attack.Txxxx
635+
# - attack.Txxxx
627636

628637
# -- priorityClassName for appsec pods
629638
priorityClassName: ""
@@ -673,7 +682,7 @@ appsec:
673682
tolerations: []
674683
# -- affinity for appsec
675684
affinity: {}
676-
685+
677686
# -- livenessProbe for appsec
678687
livenessProbe:
679688
httpGet:
@@ -705,7 +714,7 @@ appsec:
705714
timeoutSeconds: 5
706715
failureThreshold: 30
707716

708-
# -- Enable service monitoring (exposes "metrics" port "6060" for Prometheus and "7422" for AppSec)
717+
# -- Enable service monitoring (exposes "metrics" port "6060" for Prometheus and "7422" for AppSec)
709718
metrics:
710719
enabled: true
711720
# -- Creates a ServiceMonitor so Prometheus will monitor this service
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{{ range .Values.extraManifests }}
2+
---
3+
{{ tpl (toYaml .) $ }}
4+
{{ end }}

charts/helloworld/templates/tests/test-connection.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,11 @@ spec:
1313
command: ['wget']
1414
args: ['{{ include "helloworld.fullname" . }}:{{ .Values.service.port }}']
1515
restartPolicy: Never
16+
17+
extraManifests:
18+
- apiVersion: v1
19+
kind: ConfigMap
20+
metadata:
21+
name: extra-configmap
22+
data:
23+
key: value

charts/helloworld/values.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,15 @@ securityContext: {}
3535
# runAsNonRoot: true
3636
# runAsUser: 1000
3737

38+
# -- A list of extra manifests to be installed with this chart. This is useful for installing additional resources that are not part of the chart
39+
extraManifests: []
40+
# - apiVersion: v1
41+
# kind: ConfigMap
42+
# metadata:
43+
# name: extra-configmap
44+
# data:
45+
# key: value
46+
3847
service:
3948
name: helloworld
4049
type: ClusterIP

0 commit comments

Comments
 (0)