-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add new backend system support for existing backend plugins tha…
…t have not been migrated over yet (#1132) * feat(3scale-backend): add new backend system support for 3scale-backend * feat(aap-backend): add new backend system support for aap-backend plugin * chore(keycloak-backend): add TODO note to add extension points in future * feat(kiali-backend): add new backend system support for kiali-backend plugin * feat(matomo-backend): add new backend system support for the matomo-backend plugin * feat(notifications-backend): add new backend system support for the notifications-backend plugin * docs(3scale-backend): update README with new backend installation procedure * docs(aap-backend): update README with new backend installation procedure * docs(keycloak-backend): update README with new backend installation procedure * docs(notifications-backend): update README with new backend installation procedure * docs(matomo-backend): update README for new backend installation procedure * feat(feedback-backend): add new backend system support * docs(feedback-backend): update README with new backend installation procedure * feat(quay-action): add support for the new backend system * feat(kubernetes-action): add support for the new backend system * feat(regex-actions): add new backend system support * feat(servicenow-actions): add new backend system support * feat(sonarqube-actions): add new backend system support * feat(ocm-backend): add new backend system support * feat(orchestrator-backend): add support for new backend system * chore: remove unnecessary dynamic alpha.ts files * feat(cli): update plugin templates to support new backend * chore(cli): update scaffolder module name * chore(cli): remove unused imports from the backend plugin template
- Loading branch information
Showing
90 changed files
with
1,401 additions
and
597 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
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 @@ | ||
export { {{moduleVar}} as default } from './module'; |
8 changes: 0 additions & 8 deletions
8
packages/cli/templates/default-backend-module/src/dynamic/alpha.ts.hbs
This file was deleted.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
packages/cli/templates/default-backend-module/src/module.ts.hbs
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 @@ | ||
export { {{id}}Plugin as default } from './plugin'; |
8 changes: 0 additions & 8 deletions
8
packages/cli/templates/default-backend-plugin/src/dynamic/alpha.ts.hbs
This file was deleted.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
packages/cli/templates/default-backend-plugin/src/plugin.ts.hbs
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,25 @@ | ||
import { loggerToWinstonLogger } from '@backstage/backend-common'; | ||
import { coreServices, createBackendPlugin } from '@backstage/backend-plugin-api'; | ||
|
||
import { createRouter } from './service/router'; | ||
|
||
/** | ||
* The {{id}} backend plugin. | ||
* | ||
* @alpha | ||
*/ | ||
export const {{id}}Plugin = createBackendPlugin({ | ||
pluginId: '{{id}}', | ||
register(env) { | ||
env.registerInit({ | ||
deps: { | ||
logger: coreServices.logger, | ||
config: coreServices.rootConfig, | ||
http: coreServices.httpRouter, | ||
}, | ||
async init({ config, logger, http }) { | ||
http.use(() => createRouter({...config, logger: loggerToWinstonLogger(logger)})); | ||
}, | ||
}); | ||
}, | ||
}); |
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 @@ | ||
export { {{id}}ActionScaffolderModule as default } from './module'; |
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,22 @@ | ||
/* | ||
* Copyright 2024 The Janus IDP Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
/** | ||
* The 3Scale backend plugin integrates 3Scale into Backstage | ||
* | ||
* @packageDocumentation | ||
*/ | ||
export { catalogModule3ScaleEntityProvider as default } from './module'; |
This file was deleted.
Oops, something went wrong.
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,50 @@ | ||
/* | ||
* Copyright 2024 The Janus IDP Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
import { loggerToWinstonLogger } from '@backstage/backend-common'; | ||
import { | ||
coreServices, | ||
createBackendModule, | ||
} from '@backstage/backend-plugin-api'; | ||
import { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node/alpha'; | ||
|
||
import { ThreeScaleApiEntityProvider } from './providers'; | ||
|
||
export const catalogModule3ScaleEntityProvider = createBackendModule({ | ||
moduleId: 'catalog-backend-module-3scale', | ||
pluginId: 'catalog', | ||
register(env) { | ||
env.registerInit({ | ||
deps: { | ||
catalog: catalogProcessingExtensionPoint, | ||
config: coreServices.rootConfig, | ||
logger: coreServices.logger, | ||
scheduler: coreServices.scheduler, | ||
}, | ||
async init({ catalog, config, logger, scheduler }) { | ||
catalog.addEntityProvider( | ||
ThreeScaleApiEntityProvider.fromConfig(config, { | ||
logger: loggerToWinstonLogger(logger), | ||
scheduler: scheduler, | ||
schedule: scheduler.createScheduledTaskRunner({ | ||
frequency: { minutes: 30 }, | ||
timeout: { minutes: 3 }, | ||
}), | ||
}), | ||
); | ||
}, | ||
}); | ||
}, | ||
}); |
Oops, something went wrong.