Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Pavol Loffay <[email protected]>
  • Loading branch information
pavolloffay committed Feb 20, 2019
1 parent 32241f2 commit 31c5817
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
9 changes: 3 additions & 6 deletions pkg/storage/elasticsearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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,
Expand All @@ -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"},
Expand Down
3 changes: 2 additions & 1 deletion pkg/storage/elasticsearch/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions pkg/storage/elasticsearch/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 31c5817

Please sign in to comment.