Skip to content

Alpha module list#2884

Open
anoipm wants to merge 36 commits into
kyma-project:mainfrom
anoipm:alpha-module-list
Open

Alpha module list#2884
anoipm wants to merge 36 commits into
kyma-project:mainfrom
anoipm:alpha-module-list

Conversation

@anoipm
Copy link
Copy Markdown
Contributor

@anoipm anoipm commented Apr 15, 2026

Description

Changes proposed in this pull request:

  • add (alpha/v2) module list command

Related issue(s)
See also:

@anoipm anoipm added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 15, 2026
@anoipm anoipm requested a review from a team as a code owner April 15, 2026 18:49
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 15, 2026

✅ Proposed changes verification passed

This pull request comes with up-to-date documentation and no illegal standard output usages.

Find more detailed information in the verify / standards (pull_request_target) action.

@anoipm anoipm requested a review from a team as a code owner April 15, 2026 19:07
Comment thread internal/modulesv2/repository/installedmodules.go Outdated
Comment thread internal/modulesv2/repository/moduleinstallationstate.go Outdated
Comment thread internal/modulesv2/list.go Outdated
@github-actions
Copy link
Copy Markdown

✅ Proposed changes verification passed

This pull request comes with up-to-date documentation and no illegal standard output usages.

Find more detailed information in the verify-pr-code / standards action.

@anoipm anoipm force-pushed the alpha-module-list branch from 7e24e9e to f8c347b Compare May 14, 2026 20:57
@github-actions
Copy link
Copy Markdown

✅ Proposed changes verification passed

This pull request comes with up-to-date documentation and no illegal standard output usages.

Find more detailed information in the verify-pr-code / standards action.

Comment on lines +29 to +36
for i, status := range kymaCR.Status.Modules {
raw := kyma.KymaModuleInfo{Status: status}
for _, spec := range kymaCR.Spec.Modules {
if spec.Name == status.Name {
raw.Spec = spec
break
}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Module entry in kyma.spec.modules comes from a user and the entry in status is populated by the lifecycle manager. When lifecycle manager fails somehow and won't populate the status we might lose information that user wanted to enable the module (i.e. module will be present in spec and will be missing in status). I'm not saying it's very probable scenario but I think it's safer to iterate over the module spec in the first place

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I've just realized that when we remove entry from the spec then we are still going to have entry in the status as it's going to be in Deleting state for some time, so it goes both ways:

  1. user adds entry in the spec - for some time we might have entry only in the spec and not in status before lifecycle manager gets to reconcile the module
  2. user removes entry from the spec - then for some time we have entry only in the status as it's in the Deleting state

So I believe we should iterate separately the status and spec collections and compose the result

@anoipm anoipm removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 18, 2026
@musztardem musztardem self-assigned this May 18, 2026
ModuleState: module.ModuleState,
Managed: module.IsManaged(),
CustomResourcePolicy: module.CustomResourcePolicy,
InstallationState: installationState,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With that approach we've detached the installationState from the moduleInstallation. I think the installationState should live in the moduleInstallation and population of it's value should be handled in the NewModuleInstallationFromRaw.

return &moduleInstallationStateRepository{kubeClient: kubeClient}
}

func (r *moduleInstallationStateRepository) GetInstallationState(ctx context.Context, module entities.ModuleInstallation) (string, error) {
Copy link
Copy Markdown
Contributor

@musztardem musztardem May 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is implementation of a separate repository for a single string value that I believe should live in the ModuleInstallation as the installation state belongs to the moduleInstallation. I see however that there's lot of extraction logic that might bloat the original repository.

I think we could introduce some kind of extractors or converters package that could live in the repository package that could have specialized classes responsible for such data transformations

@musztardem
Copy link
Copy Markdown
Contributor

musztardem commented May 18, 2026

There's some discrepancy in how module list and alpha module list work for managed modules, there's output from my console:

$ ./bin/kyma alpha module list
MODULE                  VERSION               CR POLICY         MANAGED   MODULE STATUS   INSTALLATION STATUS
api-gateway             3.6.2(regular)        CreateAndDelete   true      Ready           Ready
application-connector   1.3.1(fast)           CreateAndDelete   true      Ready           Ready
btp-operator            1.3.2(regular)        CreateAndDelete   true      Ready           Ready
cap-operator            0.28.0(fast)          CreateAndDelete   true      Ready           Ready
cfapi                   0.4.0(experimental)   CreateAndDelete   true      Ready           Ready
cloud-manager           1.7.1(fast)           CreateAndDelete   true      Ready           Ready
connectivity-proxy      1.2.2(fast)           CreateAndDelete   true      Ready           Ready
eventing                1.5.3(fast)           CreateAndDelete   true      Deleting        Deleting
istio                   1.26.7(regular)       CreateAndDelete   true      Ready           Ready
keda                    1.10.1(fast)          CreateAndDelete   true      Ready           Ready
nats                    1.5.2(fast)           CreateAndDelete   true      Deleting        Deleting
serverless              1.12.0(fast)          CreateAndDelete   true      Ready           Ready
telemetry               1.63.3(fast)          CreateAndDelete   true      Ready           Ready
transparent-proxy       1.9.5(fast)           CreateAndDelete   true      Ready           Ready
ztis-agent              0.28.0(fast)          CreateAndDelete   true      Ready           Ready
[12:03:07] [cost 0.409s] ./bin/kyma alpha module list

$ ./bin/kyma module list
2026-05-18T10:05:11.442219Z	info	klog	Waited before sending request	delay=1.1237515s reason=client-side throttling, not priority and fairness verb=GET URL=https://api.ee0bdf1.stage.kyma.ondemand.com/apis/operator.kyma-project.io/v1beta2/namespaces/kyma-system/moduletemplates/istio-1.26.7
NAME                    VERSION               CR POLICY         MANAGED   MODULE STATUS   INSTALLATION STATUS
api-gateway             3.6.2(regular)        CreateAndDelete   true      Ready           Ready
application-connector   1.3.1(fast)           CreateAndDelete   true      Ready           Ready
btp-operator            1.3.2(regular)        CreateAndDelete   true      Ready           Ready
cap-operator            0.28.0(fast)          CreateAndDelete   true      Ready           Ready
cfapi                   0.4.0(experimental)   CreateAndDelete   true      Ready           Ready
cloud-manager           1.7.1(fast)           CreateAndDelete   true      Ready           Ready
connectivity-proxy      1.2.2(fast)           CreateAndDelete   true      Ready           Ready
eventing                1.5.3(fast)           CreateAndDelete   true                      Deleting
istio                   1.26.7(regular)       CreateAndDelete   true      Warning         Ready
keda                    1.10.1(fast)          CreateAndDelete   true      Warning         Ready
nats                    1.5.2(fast)           CreateAndDelete   true      Warning         Deleting
serverless              1.12.0(fast)          CreateAndDelete   true      Ready           Ready
telemetry               1.63.3(fast)          CreateAndDelete   true      Ready           Ready
transparent-proxy       1.9.5(fast)           CreateAndDelete   true      Ready           Ready
ztis-agent              0.28.0(fast)          CreateAndDelete   true      Error           Ready
docker-registry         0.13.0                N/A               false     Ready           Ready
registry-proxy          0.14.0                N/A               false     Ready           Ready
[12:05:16] [cost 7.593s] ./bin/kyma module list

@github-actions
Copy link
Copy Markdown

✅ Proposed changes verification passed

This pull request comes with up-to-date documentation and no illegal standard output usages.

Find more detailed information in the verify-pr-code / standards action.

@anoipm anoipm assigned anoipm and unassigned musztardem May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants