-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(naming): make it easier to use custom names
Would still require a lot of manual changes though as values are spread on many .yaml files, ie values.yaml product.yaml doc.yaml... A script would be the required to make all changes. Signed-off-by: Tiago Castro <[email protected]>
- Loading branch information
1 parent
fb09c7a
commit 4a3bc23
Showing
27 changed files
with
220 additions
and
132 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[package] | ||
name = "constants" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
utils = {path = "../dependencies/control-plane/utils/utils-lib" } | ||
convert_case = "0.4.0" |
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,51 @@ | ||
use convert_case::Casing; | ||
use utils::constants::PRODUCT_DOMAIN_NAME; | ||
pub use utils::PRODUCT_NAME; | ||
|
||
/// Name of the product. | ||
pub fn product_pascal() -> String { | ||
PRODUCT_NAME.to_case(convert_case::Case::Pascal) | ||
} | ||
|
||
/// Helm release name label's key. | ||
pub fn helm_release_name_key() -> String { | ||
format!("{PRODUCT_DOMAIN_NAME}/release") | ||
} | ||
|
||
/// Upgrade job container image name. | ||
pub fn upgrade_job_img() -> String { | ||
format!("{PRODUCT_NAME}-upgrade-job") | ||
} | ||
/// Upgrade job container image name. | ||
pub fn upgrade_job_container_name() -> String { | ||
format!("{PRODUCT_NAME}-upgrade-job") | ||
} | ||
/// UPGRADE_EVENT_REASON is the reason field in upgrade job. | ||
pub fn upgrade_event_reason() -> String { | ||
format!("{}Upgrade", product_pascal()) | ||
} | ||
/// Upgrade job container image repository. | ||
pub const UPGRADE_JOB_IMAGE_REPO: &str = "openebs"; | ||
/// This is the user docs URL for the Umbrella chart. | ||
pub const UMBRELLA_CHART_UPGRADE_DOCS_URL: &str = | ||
"https://openebs.io/docs/user-guides/upgrade#mayastor-upgrade"; | ||
|
||
/// Defines the default helm chart release name. | ||
pub const DEFAULT_RELEASE_NAME: &str = PRODUCT_NAME; | ||
|
||
/// Installed release version. | ||
pub fn helm_release_version_key() -> String { | ||
format!("{PRODUCT_DOMAIN_NAME}/version") | ||
} | ||
|
||
/// Loki Logging key. | ||
pub fn loki_logging_key() -> String { | ||
format!("{PRODUCT_DOMAIN_NAME}/logging") | ||
} | ||
|
||
/// This is the name of the Helm chart which included the core chart as a sub-chart. | ||
/// Under the hood, this installs the Core Helm chart (see below). | ||
pub const UMBRELLA_CHART_NAME: &str = "openebs"; | ||
|
||
/// RECEIVER_API_ENDPOINT is the URL to anonymous call-home metrics collection endpoint. | ||
pub const CALL_HOME_ENDPOINT: &str = "https://openebs.phonehome.datacore.com/openebs/report"; |
Submodule control-plane
updated
65 files
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.