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

Generated HTTPRoute contains null fields #91

Open
pehala opened this issue Jun 24, 2024 · 0 comments
Open

Generated HTTPRoute contains null fields #91

pehala opened this issue Jun 24, 2024 · 0 comments
Labels
bug Something isn't working kind/bug

Comments

@pehala
Copy link

pehala commented Jun 24, 2024

When generating HTTPRoute, it contains null fields. This can cause validation errors (incorrect status in this case) when supplying output directly to kubectl apply (Can be fixed by using --validate=false)
Version: 0.2.3

Generated HTTPRoute:

apiVersion: gateway.networking.k8s.io/v1beta1
kind: HTTPRoute
metadata:
  creationTimestamp: null
  name: route-phala--a3ji
spec:
  hostnames:
  - test.com
  parentRefs:
  - group: gateway.networking.k8s.io
    kind: Gateway
    name: gw-phala--cynv
    namespace: kuadrant
  rules:
  - matches:
    - method: GET
      path:
        type: Exact
        value: /get
  - matches:
    - method: PUT
      path:
        type: Exact
        value: /anything
  - matches:
    - method: GET
      path:
        type: Exact
        value: /anything
status:
  parents: null

Source OAS:

info:
  title: Httpbin
  version: 0.0.51
  x-kuadrant:
    route:
      hostnames:
      - test.com
      name: route-phala--a3ji
      parentRefs:
      - group: gateway.networking.k8s.io
        kind: Gateway
        name: gw-phala--cynv
        namespace: kuadrant
openapi: 3.1.0
paths:
  /anything:
    get:
      operationId: get_anything
      responses:
        '200':
          content:
            application/json:
              schema:
                type: string
          description: Successful Response
    put:
      operationId: put_anything
      responses:
        '200':
          content:
            application/json:
              schema:
                type: string
          description: Successful Response
  /get:
    get:
      operationId: get_get
      responses:
        '200':
          content:
            application/json:
              schema:
                type: string
          description: Successful Response
@pehala pehala added the bug Something isn't working label Jun 24, 2024
@pehala pehala added this to Kuadrant Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working kind/bug
Projects
Status: No status
Development

No branches or pull requests

1 participant