Repositories
deploymentsd
Published by: Configfacets0Updated

You can learn about, how to implement deployment configurations in this version.

deployment
|

Authentication

Add API authentication details

HEADERS
X-APIKEY
string
Send X-APIKEY in Header

Readme

User instructions for this resource

Configfacets Example: Deployment Configuration

In this example, we'll explore the deployment configuration for Istio. The Istio ingress controller starts with an IngressGateway, which acts as an entry point for external traffic. It receives incoming requests and processes them based on the Gateway resource, which defines hostnames, ports, and protocols. The IngressGateway then routes the traffic to the appropriate VirtualService, which specifies how requests should be forwarded to the corresponding backend services within the mesh.

Requirements

EnvironmentDescription
Staging"corp.example.com", "www.corp.example.com", "corp.apis.example.com"
Production"example.com", "www.example.com", "apis.example.com"
  • In both environments, all hosts listen on port 443, and the IngressGateway requires an additional NodePort listener on port 30002.
  • The configuration for host setup in the Gateway resource and the Istio IngressGateway configuration must be managed within the same endpoint, allowing for easy installation and removal as needed.

Design Decisions

The Configfacets Service data structure is designed to generate configurations dynamically based on templates, overrides, and values. Additionally, it supports the creation of multiple configurations, making it an efficient solution for this use case.

ResourceDescription
Example Inc - ValuesStores all deployment-related configuration values, identified by global variables __NS_ID__, __SVC_ID__, and __GATEWAY_ID__.
Gateway ConfigurationUtilizes Istio repository v1 components, including the Gateway template, Gateway Overrides and Example Inc - Values
Istio LoadBalancerUtilizes Kubernetes Service Resources v1 - Service, and Example Inc - Values but does not have any overrides collection
Istio Services Request ContextStores relevant global variable keys that need to be referenced in Example Inc - Values
Istio ServicesIstio Services executes Gateway Configuration and Istio LoadBalancer using Istio Services Request Context

Istio Services Request Context

The Istio Services Request Context provides a dynamic way to configure Istio resources by allowing environment-based filtering at runtime.

{
    "facets": [
        "env:{{ env }}"
    ],
    "globalvars": {
        "__NS_ID__": "istio",
        "__SVC_ID__": "loadbalancer",
        "__GATEWAY_ID__": "gateway"
    }
}

Execution

Request Body:

{
    "env": "prod"
}

Step 1

During execution, the env value is injected into the Istio Services Request Context, replacing {{ env }} with "prod".

A filter ("env:prod") is applied to the Example Inc - Values, extracting the relevant configuration values.

Step 2

The Gateway Configuration are executed as per execution settings and final template is derived

The Istio LoadBalancer are executed as per execution settings and final template is derived

Step 3

The final values derived from Step 1 are applied to Step 2

POST/apis/repos/configfacets/core-concepts/deployments/resources/services/istio-services/exec
REQUEST
QUERY-STRING PARAMETERS
client
string
format
string
No sources available.
API Server https://configfacets.com
API Key
Not set
RESPONSES
No content available.