Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Need to clarify ingresses / routes examples better. #402

Closed
cdrage opened this issue Oct 31, 2017 · 4 comments
Closed

Need to clarify ingresses / routes examples better. #402

cdrage opened this issue Oct 31, 2017 · 4 comments
Assignees
Milestone

Comments

@cdrage
Copy link
Collaborator

cdrage commented Oct 31, 2017

So we've got two places for routes examples, and both of them are conflicting / confusing.

For example: https://github.com/kedgeproject/kedge/tree/master/docs/examples/routes

In the README.md we define routes as:

name: webroute
host: httpd-web.192.168.42.69.nip.io
to:
  kind: Service
  name: httpd
  weight: 100
wildcardPolicy: None

Yet in the example it's defined as:

name: httpd
containers:
- image: bitnami/nginx
services:
- name: httpd
  type: NodePort
  portMappings:
  - 8080:8080
routes:
- to:
    kind: Service
    name: httpd

Which is a tad bit confusing.

In "examples" for Ingresses and Routes, we don't actually reflect it in the spec..

From reading the README.md (https://github.com/kedgeproject/kedge/tree/master/docs/examples/routes) as well as looking at the example, wouldn't this be more effective / true?

name: httpd                                                                                                                                                                                                                                                                       
containers:                                                                                                                                                                                                                                                                       
- image: bitnami/nginx                                                                                                                                                                                                                                                            
services:                                                                                                                                                                                                                                                                         
- name: httpd                                                                                                                                                                                                                                                                     
  type: NodePort                                                                                                                                                                                                                                                                  
  portMappings:                                                                                                                                                                                                                                                                   
  - 8080:8080                                                                                                                                                                                                                                                                     
routes:                                                                                                                                                                                                                                                                           
  name: webroute                                                                                                                                                                                                                                                                  
  host: httpd-web.192.168.42.69.nip.io                                                                                                                                                                                                                                            
  - to:                                                                                                                                                                                                                                                                           
    kind: Service                                                                                                                                                                                                                                                                 
    name: httpd                                                                                                                                                                                                                                                                   
    weight: 100                                                                                                                                                                                                                                                                   
  wildcardPolicy: None 

I'm just very confused on reading the spec what we're trying to implement / what kedge is doing.

Same goes within file reference: http://kedgeproject.org/file-reference/#routes

@kadel kadel added this to the 0.5.0 milestone Nov 1, 2017
@cdrage cdrage modified the milestone: 0.5.0 Nov 2, 2017
@cdrage
Copy link
Collaborator Author

cdrage commented Nov 6, 2017

Hey @containscafeine @surajssd Mind helping me explain what's going on here? Tad-confused.

@cdrage cdrage modified the milestone: 0.5.0 Nov 8, 2017
@surajssd
Copy link
Member

In README the placement of the routespec is wrong WRT kedge file httpd.yaml, I think we should explain definition of route in kedge considering httpd.yaml as the reference in README.

@cdrage
Copy link
Collaborator Author

cdrage commented Nov 14, 2017

@surajssd Mind doing a PR or going into more detail? Still confused.. which example is wrong?

@concaf
Copy link
Collaborator

concaf commented Nov 17, 2017

@cdrage do we need to keep https://github.com/kedgeproject/kedge/blob/master/docs/examples/routes/README.md and https://github.com/kedgeproject/kedge/blob/master/docs/examples/routes/httpd.yml in sync.

Both the definitions are correct, README.md just shows an example which uses more fields from the RouteSpec while the httpd.yml example uses just a couple of fields from RouteSpec.

When we use -

routes:
- to:
    kind: Service
    name: httpd

then it's up to the cluster to select the host since we're not specifying the field.

Neither of the examples are wrong, just different.

Did I understand you correctly? :(

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

No branches or pull requests

4 participants