Skip to content

Commit

Permalink
fix: filter source name
Browse files Browse the repository at this point in the history
  • Loading branch information
srodenhuis committed Aug 16, 2023
1 parent 3ba0fa7 commit 5562bd6
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/tasks/otomi/copy-certs-argo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,14 @@ export const createTargetPullSecret = (
export const copyTeamPullSecrets = async (teamId: string, targetPullSecretNames: string[]): Promise<void> => {
console.info(`Copying Pull secrets from team-${teamId} to ${targetNamespace} namespace`)
const namespace = `team-${teamId}`
const secretName = `harbor-pullsecret`
const getTargetSecretName = (name) => `copy-team-${teamId}-${name}`
// get all team namespace Pull secrets
const {
body: { items: teamPullSecrets },
} = await k8s
.core()
.listNamespacedSecret(
namespace,
undefined,
undefined,
undefined,
'type=kubernetes.io/dockerconfigjson',
'metadata.name=harbor-pullsecret',
)
.listNamespacedSecret(namespace, secretName, undefined, undefined, 'type=kubernetes.io/dockerconfigjson')
// create new ones if not existing
await Promise.all(
teamPullSecrets
Expand Down

0 comments on commit 5562bd6

Please sign in to comment.