Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
chore(generic)!: drop support for CronJob
Browse files Browse the repository at this point in the history
  • Loading branch information
morremeyer committed Feb 19, 2022
1 parent 552e0a6 commit b9aaad3
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 124 deletions.
2 changes: 1 addition & 1 deletion charts/generic/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: generic
description: A chart for generic applications. Use this if you need to deploy something without wanting to build a fully fledged new helm chart.
type: application
version: 2.4.4
version: 3.0.0
maintainers:
- name: morre
email: [email protected]
14 changes: 11 additions & 3 deletions charts/generic/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# generic

![Version: 2.4.4](https://img.shields.io/badge/Version-2.4.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![Version: 3.0.0](https://img.shields.io/badge/Version-3.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

A chart for generic applications. Use this if you need to deploy something without wanting to build a fully fledged new helm chart.

Expand All @@ -12,6 +12,16 @@ A chart for generic applications. Use this if you need to deploy something witho

## Upgrading

### To 3.0.0

Support for CronJobs has been removed. If you used the `isCronjob: true` flag, please migrate to `morremeyer/cronjob` in version `2.0.0 <= x < 3.0.0`.

:warning: If you need open ports on your CronJob pod, this is not supported in the cronjob chart. This is a design decision as CronJobs should not have any incoming traffic.

The cronjob chart is almost fully compatible with all existing configuration you have (except for `ports`), you just have to do one migration step:

1. Remove the `isCronjob: true` value

### To 2.0.0

The format for configuration environment variables has changed and is now less verbose.
Expand Down Expand Up @@ -64,7 +74,6 @@ If you have environment variables set from ConfigMaps or Secrets, check out `env
| ingress.hosts[0].paths[0].path | string | `"/"` | |
| ingress.tls | list | `[]` | |
| initContainers | list | `[]` | |
| isCronjob | bool | `false` | Set to true to create a CronJob instead of a Deployment |
| labels | object | `{}` | |
| livenessProbe.httpGet.path | string | `"/"` | |
| livenessProbe.httpGet.port | string | `"http"` | |
Expand All @@ -84,7 +93,6 @@ If you have environment variables set from ConfigMaps or Secrets, check out `env
| replicaCount | int | `1` | number of replicas |
| resources | object | `{}` | |
| restartPolicy | string | `"Always"` | |
| schedule | string | `"17 3 * * *"` | schedule for the cronjob. Only used if `isCronjob` is `true`. |
| securityContext | object | `{}` | |
| service.ip | string | `nil` | |
| service.name | string | `"http"` | |
Expand Down
10 changes: 10 additions & 0 deletions charts/generic/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@

## Upgrading

### To 3.0.0

Support for CronJobs has been removed. If you used the `isCronjob: true` flag, please migrate to `morremeyer/cronjob` in version `2.0.0 <= x < 3.0.0`.

:warning: If you need open ports on your CronJob pod, this is not supported in the cronjob chart. This is a design decision as CronJobs should not have any incoming traffic.

The cronjob chart is almost fully compatible with all existing configuration you have (except for `ports`), you just have to do one migration step:

1. Remove the `isCronjob: true` value

### To 2.0.0

The format for configuration environment variables has changed and is now less verbose.
Expand Down
110 changes: 0 additions & 110 deletions charts/generic/templates/cronjob.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions charts/generic/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if not .Values.isCronjob -}}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -102,4 +101,3 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- end -}}
2 changes: 0 additions & 2 deletions charts/generic/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if not .Values.isCronjob -}}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -17,4 +16,3 @@ spec:
{{- if and (eq .Values.service.type "ClusterIP") (.Values.service.ip) }}
clusterIP: {{ .Values.service.ip }}
{{- end }}
{{- end -}}
6 changes: 0 additions & 6 deletions charts/generic/values.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
# -- Set to true to create a CronJob instead of a Deployment
isCronjob: false

# -- The number of successful finished jobs to retain.
successfulJobsHistoryLimit: ~

# -- The number of failed finished jobs to retain.
failedJobsHistoryLimit: ~

# -- schedule for the cronjob. Only used if `isCronjob` is `true`.
schedule: "17 3 * * *"

# -- number of replicas
replicaCount: 1

Expand Down

0 comments on commit b9aaad3

Please sign in to comment.