-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deps update, Argon2 hashes, wait for more resource types, context imp…
…rovement, rust formatting and preparing 0.3.1
- Loading branch information
Showing
41 changed files
with
1,416 additions
and
476 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
fn workload(list, duration) { | ||
for wl in list.filter(|wl| ["Deployment", "DaemonSet", "StatefulSet"].contains(wl.kind)) { | ||
log_info(`Waiting for ${wl.kind} ${wl.namespace} ${wl.name} to be available`); | ||
if wl.kind == "Deployment" { | ||
let deploy = get_deployment(wl.namespace, w.name); | ||
deploy.wait_available(duration); | ||
} else if wl.kind == "DaemonSet" { | ||
let ds = get_deamonset(wl.namespace, wl.name); | ||
ds.wait_available(duration); | ||
} else if wl.kind == "StatefulSet" { | ||
let sts = get_statefulset(wl.namespace, wl.name); | ||
sts.wait_available(duration); | ||
} | ||
} | ||
} | ||
fn workload(list) { | ||
workload(list, 2*60); | ||
} | ||
|
||
fn job(list, duration) { | ||
for j in applied_objs.filter(|j| j.kind == "Job") { | ||
log_info(`Waiting for ${j.kind} ${j.namespace} ${j.name} to finish`); | ||
let job = get_job(j.namespace, j.name); | ||
job.wait_done(duration); | ||
} | ||
} | ||
fn job(list) { | ||
job(list, 5*60); | ||
} | ||
|
||
fn vital(list, duration) { | ||
for v in list { | ||
if ["Cluster"].contains(v.kind) { | ||
log_info(`Waiting for ${v.kind} ${v.namespace} ${v.name} to be available`); | ||
let api = k8s_resource(v.kind, v.namespace); | ||
let obj = api.get_obj(v.name); | ||
obj.wait_condition("Ready", duration); | ||
} else if ["RabbitmqCluster"].contains(v.kind) { | ||
log_info(`Waiting for ${v.kind} ${v.namespace} ${v.name} to be available`); | ||
let api = k8s_resource(v.kind, v.namespace); | ||
let obj = api.get_obj(v.name); | ||
obj.wait_condition("ClusterAvailable", duration); | ||
} else if ["Redis", "MongoDBCommunity"].contains(v.kind) { | ||
log_info(`Waiting for ${v.kind} ${v.namespace} ${v.name} to be available`); | ||
let api = k8s_resource(v.kind, v.namespace); | ||
let sts = get_statefulset(v.namespace, v.name); | ||
sts.wait_available(duration); | ||
} | ||
} | ||
} | ||
fn vital(list) { | ||
vital(list, 2*60); | ||
} | ||
|
||
fn all(list, duration) { | ||
vital(list, duration); | ||
job(list, duration); | ||
workload(list, duration); | ||
} | ||
fn all(list) { | ||
vital(list); | ||
job(list); | ||
workload(list); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
mod build; | ||
mod test; | ||
mod unpack; | ||
mod update; | ||
mod test; | ||
use clap::{Parser, Subcommand}; | ||
use std::process; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.