1
0
mirror of synced 2025-12-19 18:05:53 -05:00

Use crds in profile, if exists

Signed-off-by: Boris Kuschel <boris.kuschel@qlik.com>
This commit is contained in:
Boris Kuschel
2020-09-30 09:03:56 -04:00
parent 568012edd8
commit a63c400106

View File

@@ -93,11 +93,15 @@ func getQliksenseInitCrds(qcr *qapi.QliksenseCR) (string, error) {
}
}
qInitMsPath := filepath.Join(repoPath, Q_INIT_CRD_PATH)
qInitMsPath := filepath.Join(repoPath, "manifests", qcr.Spec.Profile, "crds")
if _, err := os.Lstat(qInitMsPath); err != nil {
// older version of qliksense-init used
qInitMsPath = filepath.Join(repoPath, "manifests/base/manifests/qliksense-init")
qInitMsPath = filepath.Join(repoPath, Q_INIT_CRD_PATH)
if _, err := os.Lstat(qInitMsPath); err != nil {
// older version of qliksense-init used
qInitMsPath = filepath.Join(repoPath, "manifests/base/manifests/")
}
}
qInitByte, err := ExecuteKustomizeBuild(qInitMsPath)
if err != nil {
fmt.Println("cannot generate crds for qliksense-init", err)