-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Distribute CRDs using helm chart (#1244)
* Distribute CRDs using helm chart CRDs for now were being deployed using controller, we should make sure CRDs are being distributed by helm chart preferrably but if we are consuming kanister not as sub chart in that case they can set an env var in the kanister pod to make sure CRDs are being created. * Remove crd source files * Fix minor helm template issue * Make sure RBAC for CRD creation is only done if createCRDs is true * Address review comments - rename helm field `createCRDs` to `updateCRDs` - refactor order of embedded files * Address review comments * Refactor, revert part of last review commentss * Change default value of `updateCRDs` to `true` When we didn't have this `updateCRDs` flag in values.yaml controller was responsible to create/update the CRDs. To make sure that we follow the same default path we are changing the default value of `updateCRDs` to `true`, so that kanister controller will be responsible to manager crds. If thats not required/possible, this flag can be set to false. * Address review comment, default to true for create crd Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
20630f3
commit fe00227
Showing
12 changed files
with
70 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../pkg/customresource/actionset.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../pkg/customresource/blueprint.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../pkg/customresource/profile.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package customresource | ||
|
||
import "embed" | ||
|
||
// embed.go embeds the CRD yamls (actionset, profile, blueprint) with the | ||
// controller binary so that we can read these manifests in runtime. | ||
|
||
// We need these manfiests at two places, at `pkg/customresource/` and at | ||
// `helm/kanister-operator/crds`. To make sure we are not duplicating the | ||
// things we have original files at `pkg/customresource` and have soft links | ||
// at `helm/kanister-operator/crds`. | ||
|
||
//go:embed actionset.yaml | ||
//go:embed blueprint.yaml | ||
//go:embed profile.yaml | ||
var yamls embed.FS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters