Struct shipcat_definitions::region::Region [−][src]
pub struct Region {}Show fields
pub name: String, pub namespace: String, pub environment: Environment, pub reconciliationMode: ReconciliationMode, pub cluster: String, pub versioningScheme: VersionScheme, pub base_urls: BTreeMap<String, String>, pub kong: Option<KongConfig>, pub statuscake: Option<StatuscakeConfig>, pub ip_whitelist: Vec<String>, pub kafka: KafkaConfig, pub vault: VaultConfig, pub logzio: Option<LogzIoConfig>, pub grafana: Option<GrafanaConfig>, pub sentry: Option<SentryConfig>, pub locations: Vec<String>, pub webhooks: Vec<Webhook>, pub customResources: Option<CRSettings>, pub defaults: Option<DefaultConfig>, pub env: Option<BTreeMap<String, String>>, pub defaultsV2: Option<Value>, pub destinationRuleHostRegex: Option<Regex>,
Expand description
A region is an abstract kube context
Either it’s a pure kubernetes context with a namespace and a cluster, or it’s an abstract concept with many associated real kubernetes contexts.
Fields
name: String
Name of region
namespace: String
Kubernetes namespace
environment: Environment
Environment (e.g. dev
or staging
)
reconciliationMode: ReconciliationMode
Reconciliation mode
This affects how cluster crd reconcile
behaves in the region.
cluster: String
Primary cluster serving this region
Shipcat does not use this for to decide where a region gets deployed, but it is used to indicate where the canonical location of a cluster is.
During blue/green cluster failovers the value of this string may not be accurate.
Jobs that decide where to deploy a region to should use get clusterinfo
with explicit cluster names and regions.
versioningScheme: VersionScheme
Versioning scheme
base_urls: BTreeMap<String, String>
Important base urls that can be templated in evars
kong: Option<KongConfig>
Kong configuration for the region
statuscake: Option<StatuscakeConfig>
Statuscake configuration for the region
ip_whitelist: Vec<String>
List of Whitelisted IPs
kafka: KafkaConfig
Kafka configuration for the region
vault: VaultConfig
Vault configuration for the region
logzio: Option<LogzIoConfig>
Logz.io configuration for the region
grafana: Option<GrafanaConfig>
Grafana details for the region
sentry: Option<SentryConfig>
Sentry URL for the region
locations: Vec<String>
List of locations the region serves
webhooks: Vec<Webhook>
All webhooks
customResources: Option<CRSettings>
CRD tuning
defaults: Option<DefaultConfig>
Old default values for services
env: Option<BTreeMap<String, String>>
Old default environment variables to inject
defaultsV2: Option<Value>
Default values for services (used by shipcat_filebacked only)
destinationRuleHostRegex: Option<Regex>
The regular expression used to verify destination rules’ regions
Implementations
impl Region
[src]
impl Region
[src]pub async fn secrets(&mut self) -> Result<()>
[src]
pub async fn verify_secrets_exist(&self) -> Result<()>
[src]
pub fn vault_url(&self, app: &str) -> String
[src]
pub fn grafana_url(&self, app: &str) -> Option<String>
[src]
pub fn sentry_url(&self, slug: &str) -> Option<String>
[src]
pub fn logzio_url(&self, app: &str) -> Option<String>
[src]
pub fn raftcat_url(&self) -> Option<String>
[src]
Trait Implementations
impl<'de> Deserialize<'de> for Region
[src]
impl<'de> Deserialize<'de> for Region
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl !RefUnwindSafe for Region
impl Send for Region
impl Sync for Region
impl Unpin for Region
impl UnwindSafe for Region
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,