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

Get rid of all route related config settings? #517

Open
clemensutschig opened this issue May 1, 2020 · 6 comments
Open

Get rid of all route related config settings? #517

clemensutschig opened this issue May 1, 2020 · 6 comments
Labels
question Further information is requested

Comments

@clemensutschig
Copy link
Member

clemensutschig commented May 1, 2020

Describe the bug
Why do we need people to set route hosts/URLs in env configs for ods resources.

As we seed the resources.. we can always find the host/url combos thru 'oc get' ... and at least via 'oc create route' there is no need to Pass a Host.

@clemensutschig clemensutschig added the bug Something isn't working label May 1, 2020
@michaelsauter
Copy link
Member

You want to remove the config from the configuration-sample/ods-core.env.sample file so that people do not need to configure it?

That would not easily be possible as those values are used as parameters for the templates. When doing template processing, we do not run oc get / oc create.

Or did you mean something else?

@clemensutschig
Copy link
Member Author

clemensutschig commented May 4, 2020 via email

@michaelsauter
Copy link
Member

Many places also use the URL outside of the Route resource, e.g. as environment variable in the Jenkins pod. All those places would need a "preprocessing step" to fetch the URL. I am not sure this is worth the effort/complexity. I'm going to label this as a question and will remove it from the 3.0 release for now.

@michaelsauter michaelsauter added question Further information is requested and removed bug Something isn't working labels May 4, 2020
@michaelsauter michaelsauter changed the title Get rid of all route related config settings Get rid of all route related config settings? May 4, 2020
@michaelsauter
Copy link
Member

As a note to posterity: sometimes the services might run outside of OpenShift (e.g. one can host Nexus elsewhere). In that case, users need to define where Nexus is, and that information cannot be automatically collected.

I'm leaving this open as it is something to think about, but might not be resolved anytime soon.

@michaelsauter michaelsauter removed their assignment May 19, 2020
@clemensutschig
Copy link
Member Author

ok - I tried it finally

apiVersion: v1
kind: Template
objects:
- apiVersion: v1
  kind: Route
  metadata:
    labels:
      app: test-route
    name: test-route
  spec:
    port:
      targetPort: 9000-tcp
    tls:
      insecureEdgeTerminationPolicy: Redirect
      termination: edge
    to:
      kind: Service
      name: sonarqube
      weight: 100
    wildcardPolicy: None
tailor apply
utschig@WKS0000627058 MINGW64 /c/Temp/routet
$ oc get route/test-route -ojsonpath='{.spec.host}'
test-route-odsst-cd.*somehost* 

so this works super nicely - and would allow us to go completely route-less in the config ...

@michaelsauter
Copy link
Member

This only works if you leave out host completely. Further, you get drift when you compare again, which should not happen. One can get around this by adding preserve route:/spec/host.

But even then - please see my comment above. Services might run outside of OpenShift. I believe we do need to configure the routes in the config ...

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

No branches or pull requests

2 participants