Closed revolunet closed 2 years ago
related to: https://github.com/SocialGouv/actions/pull/58 https://github.com/SocialGouv/kosko-charts/pull/826 https://github.com/SocialGouv/actions/pull/57 https://github.com/SocialGouv/docker/pull/910 https://github.com/SocialGouv/kosko-charts/pull/828
and finally to: https://github.com/SocialGouv/docker/pull/914 https://github.com/SocialGouv/docker/pull/918 https://github.com/SocialGouv/kosko-charts/pull/848 https://github.com/SocialGouv/kosko-charts/pull/844 https://github.com/SocialGouv/kosko-charts/pull/841 https://github.com/SocialGouv/kosko-charts/pull/840 https://github.com/SocialGouv/kosko-charts/pull/838 https://github.com/SocialGouv/kosko-charts/pull/839 https://github.com/SocialGouv/kosko-charts/pull/837 https://github.com/SocialGouv/kosko-charts/pull/836 https://github.com/SocialGouv/actions/pull/76 https://github.com/SocialGouv/actions/pull/75 https://github.com/SocialGouv/actions/pull/74 https://github.com/SocialGouv/actions/pull/73 https://github.com/SocialGouv/actions/pull/72 https://github.com/SocialGouv/actions/pull/71 https://github.com/SocialGouv/actions/pull/70 https://github.com/SocialGouv/actions/pull/69 https://github.com/SocialGouv/actions/pull/68 https://github.com/SocialGouv/actions/pull/67 https://github.com/SocialGouv/actions/pull/66 https://github.com/SocialGouv/actions/pull/65 https://github.com/SocialGouv/actions/pull/64 https://github.com/SocialGouv/actions/pull/63 https://github.com/SocialGouv/actions/pull/62 https://github.com/SocialGouv/actions/pull/58 https://github.com/SocialGouv/actions/pull/57
PS: sorry for the shambles, but researches to figure out what was happening was hard and tedious And when I wanted to make it work, I began unstoppable 🤪
reste à tester l'implémentation ;-) et à éventuellement debugger le cas échéant
Merci @devthejo
Les actions : je pense qu'elles ne devraient pas s'appuyer sur un éventuel dossier .k8s
dans le repo du projet mais être autonomes, donc installer kosko-charts, lequel intègrerait les jobs en question.
Question create-db-secret
: pourquoi faire le kubectl apply depuis l'image docker alors qu'on pourrait générer le password et le secret et le sealer dans kosko-charts au moment de l'execution du job ? c'est pour isoler la dépose du secret de son usage dans kosko-charts ?
les jobs seront intégrés dans kosko-charts par cette PR: https://github.com/SocialGouv/kosko-charts/pull/828 ensuite il faut simplement les appeler mais effectivement par un call depuis .k8s, je n'ai pas vu d'exemple d'implémentation où on appelle directement une kosko chart par une gh action sans aucune activation depuis .k8s.
Yep, en fait pas besoin de sealer le secret, cela me semblait finalement beaucoup plus compliqué (et également moins propre) que nécessaire, on le génère de manière aléatoire dans le job et ensuite on l'appelle aussi bien dans le job qui créé la db et le user que dans les déploiements.
de plus, si on met le secret (sealed) dans un manifest, il va écraser le précédent à chaque fois, hors là, le job vérifie qu'il n'y a pas déjà un secret, et seulement si il n'y en a pas déjà un, il le créé
- les jobs seront intégrés dans kosko-charts par cette PR: feat(pg): create-db-secret + create-db-user kosko-charts#828 ensuite il faut simplement les appeler mais effectivement par un call depuis .k8s, je n'ai pas vu d'exemple d'implémentation où on appelle directement une kosko chart par une gh action sans aucune activation depuis .k8s.
Ok super, en effet il reste à voir comment executer ces jobs sans dépendance au projet
- Yep, en fait pas besoin de sealer le secret, cela me semblait finalement beaucoup plus compliqué (et également moins propre) que nécessaire, on le génère de manière aléatoire dans le job et ensuite on l'appelle aussi bien dans le job qui créé la db et le user que dans les déploiements.
Ok, sounds good !
Proposition sur comment faire pour executer ces jobs :
On a un dossier "template autodevops" sur kosko-charts qui peut-être degité puis exécuté directement comme ici par exemple. En intégrant tes jobs dans ce template, on pourrait kosko generate
ces jobs individuellement.
On se cale une visio pour échanger la dessus ou autre idée ?
reste à merger: https://github.com/SocialGouv/kosko-charts/pull/828 https://github.com/SocialGouv/actions/pull/62
puis à tester en utilisant la branch devthejo/create-db sur sample-next-app ou en la mergeant depuis la PR https://github.com/SocialGouv/sample-next-app/pull/561
note: upgrader la version de kosko-charts intégrant les derniers changements (dès qu'elle sera released) avant de merger la PR sur sample-next-app (ce qui devrait également fixer l'erreur de testing dans l'action :-))
related to: https://github.com/SocialGouv/actions/pull/63
pour terminer sur ce sujet, il reste quoi a part :
create-db
Je ferme puisque c'est dispo ici : https://github.com/SocialGouv/actions/blob/master/autodevops-create-db/
create new create db/secret process (current art in kosko-charts/azure-pg)
https://hackmd.io/@5eaaFGMWTfeaTaAsl2Q3OQ/ryQAIWtut