Evolve your Internal Developer Platform with KusionStack
Build a more efficient and secure enterprise-grade Internal Developer Platform in Kubernetes and Clouds
All about your modern app by Platform Engineering
Easy App Shipping
Faster development, simplified delivery
- Declarative, application-centric spec
- Managed resource orchestration and provisioning in Kubernetes and Clouds
- Kubernetes-first, lightweight and dev-friendly
Secure By Design
From the first line of code to the production
- Shift-left validation to detect risks early
- Codified rules and policies from operating best practice
- Enterprise-grade fine-grained cluster control for Kubernetes
Enable Developer Self-Service
Build universal abstraction and golden path
- Schema-based abstraction to build your models and validations
- Building blocks to establish your paved path
- Integration with iterative platform capabilities to meet evolving needs
Codify Your Modern Delivery
With configs, models, functions and rules
import base.pkg.kusion_models.kube.frontendappConfiguration: frontend.Server {image = "howieyuen/gocity:latest"}
-- Configimport base.pkg.kusion_models.kube.frontendappConfiguration: frontend.Server {image = "howieyuen/gocity:latest"}
schema Server:"""Server is the abstraction of Deployment and StatefulSet.image: str, default is Undefined, required.Image name. More info: https://kubernetes.io/docs/concepts/containers/images.replicas: int, default is 1, required.Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.labels: {str:str}, default is Undefined, optional.Labels is a map of string keys and values that can be used to organize and categorize (scope and select) objects."""image: strreplicas: int = option("replicas") or 1labels?: {str:str}
-- Schemaschema Server:"""Server is the abstraction of Deployment and StatefulSet.image: str, default is Undefined, required.Image name. More info: https://kubernetes.io/docs/concepts/containers/images.replicas: int, default is 1, required.Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.labels: {str:str}, default is Undefined, optional.Labels is a map of string keys and values that can be used to organize and categorize (scope and select) objects."""image: strreplicas: int = option("replicas") or 1labels?: {str:str}
import base.pkg.kusion_models.kube.frontendgenLocalityLabels = lambda az: str, cell: str, cluster: str, app: str -> {str:str} {{"aws/az" = az"aws/cell" = cell"cluster.x-k8s.io/cluster-name" = cluster"app.kubernetes.io/name" = app}}appConfiguration: frontend.Server {labels: genLocalityLabels("us-west-1a", "us-west-2-lax-1a", "my-cluster", "gocity")}
-- Lambdaimport base.pkg.kusion_models.kube.frontendgenLocalityLabels = lambda az: str, cell: str, cluster: str, app: str -> {str:str} {{"aws/az" = az"aws/cell" = cell"cluster.x-k8s.io/cluster-name" = cluster"app.kubernetes.io/name" = app}}appConfiguration: frontend.Server {labels: genLocalityLabels("us-west-1a", "us-west-2-lax-1a", "my-cluster", "gocity")}
import regexrule ServerRule for Server:1 <= replicas < 20, "replica should be in range [1, 20)"regex.match(image, r"^([a-z0-9.:]+).([a-z]+):([a-z0-9]+)/([a-z0-9.]+)/([a-z0-9-_.:]+)$"), "image name should satisfy the `REPOSITORY:TAG` form"ServerRule()
-- Ruleimport regexrule ServerRule for Server:1 <= replicas < 20, "replica should be in range [1, 20)"regex.match(image, r"^([a-z0-9.:]+).([a-z]+):([a-z0-9]+)/([a-z0-9.]+)/([a-z0-9-_.:]+)$"), "image name should satisfy the `REPOSITORY:TAG` form"ServerRule()