From fdcc17bbe21d23634673ce7043d5ab867e879a46 Mon Sep 17 00:00:00 2001 From: vaikas-google Date: Fri, 6 Nov 2015 18:11:27 -0800 Subject: [PATCH] add schema files --- types/redis/v1/redis.jinja.schema | 10 ++++ .../v1/replicatedservice.py.schema | 57 +++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 types/redis/v1/redis.jinja.schema create mode 100644 types/replicatedservice/v1/replicatedservice.py.schema diff --git a/types/redis/v1/redis.jinja.schema b/types/redis/v1/redis.jinja.schema new file mode 100644 index 000000000..cd550d65a --- /dev/null +++ b/types/redis/v1/redis.jinja.schema @@ -0,0 +1,10 @@ +info: + title: Redis cluster + description: Defines a redis cluster, using a single replica + replicatedservice for master and replicatedservice for workers. + +properties: + workers: + type: int + default: 2 + description: Number of worker replicas. diff --git a/types/replicatedservice/v1/replicatedservice.py.schema b/types/replicatedservice/v1/replicatedservice.py.schema new file mode 100644 index 000000000..c9ce310ab --- /dev/null +++ b/types/replicatedservice/v1/replicatedservice.py.schema @@ -0,0 +1,57 @@ +info: + title: Replicated Service + description: | + Defines a ReplicatedService type by creating both a Service and an RC. + + This module creates a typical abstraction for running a service in a + Kubernetes cluster, namely a replication controller and a service packaged + together into a single unit. + +required: +- image + +properties: + container_name: + type: string + description: Name to use for container. If omitted, name is used. + service_name: + type: string + description: Name to use for service. If omitted, name-service is used. + namespace: + type: string + description: Namespace to create resources in. If omitted, 'default' is + used. + default: default + protocol: + type: string + description: Protocol to use for the service. + service_port: + type: int + description: Port to use for the service. + target_port: + type: int + description: Target port to use for the service. + container_port: + type: int + description: Port to use for the container. + replicas: + type: int + description: Number of replicas to create in RC. + image: + type: string + description: Docker image to use for replicas. + labels: + type: object + description: Labels to apply. + env: + type: object + description: Environment variables to apply. + properties: + name: + type: string + value: + type: string + external_service: + type: boolean + description: If set to true, enable external load balancer. +