This repository has been archived by the owner on Feb 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(deps): update dependency @socialgouv/kosko-charts to v9 (#505)
Co-authored-by: Renovate Bot <[email protected]> Co-authored-by: Douglas DUTEIL <[email protected]>
- Loading branch information
1 parent
74f0850
commit 944dddd
Showing
4 changed files
with
23 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,6 @@ | ||
import env from "@kosko/env"; | ||
import type { SealedSecret } from "@kubernetes-models/sealed-secrets/bitnami.com/v1alpha1/SealedSecret"; | ||
import { create } from "@socialgouv/kosko-charts/components/azure-pg"; | ||
import environments from "@socialgouv/kosko-charts/environments"; | ||
import { loadYaml } from "@socialgouv/kosko-charts/utils/getEnvironmentComponent"; | ||
import { updateMetadata } from "@socialgouv/kosko-charts/utils/updateMetadata"; | ||
|
||
export default async (): Promise<{ kind: string }[]> => { | ||
if (env.env === "dev") { | ||
return create({ | ||
env, | ||
}); | ||
} | ||
|
||
// in prod/preprod, we try to add a fixed sealed-secret | ||
const secret = await loadYaml<SealedSecret>( | ||
env, | ||
`pg-user.sealed-secret.yaml` | ||
); | ||
if (!secret) { | ||
return []; | ||
} | ||
|
||
const envParams = environments(process.env); | ||
// add gitlab annotations | ||
updateMetadata(secret, { | ||
annotations: envParams.metadata.annotations ?? {}, | ||
labels: envParams.metadata.labels ?? {}, | ||
namespace: envParams.metadata.namespace, | ||
}); | ||
return [secret]; | ||
}; | ||
export default create("pg-user", { | ||
env, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters