Skip to content
Closed
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
6 changes: 0 additions & 6 deletions manifests/crd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ spec:
type: string
name:
type: string
namespace:
nullable: true
type: string
required:
- key
- name
Expand Down Expand Up @@ -101,9 +98,6 @@ spec:
type: string
name:
type: string
namespace:
nullable: true
type: string
required:
- key
- name
Expand Down
10 changes: 2 additions & 8 deletions src/resource_extensions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,7 @@ async fn cluster_client(
let client = match cluster_ref {
None => client,
Some(cluster_ref) => {
let secret_ns = cluster_ref
.kube_config
.secret_ref
.namespace
.as_deref()
.unwrap_or(local_ns);
let secrets: Api<Secret> = Api::namespaced(client, secret_ns);
let secrets: Api<Secret> = Api::namespaced(client, local_ns);
let secret_ref = &cluster_ref.kube_config.secret_ref;
let sec = secrets.get(&secret_ref.name).await?;

Expand All @@ -120,7 +114,7 @@ async fn cluster_client(
Error::MissingKeyError(
secret_ref.key.clone(),
secret_ref.name.clone(),
secret_ns.to_string(),
local_ns.to_string(),
)
})?
.0,
Expand Down
1 change: 0 additions & 1 deletion src/resources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ pub struct KubeConfig {
#[serde(rename_all = "camelCase")]
pub struct SecretRef {
pub name: String,
pub namespace: Option<String>,
pub key: String,
}

Expand Down