Skip to content

Commit

Permalink
fix: add flower to docker image
Browse files Browse the repository at this point in the history
Signed-off-by: Ilya Kheifets <[email protected]>
  • Loading branch information
ikheifets-splunk committed Nov 25, 2024
1 parent a873149 commit e11a09b
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,37 @@ spec:
spec:
containers:
- name: flower
image: mher/flower
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
[
"celery", "flower",
]
env:
- name: CELERY_BROKER_URL
value: {{ include "splunk-connect-for-snmp.celery_url" . }}
{{- include "environmental-variables" . | nindent 12 }}
ports:
- containerPort: 5555

volumeMounts:
- name: config
mountPath: "/app/config"
readOnly: true
- name: pysnmp-cache-volume
mountPath: "/.pysnmp/"
readOnly: false
- name: tmp
mountPath: "/tmp/"
readOnly: false
volumes:
- name: config
configMap:
name: {{ include "splunk-connect-for-snmp.name" . }}-config
items:
- key: "config.yaml"
path: "config.yaml"
- name: pysnmp-cache-volume
emptyDir: {}
- name: tmp
emptyDir: {}

{{- end }}
3 changes: 3 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ celery)
worker-sender)
celery -A splunk_connect_for_snmp.poller worker -l "$LOG_LEVEL" -Q send --autoscale=6,"$WORKER_CONCURRENCY"
;;
flower)
celery -A splunk_connect_for_snmp.poller flower
;;
*)
celery "$2"
;;
Expand Down
70 changes: 68 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ JSON-log-formatter ="^0.5.1"
pysnmplib = {git = "https://github.com/pysnmp/pysnmp.git", branch = "main"}
urllib3 = "^1.26.17"
jsonschema = "4.23.0"
flower = "^2.0.1"

[tool.poetry.group.dev.dependencies]
pytest = "^8.0.0"
Expand Down

0 comments on commit e11a09b

Please sign in to comment.