Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple instances of the same StackInstall / Stack in different namespaces #1051

Closed
displague opened this issue Nov 12, 2019 · 2 comments · Fixed by #1311
Closed
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@displague
Copy link
Member

displague commented Nov 12, 2019

What problem are you facing?

Part of #1036, Related to #1014

The Stacks Security and Security Isolation One-Pager was updated and expanded requiring new Stack behaviors.

https://github.com/crossplaneio/crossplane/blob/master/design/one-pager-stacks-security-isolation.md#multiple-versions:

As previously mentioned, since namespace stacks will be installed per namespace, multiple instances of each namespace stack can be installed in the control plane. This also means that multiple versions of the namespace stack can be installed side by side. Because of the namespaced isolation, this is fine for the namespace stack's controllers, but it does cause a potential difficulty for the CRDs.

The custom resource definitions themselves are always cluster scoped. If two versions of a namespace stack are installed in the control plane and they have identical CRD versions, there could be a conflict.

How could Crossplane help solve your problem?

Support multiple instances of the same StackInstall / Stack in different namespaces.

#526 is a likely part of this solution.

@displague
Copy link
Member Author

displague commented Feb 12, 2020

@muvaf encountered the following logged failure when attempting to install the same stack into multiple namespaces:

2020-02-12T16:36:48.496Z	DEBUG	stack-manager	failed to create RBAC permissions	{
"controller": "stacks/stack", 
"error": "failed to list all expected crds", 
"errorVerbose": ""failed to list all expected crds
github.com/crossplaneio/crossplane/pkg/controller/stacks/stack.(*stackHandler).crdsFromStack
	/home/user/go/src/github.com/crossplaneio/crossplane/pkg/controller/stacks/stack/stack.go:265
github.com/crossplaneio/crossplane/pkg/controller/stacks/stack.(*stackHandler).createPersonaClusterRoles
	/home/user/go/src/github.com/crossplaneio/crossplane/pkg/controller/stacks/stack/stack.go:274
github.com/crossplaneio/crossplane/pkg/controller/stacks/stack.(*stackHandler).processRBAC
	/home/user/go/src/github.com/crossplaneio/crossplane/pkg/controller/stacks/stack/stack.go:536
github.com/crossplaneio/crossplane/pkg/controller/stacks/stack.(*stackHandler).create
	/home/user/go/src/github.com/crossplaneio/crossplane/pkg/controller/stacks/stack/stack.go:210
github.com/crossplaneio/crossplane/pkg/controller/stacks/stack.(*stackHandler).sync
	/home/user/go/src/github.com/crossplaneio/crossplane/pkg/controller/stacks/stack/stack.go:191
github.com/crossplaneio/crossplane/pkg/controller/stacks/stack.(*Reconciler).Reconcile
	/home/user/go/src/github.com/crossplaneio/crossplane/pkg/controller/stacks/stack/stack.go:149
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
	/home/user/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.4.0/pkg/internal/controller/controller.go:256
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
	/home/user/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.4.0/pkg/internal/controller/controller.go:232
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker
	/home/user/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.4.0/pkg/internal/controller/controller.go:211
k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1
	/home/user/go/pkg/mod/k8s.io/apimachinery@v0.17.0/pkg/util/wait/wait.go:152
k8s.io/apimachinery/pkg/util/wait.JitterUntil
	/home/user/go/pkg/mod/k8s.io/apimachinery@v0.17.0/pkg/util/wait/wait.go:153
k8s.io/apimachinery/pkg/util/wait.Until
	/home/user/go/pkg/mod/k8s.io/apimachinery@v0.17.0/pkg/util/wait/wait.go:88
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:1357"
}

@displague
Copy link
Member Author

Uninstall is a larger issue than install because the CRD resources should not be removed if other StackInstalls are using it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants