You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we mount a volume into the main container of our Apache/Nginx pod that contains the substring of Apache/Nginx config path, the it gets removed from the container.
Our case was where we got Nginx configuration in /etc/nginx/nginx.conf, and the file contains an include of configuration files located in /opt/app-root/etc/nginx/conf.d/*.conf. We mount additional configuration files as configMap here, for permissions issues (we are using RH S2I images). Our config maps volumes got removed from the container.
The first step of the injection of apache/nginx library are to copy volume from main container into the 'clone' initContainer. Then, it removes the volumeMounts that contains the Nginx/apache config path, in case the configuration directory was provided by a volume, since the directory will be remounted by the operator. But, after looking at the operator's code, the check on volumeMounts is based on a strings.Contains, I guess one should use something like startsWith.
Component(s)
auto-instrumentation
What happened?
Description
If we mount a volume into the main container of our Apache/Nginx pod that contains the substring of Apache/Nginx config path, the it gets removed from the container.
Our case was where we got Nginx configuration in /etc/nginx/nginx.conf, and the file contains an include of configuration files located in /opt/app-root/etc/nginx/conf.d/*.conf. We mount additional configuration files as configMap here, for permissions issues (we are using RH S2I images). Our config maps volumes got removed from the container.
The first step of the injection of apache/nginx library are to copy volume from main container into the 'clone' initContainer. Then, it removes the volumeMounts that contains the Nginx/apache config path, in case the configuration directory was provided by a volume, since the directory will be remounted by the operator. But, after looking at the operator's code, the check on volumeMounts is based on a strings.Contains, I guess one should use something like startsWith.
https://github.com/open-telemetry/opentelemetry-operator/blob/main/pkg/instrumentation/nginx.go#L132
https://github.com/open-telemetry/opentelemetry-operator/blob/main/pkg/instrumentation/apachehttpd.go#L111
Steps to Reproduce
Expected Result
VolumesMounts with mount points not located under nginx config path should remain present in the manifest.
Actual Result
Additional volumeMounts got removed
Kubernetes Version
1.27
Operator version
0.93.0
Collector version
opentelemetry-collector-contrib:0.93.0
Environment information
Environment
Openshift 4.14
Log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: