Skip to content
This repository has been archived by the owner on Nov 6, 2018. It is now read-only.

Multi-namespace app install issue #249

Open
antifragileer opened this issue Nov 28, 2016 · 0 comments
Open

Multi-namespace app install issue #249

antifragileer opened this issue Nov 28, 2016 · 0 comments

Comments

@antifragileer
Copy link

Moved from fabric8io/gofabric8#288

Context
I have two namespaces setup in Google Cloud. One is called "dev" and the other is called "app". Through IaC, I provision the cluster as well as fabric8. I create two fabric8 instances in the same cluster, one deployed to "dev" and the other deployed to "app".

By the way, its awesome that both fabric8 installs allow you to access everything without having to maually change URLs 💯

Issue
When I use "Create App" and install the default micro service for the first namespace to get the build pipeline setup, everything goes well. I usually start with establishing the "app" pipline with the basic micro service chassis provided.

However, when I switch to the "dev" namespace, and I repeat the process, it accidently builds it in the "app" namespace. It isn't until I manually go back to the "dev" namespace after going to "app" namespace again that it will deploy to the correct namespace which I am currently in.

I noticed that when I first setup the pipline with the chassis in the "app" namespace, it asks me for the source secret. I set this, using the default gogs one. But when I switch to the "dev" namespace, it does not ask me for a source secret. It isn't until the first one deploys incorrectly and I go back to do it again that the second namespace will ask me for the source secret for that namespace. Perhaps the fact that it is not asking me for a new source secret for the other namespace is causing the issue? I know the source secret is cached locally in the browser, so wondering if there is a conflict when switching between two namespaces in the same domain both running fabric8.

I just started using the dual namespace to test a concept for developers being able to have a playground of sorts which has all the capabilities of the cloud before they push into master where the production pipeline kicks off. Don't know if this is best practice or not, but it was the only thing I could think of besides setting up a separate cluster, which I think is less optimal.

Only way I can reproduce it is to start the cluster over again and repeat the process.

Both namespaces working in the same cluster seem to be awesome otherwise. When it happens I just have to go into the wrong namespace and cleanup the app from kubernetes as well as remove from jenkins and etc.

===============

I have had to rebuild the installation several times since I wrote this. I noticed a couple of things:

Given you have two namespaces installed
And one namespace is called "dev"
And one namespace is called "app"
Then navigating between namespaces does not change the url appropriately for each namespace you enter

I would expect that the following would occur:

Given I navigate to the "dev" namespace on the fabric8 homepage
Then the url would change to fabric8.dev.mydomain.com

And also:

Given I navigate to the "app" namespace on the fabric8 homepage
Then the url would change to fabric8.app.mydomain.com

I am wondering if because the url is not changing between the two namespaces as you navigate, the gogs-secret is not working appropriately. But I think this issue is tied to the gogs secret as well as the domain name not being changed as you swtich between namespace team dashboards.

===================

Tonight I had to build the cluster again to test some additional automation, and I found the following:

Given I create an app in "app" namespace
And I go back to the workspaces dashboard and select the "dev" namespace
And I manually change the url in the browser to the correct namespace url
Then the application installs in the right namespace

This could be a fluke, but I recommend testing the various scenarios for yourself. In previous attempts when I did not do the above, it always resulted in the app being installed to the first namespace I created an app in.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant