Examples
Cloud Compute Services
Attributes
There are currently no attributes defined for Platforms.
This section exists as a placeholder in case attributes are added in the future.
Behaviours
Behaviour | Description |
Cluster Discovery |
- Nodes are discovered by listing existing instances on the Cloud Compute Service.
The cluster ID is attached as a tag or service equivalent to each node so they can be grouped.
- The node ID is the compute instance ID as determined by the compute service.
- Each node’s agent address is derived from the compute instance attributes:
- Platforms can provide configuration options on how this works.
- Agent address is the compute IP address (private IP likely).
- Agent port can be from Platform configuration, tag detected, other compute service feature.
|
Node Provisioning |
Provisioning is done by creating Cloud Compute Service instances.
How the instance is customised to the correct store software and version is implementation defined.
As this is an example, here is one possible way to achieve this:
- Platform has access to a catalogue of “create instance” request payload templates.
- Store software and version determine the template to use.
- The selected template is rendered into the arguments for a “create instance” request.
- The “create instance” request is sent to the Cloud Compute Service.
|
Node Deprovisioning |
Deprovisioning is done by deleting Cloud Compute Service instances.
The node ID, and if needed the cluster ID, are used to issue “delete instance” request
to the Cloud Compute Service.
|
Kubernetes
A list of namespaces to check is configured when the Kubernetes Platform starts.
This enables one Platform process to manage multiple namespaces but still allow custom scoping.
Attributes
There are currently no attributes defined for Platforms.
This section exists as a placeholder in case attributes are added in the future.
Behaviours
Behaviour | Description |
Cluster Discovery |
- List all pods in namespace to find nodes.
- Optionally a label selector can be used to limit the pods to “Platform managed” pods.
- The cluster ID is attached as a label to each pod metadata.
- The agent address is determined using pod annotations:
- Value of
k8s.replicante.io/agent-address if it exists.
- Figure out the
target_ip for the node:
- If
k8s.replicante.io/agent-ip-from is set, use the Node IP (node ) or Pod IP (pod ).
- Check
platform.config.agent-ip-from to use the Node IP (node ) or Pod IP (pod ).
- Value of
{k8s.replicante.io/agent-schema}://{target_ip}:{k8s.replicante.io/agent-port}
if all required attributes are present.
- Value of
{platform.config.agent-schema}://{target_ip}:{platform.config.agent-port} .
|
Node Provisioning |
- A generated ID (which includes a random component) is generated for the node.
- A template is located based on store software and version.
- The template is rendered (with request arguments) into a YAML document.
- The template attaches the cluster ID as a label to all objects.
- The template attaches the node ID as a label to all objects.
- The YAML document is applied.
|
Node Deprovisioning |
All objects with the cluster and node IDs as labels are deleted.
A configurable list of object types is checked in order for objects to delete.
This allows provisioning to create a variety of supported objects without leaving
resources behind on delete.
|