Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Add ExposedEndpoint Trait #128

Open
hongchaodeng opened this issue Sep 6, 2019 · 5 comments
Open

Proposal: Add ExposedEndpoint Trait #128

hongchaodeng opened this issue Sep 6, 2019 · 5 comments
Labels

Comments

@hongchaodeng
Copy link
Member

hongchaodeng commented Sep 6, 2019

I was contemplating a solution for https://github.com/microsoft/hydra-spec/pull/125.

This is what I come up with and want to discuss:

  1. Add a standard trait ExposedEndpoint:
apiVersion: standard.hydra.io/v1alpha1
kind: Trait
metadata:
  name: ExposedEndpoint
  annotations:
    version: v1.0.0
    description: "Describes what endpoints to expose for the component"
spec:
  appliesTo:
    - core.hydra.io/v1alpha1.ReplicatedService
  properties:
    type: object
    properties:
      name:
        description: a name indicating the purpose of this exposure.
        type: string
      containerPort:
        type: integer
      servicePort:
        type: integer
      required:
        - containerPort

This example shows how it works:

apiVersion: core.hydra.io/v1alpha1
kind: OperationalConfiguration
metadata:
  name: custom-single-app
  annotations:
    version: v1.0.0
    description: "Customized version of single-app"
spec:
  components:
    - componentName: nginx
      instanceName: web-nginx
      traits:
        - name: http
          type: ExposedEndpoint
          properties:
            containerPort: 8080
            servicePort: 80
        - name: metrics
          type: ExposedEndpoint
          properties:
            containerPort: 8081
            servicePort: 81
@wonderflow
Copy link
Member

not only ReplicatedService, but also singletonService

@wonderflow
Copy link
Member

I think this is ok to me.

LGTM

@wonderflow
Copy link
Member

@resouer
Copy link
Member

resouer commented Sep 6, 2019

The idea of ExposedEndpoint make sense. 👍

@suhuruli suhuruli changed the title Add ExposedEndpoint Trait Proposal: Add ExposedEndpoint Trait Sep 12, 2019
@wonderflow
Copy link
Member

I think this ExposedEndpoint endpoint is really useful, can anyone give a PR to make more progress?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants