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]

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 Clone for Region[src]

fn clone(&self) -> Region[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Region[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<'de> Deserialize<'de> for Region[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

impl Serialize for Region[src]

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
    __S: Serializer
[src]

Serialize this value into the given Serde serializer. 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> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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]

🔬 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, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]

pub fn vzip(self) -> V[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]