oam-kubernetes-runtime icon indicating copy to clipboard operation
oam-kubernetes-runtime copied to clipboard

In ScopeRef it seems like Kind and Name cause for too much configuration, name should be replaced with properties

Open BBialeckiACR opened this issue 5 years ago • 2 comments

Kind in Scope Ref refers to a schema and Name a definition of properties under that schema. Why not just put the properties here like they were in previous versions, what was the rationale for the change. Kind then refers to the schema and the properties are defined by that schema and the values entered here. You then get:

scopes:

 scopeRef:

        apiVersion: standard.oam.dev/v1alpha2

        kind: NetworkScope

        parameters:
                 networkId: cool-vpc-network
                 subnetIds:
                      - cool-subnetwork
                      - cooler-subnetwork
                 internetGatewayType: nat

BBialeckiACR avatar Nov 24 '20 22:11 BBialeckiACR

That network scope should be able to be referenced by multiple components. Btw, this issue is more suitable to spec repo.

resouer avatar Nov 24 '20 22:11 resouer

This was just to show an example. I understand that the scope is referenced by multiple components, and if part of the same application config then scope as listed here works. This is basically how this was prior to the latest version.

BBialeckiACR avatar Nov 25 '20 13:11 BBialeckiACR