Skip to content

Commit

Permalink
feat: Add feature gates flag (kaito-project#368)
Browse files Browse the repository at this point in the history
**Reason for Change**:
- Add `feature-gates` flag to the Kaito controller.
- Support the `karpenter` feature gate with default value, `false`.
- Enable setting the feature gate flag via helm chart.

In addition to some chores:
- Exclude the auto generated and mock files from unit test coverage.
- Upgrade k8s version using in the tests to the current supported
version.

**Requirements**

- [x] added unit tests and e2e tests (if applicable).

**Issue Fixed**:
<!-- If this PR fixes GitHub issue 4321, add "Fixes #4321" to the next
line. -->

**Notes for Reviewers**:

---------

Signed-off-by: Heba Elayoty <hebaelayoty@gmail.com>
  • Loading branch information
helayoty authored and smritidahal653 committed Jun 7, 2024
1 parent 5771f2d commit d409218
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/tuning/preset-tuning_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ func TestEnsureTuningConfigMap(t *testing.T) {
os.Setenv(consts.DefaultReleaseNamespaceEnvVar, "release-namespace")
},
callMocks: func(c *test.MockClient) {
os.Setenv(consts.DefaultReleaseNamespaceEnvVar, "release-namespace")
c.On("Get", mock.IsType(context.Background()), mock.Anything, mock.IsType(&corev1.ConfigMap{}), mock.Anything).Return(nil)
},
workspaceObj: &kaitov1alpha1.Workspace{
Expand All @@ -211,6 +212,7 @@ func TestEnsureTuningConfigMap(t *testing.T) {
os.Setenv(consts.DefaultReleaseNamespaceEnvVar, "release-namespace")
},
callMocks: func(c *test.MockClient) {
os.Setenv(consts.DefaultReleaseNamespaceEnvVar, "release-namespace")
c.On("Get", mock.IsType(context.Background()), mock.Anything, mock.IsType(&corev1.ConfigMap{}), mock.Anything).Return(errors.NewNotFound(schema.GroupResource{}, "config-template"))
},
workspaceObj: &kaitov1alpha1.Workspace{
Expand Down

0 comments on commit d409218

Please sign in to comment.