Reputation: 41
I am using istio sidecar auto injection , I have grpc transcrpter Envoy Fliter which need a file which is mounted on shared drive on azure.But side car is not able to mount that directory because I have mounting configuration in my pod.
apiVersion: networking.istio.io/v1alpha3 kind: EnvoyFilter metadata: name: {{ .Values.filter.name }} namespace: {{ .Values.namespace }}
spec: workloadLabels: app: {{ .Values.grpc.appname}} filters:
listenerMatch: portNumber: 50051 listenerType: SIDECAR_INBOUND listenerProtocol: HTTP insertPosition: index: FIRST relativeTo: envoy.router filterName: envoy.grpc_json_transcoder filterType: HTTP filterConfig: protoDescriptor: {{ .Values.storage.mount }}/{{ .Values.filter.file }} services: com.demo.DemoService printOptions: alwaysPrintPrimitiveFields: True
in my pod file I have
volumeMounts: - mountPath: {{ .Values.storage.mount}} name: {{ .Values.storage.volume}}
and
volumes: - name: {{ .Values.storage.volume}} azureFile: secretName: {{ .Values.storage.secret}} shareName: {{ .Values.storage.shareName}} readOnly: true
Envoy filter is complains to pick this file because it didn't found path.
To solve this problem I have disabled Auto istio side car injection and used below instruction to add mount. https://istio.io/docs/setup/kubernetes/additional-setup/sidecar-injection/
Upvotes: 2
Views: 1757
Reputation: 6627
I think in your specific case, you can still rely on automatic istio-sidecar-injector, and make use of sidecar.istio.io/userVolume
annotation of Pod to which injection is made. As its name implies, it lets you to configure user defined volumes in sidecar-injector template in JSON format.
You can find an example of its usage here.
Upvotes: 2