oam-dev / spec

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

Add childResource to OAM definition spec #410

Open resouer opened 3 years ago

resouer commented 3 years ago

It has been proved that childResource is a strong need for any abstraction workload (e.g. ContainerizedWorkload), so that Trait controller could know what's the underlying workload object it need to handle with, see: this example. Note that this field is Kubernetes specific for now, but it has been proven to be a generic field required by various implementations.

--- Off Topic ---

That being said, we may also want to add a runtime field to definition object in the future so we can add runtime specific configurations in the definition object? For example:

apiVersion: v1alpha2
kind: TraitDefinition
spec:
  runtimePlatform: Kubernetes
 ...
apiVersion: v1alpha2
kind: TraitDefinition
spec:
  runtimePlatform: ServiceFabric
 ...
apiVersion: v1alpha2
kind: TraitDefinition
spec:
  runtimePlatform: AlibabaCloudFaaS
 ...
resouer commented 3 years ago

/cc @ryanzhang-oss @wonderflow

ryanzhang-oss commented 3 years ago

I think it's better to create a separate issue on the "runtime", it deserves its own issue :)

wonderflow commented 3 years ago

I agree this proposal, what about make runtimePlatform: Kubernetes as default?