Skip to content

Commit

Permalink
Merge branch 'release/v2.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
julien1619 committed May 2, 2022
2 parents 3cfa8d2 + de04799 commit ea7d452
Show file tree
Hide file tree
Showing 16 changed files with 359 additions and 152 deletions.
437 changes: 307 additions & 130 deletions Cargo.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sirene"
version = "2.3.1"
version = "2.4.0"
authors = ["Julien Blatecky <[email protected]>"]
edition = "2021"

Expand All @@ -19,12 +19,12 @@ r2d2 = "0.8"
reqwest = { version = "0.11", features = ["json", "stream"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tokio = { version = "1.17", features = ["macros", "io-util", "fs", "rt-multi-thread", "time"] }
tokio = { version = "1.18", features = ["macros", "io-util", "fs", "rt-multi-thread", "time"] }
tokio-util = { version = "0.7", features = ["compat"] }
tracing = "0.1"
tracing-subscriber = "0.3"
warp = { version = "0.3", default-features = false }
zip = "0.5"
zip = "0.6"

[target.'cfg(any(unix, linux))'.dependencies]
openssl = "0.10"
2 changes: 1 addition & 1 deletion app/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ dependencies:
repository: https://charts.bitnami.com/bitnami
version: 10.3.13
digest: sha256:9714003674edfea39d7b735dccd8078a5011b17bcd8de8c7ddcc76563126d6f8
generated: "2021-03-29T18:09:00.874362+02:00"
generated: "2022-03-15T16:49:31.854028+01:00"
2 changes: 1 addition & 1 deletion app/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ version: 0.1.0
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "v2.3.1"
appVersion: "v2.4.0"

dependencies:
- name: postgresql
Expand Down
2 changes: 1 addition & 1 deletion app/templates/cronjob.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: batch/v1beta1
apiVersion: batch/v1
kind: CronJob
metadata:
name: {{ include "app.fullname" . }}
Expand Down
4 changes: 2 additions & 2 deletions app/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ spec:
livenessProbe:
httpGet:
path: /
port: 3000
port: http
readinessProbe:
httpGet:
path: /
port: 3000
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
Expand Down
24 changes: 22 additions & 2 deletions app/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "app.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
{{- end }}
{{- end }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
Expand All @@ -16,6 +23,9 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
Expand All @@ -33,9 +43,19 @@ spec:
paths:
{{- range .paths }}
- path: {{ .path }}
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
pathType: {{ .pathType }}
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion app/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: 3000
targetPort: http
protocol: TCP
name: http
selector:
Expand Down
19 changes: 9 additions & 10 deletions app/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,15 @@ service:

ingress:
enabled: false
className: ""
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: siren-api.local
paths:
- path: /
backend:
serviceName: siren-api.local
servicePort: 80
pathType: ImplementationSpecific
tls: []
# - secretName: siren-api-tls
# hosts:
Expand All @@ -82,17 +81,17 @@ postgresql:
accessModes:
- ReadWriteMany

resources:
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
limits:
cpu: 100m
memory: 128Mi
requests:
cpu: 100m
memory: 128Mi
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi

autoscaling:
enabled: false
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE "public"."unite_legale" DROP COLUMN "societe_mission";
ALTER TABLE "public"."unite_legale_staging" DROP COLUMN "societe_mission";
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE "public"."unite_legale" ADD COLUMN "societe_mission" varchar(1) DEFAULT NULL;
ALTER TABLE "public"."unite_legale_staging" ADD COLUMN "societe_mission" varchar(1) DEFAULT NULL;
2 changes: 2 additions & 0 deletions src/connectors/insee/types/unite_legale.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ pub struct PeriodeInseeUniteLegale {
pub changement_economie_sociale_solidaire_unite_legale: bool,
pub caractere_employeur_unite_legale: Option<String>,
pub changement_caractere_employeur_unite_legale: bool,
pub societe_mission_unite_legale: Option<String>,
}

impl From<&InseeUniteLegale> for Option<UniteLegale> {
Expand Down Expand Up @@ -148,6 +149,7 @@ impl From<InseeUniteLegaleWithPeriode> for UniteLegale {
nic_siege: u.periode.nic_siege_unite_legale,
economie_sociale_solidaire: u.periode.economie_sociale_solidaire_unite_legale,
caractere_employeur: u.periode.caractere_employeur_unite_legale,
societe_mission: u.periode.societe_mission_unite_legale,
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/models/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ table! {
nic_siege -> Nullable<Text>,
economie_sociale_solidaire -> Nullable<Text>,
caractere_employeur -> Nullable<Varchar>,
societe_mission -> Nullable<Varchar>,
}
}

Expand Down Expand Up @@ -194,6 +195,7 @@ table! {
nic_siege -> Nullable<Text>,
economie_sociale_solidaire -> Nullable<Text>,
caractere_employeur -> Nullable<Varchar>,
societe_mission -> Nullable<Varchar>,
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/models/unite_legale/columns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ activite_principale,
nomenclature_activite_principale,
nic_siege,
economie_sociale_solidaire,
caractere_employeur
caractere_employeur,
societe_mission
"#;
1 change: 1 addition & 0 deletions src/models/unite_legale/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ pub struct UniteLegale {
pub nic_siege: Option<String>,
pub economie_sociale_solidaire: Option<String>,
pub caractere_employeur: Option<String>,
pub societe_mission: Option<String>,
}
1 change: 1 addition & 0 deletions src/models/unite_legale/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ impl UpdatableModel for UniteLegaleModel {
dsl::nic_siege.eq(excluded(dsl::nic_siege)),
dsl::economie_sociale_solidaire.eq(excluded(dsl::economie_sociale_solidaire)),
dsl::caractere_employeur.eq(excluded(dsl::caractere_employeur)),
dsl::societe_mission.eq(excluded(dsl::societe_mission)),
))
.execute(&connection)?;

Expand Down

0 comments on commit ea7d452

Please sign in to comment.