-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install argocd-vault-plugin #1884
Comments
Looking at the fork, it was last updated 2 years ago, and the CNS dockerfile doesn't use it, they just use the public plugin repo. So I don't really know why that fork was created, but we can probably avoid using it. |
Might be worth looking into this repository from CNS on how to setup argo for handling secrets coming from AKV |
I tried installing it following the installation documentation.
And then to test, I added the secret we want managed to the manifest. But it is failing to sync in argocd(generic error saying the value of the secret CLIENT_SECRET isnt encoded which is a normal error message that makes sense since the placeholder path didnt get replaced by the plugin). So i need to investigate which part of the install didn't work, or even if i was updating it in the correct deployment. From what I can tell, it's the patch to the deployment that seemed to not have worked as there was no sidecar for the plugin running, plus the init container to download the avp plugin also didnt seem to have run. |
I added the deployment yaml to aaw-argocd-manifests and that made it work and read that deployment resource for the avp install. But the issue I am now encountering is that the initcontainer to download the plugin isn't working. It is getting an error when trying to download from github, saying that the connection is refused when connection to github port 443. But, we already have a netpol in place to allow for the argocd-repo-server pod to egress to the internet(or at least that what it says it should do). So I'm not sure what the issue is actually, will need to investigate further. |
With the networking issues, i decided to switch how the install is done and instead use a custom image saved in our dev acr called With using this new custom image, the pod is running successfully, and the plugin seems to be installed in the sidecar. So now, it will be a matter of testing to see if the plugin is properly working. |
Still slowing resolving the issues from this install. Right now, all the pods sucessfully boot up for argocd without errors, although it seems like the deployment gets overridden on the cluster sometimes, ignoring the argocd manifest deployment override I have defined (plus the argocd deployment isnt on autosync, so that a reason why it doesnt re-apply my deployment definition). This might be something with were I defined those resources (in the argocd manifest github instead of the gitlab somewhere), so just tweaking that. But that is a minor issue for now. The major issue I am currently looking into is this one, which i think is because of the permissions that the pod needs to connect to the key vault |
I talked with @justbert from CNS about this issue a little bit. He suggested that we move away from trying to connect to the vault we already had ( I do agree with his suggestion and I will probably move forward with the work needed to create a new key vault for the purpose of being used by the plugin. |
Yeah, it's used for this Vault feature: https://developer.hashicorp.com/vault/tutorials/auto-unseal/autounseal-azure-keyvault |
On a side note, I found this terraform definition example from CNS for an argocd installation with the azure-vault-plugin. |
It looks like I was able to get a proof of concept up and running with a secret resource managed by the plugin. I have been testing with this application definition
The repo it points to is a fork I made of the argocd examples repo. It contains a secret definition with a value that the plugin reads and replaces with the secret it finds in the azure key vault from the path in the placeholder. |
Trying to write everything down that was put in place for this install: I created 3 files in the argocd-manifests repo: deployment.yaml, configmanagementplugin.yaml and vaultconfiguration.yaml vaultconfiguration.yaml creates a secret resource that contains the configurations for the plugin. These are the type of vault we are using(azurekeyvault) as well as the variables used for authentication against azure. I decided to use the client credentials for this first install since I was more familiar with that type of authentication. CNS used azure managed identities for this authentication, which I think we should follow in the future. After those 3 files were commited to the main branch, they could then be managed through ArgoCD. The reason I went with the solution with files in the manifests repo was because I was more familiar with that repo, and I don't have rights to run the tf apply command in the gitlab repo. So it was a lot more easy for testing for me. In the future, I think we should add these components where our ArgoCD instance is initially defined in gitlab. This would keep our argocd install all in one place. This would also mirror how CNS did the install. Plus, I have seen some issues in my testing where the argo instance would get re-created, and it would then ignore the deployment override defined in the manfest repo and therefore wouldn't have the plugin installed. So having everything in one place would solve this potential issue To then test the install, I applied the application definition pasted in the comment above. The important part of that application definition is the
The client_id is just some random value. The client_secret is the one that will be watching for the Azure key vault secret, and I wrote it following the examples from the plugin docs. Once everything is up and running, then it is very easy to update the secret resource that gets created. Just update the secret in the key vault to a new version, and then do a hard refresh in the argocd application that contains the secret. |
In relation to https://github.com/StatCan/aaw-private/issues/149
If we want to handle secrets coming from Azure Key Vaults coming through ArgoCD, we will need to install the argocd-vault-plugin.
Link to the plugin (It has doc on how to install it in there)
Will also gave us some CNS documentation on installing it here , but basically it seems that they have a dockerfile for their argocd install that has the plugin in there
I also noticed that we have our own fork of the argocd-vault-plugin. Might be useful to quickly look into if that is actually used anywhere
The text was updated successfully, but these errors were encountered: