Skip to content

Commit

Permalink
fix: use cnpg (#592)
Browse files Browse the repository at this point in the history
* fix: use cnpg

* fix

* chore: fix lint

---------

Co-authored-by: YoannNumericite <85347776+YoannNumericite@users.noreply.github.com>
  • Loading branch information
Julien Bouquillon and YoannNumericite authored Nov 15, 2023
1 parent 9561dca commit 8fe9b44
Show file tree
Hide file tree
Showing 6 changed files with 195 additions and 103 deletions.
12 changes: 2 additions & 10 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
{
"extends": [
"next/core-web-vitals",
"prettier",
"@socialgouv/eslint-config-react",
"@socialgouv/eslint-config-typescript"
],
"extends": ["next/core-web-vitals", "prettier", "eslint-config-next"],
"settings": {
"import/resolver": {
"node": {
"moduleDirectory": [
"node_modules",
"."
]
"moduleDirectory": ["node_modules", "."]
}
}
},
Expand Down
24 changes: 0 additions & 24 deletions .kontinuous/env/dev/values.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
app:
~needs: [build-app, db]
envFrom:
- secretRef:
name: pg-user
- secretRef:
name: app-sealed-secret
- configMapRef:
name: app-configmap
volumes:
- name: docs
emptyDir: {}
Expand All @@ -15,14 +7,6 @@ app:
name: docs

form:
~needs: [build-form, db-form]
envFrom:
- secretRef:
name: pg-user-form
- secretRef:
name: app-sealed-secret
- configMapRef:
name: app-configmap
volumes:
- name: docs-form
emptyDir: {}
Expand All @@ -42,11 +26,3 @@ jobs:
buildArgs:
NEXT_PUBLIC_SENTRY_ENVIRONMENT: review
START_SCRIPT: start-review
db:
use: create-db
db-form:
use: create-db
with:
database: "form_{{.Values.global.branchSlug32}}"
pgSecretName: pg-user-form
pgUser: form_{{ .Values.global.branchSlug32 }}
23 changes: 21 additions & 2 deletions .kontinuous/env/prod/values.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,38 @@
app:
addVolumes:
- docs
envFrom:
- secretRef:
name: pg-user
- secretRef:
name: app-sealed-secret
- configMapRef:
name: app-configmap

form:
addVolumes:
- docs-form
envFrom:
- secretRef:
name: pg-user-form # todo: remove after CNPG migration
- secretRef:
name: app-sealed-secret
- configMapRef:
name: app-configmap

pg-metabase:
~chart: pg

metabase:
enabled: true
~needs: [pg-metabase]
ingress:
enabled: false
envFrom:
- configMapRef:
name: metabase-configmap
- secretRef:
name: metabase-db-user
name: pg-metabase-app

oauth2-proxy:
host: "metabase-eds.fabrique.social.gouv.fr"
Expand Down Expand Up @@ -49,4 +68,4 @@ jobs:
NEXT_PUBLIC_FORMULAIRE_HJID: 3347496
NEXT_PUBLIC_FORMULAIRE_HJS: 6
NEXT_PUBLIC_MATOMO_URL: https://matomo.fabrique.social.gouv.fr/
NEXT_PUBLIC_MATOMO_SITE_FORMULAIRE_ID: 84
NEXT_PUBLIC_MATOMO_SITE_FORMULAIRE_ID: 84
16 changes: 11 additions & 5 deletions .kontinuous/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
app:
~chart: app
~needs: [build-app]
~needs: [build-app, pg]
imagePackage: app
resources:
requests:
Expand All @@ -14,7 +14,7 @@ app:
value: "https://{{ $.Values.global.host }}"
envFrom:
- secretRef:
name: pg-user
name: pg-app
- secretRef:
name: app-sealed-secret
- configMapRef:
Expand All @@ -33,7 +33,7 @@ app:
periodSeconds: 5
form:
~chart: app
~needs: [build-form]
~needs: [build-form, pg-form]
imagePackage: form
host: "formulaire-{{ $.Values.global.host }}"
resources:
Expand All @@ -48,7 +48,7 @@ form:
value: "https://formulaire-{{ $.Values.global.host }}"
envFrom:
- secretRef:
name: pg-user-form
name: pg-form-app
- secretRef:
name: app-sealed-secret
- configMapRef:
Expand All @@ -69,6 +69,12 @@ metabase:
oauth2-proxy:
enabled: false

pg:
~chart: pg

pg-form:
~chart: pg

jobs:
~chart: jobs
runs:
Expand All @@ -82,7 +88,6 @@ jobs:
sentry_auth_token:
secretName: app-sealed-secret
secretKey: SENTRY_AUTH_TOKEN

build-form:
use: build
with:
Expand All @@ -106,3 +111,4 @@ deactivate:
with:
database: "form_{{.Values.global.branchSlug32}}"
databaseUser: "form_{{ .Values.global.branchSlug32 }}"

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"csv-parse": "^5.0.3",
"csv-stringify": "^6.0.3",
"eslint": "^7.32.0",
"eslint-config-next": "12.0.4",
"eslint-config-next": "^14.0.1",
"faker": "^5.5.3",
"husky": "^7.0.4",
"jest": "^27.4.3",
Expand Down
Loading

0 comments on commit 8fe9b44

Please sign in to comment.