I have a chicken and the egg kind of question. Let...
# general
w
I have a chicken and the egg kind of question. Let’s say that you have some applications that you want to run on a kubernetes cluster. The images should be published to a registry first and that is something I would like to do during build, but the registry isn’t created until deployment. Is there a best practice here? Setting up the registry in its own project?
l
I use separate kubernetes and application stacks
So when the application stack needs to deploy the app, the infrastructure is already there.
w
Got it. So basically one infra “pipeline” that is a precondition to the application “pipeline”.
l
Thats how I do it. I don't know if there are better ways
w
A follow up to this. Given I have separated the deploy of the infrastructure and the deploy of the application(s). This will give me sort of two "pipelines", first the build and the deploy of the infrastructure should run and on success the build and deploy of the application(s). If I want to set up a container registry (I'm using Azure) during the deploy of the infrastructure, is there an easy way for me to access that container registry during the build of the application so I can publish application containers to that registry? Am I going about it the right way?
r
there are two ways, from what I've read: * use a StackReference to pull the actual reference of the resource from your infrastructure stack during your application stack's deploy * use the
get
method of the resource in question and specify the name/identifier of the previously-existing resource. I do this with some company-level secrets in my own deploys, for example
w
awesome, will have a look and continue playing around 🙂