spec icon indicating copy to clipboard operation
spec copied to clipboard

Missing specs for core traits

Open clareliguori opened this issue 5 years ago • 8 comments

The spec defines a single core trait ManualScaler, but seems to be missing additional core traits that are implemented by Rudr: https://github.com/oam-dev/spec/blob/master/5.traits.md#core-traits

Rudr implements the following additional traits that are not defined in the spec:

  • ingress.core.oam.dev/v1alpha1
  • auto-scaler.core.oam.dev/v1alpha1
  • volume-mounter.core.oam.dev/v1alpha1

The spec also states that the trait is named ManualScaler, but Rudr implements it as manual-scaler.

There seems to be a placeholder folder for these core trait specs, but there's nothing there yet: https://github.com/oam-dev/spec/tree/master/standard/traits

clareliguori avatar Jan 15 '20 20:01 clareliguori

Hi @clareliguori

Thanks for raising the question and I am happy to explain in details.

The spec also states that the trait is named ManualScaler, but Rudr implements it as manual-scaler.

The spec is intended to be neutral and not bound to any specific platform. But when we implemented the spec on k8s the name cannot be CamelCase so we had to change it for convenience.

additional traits that are not defined in the spec: ...

Yeah, we are still working on defining what should be core. We are in discretion since this decision probably means all platforms need to implement them.

Btw, what kind of traits could be core traits from your perspective? This input is super valuable.

hongchaodeng avatar Jan 15 '20 22:01 hongchaodeng

My feeling is maybe we can still define core traits as reference but don't have to enforce runtime must implement them all.

resouer avatar Jan 16 '20 00:01 resouer

The spec is intended to be neutral and not bound to any specific platform. But when we implemented the spec on k8s the name cannot be CamelCase so we had to change it for convenience.

Are you open to changing the spec to remove the camel casing? It would be great to be able to take the examples in the Rudr repo and use them with other spec-compliant implementations.

Btw, what kind of traits could be core traits from your perspective? This input is super valuable.

Coming from the perspective of working on Amazon ECS, ingress feels widely applicable to many types of platforms and feels core to deploying many applications' Server components. To me, that one should be a core trait.

auto-scaler can also be applied to ECS, and probably many other container platforms, so I support that in the core. My only hesitation are platforms that don't auto-scale on metrics like CPU and memory (for example, platforms that auto-scale on requests), so perhaps only min and max should be required to be implemented.

At a glance, the volume-mounter as implemented in Rudr is fairly specific to k8s PVCs. That might be a difficult one to put in core, as I don't see much consistency across platforms around configuring volume management.

clareliguori avatar Jan 16 '20 00:01 clareliguori

Coming from the perspective of working on Amazon ECS, ingress feels widely applicable to many types of platforms and feels core to deploying many applications' Server components. To me, that one should be a core trait.

Can you open an issue in OAM spec repo? Kubernetes community is also working on its Service API (Ingress v2, borrowing some key ideas from Istio Ingress concept). We are closely monitoring the progress (probably OAM devs should participant the discussion in k8s community anyway).

Agree with the scaler and volume part.

xiang90 avatar Jan 16 '20 00:01 xiang90

Are you open to changing the spec to remove the camel casing?

Sure thing. And thanks for your comments.

For the next step, we would start adding ingress and auto-scaler as core traits.

hongchaodeng avatar Jan 16 '20 01:01 hongchaodeng

@xiang90 To clarify: I should open a separate issue from this one to discuss the Ingress trait separately?

I can also open separate issues for auto-scaler and camel-casing if that would help, @hongchaodeng?

clareliguori avatar Jan 16 '20 02:01 clareliguori

To clarify: I should open a separate issue from this one to discuss the Ingress trait separately?

Yes. In the spec repo: https://github.com/oam-dev/spec if you wish to add it as a core trait.

xiang90 avatar Jan 16 '20 02:01 xiang90

I can also open separate issues for auto-scaler and camel-casing if that would help,

No need for that. I think Xiang only want to discuss Ingress V2 API to better align and refine along the path.

hongchaodeng avatar Jan 16 '20 02:01 hongchaodeng