diff --git a/stable/chaoskube/Chart.yaml b/stable/chaoskube/Chart.yaml index ac367b1ee9..5e93811d50 100755 --- a/stable/chaoskube/Chart.yaml +++ b/stable/chaoskube/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 name: chaoskube -version: 0.12.0 -appVersion: 0.10.0 +version: 0.13.0 +appVersion: 0.11.0 description: Chaoskube periodically kills random pods in your Kubernetes cluster. home: https://github.com/linki/chaoskube sources: diff --git a/stable/chaoskube/README.md b/stable/chaoskube/README.md index 598c4c765a..a2f24a4abb 100644 --- a/stable/chaoskube/README.md +++ b/stable/chaoskube/README.md @@ -41,7 +41,7 @@ $ helm install stable/chaoskube --set dryRun=false |---------------------------|-----------------------------------------------------|----------------------------------| | `name` | container name | chaoskube | | `image` | docker image | quay.io/linki/chaoskube | -| `imageTag` | docker image tag | v0.10.0 | +| `imageTag` | docker image tag | v0.11.0 | | `replicas` | number of replicas to run | 1 | | `interval` | interval between pod terminations | 10m | | `labels` | label selector to filter pods by | "" (matches everything) | @@ -61,7 +61,8 @@ $ helm install stable/chaoskube --set dryRun=false | `tolerations` | Toleration labels for pod assignment | `[]` | | `affinity` | Affinity settings for pod assignment | `{}` | | `minimumAge` | Set minimum pod age to filter pod by | `0s` | -| `podAnnotations` | Annotations for the chaoskube pod | `{}` | +| `podAnnotations` | Annotations for the chaoskube pod | `{}` | +| `gracePeriod` | grace period to give pods when terminating them | `-1s` (pod decides) | Setting label and namespaces selectors from the shell can be tricky but is possible (example with zsh): diff --git a/stable/chaoskube/templates/clusterrole.yaml b/stable/chaoskube/templates/clusterrole.yaml index a04d865c35..e5fc1f8427 100644 --- a/stable/chaoskube/templates/clusterrole.yaml +++ b/stable/chaoskube/templates/clusterrole.yaml @@ -6,11 +6,10 @@ metadata: {{ include "labels.standard" . | indent 4 }} name: {{ printf "%s-%s" .Release.Name .Values.name }} rules: - - apiGroups: - - "" - resources: - - pods - verbs: - - list - - delete + - apiGroups: [""] + resources: ["pods"] + verbs: ["list", "delete"] + - apiGroups: [""] + resources: ["events"] + verbs: ["create"] {{- end -}} diff --git a/stable/chaoskube/templates/deployment.yaml b/stable/chaoskube/templates/deployment.yaml index 6507bf7eb6..8e3e71f1fb 100644 --- a/stable/chaoskube/templates/deployment.yaml +++ b/stable/chaoskube/templates/deployment.yaml @@ -17,12 +17,7 @@ spec: template: metadata: labels: - component: "server" {{ include "labels.standard" . | indent 8 }} -{{- with .Values.podAnnotations }} - annotations: -{{ toYaml . | indent 8 }} -{{- end }} spec: containers: - name: {{ .Values.name }} @@ -43,8 +38,15 @@ spec: - --debug {{- end }} - --minimum-age={{ .Values.minimumAge }} + - --grace-period={{ .Values.gracePeriod }} resources: {{ toYaml .Values.resources | indent 12 }} + securityContext: + runAsNonRoot: true + runAsUser: 65534 + readOnlyRootFilesystem: true + capabilities: + drop: ["ALL"] {{- if .Values.priorityClassName }} priorityClassName: "{{ .Values.priorityClassName }}" {{- end }} diff --git a/stable/chaoskube/templates/role.yaml b/stable/chaoskube/templates/role.yaml index 5d2ef21554..a33f49a274 100644 --- a/stable/chaoskube/templates/role.yaml +++ b/stable/chaoskube/templates/role.yaml @@ -6,11 +6,10 @@ metadata: {{ include "labels.standard" . | indent 4 }} name: {{ printf "%s-%s" .Release.Name .Values.name }} rules: - - apiGroups: - - "" - resources: - - pods - verbs: - - list - - delete + - apiGroups: [""] + resources: ["pods"] + verbs: ["list", "delete"] + - apiGroups: [""] + resources: ["events"] + verbs: ["create"] {{- end -}} diff --git a/stable/chaoskube/values.yaml b/stable/chaoskube/values.yaml index 5915554448..68cc653ade 100644 --- a/stable/chaoskube/values.yaml +++ b/stable/chaoskube/values.yaml @@ -5,7 +5,7 @@ name: chaoskube image: quay.io/linki/chaoskube # docker image tag -imageTag: v0.10.0 +imageTag: v0.11.0 # number of replicas to run replicas: 1 @@ -40,8 +40,12 @@ excludedDaysOfYear: # Set specific Timezone for Actions to take place timezone: UTC +# minimum lifetime of a pod before it's considered for termination (0: immediately) minimumAge: 0s +# grace period to give pods when terminating them (negative: pod decides) +gracePeriod: -1s + priorityClassName: "" # create service account with permission to list and kill pods