1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
use std::io::Error as IoError;
use fluvio::FluvioError;
use k8_config::{ConfigError as K8ConfigError};
use k8_client::{ClientError as K8ClientError};
use fluvio_helm::HelmError;
use crate::check::{CheckResults, CheckStatuses};
use fluvio_command::CommandError;
#[derive(thiserror::Error, Debug)]
pub enum ClusterError {
#[error("Failed to install Fluvio on Kubernetes")]
InstallK8(#[from] K8InstallError),
#[error("Failed to install Fluvio locally")]
InstallLocal(#[from] LocalInstallError),
#[error("Failed to install Fluvio system charts")]
InstallSys(#[from] SysInstallError),
#[error("Failed to uninstall Fluvio")]
Uninstall(#[from] UninstallError),
}
#[derive(thiserror::Error, Debug)]
pub enum SysInstallError {
#[error("Helm client error")]
HelmError(#[from] HelmError),
#[error("Missing required config option {0}")]
MissingRequiredConfig(String),
}
#[derive(thiserror::Error, Debug)]
pub enum K8InstallError {
#[error(transparent)]
IoError(#[from] IoError),
#[error("Fluvio client error")]
FluvioError(#[from] FluvioError),
#[error("Kubernetes config error")]
K8ConfigError(#[from] K8ConfigError),
#[error("Kubernetes client error")]
K8ClientError(#[from] K8ClientError),
#[error("Helm client error")]
HelmError(#[from] HelmError),
#[error(transparent)]
CommandError(#[from] CommandError),
#[error("Pre-checks failed during cluster startup")]
FailedPrecheck(CheckStatuses),
#[error("Failed to perform one or more pre-checks")]
PrecheckErrored(CheckResults),
#[error("Expected to find cluster with platform version {0}")]
FailedPlatformVersion(String),
#[error("Timed out when waiting for SC service")]
SCServiceTimeout,
#[error("Timed out when waiting for SC port check")]
SCPortCheckTimeout,
#[error("Timed out when waiting for DNS resolution")]
SCDNSTimeout,
#[error("Timed out when waiting for SPU")]
SPUTimeout,
#[error("Unable to detect Fluvio SC K8 service")]
UnableToDetectService,
#[error("Unable to find chart in Helm: {0}")]
HelmChartNotFound(String),
#[error("Missing required config option {0}")]
MissingRequiredConfig(String),
#[error("An unknown error occurred: {0}")]
Other(String),
}
#[derive(thiserror::Error, Debug)]
pub enum LocalInstallError {
#[error(transparent)]
IoError(#[from] IoError),
#[error("Fluvio client error")]
FluvioError(#[from] FluvioError),
#[error("Kubernetes config error")]
K8ConfigError(#[from] K8ConfigError),
#[error("Kubernetes client error")]
K8ClientError(#[from] K8ClientError),
#[error("Helm client error")]
HelmError(#[from] HelmError),
#[error(transparent)]
CommandError(#[from] CommandError),
#[error("Pre-checks failed during cluster startup")]
FailedPrecheck(CheckStatuses),
#[error("Failed to perform one or more pre-checks")]
PrecheckErrored(CheckResults),
#[error("Timed out when waiting for SC service")]
SCServiceTimeout,
#[error("Timed out when waiting for SC port check")]
SCPortCheckTimeout,
#[error("Timed out when waiting for DNS resolution")]
SCDNSTimeout,
#[error("Timed out when waiting for SPU")]
SPUTimeout,
#[error("Unable to detect Fluvio SC K8 service")]
UnableToDetectService,
#[error("Unable to find chart in Helm: {0}")]
HelmChartNotFound(String),
#[error("Missing required config option {0}")]
MissingRequiredConfig(String),
#[error("An unknown error occurred: {0}")]
Other(String),
}
#[derive(thiserror::Error, Debug)]
pub enum UninstallError {
#[error(transparent)]
IoError(#[from] IoError),
#[error("Fluvio client error")]
FluvioError(#[from] FluvioError),
#[error("Kubernetes config error")]
K8ConfigError(#[from] K8ConfigError),
#[error("Kubernetes client error")]
K8ClientError(#[from] K8ClientError),
#[error("Helm client error")]
HelmError(#[from] HelmError),
#[error("Timed out when waiting for SC service")]
SCServiceTimeout,
#[error("Timed out when waiting for SC port check")]
SCPortCheckTimeout,
#[error("Timed out when waiting for DNS resolution")]
SCDNSTimeout,
#[error("Timed out when waiting for SPU")]
SPUTimeout,
#[error("Unable to detect Fluvio SC K8 service")]
UnableToDetectService,
#[error("Unable to find chart in Helm: {0}")]
HelmChartNotFound(String),
#[error("An unknown error occurred: {0}")]
Other(String),
}