-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from crowdsecurity/crowdsec/handle_custom_config
crowdsec: handle custom configuration in values
- Loading branch information
Showing
11 changed files
with
454 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ jobs: | |
uses: helm/[email protected] | ||
|
||
- name: Run chart-testing (lint) | ||
run: helm lint ./charts/crowdsec/ | ||
run: helm lint ./charts/crowdsec/ -f ./charts/crowdsec/ci/crowdsec-values.yaml | ||
|
||
- name: Create kind cluster | ||
uses: helm/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,13 @@ | ||
agent: | ||
# To specify each pod you want to process it logs (pods present in the node) | ||
acquisition: | ||
# The namespace where the pod is located | ||
- namespace: test | ||
# The pod name | ||
podName: test-* | ||
# as in crowdsec configuration, we need to specify the program name so the parser will match and parse logs | ||
program: test | ||
# Those are ENV variables | ||
env: | ||
# As it's a test, we don't want to share signals with CrowdSec so disable the Online API. | ||
- name: DISABLE_ONLINE_API | ||
value: "true" | ||
|
||
lapi: | ||
env: | ||
# As it's a test, we don't want to share signals with CrowdSec so disable the Online API. | ||
- name: DISABLE_ONLINE_API | ||
value: "false" | ||
value: "true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{{- if index .Values.config "simulation.yaml" -}} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: crowdsec-simulation | ||
data: | ||
simulation.yaml: | | ||
{{ printf "%+v" (index .Values.config "simulation.yaml") | indent 4 }} | ||
{{ end }} | ||
--- | ||
{{ if (include "parsersIsNotEmpty" .) }} | ||
{{- range $stage, $stageConfig := .Values.config.parsers -}} | ||
{{- if $stageConfig -}} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ printf "crowdsec-parsers-%s" $stage }} | ||
data: | ||
{{ range $fileName, $content := $stageConfig -}} | ||
{{ printf "%s: |" $fileName | indent 2 }} | ||
{{ $content | indent 4 }} | ||
{{- end }} | ||
--- | ||
{{- end }} | ||
{{ end }} | ||
{{ end -}} | ||
|
||
{{- if .Values.config.scenarios }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: "crowdsec-scenarios" | ||
data: | ||
{{ range $fileName, $content := .Values.config.scenarios -}} | ||
{{ printf "%s: |" $fileName | indent 2 }} | ||
{{ $content | indent 4 }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{ if (include "postoverflowsIsNotEmpty" .) }} | ||
--- | ||
{{- range $stage, $stageConfig := .Values.config.postoverflows -}} | ||
{{- if $stageConfig -}} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ printf "crowdsec-postoverflows-%s" $stage }} | ||
data: | ||
{{ range $fileName, $content := $stageConfig -}} | ||
{{ printf "%s: |" $fileName | indent 2 }} | ||
{{ $content | indent 4 }} | ||
{{- end }} | ||
--- | ||
{{- end }} | ||
{{ end }} | ||
{{ end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{{- if index .Values.config "profiles.yaml" -}} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: crowdsec-profiles | ||
data: | ||
profiles.yaml: | | ||
{{ printf "%+v" (index .Values.config "profiles.yaml") | indent 4 }} | ||
{{ end }} | ||
--- | ||
{{- if index .Values.config "console.yaml" -}} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: crowdsec-console | ||
data: | ||
console.yaml: | | ||
{{ printf "%+v" (index .Values.config "console.yaml") | indent 4 }} | ||
{{ end }} | ||
--- | ||
{{ if (include "notificationsIsNotEmpty" .) }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: "crowdsec-notifications" | ||
data: | ||
{{ range $fileName, $content := .Values.config.notifications -}} | ||
{{- if $content -}} | ||
{{ printf "%s: |" $fileName | indent 2 }} | ||
{{ $content | indent 4 }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |
Oops, something went wrong.