migrate(splunk): Migrate to new common (#15093)

**Description**
<!--
Please include a summary of the change and which issue is fixed. Please
also include relevant motivation and context. List any dependencies that
are required for this change.
-->
⚒️ Fixes  #15091

**⚙️ Type of change**

- [ ] ⚙️ Feature/App addition
- [x] 🪛 Bugfix
- [ ] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] 🔃 Refactor of current code

**🧪 How Has This Been Tested?**
<!--
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
-->

**📃 Notes:**
<!-- Please enter any other relevant information here -->

**✔️ Checklist:**

- [ ] ⚖️ My code follows the style guidelines of this project
- [ ] 👀 I have performed a self-review of my own code
- [ ] #️⃣ I have commented my code, particularly in hard-to-understand
areas
- [ ] 📄 I have made corresponding changes to the documentation
- [ ] ⚠️ My changes generate no new warnings
- [ ] 🧪 I have added tests to this description that prove my fix is
effective or that my feature works
- [x] ⬆️ I increased versions for any altered app according to semantic
versioning

** App addition**

If this PR is an app addition please make sure you have done the
following.

- [ ] 🪞 I have opened a PR on
[truecharts/containers](https://github.com/truecharts/containers) adding
the container to TrueCharts mirror repo.
- [ ] 🖼️ I have added an icon in the Chart's root directory called
`icon.png`

---

_Please don't blindly check all the boxes. Read them and only check
those that apply.
Those checkboxes are there for the reviewer to see what is this all
about and
the status of this PR with a quick glance._

---------

Signed-off-by: Atanas Pamukchiev <atanaspam@users.noreply.github.com>
Co-authored-by: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com>
Co-authored-by: StevenMcElligott <89483932+StevenMcElligott@users.noreply.github.com>
This commit is contained in:
Atanas Pamukchiev
2023-11-23 22:31:43 +01:00
committed by GitHub
parent 4f16610a08
commit 015ec33d48
6 changed files with 59 additions and 59 deletions
+3 -3
View File
@@ -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
+24 -29
View File
@@ -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}
@@ -0,0 +1 @@
{{- include "tc.v1.common.lib.chart.notes" $ -}}
@@ -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 }}
@@ -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" . -}}
+19 -15
View File
@@ -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