non-oss/pharos_pro/addons/kontena-storage/addon.rb
# Wait new ceph mgr replica set
#
# @param ceph_version [String]
Wait new ceph mgr replica set
Wait new ceph mgr replica set
def wait_mgr_upgrade(ceph_version)
    rs_client = kube_client.api('extensions/v1beta1').resource('replicasets', namespace: 'kontena-storage')
    upgraded = false
    while !upgraded
      upgraded = rs_client.list(labelSelector: 'app=rook-ceph-mgr').any? { |rs|
        rs.spec.template.spec.containers.first.image.include?("/ceph:v#{ceph_version}")
      }
      sleep 1
    end
    true
  end
def wait_mgr_upgrade ( ceph_version ) rs_client = kube_client . api ( 'extensions/v1beta1' ) . resource ( 'replicasets' , namespace : 'kontena-storage' ) upgraded = false while ! upgraded upgraded = rs_client . list ( labelSelector : 'app=rook-ceph-mgr' ) . any? { | rs | rs . spec . template . spec . containers . first . image . include? ( "/ceph:v#{ceph_version}" ) } sleep 1 end true end
Wait new ceph mgr replica set
Wait new ceph mgr replica set
ceph_version
None