Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add disableConnectionTypes feature flag #3041

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 2 additions & 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

emilys314 marked this conversation as resolved.
Show resolved Hide resolved
Expand Down Expand Up @@ -65,6 +66,7 @@ spec:
disableS3Endpoint: true
disableArtifactsAPI: true
disableDistributedWorkloads: false
disableConnectionTypes: false
```
## Additional fields
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { SupportedArea, useIsAreaAvailable } from '~/concepts/areas';

const useConnectionTypesEnabled = (): boolean =>
useIsAreaAvailable(SupportedArea.DATA_CONNECTIONS_TYPES).status;

export default useConnectionTypesEnabled;
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
Loading