ingresses

package
v0.7.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

pkg/resources/ingresses/ingress.go

pkg/resources/ingresses/types.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

Create creates an Ingress owned by the CR if it does not already exist. Idempotent — if the Ingress exists, does nothing and returns nil.

func Delete

Delete deletes the Ingress if it exists.

func DeleteIfOwned

func DeleteIfOwned(ctx context.Context, kube kubeclient.KubeClient,
	owner domain.Object, name, namespace string) error

DeleteIfOwned deletes the Ingress if it exists and is owned by the CR.

func Update

Update reconciles an existing Ingress to match the resolved spec. Patches host, backend service, port, and TLS when drift is detected. If the Ingress does not exist, creates it.

Types

type ResolvedIngressSpec

type ResolvedIngressSpec struct {
	// Name — Ingress resource name. Required.
	Name string

	// Namespace — target namespace.
	Namespace string

	// Host — virtual host for the Ingress rule.
	Host string

	// ServiceName — backend Service name.
	ServiceName string

	// ServicePort — backend Service port.
	ServicePort int32

	// Path — HTTP path prefix. Default: "/"
	Path string

	// PathType — Prefix | Exact | ImplementationSpecific. Default: Prefix.
	PathType string

	// IngressClass — Ingress class name. Empty means cluster default.
	IngressClass string

	// Labels applied to Ingress metadata.
	// Orkestra always adds: managed-by=orkestra, orkestra-owner=<cr-name>
	Labels map[string]string

	// Annotations applied to Ingress metadata.
	Annotations map[string]string

	// TLS — optional TLS configuration. nil means no TLS.
	TLS *ResolvedIngressTLS

	// Sleep injects an artificial delay into the reconcile of this resource.
	// Useful for autoscale testing, latency simulation, and chaos engineering.
	// Accepts extended duration units (s, m, h, d, w, mo, y).
	Sleep string
}

ResolvedIngressSpec is the fully resolved Ingress specification. All template expressions have been evaluated before this struct is populated. Passed directly to Create, Update, and Delete.

func Resolve

Resolve builds a ResolvedIngressSpec from an IngressTemplateSource. All template expressions must be evaluated before calling here.

type ResolvedIngressTLS

type ResolvedIngressTLS struct {
	// Create — whether to configure TLS on this Ingress.
	Create bool

	// SecretName — name of the kubernetes.io/tls Secret.
	SecretName string

	// Hosts — hostnames covered by the TLS certificate.
	Hosts []string

	// ValidFor — certificate validity duration string passed to GenerateTLSBundle.
	ValidFor string
}

ResolvedIngressTLS holds the fully resolved TLS configuration for an Ingress.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL