Skip to content

Commit

Permalink
validation: adding kubernetes components dependency check for the epi…
Browse files Browse the repository at this point in the history
…phany-cluster doc
  • Loading branch information
sk4zuzu committed Jun 9, 2020
1 parent c9e757a commit cfd7aca
Showing 1 changed file with 126 additions and 116 deletions.
242 changes: 126 additions & 116 deletions core/src/epicli/data/common/validation/epiphany-cluster.yml
Original file line number Diff line number Diff line change
@@ -1,116 +1,126 @@
"$id": "#/specification"
title: "Cluster specification schema"
description: "The main cluster specification"
type: object
required:
- name
- admin_user
- components
properties:
prefix:
"$id": "#/properties/prefix"
title: "Cluster prefix"
description: "A prefix the can be prepended to the cluster name"
examples:
- prod01
- dev02
- test03
- cust04
type: string
pattern: "^[a-z0-9]{2,8}$"
name:
"$id": "#/properties/name"
title: "Cluster name"
description: "The name of the cluster"
examples:
- clustername01
type: string
pattern: "^[a-z0-9\\-]{3,20}$"
admin_user:
"$id": "#/properties/admin_user"
title: "The admin_user Schema"
description: "Settings needed for the SSH connection to the cluster machines or VM's"
type: object
cloud:
"$id": "#/properties/specification/properties/cloud"
type: object
title: The Cloud Schema
properties:
subscription_name:
"$id": "#/properties/specification/properties/cloud/properties/subscription_name"
type: string
title: The Subscription_name Schema
default: ''
examples:
- subsciptionname
pattern: "^(.*)$"
vnet_address_pool:
"$id": "#/properties/specification/properties/cloud/properties/vnet_address_pool"
type: string
title: The Vnet_address_pool Schema
default: ''
examples:
- 10.1.0.0/20
pattern: "^(.*)$"
use_public_ips:
"$id": "#/properties/specification/properties/cloud/properties/use_public_ips"
type: boolean
title: The Use_public_ips Schema
default: false
examples:
- false
use_service_principal:
"$id": "#/properties/specification/properties/cloud/properties/use_service_principal"
type: boolean
title: The Use_service_principal Schema
default: false
examples:
- false
region:
"$id": "#/properties/specification/properties/cloud/properties/region"
type: string
title: The Region Schema
default: ''
examples:
- eu-west-2
pattern: "^(.*)$"
credentials:
"$id": "#/properties/specification/properties/cloud/properties/credentials"
type: object
title: The Credentials Schema
required:
- key
- secret
properties:
key:
"$id": "#/properties/specification/properties/cloud/properties/credentials/properties/key"
type: string
title: The Key Schema
pattern: "^(.*)$"
secret:
"$id": "#/properties/specification/properties/cloud/properties/credentials/properties/secret"
type: string
title: The Secret Schema
pattern: "^(.*)$"
network:
"$id": "#/properties/specification/properties/cloud/properties/network"
type: object
title: The Network Schema
properties:
use_network_security_groups:
"$id": "#/properties/specification/properties/cloud/properties/network/properties/use_network_security_groups"
type: boolean
title: The Use_network_security_groups Schema
default: false
examples:
- true
components:
"$id": "#/properties/components"
title: "Components schema"
description: "Cluster component layout specification"
type: object





"$id": "#/specification"
title: "Cluster specification schema"
description: "The main cluster specification"
type: object
required:
- name
- admin_user
- components
properties:
prefix:
"$id": "#/properties/prefix"
title: "Cluster prefix"
description: "A prefix the can be prepended to the cluster name"
examples:
- prod01
- dev02
- test03
- cust04
type: string
pattern: "^[a-z0-9]{2,8}$"
name:
"$id": "#/properties/name"
title: "Cluster name"
description: "The name of the cluster"
examples:
- clustername01
type: string
pattern: "^[a-z0-9\\-]{3,20}$"
admin_user:
"$id": "#/properties/admin_user"
title: "The admin_user Schema"
description: "Settings needed for the SSH connection to the cluster machines or VM's"
type: object
cloud:
"$id": "#/properties/specification/properties/cloud"
type: object
title: The Cloud Schema
properties:
subscription_name:
"$id": "#/properties/specification/properties/cloud/properties/subscription_name"
type: string
title: The Subscription_name Schema
default: ''
examples:
- subsciptionname
pattern: "^(.*)$"
vnet_address_pool:
"$id": "#/properties/specification/properties/cloud/properties/vnet_address_pool"
type: string
title: The Vnet_address_pool Schema
default: ''
examples:
- 10.1.0.0/20
pattern: "^(.*)$"
use_public_ips:
"$id": "#/properties/specification/properties/cloud/properties/use_public_ips"
type: boolean
title: The Use_public_ips Schema
default: false
examples:
- false
use_service_principal:
"$id": "#/properties/specification/properties/cloud/properties/use_service_principal"
type: boolean
title: The Use_service_principal Schema
default: false
examples:
- false
region:
"$id": "#/properties/specification/properties/cloud/properties/region"
type: string
title: The Region Schema
default: ''
examples:
- eu-west-2
pattern: "^(.*)$"
credentials:
"$id": "#/properties/specification/properties/cloud/properties/credentials"
type: object
title: The Credentials Schema
required:
- key
- secret
properties:
key:
"$id": "#/properties/specification/properties/cloud/properties/credentials/properties/key"
type: string
title: The Key Schema
pattern: "^(.*)$"
secret:
"$id": "#/properties/specification/properties/cloud/properties/credentials/properties/secret"
type: string
title: The Secret Schema
pattern: "^(.*)$"
network:
"$id": "#/properties/specification/properties/cloud/properties/network"
type: object
title: The Network Schema
properties:
use_network_security_groups:
"$id": "#/properties/specification/properties/cloud/properties/network/properties/use_network_security_groups"
type: boolean
title: The Use_network_security_groups Schema
default: false
examples:
- true
components:
"$id": "#/properties/components"
type: object
title: "Components schema"
description: "Cluster component layout specification"
# When "kubernetes_node" property exists, "kubernetes_master" must exist as well
dependencies:
kubernetes_node: [kubernetes_master]
allOf:
# When no master is deployed, there must be no nodes deployed as well
- if:
properties:
kubernetes_master:
properties:
count: { type: integer, enum: [0] }
then:
properties:
kubernetes_node:
properties:
count: { type: integer, enum: [0] }

0 comments on commit cfd7aca

Please sign in to comment.