diff --git a/library/common-test/Chart.yaml b/library/common-test/Chart.yaml index 62d4f8e4a05..efbe800f8a7 100644 --- a/library/common-test/Chart.yaml +++ b/library/common-test/Chart.yaml @@ -1,7 +1,8 @@ apiVersion: v2 name: common-test description: Helper chart to test different use cases of the common library -version: 1.2.0 +version: 1.2.1 +kubeVersion: ">=1.16.0-0" keywords: - truecharts - common diff --git a/library/common-test/ci/basic-values.yaml b/library/common-test/ci/basic-values.yaml index 77293628d5b..d72ffaa57b6 100644 --- a/library/common-test/ci/basic-values.yaml +++ b/library/common-test/ci/basic-values.yaml @@ -19,26 +19,6 @@ probes: enabled: true -appIngressEnabled: true -appIngress: - main: - enabled: true - mainhttp: - enabled: true - entrypoint: "web" - certType: "" - existingcert: "" - authForwardURL: "" - annotations: {} - labels: {} - hosts: - - host: app.truecharts.placeholder - paths: - - path: / - # Ignored if not kubeVersion >= 1.14-0 - pathType: Prefix - -appVolumesEnabled: true appVolumeMounts: data: enabled: true diff --git a/library/common-test/ci/codeserver-values.yaml b/library/common-test/ci/codeserver-values.yaml index 7149c42ca31..7bfa430efbf 100644 --- a/library/common-test/ci/codeserver-values.yaml +++ b/library/common-test/ci/codeserver-values.yaml @@ -11,7 +11,7 @@ ingress: enabled: true persistence: - config: + config: enabled: true emptyDir: true mountPath: /www/assets @@ -25,27 +25,8 @@ addons: volumeMounts: - name: config mountPath: /www/assets - -appIngressEnabled: true -appIngress: - main: - enabled: true - mainhttp: - enabled: true - entrypoint: "web" - certType: "" - existingcert: "" - authForwardURL: "" - annotations: {} - labels: {} - hosts: - - host: app.truecharts.placeholder - paths: - - path: / - # Ignored if not kubeVersion >= 1.14-0 - pathType: Prefix -appVolumesEnabled: true + appVolumeMounts: data: enabled: true diff --git a/library/common-test/values.yaml b/library/common-test/values.yaml index 1eaab4f8eda..3ec2edf6c52 100644 --- a/library/common-test/values.yaml +++ b/library/common-test/values.yaml @@ -10,26 +10,6 @@ service: ingress: enabled: true -appIngressEnabled: true -appIngress: - main: - enabled: true - mainhttp: - enabled: true - entrypoint: "web" - certType: "" - existingcert: "" - authForwardURL: "" - annotations: {} - labels: {} - hosts: - - host: app.truecharts.placeholder - paths: - - path: / - # Ignored if not kubeVersion >= 1.14-0 - pathType: Prefix - -appVolumesEnabled: true appVolumeMounts: data: enabled: true diff --git a/library/common/CHANGELOG.md b/library/common/CHANGELOG.md index cdb4339d857..3b9434bb4bf 100644 --- a/library/common/CHANGELOG.md +++ b/library/common/CHANGELOG.md @@ -4,6 +4,38 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.0.1] + +### Fixed + +- Fixed `kubeVersion` in `Chart.yaml` not working with people running k8s pre-releases +- Added `ingressClassName` to `values.yaml` + +## [3.0.0] + +### Changed + +- `probes.startupProbe` is now enabled by default. This will allow for quicker `Ready` states on Pods. It will precede the liveness and readiness Probes. *Note:* This requires that you are running [Kubernetes 1.16](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) +- Aligned our default values for liveness and readiness Probes with the Kubernetes defaults: + - `initialDelaySeconds` is now `0` + - `timeoutSeconds` is now `1` + - `failureThreshold` is now `3` + +## [2.5.1] + +### Added + +- Fixed a small typo in `values.yaml`: `ingress.tls.hostTpl` -> `ingress.tls.hostsTpl` + +## [2.5.0] + +### Added + +- Allow setting ingress values through Helm templates: + - `ingress.hosts.hostTpl` + - `ingress.tls.secretNameTpl` + - `ingress.tls.hostsTpl` + ## [2.4.0] ### Added @@ -84,6 +116,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 This is the last version before starting this changelog. All sorts of cool stuff was changed, but only `git log` remembers what that was :slightly_frowning_face: +[3.0.1]: https://github.com/k8s-at-home/charts/tree/common-3.0.1/charts/common + +[3.0.0]: https://github.com/k8s-at-home/charts/tree/common-3.0.0/charts/common + +[2.5.1]: https://github.com/k8s-at-home/charts/tree/common-2.5.1/charts/common + +[2.5.0]: https://github.com/k8s-at-home/charts/tree/common-2.5.0/charts/common + [2.4.0]: https://github.com/k8s-at-home/charts/tree/common-2.4.0/charts/common [2.3.0]: https://github.com/k8s-at-home/charts/tree/common-2.3.0/charts/common diff --git a/library/common/Chart.yaml b/library/common/Chart.yaml index 675ecc2d5ca..380912d1390 100644 --- a/library/common/Chart.yaml +++ b/library/common/Chart.yaml @@ -2,8 +2,9 @@ apiVersion: v2 name: common description: Function library for TrueCharts type: library -version: 0.12.2 -# upstream_version: 2.4.0 +version: 1.0.0 +kubeVersion: ">=1.16.0-0" +# upstream_version: 3.0.1 keywords: - truecharts - library-chart diff --git a/library/common/templates/_notes.tpl b/library/common/templates/_notes.tpl index 07904900802..4cba1996e20 100644 --- a/library/common/templates/_notes.tpl +++ b/library/common/templates/_notes.tpl @@ -6,7 +6,7 @@ Default NOTES.txt content. 1. Get the application URL by running these commands: {{- if .Values.ingress.enabled }} {{- range .Values.ingress.hosts }} - http{{ if $.Values.ingress.tls }}s{{ end }}://{{ .host }}{{ (first .paths).path }} + http{{ if $.Values.ingress.tls }}s{{ end }}://{{- if .hostTpl }}{{ tpl .hostTpl $ }}{{ else }}{{ .host }}{{ end }}{{ (first .paths).path }} {{- end }} {{- else if contains "NodePort" .Values.service.type }} export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.names.fullname" . }}) diff --git a/library/common/templates/_service.tpl b/library/common/templates/_service.tpl index 80a2a14fda0..2aba616d075 100644 --- a/library/common/templates/_service.tpl +++ b/library/common/templates/_service.tpl @@ -6,6 +6,7 @@ of the main Service and any additionalServices. {{- if .Values.service.enabled -}} {{- /* Generate primary service */ -}} {{- include "common.classes.service" . }} + {{- /* Generate additional services as required */ -}} {{- range $index, $extraService := .Values.service.additionalServices }} {{- if $extraService.enabled -}} diff --git a/library/common/templates/classes/_ingress.tpl b/library/common/templates/classes/_ingress.tpl index 713d3a3bdef..4f641c25386 100644 --- a/library/common/templates/classes/_ingress.tpl +++ b/library/common/templates/classes/_ingress.tpl @@ -38,12 +38,23 @@ spec: {{- range .hosts }} - {{ . | quote }} {{- end }} + {{- range .hostsTpl }} + - {{ tpl . $ | quote }} + {{- end }} + {{- if .secretNameTpl }} + secretName: {{ tpl .secretNameTpl $ | quote}} + {{- else }} secretName: {{ .secretName }} + {{- end }} {{- end }} {{- end }} rules: {{- range $values.hosts }} + {{- if .hostTpl }} + - host: {{ tpl .hostTpl $ | quote }} + {{- else }} - host: {{ .host | quote }} + {{- end }} http: paths: {{- range .paths }} diff --git a/library/common/values.yaml b/library/common/values.yaml index 1ba695c6133..13e7fa56150 100644 --- a/library/common/values.yaml +++ b/library/common/values.yaml @@ -24,7 +24,7 @@ fullnameOverride: "" podAnnotations: {} serviceAccount: - # Specifies whether a service account should be created + # Specifies whether a service account should be created create: false # Annotations to add to the service account annotations: {} @@ -33,7 +33,7 @@ serviceAccount: name: "" env: {} -# TZ: UTC + # TZ: UTC ## Variables with values set from templates, example ## With a release name of: demo, the example env value will be: demo-admin @@ -98,10 +98,10 @@ probes: ## The spec field contains the values for the default livenessProbe. ## If you selected custom: true, this field holds the definition of the livenessProbe. spec: - initialDelaySeconds: 30 - failureThreshold: 5 + initialDelaySeconds: 0 periodSeconds: 10 timeoutSeconds: 10 + failureThreshold: 5 readiness: enabled: true @@ -110,22 +110,23 @@ probes: ## The spec field contains the values for the default readinessProbe. ## If you selected custom: true, this field holds the definition of the readinessProbe. spec: - initialDelaySeconds: 30 - failureThreshold: 5 + initialDelaySeconds: 0 periodSeconds: 10 timeoutSeconds: 10 + failureThreshold: 5 startup: - enabled: false + enabled: true ## Set this to true if you wish to specify your own startupProbe custom: false ## The spec field contains the values for the default startupProbe. ## If you selected custom: true, this field holds the definition of the startupProbe. spec: - initialDelaySeconds: 5 - failureThreshold: 30 - periodSeconds: 10 + initialDelaySeconds: 0 timeoutSeconds: 10 + ## This means it has a maximum of 5*30=150 seconds to start up before it fails + periodSeconds: 5 + failureThreshold: 120 service: enabled: true @@ -178,14 +179,21 @@ ingress: labels: {} hosts: - host: chart-example.local + ## Or a tpl that is evaluated + # hostTpl: '{{ include "common.names.fullname" . }}.{{ .Release.Namespace }}.{{ .Values.ingress.domainname }}' paths: - path: / # Ignored if not kubeVersion >= 1.14-0 pathType: Prefix tls: [] # - secretName: chart-example-tls + ## Or if you need a dynamic secretname + # - secretNameTpl: '{{ include "common.names.fullname" . }}-ingress' # hosts: # - chart-example.local + ## Or a tpl that is evaluated + # hostsTpl: + # - '{{ include "common.names.fullname" . }}.{{ .Release.Namespace }}.{{ .Values.ingress.domainname }}' additionalIngresses: [] # - enabled: false # nameSuffix: "api" @@ -469,7 +477,6 @@ appAdditionalServicesEnabled: false # port: 3001 # targetPort: 3001 -appVolumesEnabled: false # appVolumeMounts: # config: # enabled: false @@ -488,42 +495,39 @@ appVolumesEnabled: false # hostPathEnabled: false # hostPath: "" -emptyDirVolumes: true - -appIngressEnabled: false -appIngress: - main: - enabled: false - entrypoint: "websecure" - certType: "letsencrypt-prod" - existingcert: "" - authForwardURL: "" - annotations: {} - labels: {} - hosts: - - host: app.truecharts.placeholder - paths: - - path: / - # Ignored if not kubeVersion >= 1.14-0 - pathType: Prefix - - maintcp: - enabled: false - type: "TCP" - entrypoint: "kms" - certType: "none" - existingcert: "" - annotations: {} - labels: {} - hosts: - - host: app.truecharts.placeholder - paths: - - path: / - # Ignored if not kubeVersion >= 1.14-0 - pathType: Prefix - mainudp: - enabled: false - type: "UDP" - entrypoint: "DNSUDP" - annotations: {} - labels: {} +# appIngress: +# main: +# enabled: false +# entrypoint: "websecure" +# certType: "letsencrypt-prod" +# existingcert: "" +# authForwardURL: "" +# annotations: {} +# labels: {} +# hosts: +# - host: app.truecharts.placeholder +# paths: +# - path: / +# # Ignored if not kubeVersion >= 1.14-0 +# pathType: Prefix +# +# maintcp: +# enabled: false +# type: "TCP" +# entrypoint: "kms" +# certType: "none" +# existingcert: "" +# annotations: {} +# labels: {} +# hosts: +# - host: app.truecharts.placeholder +# paths: +# - path: / +# # Ignored if not kubeVersion >= 1.14-0 +# pathType: Prefix +# mainudp: +# enabled: false +# type: "UDP" +# entrypoint: "DNSUDP" +# annotations: {} +# labels: {}