[−][src]Struct fluvio_cluster::ClusterInstallerBuilder
A builder for cluster installation options
Implementations
impl ClusterInstallerBuilder
[src]
pub fn build(self) -> Result<ClusterInstaller, ClusterError>
[src]
Creates a ClusterInstaller
with the current configuration.
This may fail if there is a problem conencting to Kubernetes or
finding the helm
executable on the local system.
Example
The simplest flow to create a ClusterInstaller
looks like the
following:
let installer = ClusterInstaller::new() .build() .expect("should create ClusterInstaller");
pub fn with_namespace<S: Into<String>>(self, namespace: S) -> Self
[src]
Sets the Kubernetes namespace to install Fluvio into.
The default namespace is "default".
Example
let installer = ClusterInstaller::new() .with_namespace("my-namespace") .build() .expect("should build installer");
pub fn with_image_tag<S: Into<String>>(self, image_tag: S) -> Self
[src]
Sets the docker image tag of the Fluvio image to install.
If this is not specified, the installer will use the chart version as the image tag. This should correspond to the image tags of the official published Fluvio images.
Example
Suppose you would like to install version 0.6.0
of Fluvio from
Docker Hub, where the image is tagged as infinyon/fluvio:0.6.0
.
You can do that like this:
let installer = ClusterInstaller::new() .with_image_tag("0.6.0") .build() .unwrap();
pub fn with_image_registry<S: Into<String>>(self, image_registry: S) -> Self
[src]
Sets the docker image registry to use to download Fluvio images.
This defaults to infinyon
to pull from Infinyon's official Docker Hub
registry. This can be used to specify a private registry or a local
registry as a source of Fluvio images.
Example
You can create a local Docker registry to publish images to during development. Suppose you have a local registry running such as the following:
docker run -d -p 5000:5000 --restart=always --name registry registry:2
Suppose you tagged your image as infinyon/fluvio:0.1.0
and pushed it
to your localhost:5000
registry. Your image is now located at
localhost:5000/infinyon
. You can specify that to the installer like so:
NOTE: See
with_image_tag
to see how to specify the0.1.0
shown here.
let installer = ClusterInstaller::new() .with_image_registry("localhost:5000/infinyon") .build() .unwrap();
Then, when you use installer.install_fluvio()
, it will pull the images
from your local docker registry.
pub fn with_chart_version<S: Into<String>>(self, chart_version: S) -> Self
[src]
Sets a specific version of the Fluvio helm chart to install.
When working with published Fluvio images, the chart version will appear
to be a Semver version, such as 0.6.0
.
When developing for Fluvio, chart versions are named after the git hash of the revision a chart was built on.
Example
let installer = ClusterInstaller::new() .with_chart_version("0.6.0") .build() .unwrap();
pub fn with_local_chart<S: Into<PathBuf>>(self, local_chart_location: S) -> Self
[src]
Sets a local helm chart location to search for Fluvio charts.
This is often desirable when developing for Fluvio locally and making
edits to the chart. When using this option, the argument is expected to be
a local filesystem path. The path given is expected to be the parent directory
of both the fluvio-app
and fluvio-sys
charts.
This option is mutually exclusive from with_remote_chart
; if both are used,
the latest one defined is the one that's used.
Example
let installer = ClusterInstaller::new() .with_local_chart("./k8-util/helm") .build() .unwrap();
pub fn with_remote_chart<S: Into<String>>(
self,
remote_chart_location: S
) -> Self
[src]
self,
remote_chart_location: S
) -> Self
Sets a remote helm chart location to search for Fluvio charts.
This is the default case, with the default location being https://charts.fluvio.io
,
where official Fluvio helm charts are located. Remote helm charts are expected
to be a valid URL.
This option is mutually exclusive from with_local_chart
; if both are used,
the latest one defined is the one that's used.
Example
let installer = ClusterInstaller::new() .with_remote_chart("https://charts.fluvio.io") .build() .unwrap();
pub fn with_group_name<S: Into<String>>(self, group_name: S) -> Self
[src]
Sets a custom SPU group name. The default is main
.
Example
use fluvio_cluster::ClusterInstaller; let installer = ClusterInstaller::new() .with_group_name("orange") .build() .unwrap();
pub fn with_save_profile(self, save_profile: bool) -> Self
[src]
Whether to save a profile of this installation to ~/.fluvio/config
. Defaults to false
.
Example
let installer = ClusterInstaller::new() .with_save_profile(true) .build() .unwrap();
pub fn with_system_chart(self, install_sys: bool) -> Self
[src]
Whether to install the fluvio-sys
chart in the full installation. Defaults to true
.
Example
If you want to disable installing the system chart, you can do this
let installer = ClusterInstaller::new() .with_system_chart(false) .build() .unwrap();
pub fn with_update_context(self, update_context: bool) -> Self
[src]
Whether to update the kubectl
context to match the Fluvio installation. Defaults to true
.
Example
If you do not want your Kubernetes contexts to be updated, you can do this
let installer = ClusterInstaller::new() .with_update_context(false) .build() .unwrap();
pub fn with_spu_replicas(self, spu_replicas: u16) -> Self
[src]
Sets the number of SPU replicas that should be provisioned. Defaults to 1.
Example
let installer = ClusterInstaller::new() .with_spu_replicas(2) .build() .unwrap();
pub fn with_rust_log<S: Into<String>>(self, rust_log: S) -> Self
[src]
Sets the RUST_LOG
environment variable for the installation.
Example
let installer = ClusterInstaller::new() .with_rust_log("debug") .build() .unwrap();
pub fn with_tls<C: Into<TlsPolicy>, S: Into<TlsPolicy>>(
self,
client: C,
server: S
) -> Self
[src]
self,
client: C,
server: S
) -> Self
Sets the TLS Policy that the client and server will use to communicate.
By default, these are set to TlsPolicy::Disabled
.
Example
use std::path::PathBuf; use fluvio::config::TlsPaths; use fluvio_cluster::ClusterInstaller; let cert_path = PathBuf::from("/tmp/certs"); let client = TlsPaths { domain: "fluvio.io".to_string(), ca_cert: cert_path.join("ca.crt"), cert: cert_path.join("client.crt"), key: cert_path.join("client.key"), }; let server = TlsPaths { domain: "fluvio.io".to_string(), ca_cert: cert_path.join("ca.crt"), cert: cert_path.join("server.crt"), key: cert_path.join("server.key"), }; let installer = ClusterInstaller::new() .with_tls(client, server) .build() .unwrap();
pub fn with_cloud<S: Into<String>>(self, cloud: S) -> Self
[src]
Sets the K8 cluster cloud environment.
Example
use fluvio_cluster::ClusterInstaller; let installer = ClusterInstaller::new() .with_cloud("minikube") .build() .unwrap();
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ClusterInstallerBuilder
impl Send for ClusterInstallerBuilder
impl Sync for ClusterInstallerBuilder
impl Unpin for ClusterInstallerBuilder
impl UnwindSafe for ClusterInstallerBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Erased for T
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,