Documentation
¶
Overview ¶
pkg/resources/ingresses/ingress.go
pkg/resources/ingresses/types.go
Index ¶
- func Create(ctx context.Context, kube kubeclient.KubeClient, owner domain.Object, ...) error
- func Delete(ctx context.Context, kube kubeclient.KubeClient, owner domain.Object, ...) error
- func DeleteIfOwned(ctx context.Context, kube kubeclient.KubeClient, owner domain.Object, ...) error
- func Update(ctx context.Context, kube kubeclient.KubeClient, owner domain.Object, ...) error
- type ResolvedIngressSpec
- type ResolvedIngressTLS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(ctx context.Context, kube kubeclient.KubeClient, owner domain.Object, spec ResolvedIngressSpec) error
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 ¶
func Delete(ctx context.Context, kube kubeclient.KubeClient, owner domain.Object, spec ResolvedIngressSpec) error
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 ¶
func Update(ctx context.Context, kube kubeclient.KubeClient, owner domain.Object, spec ResolvedIngressSpec) error
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 ¶
func Resolve(src orktypes.IngressTemplateSource, ownerName string) ResolvedIngressSpec
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.