Skip to content

Commit

Permalink
Fix pointers
Browse files Browse the repository at this point in the history
Signed-off-by: Pavol Loffay <[email protected]>
  • Loading branch information
pavolloffay committed Jan 9, 2020
1 parent 5a568b9 commit 5b6f615
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions pkg/strategy/production.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func newProductionStrategy(ctx context.Context, jaeger *v1.Jaeger, es *storage.E
for i := range esRollover {
jobs = append(jobs, &esRollover[i].Spec.JobTemplate.Spec.Template.Spec)
}
autoProvisionElasticsearch(&c, es, jobs, []appsv1.Deployment{*queryDep, *cDep})
autoProvisionElasticsearch(&c, es, jobs, []*appsv1.Deployment{queryDep, cDep})
}

// the index cleaner ES job, which may have been changed by the ES self-provisioning routine
Expand All @@ -133,14 +133,14 @@ func newProductionStrategy(ctx context.Context, jaeger *v1.Jaeger, es *storage.E
return c
}

func autoProvisionElasticsearch(manifest *S, es *storage.ElasticsearchDeployment, curatorPods []*corev1.PodSpec, deployments []appsv1.Deployment) {
func autoProvisionElasticsearch(manifest *S, es *storage.ElasticsearchDeployment, curatorPods []*corev1.PodSpec, deployments []*appsv1.Deployment) {
err := es.CreateCerts()
if err != nil {
es.Jaeger.Logger().WithError(err).Error("failed to create Elasticsearch certificates, Elasticsearch won't be deployed")
return
}
for _, d := range deployments {
es.InjectStorageConfiguration(&d.Spec.Template.Spec)
for i := range deployments {
es.InjectStorageConfiguration(&deployments[i].Spec.Template.Spec)
}
for _, pod := range curatorPods {
es.InjectSecretsConfiguration(pod)
Expand Down
4 changes: 2 additions & 2 deletions pkg/strategy/streaming.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ func newStreamingStrategy(ctx context.Context, jaeger *v1.Jaeger, es *storage.El
for i := range esRollover {
jobs = append(jobs, &esRollover[i].Spec.JobTemplate.Spec.Template.Spec)
}
deps := []appsv1.Deployment{*queryDep}
deps := []*appsv1.Deployment{queryDep}
if ingesterDep != nil {
deps = append(deps, *ingesterDep)
deps = append(deps, ingesterDep)
}
autoProvisionElasticsearch(&manifest, es, jobs, deps)
}
Expand Down

0 comments on commit 5b6f615

Please sign in to comment.