Skip to content

Commit

Permalink
chore: describe values (#1035)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajasnosz authored Jul 12, 2024
1 parent 8cd68fa commit e0010ea
Show file tree
Hide file tree
Showing 15 changed files with 212 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ metadata:
{{- include "splunk-connect-for-snmp.scheduler.labels" . | nindent 4 }}
data:
config.yaml: |-
{{- if (.Values.scheduler).usernames }}
usernames:
{{ .Values.scheduler.usernames | indent 8 -}}
{{ end }}
{{- if (.Values.scheduler).profiles }}
profiles:
{{ .Values.scheduler.profiles | indent 8 -}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ spec:
value: "http://{{ printf "%s-%s" .Release.Name "mibserver" }}/standard.txt"
- name: LOG_LEVEL
value: {{ .Values.scheduler.logLevel | default "INFO" }}
- name: INVENTORY_REFRESH_RATE
value: {{ .Values.scheduler.inventory_refresh_rate | default "600" | quote }}
volumeMounts:
- name: config
mountPath: "/app/config"
Expand Down
10 changes: 5 additions & 5 deletions charts/splunk-connect-for-snmp/templates/worker/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -164,23 +164,23 @@ Common labels

{{- define "environmental-variables-poller" -}}
- name: WORKER_CONCURRENCY
value: {{ .Values.worker.poller.concurrency | default "2" | quote }}
value: {{ .Values.worker.poller.concurrency | default "4" | quote }}
- name: PREFETCH_COUNT
value: {{ .Values.worker.poller.prefetch | default "1" | quote }}
{{- end }}

{{- define "environmental-variables-sender" -}}
- name: WORKER_CONCURRENCY
value: {{ .Values.worker.sender.concurrency | default "2" | quote }}
value: {{ .Values.worker.sender.concurrency | default "4" | quote }}
- name: PREFETCH_COUNT
value: {{ .Values.worker.sender.prefetch | default "1" | quote }}
value: {{ .Values.worker.sender.prefetch | default "30" | quote }}
{{- end }}

{{- define "environmental-variables-trap" -}}
- name: WORKER_CONCURRENCY
value: {{ .Values.worker.trap.concurrency | default "2" | quote }}
value: {{ .Values.worker.trap.concurrency | default "4" | quote }}
- name: PREFETCH_COUNT
value: {{ .Values.worker.trap.prefetch | default "1" | quote }}
value: {{ .Values.worker.trap.prefetch | default "30" | quote }}
- name: RESOLVE_TRAP_ADDRESS
value: {{ .Values.worker.trap.resolveAddress.enabled | default "false" | quote }}
- name: MAX_DNS_CACHE_SIZE_TRAPS
Expand Down
10 changes: 5 additions & 5 deletions charts/splunk-connect-for-snmp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ UI:
repository: ghcr.io/splunk/sc4snmp-ui/backend/container
tag: "main"
pullPolicy: "Always"
# Base container that sets permissions for folders mounted to UI containers
init:
repository: registry.access.redhat.com/ubi9/ubi
pullPolicy: IfNotPresent
Expand Down Expand Up @@ -70,7 +71,7 @@ splunk:
token: 00000000-0000-0000-0000-000000000000
# Whether to skip checking the certificate of the HEC endpoint when sending
# data over HTTPS.
insecureSSL: "true"
insecureSSL: "false"

# sourcetype for trap events
sourcetypeTraps: "sc4snmp:traps"
Expand All @@ -94,11 +95,10 @@ splunk:
sim:
# Enables sending data to Splunk Observability/SignalFx.
enabled: false

# Splunk Observability realm to send telemetry data to.
signalfxToken: ""
# Required for Splunk Observability (if `realm` is specified).
# Splunk Observability org access token.
# Required for Splunk Observability (if `realm` is specified).
signalfxToken: ""
# Splunk Observability realm to send telemetry data to.
signalfxRealm: ""

resources: {}
Expand Down
1 change: 0 additions & 1 deletion docker_compose/docker-compose-scheduler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ services:
- MIB_SOURCES=http://snmp-mibserver:8000/asn1/@mib@
- MIB_INDEX=http://snmp-mibserver:8000/index.csv
- MIB_STANDARD=http://snmp-mibserver:8000/standard.txt
- INVENTORY_REFRESH_RATE=${INVENTORY_REFRESH_RATE:-600}

# Scheduler configuration
- LOG_LEVEL=${SCHEDULER_LOG_LEVEL:-INFO}
Expand Down
1 change: 0 additions & 1 deletion docker_compose/docker-compose-traps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ services:
- MIB_INDEX=http://snmp-mibserver:8000/index.csv
- MIB_STANDARD=http://snmp-mibserver:8000/standard.txt
- LOG_LEVEL=${TRAP_LOG_LEVEL:-INFO}
- INVENTORY_REFRESH_RATE=${INVENTORY_REFRESH_RATE:-600}
- SPLUNK_HEC_HOST=${SPLUNK_HEC_HOST}
- SPLUNK_HEC_SCHEME=${SPLUNK_HEC_PROTOCOL:-https}
- SPLUNK_HEC_PORT=${SPLUNK_HEC_PORT}
Expand Down
201 changes: 201 additions & 0 deletions docs/configuration/values-params-description.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/gui/enable-gui.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ UI:
- `valuesFileName`: [OPTIONAL] full name of the file with configuration (e.g. `values.yaml`) that is stored inside the `valuesFileDirectory` directory. If this file name is provided, and it exists in this directory, then GUI will update appropriate sections in provided `values.yaml` file. If this file name is not provided, or provided file name can’t be found inside `valuesFileDirectory` then inside that directory there will be created three files with the latest GUI configuration of groups, profiles and inventory. Those configuration can be copied and pasted to the appropriate sections in the original `values.yaml` file.

Template of initial `values.yaml`:

```yaml
scheduler:
profiles: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ spec:
value: "http://release-name-mibserver/standard.txt"
- name: LOG_LEVEL
value: INFO
- name: INVENTORY_REFRESH_RATE
value: "600"
volumeMounts:
- name: config
mountPath: "/app/config"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ spec:
value: "http://release-name-mibserver/standard.txt"
- name: LOG_LEVEL
value: INFO
- name: INVENTORY_REFRESH_RATE
value: "600"
volumeMounts:
- name: config
mountPath: "/app/config"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ spec:
value: "http://release-name-mibserver/standard.txt"
- name: LOG_LEVEL
value: INFO
- name: INVENTORY_REFRESH_RATE
value: "600"
volumeMounts:
- name: config
mountPath: "/app/config"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ spec:
value: "http://release-name-mibserver/standard.txt"
- name: LOG_LEVEL
value: INFO
- name: INVENTORY_REFRESH_RATE
value: "600"
volumeMounts:
- name: config
mountPath: "/app/config"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ spec:
value: "http://release-name-mibserver/standard.txt"
- name: LOG_LEVEL
value: INFO
- name: INVENTORY_REFRESH_RATE
value: "600"
volumeMounts:
- name: config
mountPath: "/app/config"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ spec:
value: "http://release-name-mibserver/standard.txt"
- name: LOG_LEVEL
value: INFO
- name: INVENTORY_REFRESH_RATE
value: "600"
volumeMounts:
- name: config
mountPath: "/app/config"
Expand Down
1 change: 0 additions & 1 deletion splunk_connect_for_snmp/poller.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
# app.conf.update(**config)

INVENTORY_PATH = os.getenv("INVENTORY_PATH", "/app/inventory/inventory.csv")
INVENTORY_REFRESH_RATE = int(os.getenv("INVENTORY_REFRESH_RATE", "600"))

app.autodiscover_tasks(
packages=[
Expand Down

0 comments on commit e0010ea

Please sign in to comment.