Ingress

case class Ingress(kind: String, apiVersion: String, metadata: ObjectMeta, spec: Option[Spec], status: Option[Status]) extends ObjectResource
Companion:
object
trait Serializable
trait Product
trait Equals
class ObjectResource
class TypeMeta
class Object
trait Matchable
class Any

Value members

Concrete methods

def addAnnotations(newAnnos: Map[String, String]): Ingress
def addHttpRule(host: String, pathsMap: Map[String, String]): Ingress

Fluent API method for building out ingress rules e.g.

Fluent API method for building out ingress rules e.g.

val ingress = Ingress("microservices").
 addHttpRule("foo.bar.com",
              Map("/order" -> "orderService:80",
                  "inventory" -> "inventoryService:80")).
 addHttpRule("foo1.bar.com",
              Map("/ship" -> "orderService:80",
                  "inventory" -> "inventoryService:80")).
def addHttpRule(pathsMap: Map[String, String]): Ingress

Fluent API method for building out ingress rules without host e.g.

Fluent API method for building out ingress rules without host e.g.

val ingress = Ingress("microservices").
 addHttpRule(Map("/order" -> "orderService:80",
                  "inventory" -> "inventoryService:80")).
 addHttpRule(Map("/ship" -> "orderService:80",
                  "inventory" -> "inventoryService:80")).
def addHttpRule(host: String, pathsMap: (String, String)*): Ingress

Fluent API method for building out ingress rules e.g.

Fluent API method for building out ingress rules e.g.

val ingress =
 Ingress("microservices")
   .addHttpRule("foo.bar.com",
                "/order" -> "orderService:80",
                "inventory" -> "inventoryService:80")
   .addHttpRule("foo1.bar.com",
                "/ship" -> "orderService:80",
                "inventory" -> "inventoryService:80").
def addHttpRule(pathsMap: (String, String)*): Ingress

Fluent API method for building out ingress rules without host e.g.

Fluent API method for building out ingress rules without host e.g.

val ingress =
 Ingress("microservices")
   .addHttpRule("/order" -> "orderService:80",
                "inventory" -> "inventoryService:80")
   .addHttpRule("/ship" -> "orderService:80",
                "inventory" -> "inventoryService:80").
def addHttpRule(host: Option[String], pathsMap: Map[String, String]): Ingress

Fluent API method for building out ingress rules e.g.

Fluent API method for building out ingress rules e.g.

val ingress =
 Ingress("microservices")
   .addHttpRule(Some("foo.bar.com"),
                Map("/order" -> "orderService:80",
                    "inventory" -> "inventoryService:80"))
   .addHttpRule(None,
                Map("/ship" -> "orderService:80",
                    "inventory" -> "inventoryService:80")).
def withDefaultBackendService(serviceNameAndPort: String): Ingress

set the default backend i.e. if no ingress rule matches the incoming traffic then it gets routed to the specified service

set the default backend i.e. if no ingress rule matches the incoming traffic then it gets routed to the specified service

Value parameters:
serviceNameAndPort
  • service name and port as 'serviceName:servicePort'
Returns:

copy of this Ingress with default backend set

def withDefaultBackendService(serviceName: String, servicePort: NameablePort): Ingress

set the default backend i.e. if no ingress rule matches the incoming traffic then it gets routed to the specified service

set the default backend i.e. if no ingress rule matches the incoming traffic then it gets routed to the specified service

Value parameters:
serviceName
  • service name
servicePort
  • service port
Returns:

copy of this Ingress with default backend set

Inherited methods

def name: String
Inherited from:
ObjectResource
def ns: String
Inherited from:
ObjectResource
def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product
def resourceVersion: String
Inherited from:
ObjectResource

Concrete fields

lazy val copySpec: Spec