Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[release-4.9] Bug 2019884: adds feature flag for all extension for knative plugin #10393

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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
81 changes: 70 additions & 11 deletions frontend/packages/knative-plugin/console-extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,28 @@
"flag": "FLAG_KNATIVE_EVENTING_CHANNEL"
}
},
{
"type": "console.flag/model",
"properties": {
"model": {
"group": "eventing.knative.dev",
"version": "v1",
"kind": "Trigger"
},
"flag": "FLAG_KNATIVE_EVENTING_TRIGGER"
}
},
{
"type": "console.flag/model",
"properties": {
"model": {
"group": "messaging.knative.dev",
"version": "v1",
"kind": "Subscription"
},
"flag": "FLAG_KNATIVE_EVENTING_SUBSCRIPTION"
}
},
{
"type": "console.flag/model",
"properties": {
Expand All @@ -98,7 +120,6 @@
"flag": "FLAG_CAMEL_KAMELETS"
}
},

{
"type": "console.page/resource/list",
"properties": {
Expand All @@ -108,6 +129,9 @@
"kind": "Revision"
},
"component": { "$codeRef": "revisionsComponent.RevisionsPage" }
},
"flags": {
"required": ["KNATIVE_SERVING", "KNATIVE_SERVING_SERVICE", "KNATIVE_SERVING_REVISION"]
}
},
{
Expand All @@ -119,6 +143,9 @@
"kind": "Service"
},
"component": { "$codeRef": "servicesComponent.ServicesPage" }
},
"flags": {
"required": ["KNATIVE_SERVING", "KNATIVE_SERVING_SERVICE"]
}
},
{
Expand All @@ -130,6 +157,9 @@
"kind": "Route"
},
"component": { "$codeRef": "routesComponent.RoutesPage" }
},
"flags": {
"required": ["KNATIVE_SERVING", "KNATIVE_SERVING_SERVICE", "KNATIVE_SERVING_ROUTE"]
}
},
{
Expand All @@ -141,6 +171,9 @@
"kind": "Revision"
},
"component": { "$codeRef": "revisionsComponent.RevisionDetailsPage" }
},
"flags": {
"required": ["KNATIVE_SERVING", "KNATIVE_SERVING_SERVICE", "KNATIVE_SERVING_REVISION"]
}
},
{
Expand All @@ -152,6 +185,9 @@
"kind": "Route"
},
"component": { "$codeRef": "routesComponent.RouteDetailsPage" }
},
"flags": {
"required": ["KNATIVE_SERVING", "KNATIVE_SERVING_SERVICE", "KNATIVE_SERVING_ROUTE"]
}
},
{
Expand All @@ -163,6 +199,9 @@
"kind": "Service"
},
"component": { "$codeRef": "servicesComponent.ServiceDetailsPage" }
},
"flags": {
"required": ["KNATIVE_SERVING", "KNATIVE_SERVING_SERVICE"]
}
},
{
Expand All @@ -174,9 +213,11 @@
"kind": "KnativeServing"
},
"component": { "$codeRef": "overviewComponent.KnativeServingDetailsPage" }
},
"flags": {
"required": ["KNATIVE_SERVING"]
}
},

{
"type": "console.page/resource/list",
"properties": {
Expand All @@ -186,9 +227,11 @@
"kind": "Trigger"
},
"component": { "$codeRef": "eventingComponent.TriggerListPage" }
},
"flags": {
"required": ["KNATIVE_EVENTING", "FLAG_KNATIVE_EVENTING_TRIGGER"]
}
},

