feat(Splunk): Change to upstream *Breaking change* (#5092)

* feat(Splunk): Change to upstream *Breaking change*

* fix CLI args

* Change another env

* some changes

* Update charts/incubator/splunk/templates/_config.tpl

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* Update charts/incubator/splunk/templates/_config.tpl

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* cleanup

* whops

* typo

* secret

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
Co-authored-by: Stavros kois <s.kois@outlook.com>
This commit is contained in:
StevenMcElligott
2022-12-05 10:20:19 +02:00
committed by GitHub
co-authored by Stavros Kois Stavros kois
parent f7bc46e62a
commit db8fde0d73
5 changed files with 123 additions and 65 deletions
+1 -1
View File
@@ -28,4 +28,4 @@ sources:
- https://splunk.github.io/docker-splunk - https://splunk.github.io/docker-splunk
- https://hub.docker.com/r/splunk/splunk - https://hub.docker.com/r/splunk/splunk
type: application type: application
version: 2.1.1 version: 3.0.0
+60 -47
View File
@@ -8,30 +8,43 @@ questions:
# Include{replicas} # Include{replicas}
# Include{replica1} # Include{replica1}
# Include{controllerExpertExtraArgs} # Include{controllerExpertExtraArgs}
- variable: env - variable: splunk
group: "App Configuration" group: App Configuration
label: "Image Environment" label: Splunk Configuration
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
attrs: attrs:
- variable: SPLUNK_CLI_ARGS - variable: acceptLicense
label: "SPLUNK_CLI_ARGS" label: Accept License
description: "Arguments to start Splunk with. " description: Arguments to start Splunk with.
schema:
type: boolean
default: true
- variable: password
label: Splunk Password
description: Splunk Web UI admin password.
schema: schema:
type: string type: string
default: "--accept-license --no-prompt" private: true
- variable: ADMIN_PASSWORD default: ""
label: "ADMIN_PASSWORD" - variable: extraArgs
description: "Splunk Web UI admin password." label: Extra Startup Arg
schema: schema:
type: string type: list
default: "changeme2019" default: []
items:
- variable: argEntry
label: Arg Entry
schema:
type: string
required: true
default: ""
# Include{containerConfig} # Include{containerConfig}
# Include{serviceRoot} # Include{serviceRoot}
- variable: main - variable: main
label: "Main Service" label: Main Service
description: "The Primary service on which the healthcheck runs, often the webUI" description: The Primary service on which the healthcheck runs, often the webUI
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
@@ -39,21 +52,21 @@ questions:
# Include{serviceSelectorLoadBalancer} # Include{serviceSelectorLoadBalancer}
# Include{serviceSelectorExtras} # Include{serviceSelectorExtras}
- variable: main - variable: main
label: "Main Service Port Configuration" label: Main Service Port Configuration
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
attrs: attrs:
- variable: port - variable: port
label: "Port" label: Port
description: "This port exposes the container port on the service" description: This port exposes the container port on the service
schema: schema:
type: int type: int
default: 8000 default: 8000
required: true required: true
- variable: management - variable: management
label: 'management service' label: management service
description: "HTTPS API" description: HTTPS API
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
@@ -61,21 +74,21 @@ questions:
# Include{serviceSelectorLoadBalancer} # Include{serviceSelectorLoadBalancer}
# Include{serviceSelectorExtras} # Include{serviceSelectorExtras}
- variable: management - variable: management
label: "management Service Port Configuration" label: management Service Port Configuration
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
attrs: attrs:
- variable: port - variable: port
label: "Port" label: Port
description: "This port exposes the container port on the service" description: This port exposes the container port on the service
schema: schema:
type: int type: int
default: 8089 default: 8089
required: true required: true
- variable: dataingest - variable: dataingest
label: 'dataingest service' label: dataingest service
description: "SplunkTCP input" description: SplunkTCP input
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
@@ -83,14 +96,14 @@ questions:
# Include{serviceSelectorLoadBalancer} # Include{serviceSelectorLoadBalancer}
# Include{serviceSelectorExtras} # Include{serviceSelectorExtras}
- variable: dataingest - variable: dataingest
label: "dataingest Service Port Configuration" label: dataingest Service Port Configuration
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
attrs: attrs:
- variable: port - variable: port
label: "Port" label: Port
description: "This port exposes the container port on the service" description: This port exposes the container port on the service
schema: schema:
type: int type: int
default: 9997 default: 9997
@@ -100,25 +113,25 @@ questions:
# Include{serviceExpert} # Include{serviceExpert}
# Include{serviceList} # Include{serviceList}
# Include{persistenceRoot} # Include{persistenceRoot}
- variable: datapersist - variable: data
label: "datapersist Storage" label: data Storage
description: "For indexed data persistence" description: For indexed data persistence
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
attrs: attrs:
# Include{persistenceBasic} # Include{persistenceBasic}
- variable: configpersist - variable: config
label: "configpersist Storage" label: config Storage
description: "For config and app data persistence" description: For config and app data persistence
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
attrs: attrs:
# Include{persistenceBasic} # Include{persistenceBasic}
- variable: appcredspersist - variable: appcreds
label: "appcredspersist Storage" label: appcreds Storage
description: "For passwordencryption persistence" description: For passwordencryption persistence
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
@@ -127,7 +140,7 @@ questions:
# Include{persistenceList} # Include{persistenceList}
# Include{ingressRoot} # Include{ingressRoot}
- variable: main - variable: main
label: "Main Ingress" label: Main Ingress
schema: schema:
additional_attrs: true additional_attrs: true
type: dict type: dict
@@ -139,41 +152,41 @@ questions:
# Include{security} # Include{security}
# Include{securityContextAdvancedRoot} # Include{securityContextAdvancedRoot}
- variable: privileged - variable: privileged
label: "Privileged mode" label: Privileged mode
schema: schema:
type: boolean type: boolean
default: false default: false
- variable: readOnlyRootFilesystem - variable: readOnlyRootFilesystem
label: "ReadOnly Root Filesystem" label: ReadOnly Root Filesystem
schema: schema:
type: boolean type: boolean
default: false default: false
- variable: allowPrivilegeEscalation - variable: allowPrivilegeEscalation
label: "Allow Privilege Escalation" label: Allow Privilege Escalation
schema: schema:
type: boolean type: boolean
default: false default: false
- variable: runAsNonRoot - variable: runAsNonRoot
label: "runAsNonRoot" label: runAsNonRoot
schema: schema:
type: boolean type: boolean
default: false default: false
# Include{podSecurityContextRoot} # Include{podSecurityContextRoot}
- variable: runAsUser - variable: runAsUser
label: "runAsUser" label: runAsUser
description: "The UserID of the user running the application" description: The UserID of the user running the application
schema: schema:
type: int type: int
default: 0 default: 0
- variable: runAsGroup - variable: runAsGroup
label: "runAsGroup" label: runAsGroup
description: The groupID this App of the user running the application" description: The groupID this App of the user running the application
schema: schema:
type: int type: int
default: 0 default: 0
- variable: fsGroup - variable: fsGroup
label: "fsGroup" label: fsGroup
description: "The group that should own ALL storage." description: The group that should own ALL storage.
schema: schema:
type: int type: int
default: 568 default: 568
@@ -0,0 +1,32 @@
{{/* Define the secret */}}
{{- define "splunk.secret" -}}
{{- $splunkSecret := printf "%s-splunk-config" (include "tc.common.names.fullname" .) }}
{{- $argList := list -}}
{{- if .Values.splunk.acceptLicense -}}
{{- $argList = append $argList "--accept-license" -}}
{{- end -}}
{{- with .Values.splunk.extraArgs -}}
{{- range . -}}
{{- $argList = append $argList . -}}
{{- end -}}
{{- end }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ $splunkSecret }}
labels:
{{- include "tc.common.labels" . | nindent 4 }}
stringData:
{{- with $argList }}
SPLUNK_START_ARGS: {{ join " " . | quote }}
{{- end }}
{{- with .Values.splunk.password }}
SPLUNK_PASSWORD: {{ . }}
{{- end }}
{{- end -}}
@@ -1,2 +1,5 @@
{{/* Render the templates */}} {{ include "tc.common.loader.init" . }}
{{ include "tc.common.loader.all" . }}
{{- include "splunk.secret" . }}
{{ include "tc.common.loader.apply" . }}
+25 -15
View File
@@ -1,26 +1,25 @@
env:
ADMIN_PASSWORD: changeme2019
SPLUNK_CLI_ARGS: --accept-license --no-prompt
image: image:
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
repository: tccr.io/truecharts/splunk repository: splunk/splunk
tag: latest@sha256:869e2d91515fd8704c0647931d4f46695536a3779bfbb181e20003042c96bb2a tag: 9.0.2@sha256:a12eca0fbe252329e3b8c235cd8b26b31f4203a32132eb31c42ae1a86cd79256
persistence:
appcredspersist:
enabled: true
mountPath: /opt/splunk/etc/auth
configpersist:
enabled: true
mountPath: /opt/splunk/etc/apps
datapersist:
enabled: true
mountPath: /splunkdata
podSecurityContext: podSecurityContext:
runAsGroup: 0 runAsGroup: 0
runAsUser: 0 runAsUser: 0
securityContext: securityContext:
readOnlyRootFilesystem: false readOnlyRootFilesystem: false
runAsNonRoot: false runAsNonRoot: false
splunk:
acceptLicense: true
password: changeme
extraArgs: []
envFrom:
- secretRef:
name: '{{ include "tc.common.names.fullname" . }}-splunk-config'
service: service:
dataingest: dataingest:
enabled: true enabled: true
@@ -45,5 +44,16 @@ service:
protocol: HTTP protocol: HTTP
targetPort: 8089 targetPort: 8089
persistence:
appcreds:
enabled: true
mountPath: /opt/splunk/etc/
config:
enabled: true
mountPath: /opt/splunk/var
datap:
enabled: true
mountPath: /splunkdata
portal: portal:
enabled: true enabled: true