Skip to main content Link Search Menu Expand Document (external link)

Gateway

The gateway trait creates an Ingress to make the component publicly available to the Internet. This standard trait has been modified to work with the NAPPTIVE platform, so refer to the napptive-ingress trait for troubleshooting information.

Note however that some of the standard optional parameters (e.g., domain, and secretName) will not work in the NAPPTIVE playground as the certificate is already provided without requiring any extra steps.

The following snippet shows an example application exposing an HTTP route on port 8080.

apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
  name: my-app
  annotations: 
    version: "v0.0.1"
    description: "My application"
spec:
  components:
    - name: component
      type: webservice
      properties:
        image: my-app-image:v1.0.0
        ports:
          - port: 8080
            expose: true
      traits:
        - type: gateway  # Set to gateway     
          properties:
            http: # http with ingress rules
              "/": 8080 # path: port