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

kubevirt/CNV datavolume importer pod inability to disable sidecar injection if namespace has sidecar injection enabled #1449

Closed
anildhingra opened this issue Oct 20, 2020 · 2 comments
Assignees

Comments

@anildhingra
Copy link

Is this a BUG REPORT or FEATURE REQUEST?:
BUG REPORT

Uncomment only one, leave it on its own line:

/kind bug
/kind enhancement

What happened:
if cu has a requirement to run Container & CVN VM under one project with namespace has Service Mesh enabled , datavolume importer-pod should also have it disabled or some logic to check that its an importer pod & will be Terminated once import is complete & no need to inject sidecar , due to sidecar injection it's never deleted post import & stays there
we may have scenario where need to run container & cnv in same namespace

What you expected to happen:
no sidecar proxy o be injected in importer-pod

How to reproduce it (as minimally and precisely as possible):
easily reproducible enable Service Mesh for namespace & (CDI) import vm

Anything else we need to know?:

Environment:

  • CDI version (use kubectl get deployments cdi-deployment -o yaml):
  • Kubernetes version (use kubectl version):

kubectl version

Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.0", GitCommit:"e19964183377d0ec2052d1f1fa930c4d7575bd50", GitTreeState:"clean", BuildDate:"2020-08-26T14:30:33Z", GoVersion:"go1.15", Compiler:"gc", Platform:"linux/amd64"}

  • Cloud provider or hardware configuration:
  • Install tools:
  • Others:

**Normal process without Service mesh enabled **

[root@kind-cent contrib]# kubectl get pod
NAME READY STATUS RESTARTS AGE
importer-alpine-dv 0/1 Pending 0 12s

** imports & auto terminate after that **

[root@kind-cent contrib]# kubectl get pod
No resources found in default namespace

**if SM is enable in namespace **

[root@kind-cent contrib]# oc create -f datavol-pvc.yaml
virtualmachine.kubevirt.io/vm-alpine-datavolume created
[root@kind-cent contrib]# kubectl get pod
NAME READY STATUS RESTARTS AGE
importer-alpine-dv 0/2 Init:0/1 0 4s

[root@kind-cent contrib]# kubectl get pod
NAME READY STATUS RESTARTS AGE
importer-alpine-dv 1/2 NotReady 1 2m48s
[root@kind-cent contrib]# oc describe pod importer-alpine-dv
..
..
Containers:
importer:
Container ID: containerd://25d60cebf7237d4988865489597d015fdb24cbbe03c02700372967a2b7c14070
Image: kubevirt/cdi-importer:v1.18.3
Image ID: docker.io/kubevirt/cdi-importer@sha256:8746b2d3e8bcf881e0b43e897b9b07585c24d7f85d21841904364a2672721f08
Port: 8443/TCP
Host Port: 0/TCP
Args:
-v=1
State: Terminated
Reason: Completed
Message: Import Complete

..
istio-proxy:
Container ID: containerd://e80c0743de739d34b84a3c3009fc4aa59ab94cd8dadc84aa9651c566a0cbf144
Image: docker.io/istio/proxyv2:1.7.3
Image ID: docker.io/istio/proxyv2@sha256:6169d096fe60f128f1311f76c97ee1c3e5d760a45042d5c9182492745d34c658
Port: 15090/TCP
Host Port: 0/TCP
Args:
proxy
sidecar
--domain
$(POD_NAMESPACE).svc.cluster.local
--serviceCluster
containerized-data-importer.$(POD_NAMESPACE)
--proxyLogLevel=warning
--proxyComponentLogLevel=misc:error
--trust-domain=cluster.local
--concurrency
2
State: Running
Started: Mon, 19 Oct 2020 11:53:10 -0400
Ready: True
Restart Count: 0

sample vm template but its same with all

[root@kind-cent contrib]# cat datavol-pvc.yaml
apiVersion: kubevirt.io/v1alpha3
kind: VirtualMachine
metadata:
labels:
kubevirt.io/vm: vm-alpine-datavolume
name: vm-alpine-datavolume
spec:
running: false
template:
metadata:
labels:
kubevirt.io/vm: vm-alpine-datavolume
spec:
domain:
devices:
disks:
- disk:
bus: virtio
name: datavolumedisk1
resources:
requests:
memory: 64M
volumes:
- dataVolume:
name: alpine-dv
name: datavolumedisk1
dataVolumeTemplates:

@arnongilboa arnongilboa self-assigned this Dec 13, 2020
@arnongilboa
Copy link
Collaborator

This PR added in v1.27.0 the ability to pass specific annotations (defined in the DV or PVC) to the transfer Pods. The one relevant annotation here is: sidecar.istio.io/inject: "false".

@anildhingra
Copy link
Author

fixed in bugzilla 1883232

another issue related to Importer pod became CrashLoopBackOff if without define sidecar.istio.io/inject: "false" is tracked in below bugzilla

https://bugzilla.redhat.com/show_bug.cgi?id=1914833

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

2 participants