Skip to content
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
25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,24 @@ To uninstall the chart:

## Parameters

| Name | Description | Value |
| ---| ---------------------------------------------------------------------------------------------|---------------------------------------------|
| applicationName | Name of the application | `application` |
| namespaceOverride | Override default release namespace with a custom value | `application` |
| labels.group | Label to define application group | `com.stakater.platform` |
| labels.team | Label to define team | `stakater` |
| Name | Description | Value |
| -----------------------|--------------------------------------------------------------------------|---------------------------------------------|
| applicationName | Name of the application | `application` |
| namespaceOverride | Override default release namespace with a custom value | `application` |
| labels.group | Label to define application group | `com.stakater.platform` |
| labels.team | Label to define team | `stakater` |

### Deployment Paramaters

| Name | Description | Value |
|------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|----------------|
| deployment.enabled | Enable deployment on helm chart deployments | `true` |
| deployment.strategy | Strategy for updating deployments | `RollingUpdate` |
| deployment.strategy | Strategy for updating deployments | `RollingUpdate`|
| deployment.reloadOnChange | Reload deployment if configMap/secret mounted are updated | `true` |
| deployment.nodeSelector | Select node to deploy this application | `{}` |
| deployment.hostAliases | Adding entries to a Pod's /etc/hosts file provides Pod-level override of hostname resolution when DNS and other options are not applicable | `[]` |
| deployment.additionalLabels | Additional labels for Deployment | `{}` |
| deployment.podLabels | Additional label added on pod which is used in Service's Label Selector | {} |
| deployment.podLabels | Additional label added on pod which is used in Service's Label Selector | `{}` |
| deployment.annotations | Annotations on deployments | `{}` |
| deployment.additionalPodAnnotations | Additional Pod Annotations added on pod created by this Deployment | `{}` |
| deployment.replicas | Replicas to be created | `` |
Expand All @@ -54,25 +54,27 @@ To uninstall the chart:
| deployment.revisionHistoryLimit | The number of old history to retain to allow rollback | `2` |
| deployment.command | Command for primary container of deployment | `[]` |
| deployment.args | Arg for primary container of deployment | `[]` |
| deployment.priorityClassName | Defines the priority class for pod scheduling | `""` |
| deployment.tolerations | Taint tolerations for nodes | `[]` |
| deployment.affinity | Affinity for pod/node | `[]` |
| deployment.topologySpreadConstraints | Topology spread constraints definitions | `[]` |
| deployment.ports | Ports for primary container | `[]` |
| deployment.securityContext | Security Context for the pod | `{}` |
| deployment.additionalContainers | Add additional containers besides init and app containers | `[]` |
| deployment.containerSecurityContext | Add security context at container level | `{}` |
| deployment.terminationGracePeriodSeconds | Graceful termination timeout | `` |
| deployment.terminationGracePeriodSeconds | Graceful termination timeout | `` |
| deployment.lifecycle | Container lifecycle management for graceful startup and shutdown procedures | `{}` |

#### Deployment Resources Parameters

| Name | Description | Value |
| ------------------------ | -------------------------------------------------------------------------------------------- | --------------- |
| deployment.resources | Application pod resource requests & limits | See below |
| deployment.resources | Application pod resource requests & limits | See below |

##### Requests and Limits

