Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions crates/alien-helm/src/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,10 @@ spec:
summary:
type: string
description: One-line human summary for display.
params:
type: object
x-kubernetes-preserve-unknown-fields: true
description: Exact operation parameters covered by the grant.
approvedForMinutes:
type: integer
minimum: 1
Expand Down Expand Up @@ -4404,6 +4408,14 @@ mod tests {
yaml_path(&crd, &["spec", "names", "plural"]).and_then(YamlValue::as_str),
Some("acmeaccessrequests")
);
assert_eq!(
crd["spec"]["versions"][0]["schema"]["openAPIV3Schema"]["properties"]["spec"]
["properties"]["commands"]["items"]["properties"]["params"]
["x-kubernetes-preserve-unknown-fields"]
.as_bool(),
Some(true),
"the CRD must retain exact operation parameters for customer review"
);
// Not the Alien defaults.
let text = &manifest;
assert!(
Expand Down
3 changes: 3 additions & 0 deletions crates/alien-operator/src/loops/access_requests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ use std::sync::Arc;

use async_trait::async_trait;
use chrono::{DateTime, Utc};
use serde_json::{Map, Value};
use tracing::debug;

use crate::OperatorState;
Expand All @@ -36,6 +37,8 @@ pub struct AccessRequestCommand {
pub command: String,
/// One-line human summary for display.
pub summary: String,
/// Exact operation parameters the customer is being asked to authorize.
pub params: Map<String, Value>,
}

/// A control-plane access request: a grant the customer must approve before its
Expand Down
Loading