@@ -122,21 +122,24 @@ impl ConversionWebhookServer {
122
122
/// };
123
123
///
124
124
/// # async fn test() {
125
- /// let crds_and_handlers = [
125
+ /// // Things that should already be in you operator:
126
+ /// const OPERATOR_NAME: &str = "product-operator";
127
+ /// let client = Client::try_default().await.expect("failed to create Kubernetes client");
128
+ /// let operator_environment = OperatorEnvironmentOptions::parse();
129
+ ///
130
+ /// let crds_and_handlers = [
126
131
/// (
127
132
/// S3Connection::merged_crd(S3ConnectionVersion::V1Alpha1)
128
133
/// .expect("failed to merge S3Connection CRD"),
129
134
/// S3Connection::try_convert as fn(_) -> _,
130
135
/// ),
131
136
/// ];
132
137
///
133
- /// let client = Client::try_default().await.expect("failed to create Kubernetes client");
134
- ///
135
138
/// let options = ConversionWebhookOptions {
136
- /// socket_addr: "127.0.0.1:8080 ".parse().unwrap(),
137
- /// field_manager: "product-operator" .to_owned(),
138
- /// namespace: "default".to_owned() ,
139
- /// service_name: "product-operator".to_owned() ,
139
+ /// socket_addr: "127.0.0.1:8443 ".parse().unwrap(),
140
+ /// field_manager: OPERATOR_NAME .to_owned(),
141
+ /// namespace: operator_environment.operator_namespace ,
142
+ /// service_name: operator_environment.operator_service_name ,
140
143
/// };
141
144
///
142
145
/// // Construct the conversion webhook server
0 commit comments