caicloud / charts

Curated kubernetes helm charts with well-defined structures

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

issues about service config

caitong93 opened this issue · comments

some issues:

  1. should support multi-port
  2. allow random node port

below is a example format

name: string
// True to create NodePort service
nodePort: bool
portMapping:
  - port: int
    targetPort: int
    protocol: string
    # range [30000,32767], 0 to use random port
    nodePort: int

@kdada PTAL

Is nodePort: bool necessary?

  • If nodePort is required and user wants to set it himself, he can give it a value
  • If nodePort is required and he wants a random value, then set it to 0
  • If not required, then leave out this field entirely

It seems to me that multi-port will severely complicate service config @kdada to confirm; but several applications requires multi-port, e.g. zookeeper.

Is nodePort: bool necessary?

If we use string to specify port value, then it can be ignored.

name: string
// True to create NodePort service
portMapping:
  - port: string
    targetPort: string
    protocol: string
    # range [30000,32767], 0 to use random port
    nodePort: string

It makes sense to add multi-port to type services.
But I think that a random port is not very useful. If a config can generates multiple results, it's not stable and sometimes it will hide bugs.

@kdada Random port is useful in dev or for test purpose.

This is fixed? @caitong93 @kdada

@ddysher I'll create a pr to fix it.