Skip to content

Commit 6ab9317

Browse files
authored
Merge pull request #444 from qlik-oss/fix_crds
Fix crds
2 parents 568012e + 5899760 commit 6ab9317

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

pkg/qliksense/crds.go

+7-3
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,15 @@ func getQliksenseInitCrds(qcr *qapi.QliksenseCR) (string, error) {
9393
}
9494
}
9595

96-
qInitMsPath := filepath.Join(repoPath, Q_INIT_CRD_PATH)
96+
qInitMsPath := filepath.Join(repoPath, "manifests", qcr.Spec.Profile, "crds")
9797
if _, err := os.Lstat(qInitMsPath); err != nil {
98-
// older version of qliksense-init used
99-
qInitMsPath = filepath.Join(repoPath, "manifests/base/manifests/qliksense-init")
98+
qInitMsPath = filepath.Join(repoPath, Q_INIT_CRD_PATH)
99+
if _, err := os.Lstat(qInitMsPath); err != nil {
100+
// older version of qliksense-init used
101+
qInitMsPath = filepath.Join(repoPath, "manifests/base/manifests/qliksense-init")
102+
}
100103
}
104+
101105
qInitByte, err := ExecuteKustomizeBuild(qInitMsPath)
102106
if err != nil {
103107
fmt.Println("cannot generate crds for qliksense-init", err)

0 commit comments

Comments
 (0)