Sha256: 949ce58b277245d6e60822e68ff271a582b84c7caf48160e620a34f5bed7b889

Contents?: true

Size: 524 Bytes

Versions: 6

Compression:

Stored size: 524 Bytes

Contents

module KubernetesDeploy
  class PersistentVolumeClaim < KubernetesResource
    TIMEOUT = 5.minutes

    def initialize(name, namespace, file)
      @name, @namespace, @file = name, namespace, file
    end

    def sync
      @status, st = run_kubectl("get", type, @name, "--output=jsonpath={.status.phase}")
      @found = st.success?
      log_status
    end

    def deploy_succeeded?
      @status == "Bound"
    end

    def deploy_failed?
      @status == "Lost"
    end

    def exists?
      @found
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
kubernetes-deploy-0.2.2 lib/kubernetes-deploy/kubernetes_resource/persistent_volume_claim.rb
kubernetes-deploy-0.2.1 lib/kubernetes-deploy/kubernetes_resource/persistent_volume_claim.rb
kubernetes-deploy-0.2.0 lib/kubernetes-deploy/kubernetes_resource/persistent_volume_claim.rb
kubernetes-deploy-0.1.4 lib/kubernetes-deploy/kubernetes_resource/persistent_volume_claim.rb
kubernetes-deploy-0.1.3 lib/kubernetes-deploy/kubernetes_resource/persistent_volume_claim.rb
kubernetes-deploy-0.1.2 lib/kubernetes-deploy/kubernetes_resource/persistent_volume_claim.rb