fix(argocd): trust private CA in repo-server for oci helm dependencies - #1094
Open
KepoParis wants to merge 1 commit into
Open
fix(argocd): trust private CA in repo-server for oci helm dependencies#1094KepoParis wants to merge 1 commit into
KepoParis wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issues liées
Issues numéro:
Quel est le comportement actuel ?
Une Application dont le chart déclare une dépendance
oci://sur un registre signé par la CA privée échoue au rendu :helm dependency buildrésout les dépendancesoci://avec son propre client, qui valide le TLS contre le magasin de confiance du conteneur. Ce client ne lit pasargocd-tls-certs-cm, où10-exposed-ca.j2écrit pourtant déjà la CA privée. Lesrepo-credsne portent que l'authentification, jamais de CA.Quel est le nouveau comportement ?
Le chart monte déjà
argocd-tls-certs-cmdans/app/config/tls. On ajoute ce chemin àSSL_CERT_DIRsur le repo-server. Go charge tous les fichiers des répertoires listés, la CA entre donc dans le magasin de confiance du processus et helm la voit./etc/ssl/certsreste en premier pour conserver les racines publiques, les pulls quay.io et docker.io ne changent pas.Le bloc est placé sous le garde
dsc.exposedCA.type != 'none'existant. Sans CA privée, rien ne change.Cette PR introduit-elle un breaking change ?
Non.
Test sur MI Integ
printenv SSL_CERT_DIRdans le repo-server renvoie/etc/ssl/certs:/app/config/tlshelm pull oci://registry.<domaine>/<projet>/<chart>ne renvoie plus d'erreur x509env -u SSL_CERT_DIRéchoue toujours entls: failed to verify certificateAutres informations
roles/combine/tasks/main.yamlfusionne les fichiers de values aveclist_merge='append'. La clérepoServer.envs'ajoute donc aux variables proxy de10-proxy.j2au lieu de les écraser.Vérifier avec
openssl s_clientdepuis le conteneur induit en erreur. OpenSSL lit bienSSL_CERT_DIRmais cherche des liens nommés par hash, absents d'un montage de ConfigMap. Il renvoie donc toujoursverify error:num=19alors que helm fonctionne. Le test valable esthelm pull.Après ce correctif le pull renvoie
401 Unauthorized. C'est la couche suivante, pas le TLS. Si le registre n'est pas le Harbor du socle, il faudra unrepo-credsdédié danstemplates/repo-creds.yml.j2, sur le modèle deoci-harbor-credscorrigé en #1087.