```
resources:
resources:
limits:
memory: 256Mi
cpu: 0.5
Expand Down Expand Up @@ -470,6 +472,7 @@ Job parameter for each cronjob object at `cronJob.jobs`
| `<name>.image.imagePullPolicy` | ImagePullPolicy of container image of cronjob |
| `<name>.command` | Command of container of job |
| `<name>.args` | Args of container of job |
| `<name>.priorityClassName` | Defines the priority class of job |
| `<name>.resources` | Resources of container of job |
| `<name>.additionalLabels` | Additional labels of cronjob |
| `<name>.annotations` | Annotation of cronjob |
Expand Down
9 changes: 5 additions & 4 deletions application/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,10 @@ spec:
{{- end }}
containers:
- name: {{ $name }}

{{- $image := required (print "Undefined image repo for container '" $name "'") $job.image.repository }}
{{- with $job.image.tag }} {{- $image = print $image ":" . }} {{- end }}
{{- with $job.image.digest }} {{- $image = print $image "@" . }} {{- end }}
image: {{ $image }}

{{- if $job.image.imagePullPolicy }}
imagePullPolicy: {{ $job.image.imagePullPolicy }}
{{ end }}
Expand Down Expand Up @@ -105,6 +103,9 @@ spec:
{{- with $job.affinity }}
affinity:
{{ toYaml . | indent 12 }}
{{- end }}
{{- with $job.priorityClassName }}
priorityClassName: {{ . }}
{{- end }}
{{- with $job.tolerations }}
tolerations: {{ toYaml . | nindent 12 }}
Expand All @@ -115,12 +116,12 @@ spec:
{{- with $job.securityContext }}
securityContext: {{ toYaml . | nindent 12 }}
{{- end }}
{{- if $job.restartPolicy}}
{{- if $job.restartPolicy }}
restartPolicy: {{ $job.restartPolicy }}
{{ else }}
restartPolicy: OnFailure
{{ end }}
{{- with $job.imagePullSecrets}}
{{- with $job.imagePullSecrets }}
imagePullSecrets:
{{ toYaml . | indent 12 }}
{{ end }}
Expand Down
31 changes: 19 additions & 12 deletions application/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,22 @@ spec:
{{- end }}
spec:
{{- if .Values.deployment.hostAliases }}
hostAliases:
hostAliases:
{{ toYaml .Values.deployment.hostAliases | indent 6 }}
{{- end }}
{{- if .Values.deployment.initContainers }}
initContainers:
{{- range $key, $value := .Values.deployment.initContainers }}
{{- range $key, $value := .Values.deployment.initContainers }}
- name: {{ $key }}
{{ include "application.tplvalues.render" ( dict "value" $value "context" $ ) | indent 8 }}
{{- end }}
{{- end }}
{{- if .Values.deployment.nodeSelector }}
nodeSelector:
{{ toYaml .Values.deployment.nodeSelector | indent 8 }}
{{- end }}
{{- with .Values.deployment.priorityClassName }}
priorityClassName: {{ .Values.deployment.priorityClassName }}
{{- end }}
{{- if .Values.deployment.tolerations }}
tolerations:
Expand All @@ -101,7 +104,7 @@ spec:
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.deployment.imagePullSecrets }}
{{- if .Values.deployment.imagePullSecrets }}
imagePullSecrets:
- name: {{ .Values.deployment.imagePullSecrets }}
{{- end }}
Expand All @@ -119,7 +122,7 @@ spec:
- --tls-cert=/etc/tls/private/tls.crt
- --tls-key=/etc/tls/private/tls.key
- --cookie-secret=SECRET
image: {{ .Values.deployment.openshiftOAuthProxy.image | default "openshift/oauth-proxy:latest" }}
image: {{ .Values.deployment.openshiftOAuthProxy.image | default "openshift/oauth-proxy:latest" }}
imagePullPolicy: IfNotPresent
name: oauth-proxy
ports:
Expand All @@ -131,7 +134,7 @@ spec:
name: proxy
volumeMounts:
- mountPath: /etc/tls/private
name: proxy-tls
name: proxy-tls
{{- end }}
- name: {{ template "application.name" . }}

Expand All @@ -141,6 +144,10 @@ spec:
image: {{ $image }}

imagePullPolicy: {{ .Values.deployment.image.pullPolicy }}
{{- with .Values.deployment.lifecycle }}
lifecycle:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- if .Values.deployment.command }}
command: {{- include "application.tplvalues.render" (dict "value" .Values.deployment.command "context" $) | nindent 12 }}
{{- end }}
Expand Down Expand Up @@ -246,7 +253,7 @@ spec:
{{- toYaml .Values.deployment.readinessProbe.grpc | nindent 12 }}
{{- end }}
{{- end }}
{{- if or (.Values.deployment.volumeMounts) (and (eq .Values.persistence.enabled true) (eq .Values.persistence.mountPVC true) )}}
{{- if or (.Values.deployment.volumeMounts) (and (eq .Values.persistence.enabled true) (eq .Values.persistence.mountPVC true) )}}
volumeMounts:
{{- if (eq .Values.persistence.mountPVC true) }}
- mountPath: {{ .Values.persistence.mountPath }}
Expand All @@ -255,7 +262,7 @@ spec:
{{- if .Values.deployment.volumeMounts }}
{{- range $key, $value := .Values.deployment.volumeMounts }}
- name: {{ $key }}
{{ include "application.tplvalues.render" ( dict "value" $value "context" $ ) | indent 10 }}
{{ include "application.tplvalues.render" ( dict "value" $value "context" $ ) | indent 10 }}
{{- end }}
{{- end }}
{{- end }}
Expand All @@ -271,14 +278,14 @@ spec:
{{ toYaml .Values.deployment.additionalContainers | indent 6 }}
{{- end }}
{{- if .Values.deployment.securityContext }}
securityContext:
securityContext:
{{ toYaml .Values.deployment.securityContext | indent 8 }}
{{- end }}
{{- if .Values.deployment.dnsConfig }}
dnsConfig:
dnsConfig:
{{ toYaml .Values.deployment.dnsConfig | indent 8 }}
{{- end }}
{{- if or (.Values.deployment.openshiftOAuthProxy.enabled) (.Values.deployment.volumes) (and (eq .Values.persistence.enabled true) (eq .Values.persistence.mountPVC true) )}}
{{- if or (.Values.deployment.openshiftOAuthProxy.enabled) (.Values.deployment.volumes) (and (eq .Values.persistence.enabled true) (eq .Values.persistence.mountPVC true) )}}
volumes:
{{- if .Values.deployment.openshiftOAuthProxy.enabled }}
- name: proxy-tls
Expand All @@ -295,8 +302,8 @@ spec:
{{- end }}
{{- end }}
{{- if .Values.deployment.volumes }}
{{- range $key, $value := .Values.deployment.volumes }}
- name: {{ $key }}
{{- range $key, $value := .Values.deployment.volumes }}
- name: {{ $key }}
{{ include "application.tplvalues.render" ( dict "value" $value "context" $ ) | indent 8 }}
{{- end }}
{{- end }}
Expand Down
Loading