diff --git a/charts/incubator/splunk/Chart.yaml b/charts/incubator/splunk/Chart.yaml index 1844e71ba1f39..e359f2d5a27b1 100644 --- a/charts/incubator/splunk/Chart.yaml +++ b/charts/incubator/splunk/Chart.yaml @@ -2,11 +2,11 @@ annotations: truecharts.org/SCALE-support: "true" truecharts.org/category: Tools-Utilities apiVersion: v2 -appVersion: "9.0.4" +appVersion: "9.1.2" dependencies: - name: common repository: https://library-charts.truecharts.org - version: 11.1.2 + version: 15.2.0 deprecated: false description: "This is a Chartfile for Splunk designed for OpenShift and TrueNAS based on Alpine Linux - https://www.splunk.com" home: https://truecharts.org/charts/incubator/splunk @@ -25,4 +25,4 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/incubator/splunk - https://splunk.github.io/docker-splunk type: application -version: 3.0.10 +version: 4.0.0 diff --git a/charts/incubator/splunk/questions.yaml b/charts/incubator/splunk/questions.yaml index 09c9184a2c743..13ca244affe65 100644 --- a/charts/incubator/splunk/questions.yaml +++ b/charts/incubator/splunk/questions.yaml @@ -6,54 +6,50 @@ questions: # Include{global} # Include{workload} # Include{workloadDeployment} - # Include{replicas1} # Include{podSpec} # Include{containerMain} + + # Include{containerBasic} # Include{containerAdvanced} - variable: splunk group: App Configuration - label: Splunk Configuration + label: "Splunk Configuration" schema: additional_attrs: true type: dict attrs: - variable: acceptLicense - label: Accept License - description: Arguments to start Splunk with. + label: "Accept License" + description: "Arguments to start Splunk with." schema: type: boolean default: true - variable: password - label: Splunk Password - description: Splunk Web UI admin password. + label: "Splunk Password" + description: "Splunk Web UI admin password." schema: type: string private: true default: "" - variable: extraArgs - label: Extra Startup Arg + label: "Extra Startup Arguments" schema: type: list default: [] items: - variable: argEntry - label: Arg Entry + label: "Arg Entry" schema: type: string required: true default: "" # Include{containerConfig} +# Include{podOptions} # Include{serviceRoot} - - variable: main - label: Main Service - description: The Primary service on which the healthcheck runs, often the webUI - schema: - additional_attrs: true - type: dict - attrs: +# Include{serviceMain} # Include{serviceSelectorLoadBalancer} # Include{serviceSelectorExtras} - variable: main @@ -154,20 +150,19 @@ questions: # Include{ingressTraefik} # Include{ingressAdvanced} # Include{ingressList} - -# Include{podSecurityContextRoot} - - variable: runAsUser - label: runAsUser - description: The UserID of the user running the application - schema: - type: int - default: 0 - - variable: runAsGroup - label: runAsGroup - description: The groupID this App of the user running the application - schema: - type: int - default: 0 +# Include{securityContextRoot} + - variable: runAsUser + label: "runAsUser" + description: "The UserID of the user running the application" + schema: + type: int + default: 0 + - variable: runAsGroup + label: "runAsGroup" + description: "The groupID this App of the user running the application" + schema: + type: int + default: 0 # Include{securityContextContainer} # Include{securityContextAdvanced} # Include{securityContextPod} diff --git a/charts/incubator/splunk/templates/NOTES.txt b/charts/incubator/splunk/templates/NOTES.txt new file mode 100644 index 0000000000000..efcb74cb77218 --- /dev/null +++ b/charts/incubator/splunk/templates/NOTES.txt @@ -0,0 +1 @@ +{{- include "tc.v1.common.lib.chart.notes" $ -}} diff --git a/charts/incubator/splunk/templates/_config.tpl b/charts/incubator/splunk/templates/_config.tpl index a57dfef75ff53..b8a0994478619 100644 --- a/charts/incubator/splunk/templates/_config.tpl +++ b/charts/incubator/splunk/templates/_config.tpl @@ -1,7 +1,7 @@ {{/* Define the secret */}} {{- define "splunk.secret" -}} -{{- $splunkSecret := printf "%s-splunk-config" (include "tc.common.names.fullname" .) }} +{{- $splunkSecret := printf "%s-splunk-config" (include "tc.v1.common.lib.chart.names.fullname" .) }} {{- $argList := list -}} {{- if .Values.splunk.acceptLicense -}} @@ -14,14 +14,8 @@ {{- end -}} {{- end }} ---- -apiVersion: v1 -kind: Secret -metadata: - name: {{ $splunkSecret }} - labels: - {{- include "tc.common.labels" . | nindent 4 }} -stringData: +enabled: true +data: {{- with $argList }} SPLUNK_START_ARGS: {{ join " " . | quote }} {{- end }} diff --git a/charts/incubator/splunk/templates/common.yaml b/charts/incubator/splunk/templates/common.yaml index f8fb2812de82a..de4c1a4a91277 100644 --- a/charts/incubator/splunk/templates/common.yaml +++ b/charts/incubator/splunk/templates/common.yaml @@ -1,5 +1,11 @@ -{{ include "tc.common.loader.init" . }} +{{/* Make sure all variables are set properly */}} +{{- include "tc.v1.common.loader.init" . -}} -{{- include "splunk.secret" . }} +{{/* Render secrets for Splunk */}} +{{- $secrets := include "splunk.secret" . | fromYaml -}} +{{- if $secrets -}} + {{- $_ := set .Values.secret "secret" $secrets -}} +{{- end -}} -{{ include "tc.common.loader.apply" . }} +{{/* Render the templates */}} +{{- include "tc.v1.common.loader.apply" . -}} diff --git a/charts/incubator/splunk/values.yaml b/charts/incubator/splunk/values.yaml index 1c6770e0d784f..b3b718e2a937f 100644 --- a/charts/incubator/splunk/values.yaml +++ b/charts/incubator/splunk/values.yaml @@ -1,25 +1,20 @@ image: pullPolicy: IfNotPresent repository: splunk/splunk - tag: 9.0.4@sha256:864f89b8acee4d54c81f9431da78175ff70379d554ab3f3db3d2c92fb4641b8d - -podSecurityContext: - runAsGroup: 0 - runAsUser: 0 + tag: 9.1.2@sha256:2a94cd38514f6f3b6bee2cd1df36ded17d7b8148ccb35e3be2a91258f6e5c46b securityContext: - readOnlyRootFilesystem: false - runAsNonRoot: false + container: + runAsNonRoot: false + readOnlyRootFilesystem: false + runAsUser: 0 + runAsGroup: 0 splunk: acceptLicense: true password: changeme extraArgs: [] -envFrom: - - secretRef: - name: '{{ include "tc.common.names.fullname" . }}-splunk-config' - service: dataingest: enabled: true @@ -27,13 +22,13 @@ service: dataingest: enabled: true port: 9997 - protocol: HTTP + protocol: http targetPort: 9997 main: ports: main: port: 8000 - protocol: HTTP + protocol: http targetPort: 8000 management: enabled: true @@ -41,8 +36,16 @@ service: management: enabled: true port: 8089 - protocol: HTTP + protocol: http targetPort: 8089 +workload: + main: + podSpec: + containers: + main: + envFrom: + - secretRef: + name: "secret" persistence: appcreds: @@ -56,4 +59,5 @@ persistence: mountPath: /splunkdata portal: - enabled: true + open: + enabled: true