Skip to content

Commit

Permalink
fix gitcredential pagination bug, add initial_manage_principal to sco…
Browse files Browse the repository at this point in the history
…pe params
  • Loading branch information
mach-kernel committed Jul 16, 2024
1 parent 0907816 commit 794bdd8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion databricks-kube/src/crds/databricks_secret_scope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ use crate::{error::DatabricksKubeError, traits::remote_api_resource::RemoteAPIRe
)]
pub struct DatabricksSecretScopeSpec {
pub scope: WorkspaceSecretScope,
pub initial_manage_principal: Option<String>,
}

// API -> CRD
Expand All @@ -39,7 +40,7 @@ impl From<WorkspaceSecretScope> for DatabricksSecretScope {
.as_secs()
));

Self::new(&k8s_name, DatabricksSecretScopeSpec { scope })
Self::new(&k8s_name, DatabricksSecretScopeSpec { scope, initial_manage_principal: None })
}
}

Expand Down Expand Up @@ -99,6 +100,7 @@ impl RemoteAPIResource<WorkspaceSecretScope> for DatabricksSecretScope {
// Endpoint has no response value
secret_api::create_scope(&config, Some(WorkspaceCreateScope {
scope: scope.name.unwrap(),
initial_manage_principal: self.spec().initial_manage_principal.clone(),
..Default::default()
})).await?;

Expand Down
2 changes: 1 addition & 1 deletion databricks-kube/src/crds/git_credential.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ impl RemoteAPIResource<APICredential> for GitCredential {
try_stream! {
let config = APICredential::get_rest_config(context.clone()).await.unwrap();

while let GetCredentialsResponse {
if let GetCredentialsResponse {
credentials,
..
} = default_api::get_git_credential_list(&config).await? {
Expand Down

0 comments on commit 794bdd8

Please sign in to comment.