Hi we are very glad that recently Octopus team has implemented support for GCP accounts! We have connected our GKE cluster by setting up a deployment target and created a project with separate steps to deploy container, service and ingress objects. Deployment went fine except for we were unable to deploy all the above objects to a namespace other than default, even despite that our custom namespace name is specified both in the settings of the deployment target and in all of the deployment steps inside of the project. Do we need to make some other additional settings or maybe it’s a bug?
Welcome to the Octopus Community, thanks for reaching out!
I have just tried to reproduce the issue using a “Deploy Kubernetes service resource” step with the new Google Cloud account feature but was able to successfully deploy to my custom namespace. There are multiple locations that a namespace can be configured within Octopus, in the Step itself or in the Kubernetes Deployment target, is it possible that the deployment target is configured for the default namespace which is overwriting the namespace defined in the Step?
If you would like to send through the deployment logs for a failed deployment, I’d be happy to take a look and see if I can spot what’s going on! The log can be securely uploaded using your email here.
Feel free to let me know if you have any questions or run into any issues.
Thanks for your quick reply. I’ve uploaded the log for you to take glance. The release actually finishes successfully, if the target namespace is not present, Octopus creates it, then switches to the correct Kubernetes context scoping to the desired namespace, yet in the end my custom namespace remains empty and all the objects get deployed to the default one.
Thank you for sharing the log and additional context, confirming that I have received it and will dive into it shortly!
I’ll confirm this strange behaviour with my reproduction and will let you know if I have any questions or need any extra info.
Just an update, I have managed to reproduce this issue and have raised a bug here. Thanks again for raising this!
Although my reproduction was able to find the custom namespace ok, it still wasn’t used for the deployment. There could be another bug around your namespace not being found, could you please confirm the output of the “kubens” command via the Cloud Shell Terminal shows that this is configured?
Example of the output for my custom namespace “finntest” below:
I’ll keep you posted if I have any more updates as our engineers investigate.
Feel free to let me know if you have any questions!
Thank you for all your efforts! I can confirm that my custom namespace “development” is present on the cluster, yet ignored by Octopus Cloud.
Thanks for confirming that!
Our engineers have found the issue with the namespace not being used and should have a fix out very shortly!
I think there might be another bug around why it’s not discovering the namespace you’ve defined, I just wanted to confirm if you have set this within the Process Step or on the Deployment target (or both)?
First of all thanks for your help! Actually I’ve tried using multiple combinations of setting the namespace param:
- Set only in deployment target config
- Set both in deployment target and deployment steps
- Set both in deployment target and deployment steps (as a variable)
- Set only in deployment steps (as a variable)
No problem, we’re always happy to help!
Thanks for confirming that, I’ll double check with the engineers if this bug could impact finding a custom namespace, but I’m not so sure as my custom namespace was found ok. We might have to do some more investigation once the fix has been released.
I’ll keep testing on my end to see if I can reproduce this behaviour and will keep you posted with any updates.
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.