Skip to content

Commit

Permalink
refactor: add tolerations and affinity (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
zyy17 authored Mar 26, 2024
1 parent 43e1595 commit 5981228
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/greptimedb-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kubeVersion: ">=1.18.0-0"
description: The greptimedb-operator Helm chart for Kubernetes
name: greptimedb-operator
appVersion: 0.1.0-alpha.23
version: 0.1.12
version: 0.1.13
type: application
home: https://github.com/GreptimeTeam/greptimedb-operator
sources:
Expand Down
4 changes: 3 additions & 1 deletion charts/greptimedb-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The greptimedb-operator Helm chart for Kubernetes

![Version: 0.1.12](https://img.shields.io/badge/Version-0.1.12-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0-alpha.23](https://img.shields.io/badge/AppVersion-0.1.0--alpha.23-informational?style=flat-square)
![Version: 0.1.13](https://img.shields.io/badge/Version-0.1.13-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0-alpha.23](https://img.shields.io/badge/AppVersion-0.1.0--alpha.23-informational?style=flat-square)

## Source Code
- https://github.com/GreptimeTeam/greptimedb-operator
Expand Down Expand Up @@ -40,6 +40,7 @@ Kubernetes: `>=1.18.0-0`

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | The pod affinity |
| fullnameOverride | string | `""` | Provide a name to substitute for the full names of resources |
| image.imagePullPolicy | string | `"IfNotPresent"` | The image pull policy for the controller |
| image.pullSecrets | list | `[]` | The image pull secrets |
Expand All @@ -54,3 +55,4 @@ Kubernetes: `>=1.18.0-0`
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created |
| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
| tolerations | list | `[]` | The pod tolerations |
13 changes: 11 additions & 2 deletions charts/greptimedb-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,17 @@ spec:
{{- end }}
serviceAccountName: {{ include "greptimedb-operator.serviceAccountName" . }}
terminationGracePeriodSeconds: 10
{{- if .Values.nodeSelector }}
nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: manager
Expand Down
6 changes: 6 additions & 0 deletions charts/greptimedb-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,9 @@ fullnameOverride: ""

# -- The operator node selector
nodeSelector: {}

# -- The pod tolerations
tolerations: []

# -- The pod affinity
affinity: {}

0 comments on commit 5981228

Please sign in to comment.