Unverified Commit 804eaea1 authored by Douglas Duteil's avatar Douglas Duteil
Browse files

Merge branch 'master' into fix-env

parents 64806b47 7040f0ef
...@@ -141,7 +141,7 @@ spec: ...@@ -141,7 +141,7 @@ spec:
app: strapi-cache app: strapi-cache
type: ClusterIP type: ClusterIP
--- ---
apiVersion: extensions/v1beta1 apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress
metadata: metadata:
annotations: annotations:
...@@ -168,8 +168,11 @@ spec: ...@@ -168,8 +168,11 @@ spec:
http: http:
paths: paths:
- backend: - backend:
serviceName: strapi-cache service:
servicePort: 80 name: strapi-cache
port:
name: http
number: 80
path: / path: /
tls: tls:
- hosts: - hosts:
......
...@@ -141,7 +141,7 @@ spec: ...@@ -141,7 +141,7 @@ spec:
app: strapi-cache app: strapi-cache
type: ClusterIP type: ClusterIP
--- ---
apiVersion: extensions/v1beta1 apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress
metadata: metadata:
annotations: annotations:
...@@ -168,8 +168,11 @@ spec: ...@@ -168,8 +168,11 @@ spec:
http: http:
paths: paths:
- backend: - backend:
serviceName: strapi-cache service:
servicePort: 80 name: strapi-cache
port:
name: http
number: 80
path: / path: /
tls: tls:
- hosts: - hosts:
......
...@@ -118,7 +118,7 @@ spec: ...@@ -118,7 +118,7 @@ spec:
app: strapi-cache app: strapi-cache
type: ClusterIP type: ClusterIP
--- ---
apiVersion: extensions/v1beta1 apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress
metadata: metadata:
annotations: annotations:
...@@ -146,8 +146,11 @@ spec: ...@@ -146,8 +146,11 @@ spec:
http: http:
paths: paths:
- backend: - backend:
serviceName: strapi-cache service:
servicePort: 80 name: strapi-cache
port:
name: http
number: 80
path: / path: /
tls: tls:
- hosts: - hosts:
......
...@@ -9,13 +9,13 @@ import { getDeployment } from "@socialgouv/kosko-charts/utils/getDeployment"; ...@@ -9,13 +9,13 @@ import { getDeployment } from "@socialgouv/kosko-charts/utils/getDeployment";
import { IIoK8sApiCoreV1HTTPGetAction, Volume } from "kubernetes-models/v1"; import { IIoK8sApiCoreV1HTTPGetAction, Volume } from "kubernetes-models/v1";
import { ConfigMap } from "kubernetes-models/v1/ConfigMap"; import { ConfigMap } from "kubernetes-models/v1/ConfigMap";
import { Ingress } from "kubernetes-models/api/networking/v1"; import { Ingress } from "kubernetes-models/api/networking/v1";
import gitlab from "@socialgouv/kosko-charts/environments/gitlab"; import ci from "@socialgouv/kosko-charts/environments";
const httpGet: IIoK8sApiCoreV1HTTPGetAction = { const httpGet: IIoK8sApiCoreV1HTTPGetAction = {
path: "/_health", path: "/_health",
port: "http", port: "http",
}; };
const envParams = gitlab(process.env); const envParams = ci(process.env);
const strapiParams = env.component("strapi"); const strapiParams = env.component("strapi");
// renovate: datasource=docker depName=nginx versioning=1.19.6 // renovate: datasource=docker depName=nginx versioning=1.19.6
...@@ -90,9 +90,9 @@ export default async () => { ...@@ -90,9 +90,9 @@ export default async () => {
const configMap = new ConfigMap({ const configMap = new ConfigMap({
metadata: { metadata: {
name: "strapi-cache", name: "strapi-cache",
labels: envParams.labels, labels: envParams.metadata.labels,
annotations: envParams.annotations, annotations: envParams.metadata.annotations,
namespace: envParams.namespace.name, namespace: envParams.metadata.namespace.name,
}, },
data: { data: {
"nginx.conf": fs "nginx.conf": fs
...@@ -108,7 +108,7 @@ export default async () => { ...@@ -108,7 +108,7 @@ export default async () => {
...ingress.metadata.annotations, ...ingress.metadata.annotations,
"nginx.ingress.kubernetes.io/proxy-body-size": "1g", "nginx.ingress.kubernetes.io/proxy-body-size": "1g",
"nginx.ingress.kubernetes.io/limit-rps": "20", "nginx.ingress.kubernetes.io/limit-rps": "20",
"nginx.ingress.kubernetes.io/limit-rpm": "300" "nginx.ingress.kubernetes.io/limit-rpm": "300",
}; };
} }
......
...@@ -3,7 +3,7 @@ import { SealedSecret } from "@kubernetes-models/sealed-secrets/bitnami.com/v1al ...@@ -3,7 +3,7 @@ import { SealedSecret } from "@kubernetes-models/sealed-secrets/bitnami.com/v1al
import { loadYaml } from "@socialgouv/kosko-charts/utils/getEnvironmentComponent"; import { loadYaml } from "@socialgouv/kosko-charts/utils/getEnvironmentComponent";
import { updateMetadata } from "@socialgouv/kosko-charts/utils/updateMetadata"; import { updateMetadata } from "@socialgouv/kosko-charts/utils/updateMetadata";
import gitlab from "@socialgouv/kosko-charts/environments/gitlab"; import ci from "@socialgouv/kosko-charts/environments";
import { create } from "@socialgouv/kosko-charts/components/azure-pg"; import { create } from "@socialgouv/kosko-charts/components/azure-pg";
...@@ -15,17 +15,20 @@ export default async () => { ...@@ -15,17 +15,20 @@ export default async () => {
} }
// in prod/preprod, we try to add a fixed sealed-secret // in prod/preprod, we try to add a fixed sealed-secret
const secret = await loadYaml<SealedSecret>(env, `pg-user.sealed-secret.yaml`); const secret = await loadYaml<SealedSecret>(
env,
`pg-user.sealed-secret.yaml`
);
if (!secret) { if (!secret) {
return []; return [];
} }
const envParams = gitlab(process.env); const envParams = ci(process.env);
// add gitlab annotations // add gitlab annotations
updateMetadata(secret, { updateMetadata(secret, {
annotations: envParams.annotations || {}, annotations: envParams.metadata.annotations || {},
labels: envParams.labels || {}, labels: envParams.metadata.labels || {},
namespace: envParams.namespace, namespace: envParams.metadata.namespace,
}); });
return [secret]; return [secret];
}; };
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
"dependencies": { "dependencies": {
"@kosko/env": "^2.0.1", "@kosko/env": "^2.0.1",
"@kubernetes-models/sealed-secrets": "^1.6.3", "@kubernetes-models/sealed-secrets": "^1.6.3",
"@socialgouv/kosko-charts": "^6.5.0", "@socialgouv/kosko-charts": "^8.0.1",
"@types/node": "^15.12.5", "@types/node": "^15.12.5",
"kosko": "^1.1.5", "kosko": "^1.1.5",
"kubernetes-models": "^1.7.1", "kubernetes-models": "^1.7.1",
......
...@@ -665,13 +665,14 @@ ...@@ -665,13 +665,14 @@
dependencies: dependencies:
"@sinonjs/commons" "^1.7.0" "@sinonjs/commons" "^1.7.0"
"@socialgouv/kosko-charts@^6.5.0": "@socialgouv/kosko-charts@^8.0.1":
version "6.5.0" version "8.0.1"
resolved "https://registry.yarnpkg.com/@socialgouv/kosko-charts/-/kosko-charts-6.5.0.tgz#be22aab06fb99ad173e270bfd0ddb8ae60e9a97f" resolved "https://registry.yarnpkg.com/@socialgouv/kosko-charts/-/kosko-charts-8.0.1.tgz#93071672f72abdbdd0b004c01b65d346b1b5b5ab"
integrity sha512-YwLOCrBkJ77ojlG1eEYvF3V4vXIJWMAl/1XZ9hUl5bhF9MyYbEAI0izwiClwPZaTSv1DaP2+IRf5WS80KoCVUA== integrity sha512-xLbWuTdogmbPn75f75d/maWoHmHjMKiEJGWwAQ1RZ3h3mmojRSEC8sCvRxRqsTkImP4f/9kDtu2+BTCHJXNo8w==
dependencies: dependencies:
"@sindresorhus/is" "^4.0.1" "@sindresorhus/is" "^4.0.1"
fs-extra "^10.0.0" fs-extra "^10.0.0"
slugify "^1.6.0"
"@tootallnate/once@1": "@tootallnate/once@1":
version "1.1.2" version "1.1.2"
...@@ -2806,6 +2807,11 @@ slash@^3.0.0: ...@@ -2806,6 +2807,11 @@ slash@^3.0.0:
resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634"
integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==
slugify@^1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/slugify/-/slugify-1.6.0.tgz#6bdf8ed01dabfdc46425b67e3320b698832ff893"
integrity sha512-FkMq+MQc5hzYgM86nLuHI98Acwi3p4wX+a5BO9Hhw4JdK4L7WueIiZ4tXEobImPqBz2sVcV0+Mu3GRB30IGang==
source-map-support@^0.5.17, source-map-support@^0.5.6: source-map-support@^0.5.17, source-map-support@^0.5.6:
version "0.5.19" version "0.5.19"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61"
......
## [1.67.1](https://github.com/SocialGouv/1000jours/compare/v1.67.0...v1.67.1) (2021-07-16)
### Bug Fixes
* **epds:** Corrige l'envoie des scores au backend, refs [#512](https://github.com/SocialGouv/1000jours/issues/512) ([#528](https://github.com/SocialGouv/1000jours/issues/528)) ([2a33965](https://github.com/SocialGouv/1000jours/commit/2a339659ad3280fab11bf41ab12d13cb975c8ae8))
# [1.67.0](https://github.com/SocialGouv/1000jours/compare/v1.66.0...v1.67.0) (2021-07-16) # [1.67.0](https://github.com/SocialGouv/1000jours/compare/v1.66.0...v1.67.0) (2021-07-16)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment