forked from helm/charts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[incubator/graylog] Add support for node autoscaling and installing p…
…lugins (helm#1) * add autoscaling to graylog nodes * check for value before setting metrics for hpa * trying out plugin install * update init container script * volume mount plugin folder * add volume * try using graylog image for init container * messed up init container command * bad command * mount to another directory to keep all default plugins * missing && in cmd for install plugins * copy all files instead of folder * install plugins to master as well * always run plugin install so volume mount isn't empty
- Loading branch information
1 parent
effe2a6
commit 18ba942
Showing
5 changed files
with
126 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{{- if .Values.nodes.autoscaling.enabled }} | ||
apiVersion: autoscaling/v2beta1 | ||
kind: HorizontalPodAutoscaler | ||
metadata: | ||
name: {{ template "graylog.fullname" . }}-node | ||
labels: | ||
app: {{ template "graylog.name" . }}-node | ||
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
role: graylog-node | ||
spec: | ||
scaleTargetRef: | ||
apiVersion: apps/v1beta1 | ||
kind: Deployment | ||
name: {{ template "graylog.fullname" . }}-node | ||
minReplicas: {{ .Values.nodes.autoscaling.minReplicas }} | ||
maxReplicas: {{ .Values.nodes.autoscaling.maxReplicas }} | ||
metrics: | ||
{{ if .Values.nodes.autoscaling.targetCPUUtilizationPercentage }} | ||
- type: Resource | ||
resource: | ||
name: cpu | ||
targetAverageUtilization: {{ .Values.nodes.autoscaling.targetCPUUtilizationPercentage }} | ||
{{ end }} | ||
{{ if .Values.nodes.autoscaling.targetMemoryUtilizationPercentage }} | ||
- type: Resource | ||
resource: | ||
name: memory | ||
targetAverageUtilization: {{ .Values.nodes.autoscaling.targetMemoryUtilizationPercentage }} | ||
{{ 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ template "graylog.fullname" . }}-install-plugins | ||
labels: | ||
app: {{ template "graylog.name" . }}-node | ||
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
role: graylog-node | ||
data: | ||
install_plugins.sh: |- | ||
cd /usr/share/graylog/plugin | ||
{{- if .Values.plugins.install }} | ||
{{- range $index, $val := .Values.plugins.install }} | ||
wget {{ $val }} --no-check-certificate | ||
{{- 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