{
"type": "console.page/resource/details",
"properties": {
Expand All @@ -198,6 +241,9 @@
"kind": "Trigger"
},
"component": { "$codeRef": "pubSubComponent.TriggerDetailsPage" }
},
"flags": {
"required": ["KNATIVE_EVENTING", "FLAG_KNATIVE_EVENTING_TRIGGER"]
}
},
{
Expand All @@ -209,6 +255,9 @@
"kind": "Subscription"
},
"component": { "$codeRef": "eventingComponent.SubscriptionListPage" }
},
"flags": {
"required": ["KNATIVE_EVENTING", "FLAG_KNATIVE_EVENTING_SUBSCRIPTION"]
}
},
{
Expand All @@ -220,6 +269,9 @@
"kind": "Subscription"
},
"component": { "$codeRef": "pubSubComponent.SubscriptionDetailsPage" }
},
"flags": {
"required": ["KNATIVE_EVENTING", "FLAG_KNATIVE_EVENTING_SUBSCRIPTION"]
}
},
{
Expand Down Expand Up @@ -308,6 +360,9 @@
"component": {
"$codeRef": "overviewComponent.ServingListPage"
}
},
"flags": {
"required": ["KNATIVE_SERVING"]
}
},
{
Expand All @@ -331,6 +386,9 @@
"component": {
"$codeRef": "eventingComponent.EventingListPage"
}
},
"flags": {
"required": ["KNATIVE_EVENTING"]
}
},
{
Expand All @@ -346,14 +404,16 @@
"required": ["KNATIVE_SERVING_SERVICE"]
}
},

{
"type": "dev-console.add/action-group",
"properties": {
"id": "eventing",
"name": "%knative-plugin~Eventing%",
"insertBefore": "local-machine",
"insertAfter": "container-images"
},
"flags": {
"required": ["KNATIVE_EVENTING"]
}
},
{
Expand Down Expand Up @@ -458,13 +518,6 @@
"required": ["KNATIVE_SERVING"]
}
},
{
"type": "console.navigation/section",
"properties": {
"id": "serverless",
"name": "%knative-plugin~Serverless%"
}
},
{
"type": "console.navigation/href",
"properties": {
Expand Down Expand Up @@ -509,6 +562,9 @@
"template": {
"$codeRef": "yamlTemplates.defaultYamlTemplate"
}
},
"flags": {
"required": ["KNATIVE_SERVING", "KNATIVE_SERVING_SERVICE"]
}
},
{
Expand Down Expand Up @@ -571,6 +627,9 @@
"properties": {
"getTopologyFilters": { "$codeRef": "topology.getTopologyFilters" },
"applyDisplayOptions": { "$codeRef": "topology.applyKnativeDisplayOptions" }
},
"flags": {
"required": ["KNATIVE_SERVING", "KNATIVE_EVENTING"]
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"Event sources are objects that link to an event producer and an event sink or consumer. Cluster administrators can customize the content made available in the catalog.": "Event sources are objects that link to an event producer and an event sink or consumer. Cluster administrators can customize the content made available in the catalog.",
"**Event sources** are objects that link to an event producer and an event sink or consumer.": "**Event sources** are objects that link to an event producer and an event sink or consumer.",
"Provider": "Provider",
"Serverless": "Serverless",
"Serving": "Serving",
"Create Service Binding": "Create Service Binding",
"Add Subscription": "Add Subscription",
Expand Down
15 changes: 15 additions & 0 deletions frontend/packages/knative-plugin/src/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,18 @@ const plugin: Plugin<ConsumedExtensions> = [
'./components/overview/OverviewDetailsKnativeResourcesTab' /* webpackChunkName: "knative-overview" */
).then((m) => m.default),
},
flags: {
required: [FLAG_KNATIVE_SERVING_SERVICE],
},
},
{
type: 'KebabActions',
properties: {
getKebabActionsForKind,
},
flags: {
required: [FLAG_KNATIVE_EVENTING],
},
},
{
type: 'KebabActions',
Expand Down Expand Up @@ -154,20 +160,29 @@ const plugin: Plugin<ConsumedExtensions> = [
getModels: eventSourceModelsProviderForBreadcrumbs,
breadcrumbsProvider: eventSourceBreadcrumbsProvider,
},
flags: {
required: [FLAG_KNATIVE_EVENTING],
},
},
{
type: 'DetailPageBreadCrumbs',
properties: {
getModels: channelModelsProviderForBreadcrumbs,
breadcrumbsProvider: channelBreadcrumbsProvider,
},
flags: {
required: [FLAG_KNATIVE_EVENTING],
},
},
{
type: 'DetailPageBreadCrumbs',
properties: {
getModels: brokerModelProviderForBreadcrumbs,
breadcrumbsProvider: brokerBreadcrumbsProvider,
},
flags: {
required: [FLAG_KNATIVE_EVENTING],
},
},
...topologyPlugin,
];
Expand Down