oracle/coherence-operator

Enable role-based component start dependencies

dpauly opened this issue · 1 comments

When a cluster is started, it would be useful to be able to specify that members with a certain application role should not be started until another role has started.
E.g. No members with an application role of 'management' should be started until at least one member with a role of 'data' is available.

Fixed in #393
Documented in Role Start-Up Ordering

For example:

  1. If there is a cluster test-cluster with two roles, data and management where the management role should not be started until all of the data Pods are in a ready state:
apiVersion: coherence.oracle.com/v1
kind: CoherenceCluster
metadata:
  name: test-cluster
spec:
  roles:
    - role: data
      replicas: 5
    - role: management
      replicas: 1
      startQuorum:
        - role: data
  1. If there is a cluster test-cluster with two roles, data and management where the management role should not be started until at least two of the data Pods are in a ready state:
apiVersion: coherence.oracle.com/v1
kind: CoherenceCluster
metadata:
  name: test-cluster
spec:
  roles:
    - role: data
      replicas: 5
    - role: management
      replicas: 1
      startQuorum:
        - role: data
          podCount: 2
  1. If there is a cluster test-cluster with three roles, data, proxy and management where the management role should not be started until all of the Pods in the data role are in the ready state and at least one of the proxy Pods are in a ready state:
apiVersion: coherence.oracle.com/v1
kind: CoherenceCluster
metadata:
  name: test-cluster
spec:
  roles:
    - role: data
      replicas: 5
    - role: proxy
      replicas: 3
    - role: management
      replicas: 1
      startQuorum:
        - role: data
        - role: proxy
          podCount: 1