I am trialing okteto self-hosted on EKS. I have an app which deploys a dependency from a private repo. When the dependency is deployed, it appears to succeed (deployments, config maps etc are created) but the pipeline reports as failed with this message: deploy command failed: exit status 1
I noticed in the installer logs several messages like this: W0727 10:21:38.234061 7 warnings.go:70] unknown field "spec.variables[0].masked"
I have no idea if this is related but my repo is in Azure devops, and to checkout using ssh from there I had to add the following deploy command: "GIT_SSH_COMMAND=ssh -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa" >> $OKTETO_ENV
I also noticed there is no integration for preview environments for azure devops. I would have to implement this myself. How can I add the git ssh command above to okteto pipeline deploy?
EDIT:
This only happens when I deploy using GIT_SSH_COMMAND. It’s fine if I deploy from a public github repository.
We are working on docs for this! But hight level, what you need to do from Azure Devops is to call the okteto preview deploy command and Okteto will take it from there.
Happy to set up a live session to help you hook it up while our docs our ready. Feel free to DM me!
Thanks for getting back to me. I did add an ssh key in azure devops for okteto, without adding that the checkout fails. Without GIT_SSH_COMMAND the error that we have is: Unable to negotiate with <IP> port 22: no matching host key type found. Their offer: ssh-rsa
This document mentions updating ssh config. Is there a way to do that for okteto?
Is there something special about your azure devops installation? I tried reproducing the issue on our azure devops account and wasn’t able to reproduce the issue.
You can follow these instructions to customize the container that Okteto uses during the check out and deployment of your environment. With this, you could create a container that has the updated ssh-config as the article describe.
That guide is exactly what I needed, thank you. I should have noticed that before, sorry. The solution for me was to use a custom installer image with this line:
RUN echo "HostKeyAlgorithms = +ssh-rsa\nPubkeyAcceptedAlgorithms = +ssh-rsa" >> /etc/ssh/ssh_config
Not sure if this is related, or if I should start a separate thread, but I’m also seeing an exit command falied after a seemingly succesful okteto deploy:
I’m printing out the exit code from helm upgrade, which is the last line in my deploy block in the config.yaml:
Exit code: 0
deploy command failed: exit status 1
is what I see in the okteto log.
so, it seems helm runs correctly, but something after that (which i have no more lines of our code after) seems to be failing.
Things were running okay previously with this repo, and are running okay with a peer to this repo in another okteto manifest.
It seems like another issue. Could you open another support issue trying to provide more context like an okteto manifest or okteto version in order to be able to reproduce it and fix it? If you could also add the result of running okteto deploy --log-level=debug it would be perfect.
Will do, but before I do, is there a way to configure the preview action in github to run a deploy with log level debug? (I forgot to mention that this only happen in preview environments)
I’m sorry but right now it’s not possible. If it only happen in a preview environment you should provide the name of the preview in case it was something on our to investigate the root of the cause