From 9eca34c7a9d474339ff50916904a0f44416fe5c7 Mon Sep 17 00:00:00 2001 From: HubbeKing Date: Sun, 27 Sep 2020 17:21:41 +0300 Subject: [PATCH] Fix suggested style changes --- k8s.jsonnet | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/k8s.jsonnet b/k8s.jsonnet index 43ab196..60eae30 100644 --- a/k8s.jsonnet +++ b/k8s.jsonnet @@ -50,8 +50,8 @@ // Uncomment and give a secretName for ingress, if required for ingress TLS //ingress_secret_name: "wubloader-tls", - // Additional metadata labels for Ingress (cert-manager, etc.) - uncomment if needed, adjust as necessary - //ingress_labels: {"cert-manager.io/cluster-issuer": "name-of-issuer"}, + // Additional metadata labels for Ingress (cert-manager, etc.) - adjust as needed for your setup + ingress_labels: {}, // Connection args for the database. // If database is defined in this config, host and port should be postgres:5432. @@ -210,7 +210,7 @@ apiVersion: "networking.k8s.io/v1beta1", metadata: { name: "wubloader", - labels: {app: "wubloader"} + (if (std.objectHas($.config, "ingress_labels")) then $.config.ingress_labels else {}), + labels: {app: "wubloader"} + $.config.ingress_labels, }, spec: { rules: [ @@ -241,12 +241,12 @@ }, }, ], - [if ($.config.ingress_tls) then 'tls']: [ + [if $.config.ingress_tls then 'tls']: [ { hosts: [ $.config.ingress_host, ], - [if (std.objectHas($.config, "ingress_secret_name")) then 'secretName']: $.config.ingress_secret_name, + [if "ingress_secret_name" in $.config then 'secretName']: $.config.ingress_secret_name, }, ], },