Unverified Commit 9d5f7dbb authored by Julien Bouquillon's avatar Julien Bouquillon 🐫 Committed by GitHub
Browse files

fix(k8s): use prod.nodeSelector (#28)

parent 605a67b5
...@@ -295,6 +295,8 @@ spec: ...@@ -295,6 +295,8 @@ spec:
name: config-map-files-ccff889 name: config-map-files-ccff889
defaultMode: 511 defaultMode: 511
name: local-files name: local-files
nodeSelector:
kubernetes.io/hostname: aks-system0-38313369-vmss000001
initContainers: initContainers:
- args: - args:
- '-c' - '-c'
......
...@@ -12,14 +12,13 @@ import gitlab from "@socialgouv/kosko-charts/environments/gitlab"; ...@@ -12,14 +12,13 @@ import gitlab from "@socialgouv/kosko-charts/environments/gitlab";
import { SealedSecret } from "@kubernetes-models/sealed-secrets/bitnami.com/v1alpha1/SealedSecret"; import { SealedSecret } from "@kubernetes-models/sealed-secrets/bitnami.com/v1alpha1/SealedSecret";
/** /**
* *
* This creates a kubernetes job that fetch datasets and publish it to some Elastic search * This creates a kubernetes job that fetch datasets and publish it to some Elastic search
* *
* An initContainer is used to fetch and assemble the fresh data it before starting the indexation process in a pod * An initContainer is used to fetch and assemble the fresh data it before starting the indexation process in a pod
* *
*/ */
const baseName = (localFile: string) => localFile.split("/").reverse()[0]; const baseName = (localFile: string) => localFile.split("/").reverse()[0];
const read = (filePath: string) => fs.readFileSync(filePath).toString(); const read = (filePath: string) => fs.readFileSync(filePath).toString();
...@@ -34,8 +33,10 @@ const secrets = { ...@@ -34,8 +33,10 @@ const secrets = {
"AgDE1F8SFMKtRpPd9BKozxXC5YcwVae1SRc+ECX/9EUhLSaqxGXenqVbtE2tj6kovFcru8sSMgPQZIOGDel4QIpwGC9HozNQWGXkEf9AABjulJ82hwlyo/22XOYodqAs3FuZc0tiodEK6+GUw9KKVf6I2P3Y55AzwfZNuar319LG1H0OmkvJbaXjkQwuELjBeU0OG1hPSf3LSIX4F6hc9JlunyDgWFT+vqe7FN+0Q/BmRgbY9SJ4ZqD+TZxzLfKCmWAtGFWW2eFf5jJDmuXp5A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irSJ+B1szZBzGCVXGwqnPu/KNebaPdwk+Dy4MH3fFe9ktwHcSJuiwBsnx38FuFHI0qWDTk/StOzprYD16WoAihB+LCVrOvJEJTnAWf5lCs2QStRiD5gFAHMtdW/Z8Q29QgXI8s+19YZ3Wz6JmJYgUKayYR/7qZqV5eD5aVQR/BphmZiH2SJh4zJ5lFk3r6a02/OwlwqIVfCYFmm9thFHsbJr5A3698128+KRrB/WLTKV1AvmPWWcDoj7HbFi+tYobtwNQpCQWw28=",
}, },
}; };
...@@ -112,6 +113,11 @@ const jobSpec = { ...@@ -112,6 +113,11 @@ const jobSpec = {
], ],
} as IIoK8sApiCoreV1PodSpec; } as IIoK8sApiCoreV1PodSpec;
if (env.env === "prod") {
jobSpec.nodeSelector = {
"kubernetes.io/hostname": "aks-system0-38313369-vmss000001",
};
}
// script for the initContainer of the index image // script for the initContainer of the index image
const initContainerScript = ` const initContainerScript = `
apt-get update -y && apt-get install -y wget apt-get update -y && apt-get install -y wget
......
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