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

Cannot deploy operator to multiple namespaces #38

Closed
mikeywaites opened this issue Apr 23, 2021 · 5 comments
Closed

Cannot deploy operator to multiple namespaces #38

mikeywaites opened this issue Apr 23, 2021 · 5 comments

Comments

@mikeywaites
Copy link

Your environment

Operator Version: 1.0.0

Connect Server Version: 1.0.0

Kubernetes Version:1.18.16-gke.502

What happened?

helm install connect 1password/connect --namespace=dev \
            --set-file connect.credentials=dev-credentials.json \
            --set operator.serviceAccount.create=true \
            --set operator.clusterRole.create=true \
            --set operator.roleBinding.create=true \
            --set operator.create=true,operator.token.name=gke-1password-dev-access-token \
            --set namespace=dev
            
    kubectl create secret generic gke-1password-dev-access-token --from-literal=token=$OP_ACCESS_TOKEN \
            --namespace=dev
            
helm install connect 1password/connect --namespace=qa \
            --skip-crds \
            --set-file connect.credentials=qa-credentials.json \
            --set operator.serviceAccount.create=true \
            --set operator.clusterRole.create=true \
            --set operator.roleBinding.create=true \
            --set operator.create=true,operator.token.name=gke-1password-qa-access-token \
            --set namespace=qa
            
 Error: rendered manifests contain a resource that already exists. Unable to continue with install: CustomResourceDefinition "onepassworditems.onepassword.com" in namespace "" exists and cannot be imported into the current release: invalid ownership metadata; annotation validation error: key "meta.helm.sh/release-namespace" must equal "qa": current value is "dev"         

What did you expect to happen?

The second install command with skip-crds would not create the CRD again

Steps to reproduce

Create two environments for connect on 1password
generate a token and credentials for each
create two namespces
deploy connect with the operator to the first namespace
attempt to create the operator in a second namespace

Notes & Logs

Not entirely sure if this is me missing something obvious or wether it's the checks for those annotiation labels causing the issues. Essentially we have 4 isolated namespaces in our cluster. We want to have 4 environments each with it's own access-token and credentials which has access to a single vault for (one per namespace)

@florisvdg
Copy link
Member

I think this is because the CRD is defined in the helm templates dir instead of in the Helm 3-standard crds dir. I've opened a PR on the Helm charts repo to address this.

@florisvdg florisvdg transferred this issue from 1Password/onepassword-operator Apr 28, 2021
@florisvdg
Copy link
Member

v1.2.0 has just been released, so the --skip-crds flag should work now. Could you try again?

Small note: you do have to change the Helm repo URL to https://1password.github.io/connect-helm-charts to get the updated chart.

@mikeywaites
Copy link
Author

mikeywaites commented May 4, 2021 via email

@mikeywaites
Copy link
Author

@florisvdg I can confirm this has now resolved the issue. 🙏

@rhysviz
Copy link

rhysviz commented Oct 1, 2021

Hey, this seems to have returned in v1.5. If I downgrade to v1.4 then it works.

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

No branches or pull requests

3 participants