Resource Definitions

Driver

Capability

Flavor

Resource Type

Ingress

This section contains example Resource Definitions for handling Kubernetes ingress traffic using the Ingress Driver.

Resource Definitions


ingress-alb.yaml ( view on GitHub ) :

apiVersion: entity.humanitec.io/v1b1
entity:
  driver_inputs:
    values:
      annotations:
        alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:us-west-2:xxxxx:certificate/xxxxxxx
        alb.ingress.kubernetes.io/group.name: my-team.my-group
        alb.ingress.kubernetes.io/listen-ports: '[{"HTTP":80},{"HTTPS":443}]'
        alb.ingress.kubernetes.io/scheme: internet-facing
        alb.ingress.kubernetes.io/ssl-redirect: "443"
        alb.ingress.kubernetes.io/target-type: ip
      class: alb
      no_tls: true
  driver_type: humanitec/ingress
  name: alb-ingress
  type: ingress
kind: Definition
metadata:
  id: alb-ingress


ingress-kong.yaml ( view on GitHub ) :

# This Resource Definition provisions an Ingress object for the Kong Ingress Controller
apiVersion: entity.humanitec.io/v1b1
kind: Definition
metadata:
  id: kong-ingress
entity:
  name: kong-ingress
  type: ingress
  driver_type: humanitec/ingress
  driver_inputs:
    values:
      annotations:
        konghq.com/preserve-host: "false"
        konghq.com/strip-path: "true"
      api_version: v1
      class: kong

ingress-openshift-operator.yaml ( view on GitHub ) :

# This Resource Definition provisions an Ingress object for the OpenShift Container Platform Ingress Operator
apiVersion: entity.humanitec.io/v1b1
kind: Definition
metadata:
  id: openshift-ingress
entity:
  name: openshift-ingress
  type: ingress
  driver_type: humanitec/ingress
  driver_inputs:
    values:
      class: openshift-default


ingress-alb.tf ( view on GitHub ) :

resource "humanitec_resource_definition" "alb-ingress" {
  driver_type = "humanitec/ingress"
  id          = "alb-ingress"
  name        = "alb-ingress"
  type        = "ingress"
  driver_inputs = {
    values_string = jsonencode({
      "annotations" = {
        "alb.ingress.kubernetes.io/certificate-arn" = "arn:aws:acm:us-west-2:xxxxx:certificate/xxxxxxx"
        "alb.ingress.kubernetes.io/group.name"      = "my-team.my-group"
        "alb.ingress.kubernetes.io/listen-ports"    = "[{\"HTTP\":80},{\"HTTPS\":443}]"
        "alb.ingress.kubernetes.io/scheme"          = "internet-facing"
        "alb.ingress.kubernetes.io/ssl-redirect"    = "443"
        "alb.ingress.kubernetes.io/target-type"     = "ip"
      }
      "class"  = "alb"
      "no_tls" = true
    })
  }
}



ingress-kong.tf ( view on GitHub ) :

resource "humanitec_resource_definition" "kong-ingress" {
  driver_type = "humanitec/ingress"
  id          = "kong-ingress"
  name        = "kong-ingress"
  type        = "ingress"
  driver_inputs = {
    values_string = jsonencode({
      "annotations" = {
        "konghq.com/preserve-host" = "false"
        "konghq.com/strip-path"    = "true"
      }
      "api_version" = "v1"
      "class"       = "kong"
    })
  }
}



ingress-openshift-operator.tf ( view on GitHub ) :

resource "humanitec_resource_definition" "openshift-ingress" {
  driver_type = "humanitec/ingress"
  id          = "openshift-ingress"
  name        = "openshift-ingress"
  type        = "ingress"
  driver_inputs = {
    values_string = jsonencode({
      "class" = "openshift-default"
    })
  }
}


Top