-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(bors): merge pull request #885
885: fix(k8s): use provided kube-config path r=tiagolobocastro a=tiagolobocastro Ensure we always use the provided kube-config path. Co-authored-by: Tiago Castro <[email protected]>
- Loading branch information
Showing
12 changed files
with
194 additions
and
98 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/// A kube-forward error. | ||
#[derive(Debug, thiserror::Error)] | ||
#[allow(missing_docs)] | ||
pub enum Error { | ||
#[error("Service '{selector}' not found on '{namespace:?}'")] | ||
ServiceNotFound { | ||
selector: String, | ||
namespace: crate::NameSpace, | ||
}, | ||
#[error("{source}")] | ||
Kube { source: kube::Error }, | ||
#[error("{source}")] | ||
AnyHow { source: anyhow::Error }, | ||
#[error("Invalid uri: {source}")] | ||
InvalidUri { | ||
source: hyper::http::uri::InvalidUri, | ||
}, | ||
#[error("{source}")] | ||
Io { source: std::io::Error }, | ||
} | ||
|
||
impl From<anyhow::Error> for Error { | ||
fn from(source: anyhow::Error) -> Self { | ||
Self::AnyHow { source } | ||
} | ||
} | ||
|
||
impl From<kube::Error> for Error { | ||
fn from(source: kube::Error) -> Self { | ||
Self::Kube { source } | ||
} | ||
} | ||
|
||
impl From<hyper::http::uri::InvalidUri> for Error { | ||
fn from(source: hyper::http::uri::InvalidUri) -> Self { | ||
Self::InvalidUri { source } | ||
} | ||
} |
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,47 @@ | ||
/// A kube-proxy error. | ||
#[derive(Debug, thiserror::Error)] | ||
#[allow(missing_docs)] | ||
pub enum Error { | ||
#[error("{source}")] | ||
Forward { source: kube_forward::Error }, | ||
#[error("{source}")] | ||
Kube { source: kube::Error }, | ||
#[error("{source}")] | ||
AnyHow { source: anyhow::Error }, | ||
#[error("Invalid url: {source}")] | ||
InvalidUrl { source: url::ParseError }, | ||
#[error("Invalid uri: {source}")] | ||
InvalidUri { | ||
source: hyper::http::uri::InvalidUri, | ||
}, | ||
} | ||
|
||
impl From<kube_forward::Error> for Error { | ||
fn from(source: kube_forward::Error) -> Self { | ||
Self::Forward { source } | ||
} | ||
} | ||
|
||
impl From<anyhow::Error> for Error { | ||
fn from(source: anyhow::Error) -> Self { | ||
Self::AnyHow { source } | ||
} | ||
} | ||
|
||
impl From<kube::Error> for Error { | ||
fn from(source: kube::Error) -> Self { | ||
Self::Kube { source } | ||
} | ||
} | ||
|
||
impl From<url::ParseError> for Error { | ||
fn from(source: url::ParseError) -> Self { | ||
Self::InvalidUrl { source } | ||
} | ||
} | ||
|
||
impl From<hyper::http::uri::InvalidUri> for Error { | ||
fn from(source: hyper::http::uri::InvalidUri) -> Self { | ||
Self::InvalidUri { source } | ||
} | ||
} |
Oops, something went wrong.