-
Notifications
You must be signed in to change notification settings - Fork 41
Conversation
|
@@ -65,12 +66,20 @@ func GetScheme() (*runtime.Scheme, error) { | |||
// Initializing the scheme with the core v1 api | |||
scheme := api.Scheme | |||
|
|||
// TODO: find a way where we don't have to add all the subsequent schemes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why different schema for different controllers?
Using one with everything should be fine or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fine, but it'd lead to a huge schema. So this is more of an optimization TODO, does not really matter much right now tbh.
ping @kadel @cdrage @surajssd - I've added docs, tests and an example. |
docs/examples/routes/httpd.yml
Outdated
@@ -0,0 +1,13 @@ | |||
name: httpd | |||
containers: | |||
- image: centos/httpd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This image uses root,so it can't be run on default openShift configuration :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but you could use bitnami/nginx
for example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
docs/file-reference.md
Outdated
to: | ||
kind: Service | ||
name: httpd | ||
weight: 100 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove weight
and wildcardPolicy
It just makes it look too complicated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
docs/file-reference.md
Outdated
Example: | ||
```yaml | ||
name: webroute | ||
host: httpd-web.192.168.42.69.nip.io |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we maybe remove host
?
It is not required, and if someone tries it like this it won't work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree, removed
@@ -225,6 +252,19 @@ func (app *ControllerFields) createIngresses() ([]runtime.Object, error) { | |||
return ings, nil | |||
} | |||
|
|||
func (app *ControllerFields) createRoutes() ([]runtime.Object, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to have tests for this function ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few notes regarding docs, and test. The code itself looks good.
This commit adds support for defining OpenShift routes in a Kedge file. Routes can be defined like the following at the root level of a Kedge file routes: - name: route1 host: route1-myproject.192.168.42.69.nip.io port: targetPort: 8080 to: kind: Service name: httpd This is implemented by essentially merging RouteSpec and ObjectMeta and adding an array of the resulting struct at the root level under the field "routes" Adds docs, tests. Fixes kedgeproject#238
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kadel made the changes, PTAL!
This commit adds support for defining OpenShift routes in a Kedge
file.
Routes can be defined like the following at the root level of a
Kedge file
This is implemented by essentially merging RouteSpec and ObjectMeta
and adding an array of the resulting struct at the root level under
the field "routes"
Adds docs, tests.
Fixes #238