Class KubernetesJobProvider

  • All Implemented Interfaces:
    com.netflix.spinnaker.clouddriver.model.JobProvider<KubernetesJobStatus>

    @Component
    public class KubernetesJobProvider
    extends java.lang.Object
    implements com.netflix.spinnaker.clouddriver.model.JobProvider<KubernetesJobStatus>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void cancelJob​(java.lang.String account, java.lang.String location, java.lang.String id)  
      KubernetesJobStatus collectJob​(java.lang.String account, java.lang.String location, java.lang.String id)  
      java.util.Map<java.lang.String,​java.lang.Object> getFileContents​(java.lang.String account, java.lang.String location, java.lang.String id, java.lang.String containerName)  
      java.util.Map<java.lang.String,​java.lang.Object> getFileContentsFromPod​(java.lang.String account, java.lang.String namespace, java.lang.String podName, java.lang.String containerName)
      This method queries a pod for logs, from which it extracts properties which it returns as a map to the caller.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.netflix.spinnaker.clouddriver.model.JobProvider

        getPlatform
    • Method Detail

      • collectJob

        @Nullable
        public KubernetesJobStatus collectJob​(java.lang.String account,
                                              java.lang.String location,
                                              java.lang.String id)
        Specified by:
        collectJob in interface com.netflix.spinnaker.clouddriver.model.JobProvider<KubernetesJobStatus>
      • getFileContents

        @Nullable
        public java.util.Map<java.lang.String,​java.lang.Object> getFileContents​(java.lang.String account,
                                                                                      java.lang.String location,
                                                                                      java.lang.String id,
                                                                                      java.lang.String containerName)
        Specified by:
        getFileContents in interface com.netflix.spinnaker.clouddriver.model.JobProvider<KubernetesJobStatus>
      • getFileContentsFromPod

        @Nullable
        public java.util.Map<java.lang.String,​java.lang.Object> getFileContentsFromPod​(java.lang.String account,
                                                                                             java.lang.String namespace,
                                                                                             java.lang.String podName,
                                                                                             java.lang.String containerName)
        This method queries a pod for logs, from which it extracts properties which it returns as a map to the caller. This is needed in cases where a pod needs to be queried directly for logs, and getFileContents() doesn't give us all the required information.
        Parameters:
        account - - account to which the pod belongs
        namespace - - namespace in which the pod runs in
        podName - - pod to query the logs
        containerName - - containerName in the pod from which logs should be queried
        Returns:
        map of property file contents
      • cancelJob

        public void cancelJob​(java.lang.String account,
                              java.lang.String location,
                              java.lang.String id)
        Specified by:
        cancelJob in interface com.netflix.spinnaker.clouddriver.model.JobProvider<KubernetesJobStatus>