"wait until resources are ready (up to --timeout). Use '--wait' alone for 'watcher' strategy, or specify one of: 'watcher', 'hookOnly', 'legacy'. Default when flag is omitted: 'hookOnly'.",
f.StringVar(&client.DeletionPropagation,"cascade","background","Must be \"background\", \"orphan\", or \"foreground\". Selects the deletion cascading strategy for the dependents. Defaults to background. Use \"foreground\" with --wait to ensure resources with finalizers are fully deleted before returning.")
f.DurationVar(&client.Timeout,"timeout",300*time.Second,"time to wait for any individual Kubernetes operation (like Jobs for hooks)")
f.StringVar(&client.Description,"description","","add a custom description")
// Verify the generation observed by the deployment controller matches the spec generation
ifdep.Status.ObservedGeneration!=dep.Generation{
slog.Debug("Deployment is not ready, observedGeneration does not match spec generation","namespace",dep.GetNamespace(),"name",dep.GetName(),"actualGeneration",dep.Status.ObservedGeneration,"expectedGeneration",dep.Generation)
c.log().Debug("Deployment is not ready, observedGeneration does not match spec generation","namespace",dep.GetNamespace(),"name",dep.GetName(),"actualGeneration",dep.Status.ObservedGeneration,"expectedGeneration",dep.Generation)
slog.Debug("Deployment does not have enough pods ready","namespace",dep.GetNamespace(),"name",dep.GetName(),"readyPods",rs.Status.ReadyReplicas,"totalPods",expectedReady)
c.log().Debug("Deployment does not have enough pods ready","namespace",dep.GetNamespace(),"name",dep.GetName(),"readyPods",rs.Status.ReadyReplicas,"totalPods",expectedReady)
returnfalse
}
slog.Debug("Deployment is ready","namespace",dep.GetNamespace(),"name",dep.GetName(),"readyPods",rs.Status.ReadyReplicas,"totalPods",expectedReady)
c.log().Debug("Deployment is ready","namespace",dep.GetNamespace(),"name",dep.GetName(),"readyPods",rs.Status.ReadyReplicas,"totalPods",expectedReady)
// Verify the generation observed by the daemonSet controller matches the spec generation
ifds.Status.ObservedGeneration!=ds.Generation{
slog.Debug("DaemonSet is not ready, observedGeneration does not match spec generation","namespace",ds.GetNamespace(),"name",ds.GetName(),"observedGeneration",ds.Status.ObservedGeneration,"expectedGeneration",ds.Generation)
c.log().Debug("DaemonSet is not ready, observedGeneration does not match spec generation","namespace",ds.GetNamespace(),"name",ds.GetName(),"observedGeneration",ds.Status.ObservedGeneration,"expectedGeneration",ds.Generation)
slog.Debug("DaemonSet does not have enough Pods scheduled","namespace",ds.GetNamespace(),"name",ds.GetName(),"scheduledPods",ds.Status.UpdatedNumberScheduled,"totalPods",ds.Status.DesiredNumberScheduled)
c.log().Debug("DaemonSet does not have enough Pods scheduled","namespace",ds.GetNamespace(),"name",ds.GetName(),"scheduledPods",ds.Status.UpdatedNumberScheduled,"totalPods",ds.Status.DesiredNumberScheduled)
slog.Debug("DaemonSet does not have enough Pods ready","namespace",ds.GetNamespace(),"name",ds.GetName(),"readyPods",ds.Status.NumberReady,"totalPods",expectedReady)
c.log().Debug("DaemonSet does not have enough Pods ready","namespace",ds.GetNamespace(),"name",ds.GetName(),"readyPods",ds.Status.NumberReady,"totalPods",expectedReady)
returnfalse
}
slog.Debug("DaemonSet is ready","namespace",ds.GetNamespace(),"name",ds.GetName(),"readyPods",ds.Status.NumberReady,"totalPods",expectedReady)
c.log().Debug("DaemonSet is ready","namespace",ds.GetNamespace(),"name",ds.GetName(),"readyPods",ds.Status.NumberReady,"totalPods",expectedReady)
// Verify the generation observed by the statefulSet controller matches the spec generation
ifsts.Status.ObservedGeneration!=sts.Generation{
slog.Debug("StatefulSet is not ready, observedGeneration doest not match spec generation","namespace",sts.GetNamespace(),"name",sts.GetName(),"actualGeneration",sts.Status.ObservedGeneration,"expectedGeneration",sts.Generation)
c.log().Debug("StatefulSet is not ready, observedGeneration doest not match spec generation","namespace",sts.GetNamespace(),"name",sts.GetName(),"actualGeneration",sts.Status.ObservedGeneration,"expectedGeneration",sts.Generation)
returnfalse
}
// If the update strategy is not a rolling update, there will be nothing to wait for
slog.Debug("StatefulSet does not have enough Pods scheduled","namespace",sts.GetNamespace(),"name",sts.GetName(),"readyPods",sts.Status.UpdatedReplicas,"totalPods",expectedReplicas)
c.log().Debug("StatefulSet does not have enough Pods scheduled","namespace",sts.GetNamespace(),"name",sts.GetName(),"readyPods",sts.Status.UpdatedReplicas,"totalPods",expectedReplicas)
returnfalse
}
ifint(sts.Status.ReadyReplicas)!=replicas{
slog.Debug("StatefulSet does not have enough Pods ready","namespace",sts.GetNamespace(),"name",sts.GetName(),"readyPods",sts.Status.ReadyReplicas,"totalPods",replicas)
c.log().Debug("StatefulSet does not have enough Pods ready","namespace",sts.GetNamespace(),"name",sts.GetName(),"readyPods",sts.Status.ReadyReplicas,"totalPods",replicas)
returnfalse
}
// This check only makes sense when all partitions are being upgraded otherwise during a
// partitioned rolling upgrade, this condition will never evaluate to true, leading to
slog.Debug("StatefulSet is not ready, currentRevision does not match updateRevision","namespace",sts.GetNamespace(),"name",sts.GetName(),"currentRevision",sts.Status.CurrentRevision,"updateRevision",sts.Status.UpdateRevision)
c.log().Debug("StatefulSet is not ready, currentRevision does not match updateRevision","namespace",sts.GetNamespace(),"name",sts.GetName(),"currentRevision",sts.Status.CurrentRevision,"updateRevision",sts.Status.UpdateRevision)
returnfalse
}
slog.Debug("StatefulSet is ready","namespace",sts.GetNamespace(),"name",sts.GetName(),"readyPods",sts.Status.ReadyReplicas,"totalPods",replicas)
c.log().Debug("StatefulSet is ready","namespace",sts.GetNamespace(),"name",sts.GetName(),"readyPods",sts.Status.ReadyReplicas,"totalPods",replicas)
// Verify the generation observed by the replicationController controller matches the spec generation
ifrc.Status.ObservedGeneration!=rc.Generation{
slog.Debug("ReplicationController is not ready, observedGeneration doest not match spec generation","namespace",rc.GetNamespace(),"name",rc.GetName(),"actualGeneration",rc.Status.ObservedGeneration,"expectedGeneration",rc.Generation)
c.log().Debug("ReplicationController is not ready, observedGeneration doest not match spec generation","namespace",rc.GetNamespace(),"name",rc.GetName(),"actualGeneration",rc.Status.ObservedGeneration,"expectedGeneration",rc.Generation)
// Verify the generation observed by the replicaSet controller matches the spec generation
ifrs.Status.ObservedGeneration!=rs.Generation{
slog.Debug("ReplicaSet is not ready, observedGeneration doest not match spec generation","namespace",rs.GetNamespace(),"name",rs.GetName(),"actualGeneration",rs.Status.ObservedGeneration,"expectedGeneration",rs.Generation)
c.log().Debug("ReplicaSet is not ready, observedGeneration doest not match spec generation","namespace",rs.GetNamespace(),"name",rs.GetName(),"actualGeneration",rs.Status.ObservedGeneration,"expectedGeneration",rs.Generation)
slog.Error("skipping loading invalid entry for chart","name",md.Name,"version",md.Version,"file",filename,"error",err)
i.log().Error("skipping loading invalid entry for chart","name",md.Name,"version",md.Version,"file",filename,"error",err)
}
}
@ -217,7 +227,7 @@ func (i IndexFile) Get(name, version string) (*ChartVersion, error) {
ifconstraint.Check(test){
iflen(version)!=0{
slog.Warn("unable to find exact version requested; falling back to closest available version","chart",name,"requested",version,"selected",ver.Version)
i.log().Warn("unable to find exact version requested; falling back to closest available version","chart",name,"requested",version,"selected",ver.Version)