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

istioctl deletes user namespaces if they are in ICP spec #20170

Closed
ostromart opened this issue Jan 14, 2020 · 1 comment
Closed

istioctl deletes user namespaces if they are in ICP spec #20170

ostromart opened this issue Jan 14, 2020 · 1 comment
Labels
area/environments/operator Issues related to Operator or installation
Milestone

Comments

@ostromart
Copy link
Contributor

https://discuss.istio.io/t/bug-istioctl-deleting-other-namespace/4926

Hi All,

We are facing an issue that I believe might be a bug.

Description:
We are using KIali and we want it to pick data from Prometheus. But, We do not want to install prometheus via Istio. This is because we are already using Prometheus(deployed in a different namespace) and we want Kiali to use the same. To achieve this we added “prometheusNamespace” to values.global in Istiocontrolplane file. it looked something like below:

values: 
    prometheus:
      enabled: false
      replicaCount: 2
    kiali:
      enabled: true
    global:
      prometheusNamespace: testmonitoring

This worked fine. Kilali was picking up data. Later for some reason we removed the istio installation and installed it again. For removing we used the same istiocontrolplane file that we used in the first place to install. But while deletion istio deleted the “testmonitoring” namespace too. For the first time, since the namespace was already there, we did not realise, istion was trying to create it.

by using istio manifest generate we can see that istio is creating the namespace.

istioctl manifest generate -f istiocontrolplane.yaml
Relevant part of out put below:

apiVersion: v1
kind: Namespace
metadata:
  name: testmonitoring
  labels:
    istio-operator-managed: Reconcile
    istio-injection: disabled

We did not expect that. I further tested, by enabling prometheus in the istiocontrolplane file and replacing value of “prometheusNamespace” with a dummy values say “mynamespace”. So istio deployed prometheus in “istio-system” ns and created a blank names space “mynamespace”. This time I expected prometheus to to deployed in dummy namespace, but that did not happen.

In conclusion, if we use existing prometheus in a different namespace, while deletion Istio deletes that namespace with all its content. That is a disaster for us.

Please let me know if my understanding is wrong, or if I missed some documentation. Please rectify this, of let me know a better way to achieve my requirement.

@ostromart ostromart added area/environments/operator Issues related to Operator or installation flag/needs-backport labels Jan 14, 2020
@ostromart ostromart added this to the 1.5 milestone Jan 14, 2020
@ostromart
Copy link
Contributor Author

Duplicate of #20059.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/environments/operator Issues related to Operator or installation
Projects
None yet
Development

No branches or pull requests

1 participant