-
Notifications
You must be signed in to change notification settings - Fork 560
feat(taskbroker): add deployment #1831
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,124 @@ | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: {{ template "sentry.fullname" . }}-taskbroker | ||
| labels: | ||
| app: {{ template "sentry.fullname" . }} | ||
| chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" | ||
| release: "{{ .Release.Name }}" | ||
| heritage: "{{ .Release.Service }}" | ||
| app.kubernetes.io/managed-by: "Helm" | ||
| {{- if .Values.asHook }} | ||
| {{- /* Add the Helm annotations so that deployment after asHook from true to false works */}} | ||
| annotations: | ||
| meta.helm.sh/release-name: "{{ .Release.Name }}" | ||
| meta.helm.sh/release-namespace: "{{ .Release.Namespace }}" | ||
| "helm.sh/hook": "post-install,post-upgrade" | ||
| "helm.sh/hook-weight": "25" | ||
| {{- end }} | ||
| spec: | ||
| selector: | ||
| matchLabels: | ||
| app: {{ template "sentry.fullname" . }} | ||
| release: "{{ .Release.Name }}" | ||
| role: taskbroker | ||
| {{- if not .Values.taskbroker.autoscaling.enabled }} | ||
| replicas: {{ .Values.taskbroker.replicas }} | ||
| {{- end }} | ||
| revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} | ||
| template: | ||
| metadata: | ||
| annotations: | ||
| {{- if .Values.taskbroker.annotations }} | ||
| {{ toYaml .Values.taskbroker.annotations | indent 8 }} | ||
| {{- end }} | ||
| labels: | ||
| app: {{ template "sentry.fullname" . }} | ||
| release: "{{ .Release.Name }}" | ||
| role: taskbroker | ||
| {{- if .Values.taskbroker.podLabels }} | ||
| {{ toYaml .Values.taskbroker.podLabels | indent 8 }} | ||
| {{- end }} | ||
| spec: | ||
| affinity: | ||
| {{- if .Values.taskbroker.affinity }} | ||
| {{ toYaml .Values.taskbroker.affinity | indent 8 }} | ||
| {{- end }} | ||
| {{- if .Values.taskbroker.nodeSelector }} | ||
| nodeSelector: | ||
| {{ toYaml .Values.taskbroker.nodeSelector | indent 8 }} | ||
| {{- else if .Values.global.nodeSelector }} | ||
| nodeSelector: | ||
| {{ toYaml .Values.global.nodeSelector | indent 8 }} | ||
| {{- end }} | ||
| {{- if .Values.taskbroker.tolerations }} | ||
| tolerations: | ||
| {{ toYaml .Values.taskbroker.tolerations | indent 8 }} | ||
| {{- else if .Values.global.tolerations }} | ||
| tolerations: | ||
| {{ toYaml .Values.global.tolerations | indent 8 }} | ||
| {{- end }} | ||
| {{- if .Values.taskbroker.topologySpreadConstraints }} | ||
| topologySpreadConstraints: | ||
| {{ toYaml .Values.taskbroker.topologySpreadConstraints | indent 8 }} | ||
| {{- end }} | ||
| {{- if .Values.images.taskbroker.imagePullSecrets }} | ||
| imagePullSecrets: | ||
| {{ toYaml .Values.images.taskbroker.imagePullSecrets | indent 8 }} | ||
| {{- end }} | ||
| {{- if .Values.taskbroker.securityContext }} | ||
| securityContext: | ||
| {{ toYaml .Values.taskbroker.securityContext | indent 8 }} | ||
| {{- end }} | ||
| containers: | ||
| - name: {{ .Chart.Name }}-taskbroker | ||
| {{- if .Values.taskbroker.args }} | ||
| args: | ||
| {{ toYaml .Values.taskbroker.args | indent 10 }} | ||
| {{- end }} | ||
| image: "{{ template "taskbroker.image" . }}" | ||
| imagePullPolicy: {{ default "IfNotPresent" .Values.images.taskbroker.pullPolicy }} | ||
| env: | ||
| {{- include "taskbroker.env" . | nindent 8 }} | ||
| {{- if .Values.taskbroker.env }} | ||
| {{ toYaml .Values.taskbroker.env | indent 8 }} | ||
| {{- end }} | ||
| volumeMounts: | ||
| - name: taskbroker-storage | ||
| mountPath: /opt/sqlite | ||
| {{- if .Values.taskbroker.volumeMounts }} | ||
| {{ toYaml .Values.taskbroker.volumeMounts | indent 10 }} | ||
| {{- end }} | ||
| resources: | ||
| {{ toYaml .Values.taskbroker.resources | indent 12 }} | ||
| {{- if .Values.taskbroker.containerSecurityContext }} | ||
| securityContext: | ||
| {{ toYaml .Values.taskbroker.containerSecurityContext | indent 12 }} | ||
| {{- end }} | ||
| {{- if .Values.taskbroker.sidecars }} | ||
| {{ toYaml .Values.taskbroker.sidecars | indent 6 }} | ||
| {{- end }} | ||
| {{- if .Values.global.sidecars }} | ||
| {{ toYaml .Values.global.sidecars | indent 6 }} | ||
| {{- end }} | ||
| {{- if .Values.serviceAccount.enabled }} | ||
| serviceAccountName: {{ .Values.serviceAccount.name }}-taskbroker | ||
| {{- end }} | ||
| volumes: | ||
| {{- if .Values.taskbroker.persistence.enabled }} | ||
| - name: taskbroker-storage | ||
| persistentVolumeClaim: | ||
| claimName: sentry-taskbroker-pvc | ||
| {{- else }} | ||
| - name: taskbroker-storage | ||
| emptyDir: {} | ||
| {{- end }} | ||
| {{- if .Values.taskbroker.volumes }} | ||
| {{ toYaml .Values.taskbroker.volumes | indent 6 }} | ||
| {{- end }} | ||
| {{- if .Values.global.volumes }} | ||
| {{ toYaml .Values.global.volumes | indent 6 }} | ||
| {{- end }} | ||
| {{- if .Values.taskbroker.priorityClassName }} | ||
| priorityClassName: "{{ .Values.taskbroker.priorityClassName }}" | ||
| {{- end }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,110 @@ | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: {{ template "sentry.fullname" . }}-taskscheduler | ||
| labels: | ||
| app: {{ template "sentry.fullname" . }} | ||
| chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" | ||
| release: "{{ .Release.Name }}" | ||
| heritage: "{{ .Release.Service }}" | ||
| app.kubernetes.io/managed-by: "Helm" | ||
| {{- if .Values.asHook }} | ||
| {{- /* Add the Helm annotations so that deployment after asHook from true to false works */}} | ||
| annotations: | ||
| meta.helm.sh/release-name: "{{ .Release.Name }}" | ||
| meta.helm.sh/release-namespace: "{{ .Release.Namespace }}" | ||
| "helm.sh/hook": "post-install,post-upgrade" | ||
| "helm.sh/hook-weight": "25" | ||
| {{- end }} | ||
| spec: | ||
| selector: | ||
| matchLabels: | ||
| app: {{ template "sentry.fullname" . }} | ||
| release: "{{ .Release.Name }}" | ||
| role: sentry | ||
| replicas: {{ .Values.sentry.replicas }} | ||
| revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} | ||
| template: | ||
| metadata: | ||
| annotations: | ||
| checksum/configmap.yaml: {{ include "sentry.config" . | sha256sum }} | ||
| {{- if .Values.sentry.annotations }} | ||
| {{ toYaml .Values.sentry.annotations | indent 8 }} | ||
| {{- end }} | ||
| labels: | ||
| app: {{ template "sentry.fullname" . }} | ||
| release: "{{ .Release.Name }}" | ||
| role: sentry | ||
| {{- if .Values.sentry.podLabels }} | ||
| {{ toYaml .Values.sentry.podLabels | indent 8 }} | ||
| {{- end }} | ||
| spec: | ||
| affinity: | ||
| {{- if .Values.sentry.affinity }} | ||
| {{ toYaml .Values.sentry.affinity | indent 8 }} | ||
| {{- end }} | ||
| {{- if .Values.sentry.nodeSelector }} | ||
| nodeSelector: | ||
| {{ toYaml .Values.sentry.nodeSelector | indent 8 }} | ||
| {{- else if .Values.global.nodeSelector }} | ||
| nodeSelector: | ||
| {{ toYaml .Values.global.nodeSelector | indent 8 }} | ||
| {{- end }} | ||
| {{- if .Values.sentry.tolerations }} | ||
| tolerations: | ||
| {{ toYaml .Values.sentry.tolerations | indent 8 }} | ||
| {{- else if .Values.global.tolerations }} | ||
| tolerations: | ||
| {{ toYaml .Values.global.tolerations | indent 8 }} | ||
| {{- end }} | ||
| {{- if .Values.sentry.topologySpreadConstraints }} | ||
| topologySpreadConstraints: | ||
| {{ toYaml .Values.sentry.topologySpreadConstraints | indent 8 }} | ||
| {{- end }} | ||
| {{- if .Values.images.sentry.imagePullSecrets }} | ||
| imagePullSecrets: | ||
| {{ toYaml .Values.images.sentry.imagePullSecrets | indent 8 }} | ||
| {{- end }} | ||
| {{- if .Values.sentry.securityContext }} | ||
| securityContext: | ||
| {{ toYaml .Values.sentry.securityContext | indent 8 }} | ||
| {{- end }} | ||
| containers: | ||
| - name: {{ .Chart.Name }}-sentry | ||
| {{- if .Values.sentry.args }} | ||
| args: | ||
| {{ toYaml .Values.sentry.args | indent 10 }} | ||
| {{- end }} | ||
| command: ["sentry"] | ||
| args: | ||
| - run | ||
| - taskworker-scheduler | ||
| image: "{{ template "sentry.image" . }}" | ||
| imagePullPolicy: {{ default "IfNotPresent" .Values.images.sentry.pullPolicy }} | ||
| env: | ||
| {{- include "sentry.env" . | nindent 8 }} | ||
| {{- if .Values.sentry.env }} | ||
| {{ toYaml .Values.sentry.env | indent 8 }} | ||
| {{- end }} | ||
| resources: | ||
| {{ toYaml .Values.sentry.resources | indent 12 }} | ||
| {{- if .Values.sentry.containerSecurityContext }} | ||
| securityContext: | ||
| {{ toYaml .Values.sentry.containerSecurityContext | indent 12 }} | ||
| {{- end }} | ||
| {{- if .Values.sentry.sidecars }} | ||
| {{ toYaml .Values.sentry.sidecars | indent 6 }} | ||
| {{- end }} | ||
| {{- if .Values.global.sidecars }} | ||
| {{ toYaml .Values.global.sidecars | indent 6 }} | ||
| {{- end }} | ||
| {{- if .Values.serviceAccount.enabled }} | ||
| serviceAccountName: {{ .Values.serviceAccount.name }}-sentry | ||
| {{- end }} | ||
| {{- if .Values.sentry.priorityClassName }} | ||
| priorityClassName: "{{ .Values.sentry.priorityClassName }}" | ||
| {{- end }} | ||
| volumes: | ||
| - name: config | ||
| configMap: | ||
| name: {{ template "sentry.fullname" . }}-sentry |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,112 @@ | ||
| apiVersion: apps/v1 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @TartanLeGrand Thanks for taking this initiative, But the way this should be implemented is as follows. the way this file should be is for each taskbroker |
||
| kind: Deployment | ||
| metadata: | ||
| name: {{ template "sentry.fullname" . }}-taskworker | ||
| labels: | ||
| app: {{ template "sentry.fullname" . }} | ||
| chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" | ||
| release: "{{ .Release.Name }}" | ||
| heritage: "{{ .Release.Service }}" | ||
| app.kubernetes.io/managed-by: "Helm" | ||
| {{- if .Values.asHook }} | ||
| {{- /* Add the Helm annotations so that deployment after asHook from true to false works */}} | ||
| annotations: | ||
| meta.helm.sh/release-name: "{{ .Release.Name }}" | ||
| meta.helm.sh/release-namespace: "{{ .Release.Namespace }}" | ||
| "helm.sh/hook": "post-install,post-upgrade" | ||
| "helm.sh/hook-weight": "25" | ||
| {{- end }} | ||
| spec: | ||
| selector: | ||
| matchLabels: | ||
| app: {{ template "sentry.fullname" . }} | ||
| release: "{{ .Release.Name }}" | ||
| role: taskworker | ||
| replicas: {{ .Values.sentry.replicas }} | ||
| revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} | ||
| template: | ||
| metadata: | ||
| annotations: | ||
| checksum/configmap.yaml: {{ include "sentry.config" . | sha256sum }} | ||
| {{- if .Values.sentry.annotations }} | ||
| {{ toYaml .Values.sentry.annotations | indent 8 }} | ||
| {{- end }} | ||
| labels: | ||
| app: {{ template "sentry.fullname" . }} | ||
| release: "{{ .Release.Name }}" | ||
| role: taskworker | ||
| {{- if .Values.sentry.podLabels }} | ||
| {{ toYaml .Values.sentry.podLabels | indent 8 }} | ||
| {{- end }} | ||
| spec: | ||
| affinity: | ||
| {{- if .Values.sentry.affinity }} | ||
| {{ toYaml .Values.sentry.affinity | indent 8 }} | ||
| {{- end }} | ||
| {{- if .Values.sentry.nodeSelector }} | ||
| nodeSelector: | ||
| {{ toYaml .Values.sentry.nodeSelector | indent 8 }} | ||
| {{- else if .Values.global.nodeSelector }} | ||
| nodeSelector: | ||
| {{ toYaml .Values.global.nodeSelector | indent 8 }} | ||
| {{- end }} | ||
| {{- if .Values.sentry.tolerations }} | ||
| tolerations: | ||
| {{ toYaml .Values.sentry.tolerations | indent 8 }} | ||
| {{- else if .Values.global.tolerations }} | ||
| tolerations: | ||
| {{ toYaml .Values.global.tolerations | indent 8 }} | ||
| {{- end }} | ||
| {{- if .Values.sentry.topologySpreadConstraints }} | ||
| topologySpreadConstraints: | ||
| {{ toYaml .Values.sentry.topologySpreadConstraints | indent 8 }} | ||
| {{- end }} | ||
| {{- if .Values.images.sentry.imagePullSecrets }} | ||
| imagePullSecrets: | ||
| {{ toYaml .Values.images.sentry.imagePullSecrets | indent 8 }} | ||
| {{- end }} | ||
| {{- if .Values.sentry.securityContext }} | ||
| securityContext: | ||
| {{ toYaml .Values.sentry.securityContext | indent 8 }} | ||
| {{- end }} | ||
| containers: | ||
| - name: {{ .Chart.Name }}-taskworker | ||
| {{- if .Values.sentry.args }} | ||
| args: | ||
| {{ toYaml .Values.sentry.args | indent 10 }} | ||
| {{- end }} | ||
| command: ["sentry"] | ||
| args: | ||
| - run | ||
| - taskworker | ||
| - --concurrency=4 | ||
| - --rpc-host={{ include "taskbroker.host" . }}:50051 | ||
| image: "{{ template "sentry.image" . }}" | ||
| imagePullPolicy: {{ default "IfNotPresent" .Values.images.sentry.pullPolicy }} | ||
| env: | ||
| {{- include "sentry.env" . | nindent 8 }} | ||
| {{- if .Values.sentry.env }} | ||
| {{ toYaml .Values.sentry.env | indent 8 }} | ||
| {{- end }} | ||
| resources: | ||
| {{ toYaml .Values.sentry.resources | indent 12 }} | ||
| {{- if .Values.sentry.containerSecurityContext }} | ||
| securityContext: | ||
| {{ toYaml .Values.sentry.containerSecurityContext | indent 12 }} | ||
| {{- end }} | ||
| {{- if .Values.sentry.sidecars }} | ||
| {{ toYaml .Values.sentry.sidecars | indent 6 }} | ||
| {{- end }} | ||
| {{- if .Values.global.sidecars }} | ||
| {{ toYaml .Values.global.sidecars | indent 6 }} | ||
| {{- end }} | ||
| {{- if .Values.serviceAccount.enabled }} | ||
| serviceAccountName: {{ .Values.serviceAccount.name }}-taskworker | ||
| {{- end }} | ||
| {{- if .Values.sentry.priorityClassName }} | ||
| priorityClassName: "{{ .Values.sentry.priorityClassName }}" | ||
| {{- end }} | ||
| volumes: | ||
| - name: config | ||
| configMap: | ||
| name: {{ template "sentry.fullname" . }}-sentry | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should ideally be a statefulset because, embedded sqlite might require pvc also.
Take example of symbolicator statefulset