Skip to content

Commit b84cf05

Browse files
committed
Add some docs
1 parent 31b128b commit b84cf05

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

crates/stackable-webhook/src/servers/conversion.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,16 @@ impl ConversionWebhookServer {
106106
/// # async fn test() {
107107
/// let crds_and_handlers = [
108108
/// (
109-
/// S3Connection::merged_crd(S3ConnectionVersion::V1Alpha1).expect("failed to merge S3Connection CRD"),
109+
/// S3Connection::merged_crd(S3ConnectionVersion::V1Alpha1)
110+
/// .expect("failed to merge S3Connection CRD"),
110111
/// S3Connection::try_convert as fn(ConversionReview) -> ConversionReview,
111112
/// ),
112113
/// ];
113114
///
114115
/// const OPERATOR_NAME: &str = "PRODUCT_OPERATOR";
115116
/// let client = Client::try_default().await.expect("failed to create Kubernetes client");
116-
/// // Normally you would get this from the CLI arguments in `ProductOperatorRun::operator_environment`
117+
/// // Normally you would get this from the CLI arguments in
118+
/// // `ProductOperatorRun::operator_environment`
117119
/// let operator_environment = OperatorEnvironmentOpts {
118120
/// operator_namespace: "stackable-operator".to_string(),
119121
/// operator_service_name: "product-operator".to_string(),

crates/stackable-webhook/src/tls/cert_resolver.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ pub enum CertificateResolverError {
5050
TokioSpawnBlocking { source: tokio::task::JoinError },
5151
}
5252

53+
/// This struct serves as [`ResolvesServerCert`] to always hand out the current certificate for TLS
54+
/// client connections.
55+
///
56+
/// It offers the [`Self::rotate_certificate`] function to create a fresh certificate and basically
57+
/// hot-reload the certificate in the running webhook.
5358
#[derive(Debug)]
5459
pub struct CertificateResolver {
5560
/// Using a [`ArcSwap`] (over e.g. [`tokio::sync::RwLock`]), so that we can easily

0 commit comments

Comments
 (0)