Skip to content

Commit 9bfee88

Browse files
committed
remove all usage of apache-http gate
1 parent c316b56 commit 9bfee88

File tree

3 files changed

+8
-27
lines changed

3 files changed

+8
-27
lines changed

pkg/instrumentation/podmutator_test.go

+2-14
Original file line numberDiff line numberDiff line change
@@ -2751,13 +2751,7 @@ func TestMutatePod(t *testing.T) {
27512751
},
27522752
},
27532753
},
2754-
setFeatureGates: func(t *testing.T) {
2755-
originalVal := featuregate.EnableApacheHTTPAutoInstrumentationSupport.IsEnabled()
2756-
require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableApacheHTTPAutoInstrumentationSupport.ID(), true))
2757-
t.Cleanup(func() {
2758-
require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableApacheHTTPAutoInstrumentationSupport.ID(), originalVal))
2759-
})
2760-
},
2754+
config: config.New(config.WithEnableApacheHTTPInstrumentation(true)),
27612755
},
27622756
{
27632757
name: "apache httpd injection feature gate disabled",
@@ -2832,13 +2826,7 @@ func TestMutatePod(t *testing.T) {
28322826
},
28332827
},
28342828
},
2835-
setFeatureGates: func(t *testing.T) {
2836-
originalVal := featuregate.EnableApacheHTTPAutoInstrumentationSupport.IsEnabled()
2837-
require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableApacheHTTPAutoInstrumentationSupport.ID(), false))
2838-
t.Cleanup(func() {
2839-
require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableApacheHTTPAutoInstrumentationSupport.ID(), originalVal))
2840-
})
2841-
},
2829+
config: config.New(config.WithEnableApacheHTTPInstrumentation(false)),
28422830
},
28432831

28442832
{

pkg/instrumentation/upgrade/upgrade.go

+6-7
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,12 @@ import (
3333

3434
var (
3535
defaultAnnotationToGate = map[string]*featuregate2.Gate{
36-
constants.AnnotationDefaultAutoInstrumentationJava: featuregate.EnableJavaAutoInstrumentationSupport,
37-
constants.AnnotationDefaultAutoInstrumentationNodeJS: featuregate.EnableNodeJSAutoInstrumentationSupport,
38-
constants.AnnotationDefaultAutoInstrumentationPython: featuregate.EnablePythonAutoInstrumentationSupport,
39-
constants.AnnotationDefaultAutoInstrumentationDotNet: featuregate.EnableDotnetAutoInstrumentationSupport,
40-
constants.AnnotationDefaultAutoInstrumentationGo: featuregate.EnableGoAutoInstrumentationSupport,
41-
constants.AnnotationDefaultAutoInstrumentationApacheHttpd: featuregate.EnableApacheHTTPAutoInstrumentationSupport,
42-
constants.AnnotationDefaultAutoInstrumentationNginx: featuregate.EnableNginxAutoInstrumentationSupport,
36+
constants.AnnotationDefaultAutoInstrumentationJava: featuregate.EnableJavaAutoInstrumentationSupport,
37+
constants.AnnotationDefaultAutoInstrumentationNodeJS: featuregate.EnableNodeJSAutoInstrumentationSupport,
38+
constants.AnnotationDefaultAutoInstrumentationPython: featuregate.EnablePythonAutoInstrumentationSupport,
39+
constants.AnnotationDefaultAutoInstrumentationDotNet: featuregate.EnableDotnetAutoInstrumentationSupport,
40+
constants.AnnotationDefaultAutoInstrumentationGo: featuregate.EnableGoAutoInstrumentationSupport,
41+
constants.AnnotationDefaultAutoInstrumentationNginx: featuregate.EnableNginxAutoInstrumentationSupport,
4342
}
4443
)
4544

pkg/instrumentation/upgrade/upgrade_test.go

-6
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,6 @@ func TestUpgrade(t *testing.T) {
4141
require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableGoAutoInstrumentationSupport.ID(), originalVal))
4242
})
4343

44-
originalVal = featuregate.EnableApacheHTTPAutoInstrumentationSupport.IsEnabled()
45-
require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableApacheHTTPAutoInstrumentationSupport.ID(), true))
46-
t.Cleanup(func() {
47-
require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableApacheHTTPAutoInstrumentationSupport.ID(), originalVal))
48-
})
49-
5044
originalVal = featuregate.EnableNginxAutoInstrumentationSupport.IsEnabled()
5145
require.NoError(t, colfeaturegate.GlobalRegistry().Set(featuregate.EnableNginxAutoInstrumentationSupport.ID(), true))
5246
t.Cleanup(func() {

0 commit comments

Comments
 (0)