diff --git a/pkg/storage/elasticsearch.go b/pkg/storage/elasticsearch.go index ee5ad0f9b..40d4113ee 100644 --- a/pkg/storage/elasticsearch.go +++ b/pkg/storage/elasticsearch.go @@ -28,10 +28,7 @@ func ShouldDeployElasticsearch(s v1alpha1.JaegerStorageSpec) bool { return false } _, ok := s.Options.Map()["es.server-urls"] - if ok { - return false - } - return true + return !ok } type ElasticsearchDeployment struct { @@ -49,7 +46,7 @@ func (ed *ElasticsearchDeployment) InjectStorageConfiguration(p *v1.PodSpec) { }) // we assume jaeger containers are first if len(p.Containers) > 0 { - // TODO archive storage if it is enabled? + // TODO add to archive storage if it is enabled? p.Containers[0].Args = append(p.Containers[0].Args, "--es.server-urls="+elasticsearchUrl, "--es.token-file="+k8sTokenFile, @@ -73,7 +70,7 @@ func (ed *ElasticsearchDeployment) InjectIndexCleanerConfiguration(p *v1.PodSpec }) // we assume jaeger containers are first if len(p.Containers) > 0 { - // the size of arguments arr should be always 2 + // the size of arguments array should be always 2 p.Containers[0].Args[1] = elasticsearchUrl p.Containers[0].Env = append(p.Containers[0].Env, v1.EnvVar{Name: "ES_TLS", Value: "true"}, diff --git a/pkg/storage/elasticsearch/v1alpha1/types.go b/pkg/storage/elasticsearch/v1alpha1/types.go index f7cbf0ace..b8fb683fd 100644 --- a/pkg/storage/elasticsearch/v1alpha1/types.go +++ b/pkg/storage/elasticsearch/v1alpha1/types.go @@ -8,7 +8,8 @@ import ( // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// TODO temporal fix https://github.com/jaegertracing/jaeger-operator/issues/206 +// TODO remove this file, it's temporary copied from es-operator due to old SDK dependency +// https://github.com/jaegertracing/jaeger-operator/issues/206 const ( ServiceAccountName string = "elasticsearch" diff --git a/pkg/storage/elasticsearch/v1alpha1/zz_generated.deepcopy.go b/pkg/storage/elasticsearch/v1alpha1/zz_generated.deepcopy.go index 25bf90c38..8c0975034 100644 --- a/pkg/storage/elasticsearch/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/storage/elasticsearch/v1alpha1/zz_generated.deepcopy.go @@ -8,6 +8,9 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// TODO remove this file, it's temporary copied from es-operator due to old SDK dependency +// https://github.com/jaegertracing/jaeger-operator/issues/206 + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClusterCondition) DeepCopyInto(out *ClusterCondition) { *out = *in