snowdrop-zen / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
1 stars 0 forks source link

knative generated files are not compliant to the new knative protocol #67

Closed snowdrop-bot closed 4 years ago

snowdrop-bot commented 4 years ago

Describe the bug The files generated by the openshift extension is not compliant to the new knative protocol

Expected behavior Generate files compliant with the protocol including renaming standard 8080 ports from http to http1 or h2c and remove ports from liveness and readiness probes. For reference [1]

And this is the resulting yaml file:

spec:
  template:
    spec:
      containers:
      - image: "image-registry.openshift-image-registry.svc:5000/knative-app/quickstart-knative:1.0-SNAPSHOT"
        imagePullPolicy: "Always"
        livenessProbe:
          failureThreshold: 3
          httpGet:
            path: "/health/live"
            scheme: "HTTP"
          initialDelaySeconds: 0
          periodSeconds: 30
          successThreshold: 1
          timeoutSeconds: 10
        name: "quickstart-knative"
        ports:
        - containerPort: 8080
          protocol: "TCP"
        readinessProbe:
          failureThreshold: 3
          httpGet:
            path: "/health/ready"
            scheme: "HTTP"
          initialDelaySeconds: 0
          periodSeconds: 30
          successThreshold: 1
          timeoutSeconds: 10

[1] https://github.com/knative/serving/blob/master/docs/runtime-contract.md#protocols-and-ports

Actual behavior The extension is generating the following yaml

spec:
  template:
    spec:
      containers:
      - image: "image-registry.openshift-image-registry.svc:5000/knative-app/quickstart-knative:1.0-SNAPSHOT"
        imagePullPolicy: "Always"
        livenessProbe:
          failureThreshold: 3
          httpGet:
            path: "/health/live"
            port: 8080
            scheme: "HTTP"
          initialDelaySeconds: 0
          periodSeconds: 30
          successThreshold: 1
          timeoutSeconds: 10
        name: "quickstart-knative"
        ports:
        - containerPort: 8080
          name: "http"
          protocol: "TCP"
        readinessProbe:
          failureThreshold: 3
          httpGet:
            path: "/health/ready"
            port: 8080
            scheme: "HTTP"
          initialDelaySeconds: 0
          periodSeconds: 30
          successThreshold: 1
          timeoutSeconds: 10

To Reproduce Steps to reproduce the behavior:

  1. Create an empty app
  2. Add openshift, smallrye-heath, resteasy-jsonb extensions
  3. Run ./mvnw clean package
  4. Look at the generated file: ./target/kubernetes/knative.yml

Configuration

# Add your application.properties here, if applicable.
quarkus.knative.containers.quickstart-knative.ports.http1.container-port=8080
quarkus.openshift.containers.quickstart-knative.ports.http1.container-port=8080

Screenshots N/A

Environment (please complete the following information):

Additional context N/A


https://github.com/quarkusio/quarkus/issues/8659


$upstream:8659$

cmoulliard commented 4 years ago

This ticket has been created the 23rd of April and is still in progress. Why ? @iocanel

iocanel commented 4 years ago

The fix consists of two parts:

For the later, I haven't found the time.

iocanel commented 4 years ago

Status: