Skip to content

Commit

Permalink
Add disableConnectionTypes feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
emilys314 committed Jul 29, 2024
1 parent 3aeb340 commit 8403e6a
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions backend/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export type DashboardConfig = K8sResourceCommon & {
disableArtifactsAPI: boolean;
disableDistributedWorkloads: boolean;
disableModelRegistry: boolean;
disableConnectionTypes: boolean;
};
groupsConfig?: {
adminGroups: string;
Expand Down
1 change: 1 addition & 0 deletions backend/src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export const blankDashboardCR: DashboardConfig = {
disableArtifactsAPI: true,
disableDistributedWorkloads: false,
disableModelRegistry: true,
disableConnectionTypes: true,
},
notebookController: {
enabled: true,
Expand Down
1 change: 1 addition & 0 deletions docs/dashboard-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ The following are a list of features that are supported, along with there defaul
| disablePerformanceMetrics | false | Disables Endpoint Performance tab from Model Serving metrics. |
| disableDistributedWorkloads | false | Disables Distributed Workload Metrics from the dashboard. |
| disableModelRegistry | true | Disables Model Registry from the dashboard. |
| disableConnectionTypes | true | Disables creating custom data connection types from the dashboard. |

## Defaults

Expand Down
3 changes: 3 additions & 0 deletions frontend/src/__mocks__/mockDashboardConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ type MockDashboardConfigType = {
disableArtifactsAPI?: boolean;
disableDistributedWorkloads?: boolean;
disableModelRegistry?: boolean;
disableConnectionTypes?: boolean;
disableNotebookController?: boolean;
notebookSizes?: NotebookSize[];
};
Expand Down Expand Up @@ -57,6 +58,7 @@ export const mockDashboardConfig = ({
disableArtifactsAPI = true,
disableDistributedWorkloads = false,
disableModelRegistry = true,
disableConnectionTypes = true,
disableNotebookController = false,
notebookSizes = [
{
Expand Down Expand Up @@ -164,6 +166,7 @@ export const mockDashboardConfig = ({
disableArtifactsAPI,
disableDistributedWorkloads,
disableModelRegistry,
disableConnectionTypes,
},
notebookController: {
enabled: !disableNotebookController,
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/concepts/areas/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const allFeatureFlags: string[] = Object.keys({
disableArtifactsAPI: false,
disableDistributedWorkloads: false,
disableModelRegistry: false,
disableConnectionTypes: false,
} satisfies DashboardCommonConfig);

export const SupportedAreasStateMap: SupportedAreasState = {
Expand Down Expand Up @@ -123,4 +124,7 @@ export const SupportedAreasStateMap: SupportedAreasState = {
requiredComponents: [StackComponent.MODEL_REGISTRY],
requiredCapabilities: [StackCapability.SERVICE_MESH, StackCapability.SERVICE_MESH_AUTHZ],
},
[SupportedArea.DATA_CONNECTIONS_TYPES]: {
featureFlags: ['disableConnectionTypes'],
},
};
2 changes: 2 additions & 0 deletions frontend/src/concepts/areas/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ export enum SupportedArea {

/* Model Registry areas */
MODEL_REGISTRY = 'model-registry',

DATA_CONNECTIONS_TYPES = 'data-connections-types',
}

/** Components deployed by the Operator. Part of the DSC Status. */
Expand Down
1 change: 1 addition & 0 deletions frontend/src/k8sTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1239,6 +1239,7 @@ export type DashboardCommonConfig = {
disableArtifactsAPI: boolean;
disableDistributedWorkloads: boolean;
disableModelRegistry: boolean;
disableConnectionTypes: boolean;
};

export type DashboardConfigKind = K8sResourceCommon & {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ spec:
type: boolean
disableModelRegistry:
type: boolean
disableConnectionTypes:
type: boolean
groupsConfig:
type: object
required:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ spec:
disableModelMesh: false
disableDistributedWorkloads: false
disableModelRegistry: true
disableConnectionTypes: true
groupsConfig:
adminGroups: "$(admin_groups)"
allowedGroups: "system:authenticated"
Expand Down

0 comments on commit 8403e6a

Please # to comment.