Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Commit

Permalink
fix(k8s): restore pg-user.sealed-secret.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasduteil committed Jul 30, 2020
1 parent 5f1bfbe commit 55460c2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions .k8s/components/pg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,25 @@ import gitlab from "@socialgouv/kosko-charts/environments/gitlab";

import { create } from "@socialgouv/kosko-charts/components/azure-pg";

let manifests = create({
env,
});
export default () => {
if (env.env === "dev") {
return create({
env,
});
}

if (env.env !== "dev") {
// in prod/preprod, we try to add a fixed sealed-secret
const secret = loadYaml<SealedSecret>(env, `pg-user.sealed-secret.yaml`);
if (secret) {
const envParams = gitlab(process.env);
// add gitlab annotations
updateMetadata(secret, {
annotations: envParams.annotations || {},
labels: envParams.labels || {},
namespace: envParams.namespace,
});
manifests = [secret];
if (!secret) {
return [];
}
}

export default manifests;
const envParams = gitlab(process.env);
// add gitlab annotations
updateMetadata(secret, {
annotations: envParams.annotations || {},
labels: envParams.labels || {},
namespace: envParams.namespace,
});
return [secret];
};

0 comments on commit 55460c2

Please sign in to comment.