Traffic Management Config
Traffic management section
trafficManagement.
You configure your service mesh per target in this section. If you omit the target
entry, CD-as-a-Service applies the config to all targets.
trafficManagement:
- targets: ["<target-name>"]
SMI targets
trafficManagement.targets.smi
trafficManagement:
- targets: ["<target>"]
smi:
- rootServiceName: "<rootServiceName>"
canaryServiceName: "<rootServiceName>-canary"
trafficSplitName: "<rootServiceName>"
kubernetes:
- activeService: "<activeServiceName>"
previewService: "<previewServiceName>"
targets
: Comma-delimited list of deployment targets; if omitted, CD-as-a-Service applies the traffic management configuration to all targets.smi.rootServiceName
: (Required if configuring ansmi
block) the name of a KubernetesService
. Its service selector should target a KubernetesDeployment
resource in your deployment’s manifests. The SMITrafficSplit
spec defines a root service as the fully qualified domain name (FQDN) used by clients to communicate with your application. TheService
should exist at the time of deployment.smi.canaryServiceName
: (Optional)(Canary) the name of a KubernetesService
. Its service selector should target a KubernetesDeployment
resource in your deployment’s manifests.- If you provide a
canaryServiceName
, CD-as-a-Service assumes theService
already exists and uses it for deployment. - If you don’t provide a
canaryServiceName
, CD-as-a-Service creates aService
object and gives it the name of the root service with “-canary” appended to it. For example, if your root service is “myRootService”, then the canary service name would be “myRootService-canary”.
- If you provide a
smi.trafficSplitName
: (Optional) CD-as-a-Service uses the provided name when creating an SMITrafficSplit
.kubernetes.activeService
: (Required if configuring akubernetes
block)(Blue/Green) the name of a KubernetesService
. Its service selector should target a KubernetesDeployment
resource in your deployment’s manifests. TheService
should exist at the time of deployment.kubernetes.previewService
: (Optional)(Blue/Green) the name of a KubernetesService
. Its service selector should target a KubernetesDeployment
resource in your deployment’s manifests. TheService
should exist at the time of deployment.
Istio targets
trafficManagment.targets.istio
See Configure Traffic Management With Istio for a detailed example.
trafficManagement:
- targets: ["<target-name>"]
istio:
- virtualService:
name: <VirtualService-metadata-name>
httpRouteName: <VirtualService-http-route-name>
destinationRule:
name: <DestinationRule-metadata-name>
activeSubsetName: <VirtualService-http-route-destination-subset-name>
canarySubsetName: <canary-subset-name>
targets
: (Optional) comma-delimited list of deployment targets; if omitted, CD-as-a-Service applies the traffic management configuration to all targets.istio.virtualService
: (Required)istio.virtualService.name
: The name of your VirtualServiceistio.virtualService.httpRouteName
: The name of the HTTPRoute defined in your VirtualService. This field is optional if you define only one HTTPRoute.
istio.destinationRule
: Optional if you only define only one DestinationRule.istio.destinationRule.name
: The name of your DestinationRuleistio.destinationRule.activeSubsetName
: The name of the subset configured in your VirtualService HTTPRoute destination. This subset is running the current version of your app.activeSubsetName
is optional if you define only one active subset.istio.destinationRule.canarySubsetName
: (Optional) The name of the canary subset defined in your DestinationRule.
Kubernetes targets
trafficManagement.targets.kubernetes
trafficManagement:
- targets: ["<target1>", "<target2>"]
kubernetes:
- activeService: "<activeServiceName>"
previewService: "<previewServiceName>"
targets
: Comma-delimited list of deployment targets.kubernetes.activeService
: (Required if configuring akubernetes
block)(Blue/Green) the name of a KubernetesService
. Its service selector should target a KubernetesDeployment
resource in your deployment’s manifests. TheService
should exist at the time of deployment.kubernetes.previewService
: (Optional)(Blue/Green) the name of a KubernetesService
. Its service selector should target a KubernetesDeployment
resource in your deployment’s manifests. TheService
should exist at the time of deployment.
Feedback
Was this page helpful?
Thank you for letting us know!
Sorry to hear that. Please tell us how we can improve.
Last modified October 10, 2023: (db84da5)