LogicFlowService
LogicFlowService provides stable external HTTP access to workflows with traffic splitting for canary deployments and gradual rollouts. It uses a forward reference pattern (Service → Definition) and discovers the runtime transitively from the referenced definitions. Supports Kubernetes Ingress, OpenShift Route, and Gateway API HTTPRoute.
Spec Fields
defaultDefinition
Type: LocalObjectReference — Optional
Routes 100% traffic to a single LogicFlowDefinition. Mutually exclusive with traffic.
spec:
defaultDefinition:
name: order-workflow-v1
traffic
Type: []TrafficSpec — Optional
Distributes requests across workflow versions. Mutually exclusive with defaultDefinition. Weights must sum to 100.
spec:
traffic:
- definitionRef:
name: order-workflow-v1
weight: 80
- definitionRef:
name: order-workflow-v2
weight: 20
ingress
Type: IngressSpec — Required
External HTTP/HTTPS access configuration. Creates an Ingress (Kubernetes), Route (OpenShift), or HTTPRoute (Gateway API).
spec:
ingress:
host: order-api.example.com
ingressClassName: nginx
annotations:
cert-manager.io/cluster-issuer: letsencrypt
tls:
enabled: true
secretRef:
name: order-api-tls
ingress.ingressClassName
Type: string — Optional
Selects the Ingress controller (Kubernetes Ingress mode).
ingress.gatewayRef
Type: GatewayRef — Optional
Selects the Gateway for HTTPRoute creation (Gateway API mode). When set, an HTTPRoute is created instead of Ingress/Route. Required for traffic splitting on OpenShift.
ingress.annotations
Type: map[string]string — Optional
Annotations for the Ingress/Route/HTTPRoute resource (user-provided).
ingress.tls
Type: TLSSpec — Optional
HTTPS/TLS configuration.
ingress.tls.secretRef
Type: LocalObjectReference — Optional
References an existing TLS Secret. Mutually exclusive with certManager.
ingress.tls.certManager
Type: CertManagerSpec — Optional
Configures automatic certificate generation via cert-manager. Mutually exclusive with secretRef.
ingress.tls.certManager.issuerRef
Type: CertManagerIssuerRef — Required
References a cert-manager Issuer or ClusterIssuer.
======= ingress.tls.certManager.issuerRef.name
Type: string — Required
Name of the Issuer/ClusterIssuer.
======= ingress.tls.certManager.issuerRef.kind
Type: string — Optional — Default: ClusterIssuer
Kind is either "Issuer" or "ClusterIssuer".
======= ingress.tls.certManager.issuerRef.group
Type: string — Optional — Default: cert-manager.io
API group of the Issuer.
Status Fields
runtimeRef
Type: LocalObjectReference — Optional
The discovered LogicFlowRuntime from the referenced definitions.
Full Example
apiVersion: logic.kubesmarts.org/v1
kind: LogicFlowService
metadata:
name: order-api
namespace: default
spec:
# Canary rollout: 80% to v1, 20% to v2
traffic:
- definitionRef:
name: order-workflow-v1
weight: 80
- definitionRef:
name: order-workflow-v2
weight: 20
ingress:
host: order-api.example.com
ingressClassName: nginx
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/rate-limit: "100"
tls:
enabled: true
certManager:
issuerRef:
name: letsencrypt-prod
kind: ClusterIssuer
group: cert-manager.io
status:
observedGeneration: 1
runtimeRef:
name: production-runtime
ingressRef:
name: order-api
url: https://order-api.example.com
traffic:
- definitionRef:
name: order-workflow-v1
weight: 80
ready: true
- definitionRef:
name: order-workflow-v2
weight: 20
ready: true
conditions:
- type: Ready
status: "True"
observedGeneration: 1
reason: IngressReady
message: Ingress is ready and accepting traffic
- type: RoutingConfigured
status: "True"
observedGeneration: 1
reason: TrafficSplitReady
message: Traffic split configured successfully