Example
A simple definition example:
# resource document type declaration
apiVersion: service.aep.asag.io/v1 # the AEP service resource api with version
kind: Definition # the resource type is a definition
# resource document naming
metadata:
namespace: asag # the vendor shortname of the definition
name: nginx-0.1 # a unique name of the definition per vendor
# resource document specification
spec:
name: nginx # the service shortname of this definition
version: "0.1" # the recipe version of this definition
# cluster specific specs
clusters:
- # node specific specs applied to all nodes in this cluster
podspec:
containers:
- image: nginx # image to use in the container of the nodes
# the allowed operating size for this cluster
sizing:
initial: 2 # amount of nodes to be deployed if not changed by a provision
minimum: 1 # minimum amount of nodes
maximum: 10 # maximum amoumt of nodes
increment: 1 # allowed cluster sizing change if requested
# endpoints this cluster provides
provides:
- network: loadbalanced # type of clustering on network level
servicespec:
ports: # list of offered ports
- name: http
port: 80
protocol: TCP
- name: https
port: 443
protocol: TCP
It is advisable to use the service shortname suffixed with the version as the unique definition name as you might want to develop the definition further without changing the current recipe