Skip to content

Commit

Permalink
feat: new features for polymorphic-app chart #42 (#43)
Browse files Browse the repository at this point in the history
Added support for successfulJobHistoryLimit and failedJobHistoryLimit for CronJob
Added support for dnsConfig for Deployment
  • Loading branch information
HussainTechSavvy authored Jul 3, 2023
1 parent 941ed60 commit f3daa15
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/polymorphic-app/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ description: A Helm chart for deploying any custom applications, specifically po
maintainers:
- name: improwised
type: application
version: 1.2.2
version: 1.2.3
appVersion: 1.0.0
6 changes: 6 additions & 0 deletions charts/polymorphic-app/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- with .successfulJobsHistoryLimit | default $.Values.cronJobTemplate.successfulJobsHistoryLimit }}
successfulJobsHistoryLimit: {{ toYaml . }}
{{- end }}
{{- with .failedJobsHistoryLimit | default $.Values.cronJobTemplate.failedJobsHistoryLimit }}
failedJobsHistoryLimit: {{ toYaml . }}
{{- end }}
schedule: {{ .schedule | quote }}
suspend: {{ .suspend | default false }}
jobTemplate:
Expand Down
5 changes: 4 additions & 1 deletion charts/polymorphic-app/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ spec:
periodSeconds: {{ .healthcheck.periodSeconds | default $.Values.serviceTemplate.healthcheck.periodSeconds | default "20" }}
{{- end }}
{{- end }}
{{- with .dnsConfig | default $.Values.workerTemplate.dnsConfig }}
dnsConfig:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .securityContext | default $.Values.serviceTemplate.securityContext }}
securityContext:
{{ toYaml . | indent 8 }}
Expand Down Expand Up @@ -296,4 +300,3 @@ spec:
{{- end }}

{{- end }}

4 changes: 4 additions & 0 deletions charts/polymorphic-app/templates/worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ spec:
{{- end }}
successThreshold: 1
{{- end }}
{{- with .dnsConfig | default $.Values.workerTemplate.dnsConfig }}
dnsConfig:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .securityContext | default $.Values.workerTemplate.securityContext }}
securityContext:
{{ toYaml . | indent 8 }}
Expand Down
22 changes: 22 additions & 0 deletions charts/polymorphic-app/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@ serviceTemplate:
# fsGroup: 1001
# runAsGroup: 1001
# runAsUser: 1001
dnsConfig: {}
# nameservers:
# - 192.0.2.1 # this is an example
# searches:
# - ns1.svc.cluster-domain.example
# - my.dns.search.suffix
# options:
# - name: ndots
# value: "2"
# - name: edns0
annotations: {}
nodeSelector: {}
tolerations: []
Expand Down Expand Up @@ -127,6 +137,16 @@ workerTemplate:
# fsGroup: 1001
# runAsGroup: 1001
# runAsUser: 1001
dnsConfig: {}
# nameservers:
# - 192.0.2.1 # this is an example
# searches:
# - ns1.svc.cluster-domain.example
# - my.dns.search.suffix
# options:
# - name: ndots
# value: "2"
# - name: edns0
nodeSelector: {}

tolerations: []
Expand Down Expand Up @@ -210,6 +230,8 @@ cronJobTemplate:
# fsGroup: 1001
# runAsGroup: 1001
# runAsUser: 1001
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 1

cronJobs:
# - name: update-status
Expand Down

0 comments on commit f3daa15

Please sign in to comment.