OctopusDeploy / Issues

| Public | Bug reports and known issues for Octopus Deploy and all related tools
https://octopus.com
162 stars 20 forks source link

Support for package instead of Git repo in Kustomize step #8378

Open dloeffler opened 1 year ago

dloeffler commented 1 year ago

I like the new Kustomize step. But we would need to provide the kustomize.yaml and the according .yaml and configuration files in a .nuget package, which is created in our CI/CD pipeline. Please allow the usage of a package as alternative for Git repository in the Kustomize step. This would make it also easier to define a specific image tag/version for the release.

nikita-dergilev commented 1 year ago

Hi @dloeffler ,

Thanks for the feedback!

Would you mind sharing a bit more details on this? Do you still store Kustomize files in Git? Except for the image reference (we're considering this improvement as well), are there any advantages of using packages vs sourcing files from Git?

dloeffler commented 1 year ago

Hi @nikita-dergilev

Let me elaborate more an this. We have a very large repo (2GB) where we have about 10 to 15 .net core services in this repo. In the same directory where the VS project files are located we have the .nuspec file and the kubernetes YAML files for the deployment definition (deployment.yaml, service.yaml, ingress.yaml). Additionally we put the appsettings.json yaml for the service configuration in the nuspec package and register it during the deployment as secret and mount it to the pod. The final nuspec package for the deployment then contains:

We use Octopus variable configuration for adapting the appsettings.json for each environment (connection strings, feature flags, endpoint urls, ..) and configure the kubernetes resources as well (CPU/memory request/limits, replica count, placement contraints, namespace). At the end we just call kubectl apply -k . The deployment is done by Octopus workers running as pods within the AKS cluster. This works quite well. The only missing puzzle piece would be the Octopus monitoring of the deployed Kubernetes resource (fancy new Kubernetes object status page).

nikita-dergilev commented 1 year ago

Thanks, @dloeffler!

It's really helpful!

Would you spare half an hour for a Zoom call? It would really help me to ask you a few extra questions on this. For example, learning more about how you register appsettings.json as secret (I assume using secretGenerator).

dloeffler commented 1 year ago

Hi @nikita-dergilev

Yes for registering the appsettings.json as secret I use the secretGenerator. I'm open for a Zoom call.

nikita-dergilev commented 1 year ago

Great, thanks, @dloeffler

This is my Calendly link. Please let me know if none of the time slots work for you

kieranjamesCOT commented 2 months ago

Was there any movement on this? We need this support also

nikita-dergilev commented 2 months ago

Hi @kieranjamesCOT,

Sorry, it's on our radar but not in active development yet.

Would you mind sharing a few more details about why the Git reference doesn't work for you? It would help us with the prioritisation.