{
  "description": "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined\nby a backend. An Ingress can be configured to give services externally-reachable URLs, load\nbalance traffic, offer name based virtual hosting, etc.\n\nThis is heavily based on K8s Ingress https://godoc.org/k8s.io/api/networking/v1beta1#Ingress\nwhich some highlighted modifications.",
  "type": "object",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
      "type": "string"
    },
    "kind": {
      "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "Spec is the desired state of the Ingress.\nMore info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status",
      "type": "object",
      "properties": {
        "httpOption": {
          "description": "HTTPOption is the option of HTTP. It has the following two values:\n`HTTPOptionEnabled`, `HTTPOptionRedirected`",
          "type": "string"
        },
        "rules": {
          "description": "A list of host rules used to configure the Ingress.",
          "type": "array",
          "items": {
            "description": "IngressRule represents the rules mapping the paths under a specified host to\nthe related backend services. Incoming requests are first evaluated for a host\nmatch, then routed to the backend associated with the matching IngressRuleValue.",
            "type": "object",
            "properties": {
              "hosts": {
                "description": "Host is the fully qualified domain name of a network host, as defined\nby RFC 3986. Note the following deviations from the \"host\" part of the\nURI as defined in the RFC:\n1. IPs are not allowed. Currently a rule value can only apply to the\n\t  IP in the Spec of the parent .\n2. The `:` delimiter is not respected because ports are not allowed.\n\t  Currently the port of an Ingress is implicitly :80 for http and\n\t  :443 for https.\nBoth these may change in the future.\nIf the host is unspecified, the Ingress routes all traffic based on the\nspecified IngressRuleValue.\nIf multiple matching Hosts were provided, the first rule will take precedent.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "http": {
                "description": "HTTP represents a rule to apply against incoming requests. If the\nrule is satisfied, the request is routed to the specified backend.",
                "type": "object",
                "required": [
                  "paths"
                ],
                "properties": {
                  "paths": {
                    "description": "A collection of paths that map requests to backends.\n\nIf they are multiple matching paths, the first match takes precedence.",
                    "type": "array",
                    "items": {
                      "description": "HTTPIngressPath associates a path regex with a backend. Incoming URLs matching\nthe path are forwarded to the backend.",
                      "type": "object",
                      "required": [
                        "splits"
                      ],
                      "properties": {
                        "appendHeaders": {
                          "description": "AppendHeaders allow specifying additional HTTP headers to add\nbefore forwarding a request to the destination service.\n\nNOTE: This differs from K8s Ingress which doesn't allow header appending.",
                          "type": "object",
                          "additionalProperties": {
                            "type": "string"
                          }
                        },
                        "headers": {
                          "description": "Headers defines header matching rules which is a map from a header name\nto HeaderMatch which specify a matching condition.\nWhen a request matched with all the header matching rules,\nthe request is routed by the corresponding ingress rule.\nIf it is empty, the headers are not used for matching",
                          "type": "object",
                          "additionalProperties": {
                            "description": "HeaderMatch represents a matching value of Headers in HTTPIngressPath.\nCurrently, only the exact matching is supported.",
                            "type": "object",
                            "required": [
                              "exact"
                            ],
                            "properties": {
                              "exact": {
                                "type": "string"
                              }
                            },
                            "additionalProperties": false
                          }
                        },
                        "path": {
                          "description": "Path represents a literal prefix to which this rule should apply.\nCurrently it can contain characters disallowed from the conventional\n\"path\" part of a URL as defined by RFC 3986. Paths must begin with\na '/'. If unspecified, the path defaults to a catch all sending\ntraffic to the backend.",
                          "type": "string"
                        },
                        "rewriteHost": {
                          "description": "RewriteHost rewrites the incoming request's host header.\n\nThis field is currently experimental and not supported by all Ingress\nimplementations.",
                          "type": "string"
                        },
                        "splits": {
                          "description": "Splits defines the referenced service endpoints to which the traffic\nwill be forwarded to.",
                          "type": "array",
                          "items": {
                            "description": "IngressBackendSplit describes all endpoints for a given service and port.",
                            "type": "object",
                            "required": [
                              "serviceName",
                              "serviceNamespace",
                              "servicePort"
                            ],
                            "properties": {
                              "appendHeaders": {
                                "description": "AppendHeaders allow specifying additional HTTP headers to add\nbefore forwarding a request to the destination service.\n\nNOTE: This differs from K8s Ingress which doesn't allow header appending.",
                                "type": "object",
                                "additionalProperties": {
                                  "type": "string"
                                }
                              },
                              "percent": {
                                "description": "Specifies the split percentage, a number between 0 and 100.  If\nonly one split is specified, we default to 100.\n\nNOTE: This differs from K8s Ingress to allow percentage split.",
                                "type": "integer"
                              },
                              "serviceName": {
                                "description": "Specifies the name of the referenced service.",
                                "type": "string"
                              },
                              "serviceNamespace": {
                                "description": "Specifies the namespace of the referenced service.\n\nNOTE: This differs from K8s Ingress to allow routing to different namespaces.",
                                "type": "string"
                              },
                              "servicePort": {
                                "description": "Specifies the port of the referenced service.",
                                "anyOf": [
                                  {
                                    "type": "integer"
                                  },
                                  {
                                    "type": "string"
                                  }
                                ],
                                "x-kubernetes-int-or-string": true
                              }
                            },
                            "additionalProperties": false
                          }
                        }
                      },
                      "additionalProperties": false
                    }
                  }
                },
                "additionalProperties": false
              },
              "visibility": {
                "description": "Visibility signifies whether this rule should `ClusterLocal`. If it's not\nspecified then it defaults to `ExternalIP`.",
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        "tls": {
          "description": "TLS configuration. Currently Ingress only supports a single TLS\nport: 443. If multiple members of this list specify different hosts, they\nwill be multiplexed on the same port according to the hostname specified\nthrough the SNI TLS extension, if the ingress controller fulfilling the\ningress supports SNI.",
          "type": "array",
          "items": {
            "description": "IngressTLS describes the transport layer security associated with an Ingress.",
            "type": "object",
            "properties": {
              "hosts": {
                "description": "Hosts is a list of hosts included in the TLS certificate. The values in\nthis list must match the name/s used in the tlsSecret. Defaults to the\nwildcard host setting for the loadbalancer controller fulfilling this\nIngress, if left unspecified.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "secretName": {
                "description": "SecretName is the name of the secret used to terminate SSL traffic.",
                "type": "string"
              },
              "secretNamespace": {
                "description": "SecretNamespace is the namespace of the secret used to terminate SSL traffic.\nIf not set the namespace should be assumed to be the same as the Ingress.\nIf set the secret should have the same namespace as the Ingress otherwise\nthe behaviour is undefined and not supported.",
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        }
      },
      "additionalProperties": false
    },
    "status": {
      "description": "Status is the current state of the Ingress.\nMore info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status",
      "type": "object",
      "properties": {
        "annotations": {
          "description": "Annotations is additional Status fields for the Resource to save some\nadditional State as well as convey more information to the user. This is\nroughly akin to Annotations on any k8s resource, just the reconciler conveying\nricher information outwards.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "conditions": {
          "description": "Conditions the latest available observations of a resource's current state.",
          "type": "array",
          "items": {
            "description": "Condition defines a readiness condition for a Knative resource.\nSee: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties",
            "type": "object",
            "required": [
              "status",
              "type"
            ],
            "properties": {
              "lastTransitionTime": {
                "description": "LastTransitionTime is the last time the condition transitioned from one status to another.\nWe use VolatileTime in place of metav1.Time to exclude this from creating equality.Semantic\ndifferences (all other things held constant).",
                "type": "string"
              },
              "message": {
                "description": "A human readable message indicating details about the transition.",
                "type": "string"
              },
              "reason": {
                "description": "The reason for the condition's last transition.",
                "type": "string"
              },
              "severity": {
                "description": "Severity with which to treat failures of this type of condition.\nWhen this is not specified, it defaults to Error.",
                "type": "string"
              },
              "status": {
                "description": "Status of the condition, one of True, False, Unknown.",
                "type": "string"
              },
              "type": {
                "description": "Type of condition.",
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        "observedGeneration": {
          "description": "ObservedGeneration is the 'Generation' of the Service that\nwas last processed by the controller.",
          "type": "integer",
          "format": "int64"
        },
        "privateLoadBalancer": {
          "description": "PrivateLoadBalancer contains the current status of the load-balancer.",
          "type": "object",
          "properties": {
            "ingress": {
              "description": "Ingress is a list containing ingress points for the load-balancer.\nTraffic intended for the service should be sent to these ingress points.",
              "type": "array",
              "items": {
                "description": "LoadBalancerIngressStatus represents the status of a load-balancer ingress point:\ntraffic intended for the service should be sent to an ingress point.",
                "type": "object",
                "properties": {
                  "domain": {
                    "description": "Domain is set for load-balancer ingress points that are DNS based\n(typically AWS load-balancers)",
                    "type": "string"
                  },
                  "domainInternal": {
                    "description": "DomainInternal is set if there is a cluster-local DNS name to access the Ingress.\n\nNOTE: This differs from K8s Ingress, since we also desire to have a cluster-local\n      DNS name to allow routing in case of not having a mesh.",
                    "type": "string"
                  },
                  "ip": {
                    "description": "IP is set for load-balancer ingress points that are IP based\n(typically GCE or OpenStack load-balancers)",
                    "type": "string"
                  },
                  "meshOnly": {
                    "description": "MeshOnly is set if the Ingress is only load-balanced through a Service mesh.",
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "additionalProperties": false
        },
        "publicLoadBalancer": {
          "description": "PublicLoadBalancer contains the current status of the load-balancer.",
          "type": "object",
          "properties": {
            "ingress": {
              "description": "Ingress is a list containing ingress points for the load-balancer.\nTraffic intended for the service should be sent to these ingress points.",
              "type": "array",
              "items": {
                "description": "LoadBalancerIngressStatus represents the status of a load-balancer ingress point:\ntraffic intended for the service should be sent to an ingress point.",
                "type": "object",
                "properties": {
                  "domain": {
                    "description": "Domain is set for load-balancer ingress points that are DNS based\n(typically AWS load-balancers)",
                    "type": "string"
                  },
                  "domainInternal": {
                    "description": "DomainInternal is set if there is a cluster-local DNS name to access the Ingress.\n\nNOTE: This differs from K8s Ingress, since we also desire to have a cluster-local\n      DNS name to allow routing in case of not having a mesh.",
                    "type": "string"
                  },
                  "ip": {
                    "description": "IP is set for load-balancer ingress points that are IP based\n(typically GCE or OpenStack load-balancers)",
                    "type": "string"
                  },
                  "meshOnly": {
                    "description": "MeshOnly is set if the Ingress is only load-balanced through a Service mesh.",
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    }
  }
}
