Skip to content

Openshift existing resources won't merge route spec #29899

Closed
@indiealexh

Description

@indiealexh

Describe the bug

The default Route resource created has no programmatic means to apply TLS config.
Upon reading https://quarkus.io/guides/deploying-to-kubernetes#using-existing-resources I assumed I could create an src/main/kubernetes/openshift.yml file like this:

apiVersion: route.openshift.io/v1
kind: Route
metadata:
  name: example-api
spec:
  tls:
    termination: edge
    insecureEdgeTerminationPolicy: Redirect

and it could generated something like this:

---
apiVersion: route.openshift.io/v1
kind: Route
metadata:
  annotations:
    app.openshift.io/vcs-url: <<unknown>>
    app.quarkus.io/commit-id: <<example>>
    app.quarkus.io/build-timestamp: <<example>>
  labels:
    app.openshift.io/runtime: quarkus
    app.kubernetes.io/version: 1.0.0
    app.kubernetes.io/name: example-api
    app.kubernetes.io/part-of: core
  name: example-api
spec:
  host: example-api.hostname.com
  port:
    targetPort: http
  tls:
    insecureEdgeTerminationPolicy: Redirect
    termination: edge
  to:
    kind: Service
    name: colony-legacy-api

But instead it omits everything it would normally generate except annotations and labels:

apiVersion: route.openshift.io/v1
kind: Route
metadata:
  annotations:
    app.openshift.io/vcs-url: <<unknown>>
    app.quarkus.io/commit-id: <<example>>
    app.quarkus.io/build-timestamp: <<example>>
  labels:
    app.openshift.io/runtime: quarkus
    app.kubernetes.io/version: 1.0.0
    app.kubernetes.io/name: example-api
    app.kubernetes.io/part-of: core
  name: example-api
spec:
  tls:
    insecureEdgeTerminationPolicy: Redirect
    termination: edge

Quarkus version or git rev

2.15.0

Activity

quarkus-bot

quarkus-bot commented on Dec 15, 2022

@quarkus-bot

/cc @Sgitario(kubernetes), @geoand(kubernetes,openshift), @iocanel(kubernetes,openshift)

Sgitario

Sgitario commented on Dec 16, 2022

@Sgitario
Contributor

This needs to be fixed first in Dekorate: dekorateio/dekorate#1112

added this to the 2.16 - main milestone on Dec 19, 2022
removed this from the 2.16 - main milestone on Dec 20, 2022

3 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      Participants

      @indiealexh@gsmet@Sgitario

      Issue actions

        Openshift existing resources won't merge route spec · Issue #29899 · quarkusio/quarkus