You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Active and Available Inventory (AAI) needs to be updated when a Resource Bundle is instantiated in one of the cloud regions managed by the k8splugin.

The requires that;

  1. The k8splugin provide an API to get the status of a running instance
  2. The status fields need to be mapped to the AAI data model
  3. A REST API call to AAI needs to be made when the status of resources changes.

Structure of Resources

Here is how the an instance created by K8splugin is tracked


Each Resource is tracked as two parts that uniquely identify it in a given namespace

Name and GVK

Structure of Status

The structure of status fields is not finalized yet. However, we would like to include the entire status as returned by Kubernetes for the object.

This means that the status can vary based on the type of object being queried.

Eg: Deployment Status

Deployment Status
status:
  availableReplicas: 1
  conditions:
  - lastTransitionTime: "2019-07-19T21:48:55Z"
    lastUpdateTime: "2019-07-19T21:48:55Z"
    message: Deployment has minimum availability.
    reason: MinimumReplicasAvailable
    status: "True"
    type: Available
  - lastTransitionTime: "2019-07-19T21:47:50Z"
    lastUpdateTime: "2019-07-19T21:48:55Z"
    message: ReplicaSet "profile2-edgex-mongo-d64f6c7c8" has successfully progressed.
    reason: NewReplicaSetAvailable
    status: "True"
    type: Progressing
  observedGeneration: 1
  readyReplicas: 1
  replicas: 1
  updatedReplicas: 1

POD Status

Pod Status
status:
  conditions:
  - lastProbeTime: null
    lastTransitionTime: "2019-07-19T21:47:51Z"
    status: "True"
    type: Initialized
  - lastProbeTime: null
    lastTransitionTime: "2019-07-19T21:48:55Z"
    status: "True"
    type: Ready
  - lastProbeTime: null
    lastTransitionTime: "2019-07-19T21:48:55Z"
    status: "True"
    type: ContainersReady
  - lastProbeTime: null
    lastTransitionTime: "2019-07-19T21:47:50Z"
    status: "True"
    type: PodScheduled
  containerStatuses:
  - containerID: docker://eb3f5ae847a5a3aa38c95cba3aea0bf6a15fce12bcd220206de8b513c481154f
    image: edgexfoundry/docker-edgex-mongo:0.8.0
    imageID: docker-pullable://edgexfoundry/docker-edgex-mongo@sha256:e2cf9380555867ed747be392284117be3b50cfdff04e13e6f57cb51d86f331b3
    lastState: {}
    name: edgex-mongo
    ready: true
    restartCount: 0
    state:
      running:
        startedAt: "2019-07-19T21:48:27Z"
  hostIP: 172.25.55.139
  phase: Running
  podIP: 10.42.0.13
  qosClass: BestEffort
  startTime: "2019-07-19T21:47:51Z"


  • No labels