From 88182d2f776b934de9a16fdd4ca293949d945d9d Mon Sep 17 00:00:00 2001 From: "siraj.yasin" Date: Fri, 13 Aug 2021 14:02:42 +0000 Subject: [PATCH] Aligning to the recent changes for airshipctl * Dependant airshipctl change https://review.opendev.org/c/airship/airshipctl/+/800722 This PS fixes this issue: template: tmpl:9:78: executing "tmpl" at <.ephemeralCluster.ca.validity>: wrong type for value; expected int; got float64couldn't execute function: yaml: line 72: mapping values are not allowed in this context Change-Id: I10960ba341e80c213f466c18a4a778fcedce61dc --- .../multi-tenant/target/generator/secret-template.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/manifests/type/multi-tenant/target/generator/secret-template.yaml b/manifests/type/multi-tenant/target/generator/secret-template.yaml index 3c7c566c3..2b72d8a4c 100644 --- a/manifests/type/multi-tenant/target/generator/secret-template.yaml +++ b/manifests/type/multi-tenant/target/generator/secret-template.yaml @@ -32,8 +32,8 @@ template: | name: generated-secrets annotations: config.kubernetes.io/path: secrets.yaml - {{- $ephemeralClusterCa := genCAEx .ephemeralCluster.ca.subj .ephemeralCluster.ca.validity }} - {{- $ephemeralKubeconfigCert := genSignedCertEx .ephemeralCluster.kubeconfigCert.subj nil nil .ephemeralCluster.kubeconfigCert.validity $ephemeralClusterCa }} + {{- $ephemeralClusterCa := genCAEx .ephemeralCluster.ca.subj (int .ephemeralCluster.ca.validity) }} + {{- $ephemeralKubeconfigCert := genSignedCertEx .ephemeralCluster.kubeconfigCert.subj nil nil (int .ephemeralCluster.kubeconfigCert.validity) $ephemeralClusterCa }} ephemeralClusterCa: crt: {{ $ephemeralClusterCa.Cert|b64enc|quote }} key: {{ $ephemeralClusterCa.Key|b64enc|quote }} @@ -41,8 +41,8 @@ template: | certificate-authority-data: {{ $ephemeralClusterCa.Cert|b64enc|quote }} client-certificate-data: {{ $ephemeralKubeconfigCert.Cert|b64enc|quote }} client-key-data: {{ $ephemeralKubeconfigCert.Key|b64enc|quote }} - {{- $targetClusterCa := genCAEx .targetCluster.ca.subj .targetCluster.ca.validity }} - {{- $targetKubeconfigCert := genSignedCertEx .targetCluster.kubeconfigCert.subj nil nil .targetCluster.kubeconfigCert.validity $targetClusterCa }} + {{- $targetClusterCa := genCAEx .targetCluster.ca.subj (int .targetCluster.ca.validity) }} + {{- $targetKubeconfigCert := genSignedCertEx .targetCluster.kubeconfigCert.subj nil nil (int .targetCluster.kubeconfigCert.validity) $targetClusterCa }} targetClusterCa: tls.crt: {{ $targetClusterCa.Cert|b64enc|quote }} tls.key: {{ $targetClusterCa.Key|b64enc|quote }} @@ -54,7 +54,7 @@ template: | passwords: root: {{ derivePassword 1 "long" (randAscii 10) "user" "airshipit.org"|quote }} deployer: {{ derivePassword 1 "long" (randAscii 10) "user" "airshipit.org"|quote }} - {{- $sshKey := genSSHKeyPair .sshKeyGen.encBit }} + {{- $sshKey := genSSHKeyPair (int .sshKeyGen.encBit) }} sshKeys: privateKey: {{ $sshKey.Private|quote }} publicKey: {{ $sshKey.Public|quote }}