diff --git a/charts/ingress-nginx/README.md b/charts/ingress-nginx/README.md index c542d8789..719519256 100644 --- a/charts/ingress-nginx/README.md +++ b/charts/ingress-nginx/README.md @@ -491,6 +491,7 @@ metadata: | controller.sysctls | object | `{}` | sysctls for controller pods # Ref: https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/ | | controller.tcp.annotations | object | `{}` | Annotations to be added to the tcp config configmap | | controller.tcp.configMapNamespace | string | `""` | Allows customization of the tcp-services-configmap; defaults to $(POD_NAMESPACE) | +| controller.templateEngine | string | `"go-template"` | Defines which template engine should be used when creating NGINX configuration. Can be 'go-template' or 'crossplane' | | controller.terminationGracePeriodSeconds | int | `300` | `terminationGracePeriodSeconds` to avoid killing pods before we are ready # wait up to five minutes for the drain of connections # | | controller.tolerations | list | `[]` | Node tolerations for server scheduling to nodes with taints # Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ # | | controller.topologySpreadConstraints | list | `[]` | Topology spread constraints rely on node labels to identify the topology domain(s) that each Node is in. # Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ # | diff --git a/charts/ingress-nginx/values.yaml b/charts/ingress-nginx/values.yaml index 1bbf112cc..d9af12664 100644 --- a/charts/ingress-nginx/values.yaml +++ b/charts/ingress-nginx/values.yaml @@ -21,6 +21,7 @@ commonLabels: {} controller: name: controller + # -- Defines which template engine should be used when creating NGINX configuration. Can be 'go-template' or 'crossplane' templateEngine: "go-template" enableAnnotationValidations: true image: diff --git a/internal/ingress/controller/controller_test.go b/internal/ingress/controller/controller_test.go index 9d3fea470..a830a5729 100644 --- a/internal/ingress/controller/controller_test.go +++ b/internal/ingress/controller/controller_test.go @@ -157,6 +157,10 @@ func (ntc testNginxTestCommand) Test(cfg string) ([]byte, error) { type fakeTemplate struct{} +func (fakeTemplate) Validate(filename string) error { + return nil +} + func (fakeTemplate) Write(conf *ngx_config.TemplateConfig) ([]byte, error) { r := []byte{} for _, s := range conf.Servers {