Skip to content

Commit

Permalink
Merge pull request #444 from qlik-oss/fix_crds
Browse files Browse the repository at this point in the history
Fix crds
  • Loading branch information
bkuschel authored Sep 30, 2020
2 parents 568012e + 5899760 commit 6ab9317
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pkg/qliksense/crds.go
Original file line number Diff line number Diff line change
Expand Up @@ -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/qliksense-init")
}
}

qInitByte, err := ExecuteKustomizeBuild(qInitMsPath)
if err != nil {
fmt.Println("cannot generate crds for qliksense-init", err)
Expand Down

0 comments on commit 6ab9317

Please sign in to comment.