mirror of
https://github.com/typeable/octopod.git
synced 2024-09-11 14:56:38 +03:00
Cleanup control script fix (#148)
* remove certificates deletion * rewrite check_value function * bump up chart+control scripts version Co-authored-by: Aleksei Sizov <a.sizov@typeable.io>
This commit is contained in:
parent
b8d490a2c4
commit
5c7956ccae
@ -2,7 +2,7 @@ apiVersion: v2
|
||||
name: octopod
|
||||
description: An opensource self-hosted solution for managing multiple deployments in a Kubernetes cluster.
|
||||
type: application
|
||||
version: 0.6.5
|
||||
version: 0.6.6
|
||||
appVersion: 1.4.2
|
||||
keywords:
|
||||
- kubernetes
|
||||
|
@ -99,7 +99,7 @@ controlScripts:
|
||||
image:
|
||||
repository: typeable/octopod-helm-control-scripts
|
||||
pullPolicy: IfNotPresent
|
||||
tag: 0.2.2
|
||||
tag: 0.2.3
|
||||
sqitch:
|
||||
image:
|
||||
repository: typeable/sqitch
|
||||
|
2
helm-control-scripts/Cargo.lock
generated
2
helm-control-scripts/Cargo.lock
generated
@ -525,7 +525,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "helm-control-scripts"
|
||||
version = "0.2.2"
|
||||
version = "0.2.3"
|
||||
dependencies = [
|
||||
"dkregistry",
|
||||
"env_logger",
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "helm-control-scripts"
|
||||
version = "0.2.2"
|
||||
version = "0.2.3"
|
||||
authors = ["Aleksei Sizov <a.sizov@typeable.io>"]
|
||||
edition = "2018"
|
||||
|
||||
|
@ -55,17 +55,6 @@ fn main() {
|
||||
panic!("{:?}", err);
|
||||
}
|
||||
}
|
||||
match ingresses_to_secrets(ingresses, old_ingresses) {
|
||||
Some(secrets) => {
|
||||
for secret in secrets {
|
||||
match delete_secret(&namespace, &secret) {
|
||||
Ok(_status) => info!("Successfully deleted secret {}", &secret),
|
||||
Err(error) => error!("Can't delete secret {}\n {}", &secret, error)
|
||||
}
|
||||
}
|
||||
},
|
||||
None => info!("No secrets to delete")
|
||||
}
|
||||
info!("Success!");
|
||||
},
|
||||
Err(status) => {
|
||||
|
@ -30,6 +30,7 @@ fn main() {
|
||||
deployment_parameters: deployment_parameters,
|
||||
overrides: overrides,
|
||||
};
|
||||
info!("Generated Helm args: {:?}", &helm_template.args());
|
||||
match helm_template.run_stdout() {
|
||||
Ok(status) => {
|
||||
let (deployments, statefulsets, _ingresses, _old_ingresses, _postgresqls, _kafkas) = match parse_to_k8s(status) {
|
||||
|
@ -297,11 +297,10 @@ pub mod lib {
|
||||
replicas: i32
|
||||
}
|
||||
fn check_value(value: String) -> Result<String, String> {
|
||||
let split_value = value.split('=').collect::<Vec<_>>();
|
||||
if split_value.len() == 2 {
|
||||
Ok(value)
|
||||
} else {
|
||||
Err(format!("Override value {} is malformed", value))
|
||||
let re = Regex::new(r"^([^=]*)=(.*)$").unwrap();
|
||||
match re.captures(&value) {
|
||||
Some(_) => return Ok(value),
|
||||
None => return Err(format!("Override value {} is malformed", value)),
|
||||
}
|
||||
}
|
||||
pub fn overrides(cli_opts: &CliOpts, envs: &EnvVars) -> Option<Vec<String>> {
|
||||
|
Loading…
Reference in New Issue
Block a user