feat: Add community modules#3947
Conversation
| return resources; | ||
| }; | ||
|
|
||
| async function getResourcesYamls(link: string, post: Function) { |
There was a problem hiding this comment.
It look the same as postForCommunityResources from deleteModuleHelpers.tsx
mrCherry97
left a comment
There was a problem hiding this comment.
Please double check if there is more functions with are the same or very similar which can be moved to like support or shared for adding functionalities and called in ModulesAdd and CommunityModulesAdd
| }} | ||
| /> | ||
| )} | ||
| {layoutState?.showCreate?.createType !== 'community' && ( |
| resourceType: 'kymas', | ||
| rawResourceTypeName: 'Kyma', | ||
| namespaceId: 'kyma-system', | ||
| apiGroup: 'operator.kyma-project.io', | ||
| apiVersion: 'v1beta2', |
There was a problem hiding this comment.
Do we need such specificity? In case of a Kyma update, we need to remember to change it.
| if (!existingModule && !isAlreadyInstalled) { | ||
| moduleMetaRelase?.spec.channels.forEach(channel => { | ||
| if (!acc.find(item => item.name === name)) { | ||
| acc.push({ | ||
| name: name, | ||
| channels: [ | ||
| { | ||
| channel: channel.channel, | ||
| version: channel.version, | ||
| isBeta: moduleMetaRelase.spec.beta ?? false, | ||
| isMetaRelease: true, | ||
| resources: module.spec.resources, | ||
| }, | ||
| ], | ||
| docsUrl: module.spec.info.documentation, | ||
| icon: { | ||
| link: module.spec?.info?.icons[0]?.link, | ||
| name: module.spec?.info?.icons[0]?.name, | ||
| }, | ||
| }); | ||
| } else { | ||
| acc | ||
| .find(item => item.name === name) | ||
| .channels.push({ | ||
| channel: channel.channel, | ||
| version: channel.version, | ||
| isBeta: moduleMetaRelase.spec.beta ?? false, | ||
| isMetaRelease: true, | ||
| resources: module.spec.resources, | ||
| }); | ||
| } | ||
| }); | ||
| } |
There was a problem hiding this comment.
This could be moved to a separate function and called dynamically in ModulesAdd and CommunityModulesAdd
| const modulesAddData = moduleTemplates?.items.reduce((acc, module) => { | ||
| const name = module.metadata.labels['operator.kyma-project.io/module-name']; | ||
| const existingModule = acc.find(item => { | ||
| return item.metadata.name === name; |
There was a problem hiding this comment.
Busola crashes when there is the same module in acc.
It tries to access metadata.name which is not available because it's custom data structure.
I created 2 busola moduleTempaltes with different version.
apiVersion: operator.kyma-project.io/v1beta2
kind: ModuleTemplate
metadata:
annotations:
operator.kyma-project.io/is-cluster-scoped: "false"
labels:
operator.kyma-project.io/module-name: busola
name: busola-fast
namespace: kyma-system
spec:
channel: fast
associatedResources:
- group: operator.kyma-project.io
kind: ClusterIP
version: v1alpha2
data:
apiVersion: operator.kyma-project.io/v1alpha1
kind: ClusterIP
metadata:
name: cluster-ip-zones
spec:
nodeSpreadLabel: topology.kubernetes.io/zone
descriptor:
component:
componentReferences: []
name: kyma-project.io/module/cluster-ip
provider: '{"name":"kyma-project.io","labels":[{"name":"kyma-project.io/built-by","value":"modulectl","version":"v1"}]}'
repositoryContexts:
- baseUrl: http://k3d-oci.localhost:5001
componentNameMapping: urlPath
type: OCIRegistry
resources:
- access:
localReference: sha256:b88d172173d41c7b0799512718e598efa5643e9eb3aeebbf88fd8e5e6e18098f
mediaType: application/x-tar
referenceName: raw-manifest
type: localBlob
digest:
hashAlgorithm: SHA-256
normalisationAlgorithm: genericBlobDigest/v1
value: b88d172173d41c7b0799512718e598efa5643e9eb3aeebbf88fd8e5e6e18098f
name: raw-manifest
relation: local
type: directory
version: 0.0.29
- access:
localReference: sha256:633d91a28e03e1bcb495095e92430a2d996e13faaa15ead90cc180514cf5a2c3
mediaType: application/x-tar
referenceName: default-cr
type: localBlob
digest:
hashAlgorithm: SHA-256
normalisationAlgorithm: genericBlobDigest/v1
value: 633d91a28e03e1bcb495095e92430a2d996e13faaa15ead90cc180514cf5a2c3
name: default-cr
relation: local
type: directory
version: 0.0.29
sources:
- access:
commit: 106643ead24aff8da197fc89a46ce546193ea8f1
repoUrl: https://github.com/pbochynski/cluster-ip.git
type: gitHub
labels:
- name: git.kyma-project.io/ref
value: HEAD
version: v1
name: module-sources
type: Github
version: 0.0.29
version: 0.0.29
meta:
schemaVersion: v2
info:
documentation: https://github.com/pbochynski
icons:
- link: https://raw.githubusercontent.com/pbochynski/cluster-ip/refs/heads/main/logo.png
name: module-icon
repository: https://github.com/pbochynski/cluster-ip.git
manager:
group: apps
kind: Deployment
name: busola
namespace: default
version: v1
mandatory: false
moduleName: busola
requiresDowntime: false
resources:
- link: https://github.com/kyma-project/busola/releases/download/v0.0.13/busola.yaml
name: rawManifest
version: 0.0.13apiVersion: operator.kyma-project.io/v1beta2
kind: ModuleTemplate
metadata:
annotations:
operator.kyma-project.io/is-cluster-scoped: "false"
labels:
operator.kyma-project.io/module-name: busola
name: busola-regular
namespace: kyma-system
spec:
channel: regular
associatedResources:
- group: operator.kyma-project.io
kind: ClusterIP
version: v1alpha2
data:
apiVersion: operator.kyma-project.io/v1alpha1
kind: ClusterIP
metadata:
name: cluster-ip-zones
spec:
nodeSpreadLabel: topology.kubernetes.io/zone
descriptor:
component:
componentReferences: []
name: kyma-project.io/module/cluster-ip
provider: '{"name":"kyma-project.io","labels":[{"name":"kyma-project.io/built-by","value":"modulectl","version":"v1"}]}'
repositoryContexts:
- baseUrl: http://k3d-oci.localhost:5001
componentNameMapping: urlPath
type: OCIRegistry
resources:
- access:
localReference: sha256:b88d172173d41c7b0799512718e598efa5643e9eb3aeebbf88fd8e5e6e18098f
mediaType: application/x-tar
referenceName: raw-manifest
type: localBlob
digest:
hashAlgorithm: SHA-256
normalisationAlgorithm: genericBlobDigest/v1
value: b88d172173d41c7b0799512718e598efa5643e9eb3aeebbf88fd8e5e6e18098f
name: raw-manifest
relation: local
type: directory
version: 0.0.29
- access:
localReference: sha256:633d91a28e03e1bcb495095e92430a2d996e13faaa15ead90cc180514cf5a2c3
mediaType: application/x-tar
referenceName: default-cr
type: localBlob
digest:
hashAlgorithm: SHA-256
normalisationAlgorithm: genericBlobDigest/v1
value: 633d91a28e03e1bcb495095e92430a2d996e13faaa15ead90cc180514cf5a2c3
name: default-cr
relation: local
type: directory
version: 0.0.29
sources:
- access:
commit: 106643ead24aff8da197fc89a46ce546193ea8f1
repoUrl: https://github.com/pbochynski/cluster-ip.git
type: gitHub
labels:
- name: git.kyma-project.io/ref
value: HEAD
version: v1
name: module-sources
type: Github
version: 0.0.29
version: 0.0.29
meta:
schemaVersion: v2
info:
documentation: https://github.com/pbochynski
icons:
- link: https://raw.githubusercontent.com/pbochynski/cluster-ip/refs/heads/main/logo.png
name: module-icon
repository: https://github.com/pbochynski/cluster-ip.git
manager:
group: apps
kind: Deployment
name: busola
namespace: default
version: v1
mandatory: false
moduleName: busola
requiresDowntime: false
resources:
- link: https://github.com/kyma-project/busola/releases/download/v0.0.10/busola.yaml
name: rawManifest
version: 0.0.10
src/components/KymaModules/components/communityModulesHelpers.ts
Outdated
Show resolved
Hide resolved
| {/* {checkIfSelectedModuleIsBeta() ? ( | ||
| <MessageStrip | ||
| key={'beta'} | ||
| design="Critical" | ||
| hideCloseButton | ||
| className="sap-margin-top-small" | ||
| > | ||
| {t('kyma-modules.beta-alert')} | ||
| </MessageStrip> | ||
| ) : null} */} |
|
After refreshing the page with either the Add Community Modules or the Add Modules form open, the forms are not being loaded, and I see an empty column Screen.Recording.2025-07-14.at.14.02.39.mov |
src/components/KymaModules/providers/CommunityModuleProvider.js
Outdated
Show resolved
Hide resolved
dbadura
left a comment
There was a problem hiding this comment.
Something is wrong I can't install busola.
dbadura
left a comment
There was a problem hiding this comment.
I found out that installing doesn't work when using Firefox.

Description
Changes proposed in this pull request:
Related issue(s)
Definition of done
backlog#4567