oam-dev / spec

Open Application Model (OAM).
https://oam.dev
Other
3.03k stars 246 forks source link

New application entity (v0.3.0) #447

Closed dhiguero closed 3 years ago

dhiguero commented 3 years ago

What does this PR do?

Where should the reviewer start?

What is missing?

Any background context you want to provide?

What are the associated tickets?

Questions

ghost commented 3 years ago

CLA assistant check
All CLA requirements met.

ghost commented 3 years ago

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

:x: dhiguero sign now
You have signed the CLA already but the status is still pending? Let us recheck it.

dhiguero commented 3 years ago

Hi! I have been testing deploying an Application in Kubevela following the proposed changes and it seems that there is a mismatch related to how scopes are specified. In the previous version, we used a scopeRef as:

      scopes:
        - scopeRef:
            apiVersion: core.oam.dev/v1alpha2
            kind: HealthScope
            name: app-health # An application level health scope including both components.

However it seems that the new runtime expects a map as:

      scopes:
        "healthscopes.core.oam.dev": "app-health"

@resouer, @hongchaodeng Could you please check which one is the expected one? I will update the example accordingly before merging the PR.

wonderflow commented 3 years ago

In application, I hope we can use this way as it's more convenient:

      scopes:
        "healthscopes.core.oam.dev": "app-health"

The healthscopes.core.oam.dev will refer to a ScopeDefinition which will refer to the information:

            apiVersion: core.oam.dev/v1alpha2
            kind: HealthScope
resouer commented 3 years ago

+1 to @wonderflow 's approach. Note that this also implies the ScopeDefinition is named as healthscopes.core.oam.dev and references the real resource schema (HealthScope GVK), similar to workload definition.

dhiguero commented 3 years ago

@resouer , @wonderflow I have uploaded the changes related to the scope.

dhiguero commented 3 years ago

New revision available. Thanks @kminder for the awesome review.