Skip to content

Commit

Permalink
fix: debug notes now correct namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
ElderMatt committed Nov 2, 2023
1 parent 8754cbb commit 229b689
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/operator/secrets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async function createNamespacedSecret(
console.debug(`Secret '${metadata.name!}' cannot be found in namespace '${metadata.namespace!}'`)
}
await k8sApi.createNamespacedSecret(targetNamespace, simpleSecret)
console.debug(`Secret '${simpleSecret.metadata.name!}' successfully created in namespace '${metadata.namespace!}'`)
console.debug(`Secret '${simpleSecret.metadata.name!}' successfully created in namespace '${targetNamespace}'`)
} catch (err) {
// we know 409 indicates that secret already exists, ignore this code because it will only happen during start of the operator
if (err.response.body.code === 409) return
Expand All @@ -49,8 +49,7 @@ export default class MyOperator extends Operator {
try {
await k8sApi.deleteNamespacedSecret(`copy-${metadata?.namespace}-${metadata?.name}`, targetNamespace)
console.debug(
`Secret 'copy-${metadata?.namespace}-${metadata?.name}' successfully deleted in namespace '${metadata!
.namespace!}'`,
`Secret 'copy-${metadata?.namespace}-${metadata?.name}' successfully deleted in namespace '${targetNamespace}'`,
)
} catch (err) {
console.debug(
Expand Down Expand Up @@ -81,7 +80,7 @@ export default class MyOperator extends Operator {
{ headers },
)
console.debug(
`Secret '${simpleSecret.metadata.name!}' successfully patched in namespace '${metadata!.namespace!}'`,
`Secret '${simpleSecret.metadata.name!}' successfully patched in namespace '${targetNamespace}'`,
)
break
} catch (err) {
Expand Down

0 comments on commit 229b689

Please sign in to comment.