From c720b399440a4b253a8dc92e6a2eb261b3db3742 Mon Sep 17 00:00:00 2001 From: James C Scott III Date: Wed, 18 Apr 2018 01:15:00 -0400 Subject: [PATCH] [sentry] add nodeSelector, affinity & tolerations (#4264) also add more details to sentry README --- stable/sentry/Chart.yaml | 2 +- stable/sentry/README.md | 70 ++++++++++++------- stable/sentry/templates/cron-deployment.yaml | 12 ++++ stable/sentry/templates/web-deployment.yaml | 12 ++++ .../sentry/templates/workers-deployment.yaml | 12 ++++ stable/sentry/values.yaml | 9 +++ 6 files changed, 90 insertions(+), 27 deletions(-) diff --git a/stable/sentry/Chart.yaml b/stable/sentry/Chart.yaml index a6027df7f5..f9a7959156 100644 --- a/stable/sentry/Chart.yaml +++ b/stable/sentry/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: Sentry is a cross-platform crash reporting and aggregation platform. name: sentry -version: 0.1.12 +version: 0.1.13 appVersion: 8.17 keywords: - debugging diff --git a/stable/sentry/README.md b/stable/sentry/README.md index 7caabaa238..afc6628957 100644 --- a/stable/sentry/README.md +++ b/stable/sentry/README.md @@ -55,32 +55,50 @@ $ kubectl delete job/sentry-db-init job/sentry-user-create The following table lists the configurable parameters of the Sentry chart and their default values. -| Parameter | Description | Default | -| ------------------------------- | ------------------------------- | ---------------------------------------------------------- | -| `image.repository` | Sentry image | `library/sentry:{VERSION}` | -| `image.tag` | Sentry image tag | `8.17` | -| `imagePullPolicy` | Image pull policy | `IfNotPresent` | -| `web.replicacount` | Amount of web pods to run | `1` | -| `user.email` | Username for default admin | `admin@sentry.local` | -| `email.from_address` | Email notifications are from | `smtp` | -| `email.host` | SMTP host for sending email | `smtp` | -| `email.port` | SMTP port | `25` | -| `email.user` | SMTP user | `nil` | -| `email.password` | SMTP password | `nil` | -| `email.use_tls` | SMTP TLS for security | `false` | -| `email.enable_replies` | Allow email replies | `false` | -| `service.type` | Kubernetes service type | `LoadBalancer` | -| `service.name` | Kubernetes service name | `sentry` | -| `service.externalPort` | Kubernetes external service port | `9000` | -| `service.internalPort` | Kubernetes internal service port | `9000` | -| `ingress.enabled` | Enable ingress controller resource | `false` | -| `ingress.annotations` | Ingress annotations | `{}` | -| `ingress.hostname` | URL to address your Sentry installation | `sentry.local` | -| `ingress.tls` | Ingress TLS configuration | `[]` | -| `persistence.enabled` | Enable persistence using PVC | `true` | -| `persistence.storageClass` | PVC Storage Class | `nil` (uses alpha storage class annotation) | -| `persistence.accessMode` | PVC Access Mode | `ReadWriteOnce` | -| `persistence.size` | PVC Storage Request | `10Gi` | +| Parameter | Description | Default | +| ------------------------------- | ------------------------------- | ---------------------------------------------------------- | +| `image.repository` | Sentry image | `library/sentry:{VERSION}` | +| `image.tag` | Sentry image tag | `8.17` | +| `imagePullPolicy` | Image pull policy | `IfNotPresent` | +| `web.replicacount` | Amount of web pods to run | `1` | +| `web.resources.limits` | Web resource limits | `{cpu: 500m, memory: 500Mi}` | +| `web.resources.requests` | Web resource requests | `{cpu: 300m, memory: 300Mi}` | +| `web.env` | Additional web environment variables | `[{name: GITHUB_APP_ID}, {name: GITHUB_API_SECRET}]` | +| `web.nodeSelector` | Node labels for web pod assignment | `{}` | +| `web.affinity` | Affinity settings for web pod assignment | `{}` | +| `web.tolerations` | Toleration labels for web pod assignment | `[]` | +| `cron.replicacount` | Amount of cron pods to run | `1` | +| `cron.resources.limits` | Cron resource limits | `{cpu: 200m, memory: 200Mi}` | +| `cron.resources.requests` | Cron resource requests | `{cpu: 100m, memory: 100Mi}` | +| `cron.nodeSelector` | Node labels for cron pod assignment | `{}` | +| `cron.affinity` | Affinity settings for cron pod assignment | `{}` | +| `cron.tolerations` | Toleration labels for cron pod assignment | `[]` | +| `worker.replicacount` | Amount of worker pods to run | `2` | +| `worker.resources.limits` | Worker resource limits | `{cpu: 300m, memory: 500Mi}` | +| `worker.resources.requests` | Worker resource requests | `{cpu: 100m, memory: 100Mi}` | +| `worker.nodeSelector` | Node labels for worker pod assignment | `{}` | +| `worker.affinity` | Affinity settings for worker pod assignment | `{}` | +| `worker.tolerations` | Toleration labels for worker pod assignment | `[]` | +| `user.email` | Username for default admin | `admin@sentry.local` | +| `email.from_address` | Email notifications are from | `smtp` | +| `email.host` | SMTP host for sending email | `smtp` | +| `email.port` | SMTP port | `25` | +| `email.user` | SMTP user | `nil` | +| `email.password` | SMTP password | `nil` | +| `email.use_tls` | SMTP TLS for security | `false` | +| `email.enable_replies` | Allow email replies | `false` | +| `service.type` | Kubernetes service type | `LoadBalancer` | +| `service.name` | Kubernetes service name | `sentry` | +| `service.externalPort` | Kubernetes external service port | `9000` | +| `service.internalPort` | Kubernetes internal service port | `9000` | +| `ingress.enabled` | Enable ingress controller resource | `false` | +| `ingress.annotations` | Ingress annotations | `{}` | +| `ingress.hostname` | URL to address your Sentry installation | `sentry.local` | +| `ingress.tls` | Ingress TLS configuration | `[]` | +| `persistence.enabled` | Enable persistence using PVC | `true` | +| `persistence.storageClass` | PVC Storage Class | `nil` (uses alpha storage class annotation) | +| `persistence.accessMode` | PVC Access Mode | `ReadWriteOnce` | +| `persistence.size` | PVC Storage Request | `10Gi` | Dependent charts can also have values overwritten. Preface values with postgresql.* or redis.* diff --git a/stable/sentry/templates/cron-deployment.yaml b/stable/sentry/templates/cron-deployment.yaml index 9a313e7310..81bb47f5be 100644 --- a/stable/sentry/templates/cron-deployment.yaml +++ b/stable/sentry/templates/cron-deployment.yaml @@ -16,6 +16,18 @@ spec: release: "{{ .Release.Name }}" role: cron spec: + {{- if .Values.cron.affinity }} + affinity: +{{ toYaml .Values.cron.affinity | indent 8 }} + {{- end }} + {{- if .Values.cron.nodeSelector }} + nodeSelector: +{{ toYaml .Values.cron.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.cron.tolerations }} + tolerations: +{{ toYaml .Values.cron.tolerations | indent 8 }} + {{- end }} containers: - name: {{ .Chart.Name }}-cron image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" diff --git a/stable/sentry/templates/web-deployment.yaml b/stable/sentry/templates/web-deployment.yaml index 9649c88d50..83138c01f5 100644 --- a/stable/sentry/templates/web-deployment.yaml +++ b/stable/sentry/templates/web-deployment.yaml @@ -16,6 +16,18 @@ spec: release: "{{ .Release.Name }}" role: web spec: + {{- if .Values.web.affinity }} + affinity: +{{ toYaml .Values.web.affinity | indent 8 }} + {{- end }} + {{- if .Values.web.nodeSelector }} + nodeSelector: +{{ toYaml .Values.web.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.web.tolerations }} + tolerations: +{{ toYaml .Values.web.tolerations | indent 8 }} + {{- end }} containers: - name: {{ .Chart.Name }}-web image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" diff --git a/stable/sentry/templates/workers-deployment.yaml b/stable/sentry/templates/workers-deployment.yaml index 0c3154f000..90ff6297b7 100644 --- a/stable/sentry/templates/workers-deployment.yaml +++ b/stable/sentry/templates/workers-deployment.yaml @@ -16,6 +16,18 @@ spec: release: "{{ .Release.Name }}" role: worker spec: + {{- if .Values.worker.affinity }} + affinity: +{{ toYaml .Values.worker.affinity | indent 8 }} + {{- end }} + {{- if .Values.worker.nodeSelector }} + nodeSelector: +{{ toYaml .Values.worker.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.worker.tolerations }} + tolerations: +{{ toYaml .Values.worker.tolerations | indent 8 }} + {{- end }} containers: - name: {{ .Chart.Name }}-workers image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" diff --git a/stable/sentry/values.yaml b/stable/sentry/values.yaml index a2642c5600..27d3db47d4 100644 --- a/stable/sentry/values.yaml +++ b/stable/sentry/values.yaml @@ -21,6 +21,9 @@ web: value: - name: GITHUB_API_SECRET value: + nodeSelector: {} + tolerations: [] + affinity: {} # How many cron instances to run cron: @@ -32,6 +35,9 @@ cron: requests: cpu: 100m memory: 100Mi + nodeSelector: {} + tolerations: [] + affinity: {} # How many worker instances to run worker: @@ -43,6 +49,9 @@ worker: requests: cpu: 100m memory: 100Mi + nodeSelector: {} + tolerations: [] + affinity: {} # Initial admin user to create user: