diff --git a/apis/fluentd/v1alpha1/plugins/input/types.go b/apis/fluentd/v1alpha1/plugins/input/types.go index 991fcc946..944945aac 100644 --- a/apis/fluentd/v1alpha1/plugins/input/types.go +++ b/apis/fluentd/v1alpha1/plugins/input/types.go @@ -32,7 +32,7 @@ type Input struct { Tail *Tail `json:"tail,omitempty"` // in_sample plugin Sample *Sample `json:"sample,omitempty"` - // Custom plugin type + // Custom plugin type CustomPlugin *custom.CustomPlugin `json:"customPlugin,omitempty"` // monitor_agent plugin MonitorAgent *MonitorAgent `json:"monitorAgent,omitempty"` @@ -90,19 +90,15 @@ func (i *Input) Params(loader plugins.SecretLoader) (*params.PluginStore, error) return i.samplePlugin(ps, loader), nil } -<<<<<<< HEAD if i.CustomPlugin != nil { customPs, _ := i.CustomPlugin.Params(loader) ps.Content = customPs.Content return ps, nil -======= + } + if i.MonitorAgent != nil { ps.InsertType(string(params.MonitorAgentType)) -<<<<<<< HEAD ->>>>>>> 44fcf92 (Add fluentd monitor_agent input plugin.) -======= return i.monitorAgentPlugin(ps, loader), nil ->>>>>>> cc07ec3 (Fix the input plugin.) } return nil, errors.New("you must define an input plugin") diff --git a/apis/fluentd/v1alpha1/tests/helper_test.go b/apis/fluentd/v1alpha1/tests/helper_test.go index 69f08ba33..36dbe18f5 100644 --- a/apis/fluentd/v1alpha1/tests/helper_test.go +++ b/apis/fluentd/v1alpha1/tests/helper_test.go @@ -99,7 +99,7 @@ func Test_ClusterCfgInputMonitorAgent(t *testing.T) { clustercfgRouter, err := psr.BuildCfgRouter(&FluentdConfig1) g.Expect(err).NotTo(HaveOccurred()) clusterOutputs := []fluentdv1alpha1.ClusterOutput{FluentdClusterOutputTag} - clustercfgResources, _ := psr.PatchAndFilterClusterLevelResources(sl, FluentdConfig1.GetCfgId(), []fluentdv1alpha1.ClusterFilter{}, clusterOutputs) + clustercfgResources, _ := psr.PatchAndFilterClusterLevelResources(sl, FluentdConfig1.GetCfgId(), []fluentdv1alpha1.ClusterInput{}, []fluentdv1alpha1.ClusterFilter{}, clusterOutputs) err = psr.WithCfgResources(*clustercfgRouter.Label, clustercfgResources) g.Expect(err).NotTo(HaveOccurred())