Class DisplaySecretMonitor

java.lang.Object
org.jgrapes.core.internal.ComponentVertex
org.jgrapes.core.Component
org.jdrupes.vmoperator.manager.AbstractMonitor<io.kubernetes.client.openapi.models.V1Secret,io.kubernetes.client.openapi.models.V1SecretList,VmChannel>
org.jdrupes.vmoperator.manager.DisplaySecretMonitor
All Implemented Interfaces:
Iterable<ComponentType>, Channel, ComponentType, Eligible, Manager

public class DisplaySecretMonitor extends AbstractMonitor<io.kubernetes.client.openapi.models.V1Secret,io.kubernetes.client.openapi.models.V1SecretList,VmChannel>
Watches for changes of display secrets.

Updates an artifical attribute of the pod running the VM in response to force an update of the files in the pod that reflect the information from the secret.

  • Constructor Details

  • Method Details

    • prepareMonitoring

      protected void prepareMonitoring() throws IOException, io.kubernetes.client.openapi.ApiException
      Description copied from class: AbstractMonitor
      Invoked by AbstractMonitor.onStart(Start) after the namespace has been configured and before starting the observer.

      This is the last opportunity to invoke AbstractMonitor.context(APIResource).

      Overrides:
      prepareMonitoring in class AbstractMonitor<io.kubernetes.client.openapi.models.V1Secret,io.kubernetes.client.openapi.models.V1SecretList,VmChannel>
      Throws:
      IOException - Signals that an I/O exception has occurred.
      io.kubernetes.client.openapi.ApiException - the api exception
    • handleChange

      protected void handleChange(K8sClient client, io.kubernetes.client.util.Watch.Response<io.kubernetes.client.openapi.models.V1Secret> change)
      Description copied from class: AbstractMonitor
      Handle an observed change.

      The method is invoked by the observer thread(s). It is the responsibility of the implementing class to fire derived events on the appropriate event pipeline.

      Specified by:
      handleChange in class AbstractMonitor<io.kubernetes.client.openapi.models.V1Secret,io.kubernetes.client.openapi.models.V1SecretList,VmChannel>
      Parameters:
      client - the client
      change - the change