Skip to content
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

All Charts: add configurable revision history limit for deployments #384

Merged
merged 2 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,7 @@ If you are using the subchart deployed database with persistence enabled, it is

## Contributing

Contributions to the Prefect Helm Charts are always welcome! We welcome your help - whether it's adding new functionality,
tweaking documentation, or anything in between. In order to successfully contribute, you'll need to fork this repository and commit changes to your local prefect-helm repo. You can then open a PR against this upstream repo that the team will review!
Contributions to the Prefect Helm Charts are always welcome! We welcome your help - whether it's adding new functionality, echo 'eval "$(~/.local/bin/mise activate zsh)"' >> ~/.zshrctweaking documentation, or anything in between. In order to successfully contribute, you'll need to fork this repository and commit changes to your local prefect-helm repo. You can then open a PR against this upstream repo that the team will review!

To get started, ensure you have the required dependencies installed:

Expand Down
3 changes: 3 additions & 0 deletions charts/prefect-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ prefect-server:
| server.replicaCount | int | `1` | number of server replicas to deploy |
| server.resources.limits | object | `{"cpu":"1","memory":"1Gi"}` | the requested limits for the server container |
| server.resources.requests | object | `{"cpu":"500m","memory":"512Mi"}` | the requested resources for the server container |
| server.revisionHistoryLimit | int | `10` | the number of old ReplicaSets to retain to allow rollback |
| server.tolerations | list | `[]` | tolerations for server pods assignment |
| server.uiConfig.enabled | bool | `true` | set PREFECT_UI_ENABLED; enable the UI on the server |
| server.uiConfig.prefectUiApiUrl | string | `""` | sets PREFECT_UI_API_URL |
Expand All @@ -227,3 +228,5 @@ prefect-server:
| serviceAccount.create | bool | `true` | specifies whether a ServiceAccount should be created |
| serviceAccount.name | string | `""` | the name of the ServiceAccount to use. if not set and create is true, a name is generated using the common.names.fullname template |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
1 change: 1 addition & 0 deletions charts/prefect-server/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ metadata:
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
revisionHistoryLimit: {{ .Values.server.revisionHistoryLimit }}
replicas: {{ .Values.server.replicaCount }}
selector:
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
Expand Down
5 changes: 5 additions & 0 deletions charts/prefect-server/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@
"type": "object"
}
},
"revisionHistoryLimit": {
"type": "integer",
"title": "Revision History Limit",
"description": "the number of old ReplicaSets to retain to allow rollback"
},
"autoscaling": {
"type": "object",
"title": "Autoscaling",
Expand Down
3 changes: 3 additions & 0 deletions charts/prefect-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ server:
## - name: PREFECT_API_ENABLE_HTTP2
## value: false

# -- the number of old ReplicaSets to retain to allow rollback
revisionHistoryLimit: 10

# Autoscaling configuration
# requests MUST be specified if using an HPA, otherwise the HPA will not know when to trigger a scale event
autoscaling:
Expand Down
3 changes: 3 additions & 0 deletions charts/prefect-worker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ Please note that configuring the template via `baseJobTemplate.existingConfigMap
| worker.replicaCount | int | `1` | number of worker replicas to deploy |
| worker.resources.limits | object | `{"cpu":"1000m","memory":"1Gi"}` | the requested limits for the worker container |
| worker.resources.requests | object | `{"cpu":"100m","memory":"256Mi"}` | the requested resources for the worker container |
| worker.revisionHistoryLimit | int | `10` | the number of old ReplicaSets to retain to allow rollback |
| worker.selfHostedCloudApiConfig.accountId | string | `""` | prefect account ID |
| worker.selfHostedCloudApiConfig.apiKeySecret.key | string | `"key"` | prefect API secret key |
| worker.selfHostedCloudApiConfig.apiKeySecret.name | string | `"prefect-api-key"` | prefect API secret name |
Expand All @@ -325,3 +326,5 @@ Please note that configuring the template via `baseJobTemplate.existingConfigMap
| worker.serverApiConfig.uiUrl | string | `"http://localhost:4200"` | prefect UI url |
| worker.tolerations | list | `[]` | tolerations for worker pods assignment |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
1 change: 1 addition & 0 deletions charts/prefect-worker/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ metadata:
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
revisionHistoryLimit: {{ .Values.worker.revisionHistoryLimit }}
replicas: {{ .Values.worker.replicaCount }}
selector:
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
Expand Down
5 changes: 5 additions & 0 deletions charts/prefect-worker/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,11 @@
}
}
},
"revisionHistoryLimit": {
"type": "integer",
"title": "Revision History Limit",
"description": "the number of old ReplicaSets to retain to allow rollback"
},
"replicaCount": {
"type": "integer",
"title": "Replica Count",
Expand Down
3 changes: 3 additions & 0 deletions charts/prefect-worker/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ worker:
# -- prefect UI url
uiUrl: http://localhost:4200

# -- the number of old ReplicaSets to retain to allow rollback
revisionHistoryLimit: 10

# -- number of worker replicas to deploy
replicaCount: 1

Expand Down
3 changes: 3 additions & 0 deletions charts/prometheus-prefect-exporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ Shoutout to @ialejandro for the original work on this chart!
| readinessProbe | bool | `false` | Enable readinessProbe |
| replicaCount | int | `1` | Number of replicas |
| resources | object | `{}` | The resources limits and requested |
| revisionHistoryLimit | int | `10` | the number of old ReplicaSets to retain to allow rollback |
| securityContext | object | `{}` | Defines privilege and access control settings for a Pod or Container |
| service | object | `{"port":80,"targetPort":8000,"type":"ClusterIP"}` | Kubernetes servide to expose Pod |
| service.port | int | `80` | Kubernetes Service port |
Expand All @@ -91,3 +92,5 @@ Shoutout to @ialejandro for the original work on this chart!
| serviceMonitor.enabled | bool | `false` | Enable or disable |
| tolerations | list | `[]` | Tolerations for pod assignment |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ metadata:
labels:
{{- include "common.labels.standard" . | nindent 4 }}
spec:
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
Expand Down
5 changes: 5 additions & 0 deletions charts/prometheus-prefect-exporter/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
"type": "object",
"additionalProperties": true,
"properties": {
"revisionHistoryLimit": {
"type": "integer",
"title": "Revision History Limit",
"description": "the number of old ReplicaSets to retain to allow rollback"
},
"replicaCount": {
"type": "integer",
"title": "Replica Count",
Expand Down
3 changes: 3 additions & 0 deletions charts/prometheus-prefect-exporter/values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# -- the number of old ReplicaSets to retain to allow rollback
revisionHistoryLimit: 10

# -- Number of replicas
replicaCount: 1

Expand Down