-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Ilya Kheifets <[email protected]>
- Loading branch information
1 parent
527bd84
commit 9c1dfc8
Showing
11 changed files
with
231 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
charts/splunk-connect-for-snmp/templates/worker/flower/deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{{- if .Values.flower.enabled }} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "splunk-connect-for-snmp.worker.fullname" . }}-flower | ||
labels: | ||
{{- include "splunk-connect-for-snmp.worker.flower.labels" . | nindent 4 }} | ||
|
||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
{{- include "splunk-connect-for-snmp.worker.flower.selectorLabels" . | nindent 6 }} | ||
template: | ||
metadata: | ||
labels: | ||
{{- include "splunk-connect-for-snmp.worker.flower.selectorLabels" . | nindent 8 }} | ||
spec: | ||
{{- with .Values.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
serviceAccountName: {{ include "splunk-connect-for-snmp.serviceAccountName" . }} | ||
securityContext: | ||
fsGroup: 10001 | ||
containers: | ||
- name: {{ .Chart.Name }}-flower | ||
securityContext: | ||
capabilities: | ||
drop: | ||
- ALL | ||
readOnlyRootFilesystem: true | ||
runAsNonRoot: true | ||
runAsUser: 10001 | ||
runAsGroup: 10001 | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
args: | ||
[ | ||
"celery", "flower", | ||
] | ||
env: | ||
{{- 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 }} |
22 changes: 22 additions & 0 deletions
22
charts/splunk-connect-for-snmp/templates/worker/flower/service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{{- if .Values.flower.enabled }} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ include "splunk-connect-for-snmp.worker.fullname" . }}-flower | ||
labels: | ||
{{- include "splunk-connect-for-snmp.worker.flower.labels" . | nindent 4 }} | ||
|
||
|
||
spec: | ||
selector: | ||
{{- include "splunk-connect-for-snmp.worker.flower.selectorLabels" . | nindent 4 }} | ||
ports: | ||
- protocol: TCP | ||
port: {{ .Values.flower.port | default 80 }} | ||
targetPort: 5555 | ||
type: LoadBalancer | ||
{{- if .Values.flower.loadBalancerIP }} | ||
externalIPs: | ||
- {{ .Values.flower.loadBalancerIP }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Celery admin panel (internal) | ||
|
||
Main component of SC4SNMP architecture is Celery framworks that can run background and periodic tasks (like polling and walk). By this reason super helpfull might be administrate Celery cluster using admin panel and we using for that [Flower](https://github.com/mher/flower). | ||
|
||
## k8s | ||
|
||
Just add `flower` section on `values.yaml`: | ||
|
||
``` | ||
flower: | ||
enabled: true | ||
loadBalancerIP: x.x.x.x | ||
``` | ||
|
||
|
||
## docker-compose | ||
|
||
Just use `--profile debug` flag to run optional `flower` service: `docker-compose --profiles debug up` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters