Skip to content

Commit

Permalink
Merge pull request #28 from ethersphere/beekeeper-push-metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
vandot authored Jun 29, 2020
2 parents 9016a49 + c073e41 commit 3de539f
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/beekeeper/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
appVersion: latest
name: beekeeper
version: 0.1.2
version: 0.1.3
description: Ethereum Swarm Beekeeper Helm chart for Kubernetes
home: https://swarm.ethereum.org
icon: https://swarm-guide.readthedocs.io/en/latest/_images/swarm.png
Expand Down
50 changes: 50 additions & 0 deletions charts/beekeeper/templates/podfailure.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{{- if and .Values.chaos.podfailure.enabled -}}

apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: {{ include "beekeeper.fullname" . }}-podfailure
labels:
{{- include "beekeeper.labels" . | nindent 4 }}
spec:
schedule: "{{ .Values.chaos.podfailure.schedule }}"
successfulJobsHistoryLimit: {{ .Values.chaos.podfailure.successfulJobsHistoryLimit }}
failedJobsHistoryLimit: {{ .Values.chaos.podfailure.failedJobsHistoryLimit }}
concurrencyPolicy: "{{ .Values.chaos.podfailure.concurrencyPolicy }}"
jobTemplate:
metadata:
labels:
{{- include "beekeeper.selectorLabels" . | nindent 8 }}
spec:
template:
spec:
serviceAccountName: {{ include "beekeeper.serviceAccountName" . }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: BEEKEEPER_NAMESPACE
value: ".Values.beeChaos.namespace }}"
- name: BEEKEEPER_MODE
value: "{{ .Values.beeChaos.mode }}"
- name: BEEKEEPER_VALUE
value: "{{ .Values.beeChaos.value }}"
- name: BEEKEEPER_DURATION
value: "{{ .Values.beeChaos.duration }}"
- name: BEEKEEPER_CRON
value: "{{ .Values.beeChaos.cron }}"
- name: BEEKEEPER_PODNAME
value: "{{ .Values.beeChaos.podname }}"
args:
- turn-on
- podfailure
- --kubeconfig
- incluster
restartPolicy: Never
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 12 }}
{{- end }}

{{- end -}}
15 changes: 15 additions & 0 deletions charts/beekeeper/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ beeCluster:
pushGateway: http://localhost:9091/
pushMetrics: false

beeChaos:
namespace: bee
mode: one
value: ""
duration: 19s
cron: 20s

check:
fileretrieval:
enabled: false
Expand Down Expand Up @@ -86,3 +93,11 @@ check:
concurrencyPolicy: Forbid
chunksPerNode: 1
uploadNodeCount: 1

chaos:
podfailure:
enabled: true
schedule: "*/1 * * * *"
successfulJobsHistoryLimit: 3
failedJobsHistoryLimit: 3
concurrencyPolicy: Forbid

0 comments on commit 3de539f

Please sign in to comment.