Skip to content

Commit

Permalink
Preparing relase 1.20.0 (jaegertracing#1223)
Browse files Browse the repository at this point in the history
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
  • Loading branch information
jpkrohling authored Sep 30, 2020
1 parent f5efe2a commit 7d7d6ab
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 2 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
Changes by Version
==================

1.20.0 (unreleased)
1.20.0 (2020-09-30)
-------------------

* Added configuration for the agent's securityContext ([#1190](https://github.com/jaegertracing/jaeger-operator/pull/1190), [@chgl](https://github.com/chgl))
* Completely replace the sidecar on each reconciliation, call patch instead of update. ([#1212](https://github.com/jaegertracing/jaeger-operator/pull/1212), [@rubenvp8510](https://github.com/rubenvp8510))
* Remove sidecars of annotated namespaces when annotation is deleted ([#1209](https://github.com/jaegertracing/jaeger-operator/pull/1209), [@rubenvp8510](https://github.com/rubenvp8510))
* Create service accounts before storage dependencies/init schemas ([#1196](https://github.com/jaegertracing/jaeger-operator/pull/1196), [@pavolloffay](https://github.com/pavolloffay))
* Added 'w3c' to the injected JAEGER_PROPAGATION env var ([#1192](https://github.com/jaegertracing/jaeger-operator/pull/1192), [@chgl](https://github.com/chgl))
* Create daemonsets after services and deployments. ([#1176](https://github.com/jaegertracing/jaeger-operator/pull/1176), [@jpkrohling](https://github.com/jpkrohling))
* Add consolelink permissions to cluster role ([#1177](https://github.com/jaegertracing/jaeger-operator/pull/1177), [@rubenvp8510](https://github.com/rubenvp8510))

1.19.0 (2020-08-27)
-------------------

Expand Down
20 changes: 20 additions & 0 deletions pkg/upgrade/v1_20_0.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package upgrade

import (
"context"

v1 "github.com/jaegertracing/jaeger-operator/pkg/apis/jaegertracing/v1"
"sigs.k8s.io/controller-runtime/pkg/client"
)

func upgrade1_20_0(ctx context.Context, client client.Client, jaeger v1.Jaeger) (v1.Jaeger, error) {
d := []deprecationFlagMap{{
from: "es.max-num-spans",
to: "es.max-doc-count",
}, {
from: "es-archive.max-num-spans",
to: "es-archive.max-doc-count",
}}

return migrateAllDeprecatedOptions(jaeger, d), nil
}
47 changes: 47 additions & 0 deletions pkg/upgrade/v1_20_0_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package upgrade

import (
"context"
"testing"

v1 "github.com/jaegertracing/jaeger-operator/pkg/apis/jaegertracing/v1"
"github.com/stretchr/testify/assert"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/kubernetes/scheme"
"sigs.k8s.io/controller-runtime/pkg/client/fake"
)

func TestUpgradeDeprecatedOptionsv1_20_0NonConflicting(t *testing.T) {
latestVersion := "1.20.0"
nsn := types.NamespacedName{Name: "my-instance"}
existing := v1.NewJaeger(nsn)
existing.Status.Version = "1.19.0"
existing.Spec.Collector.Options = v1.NewOptions(map[string]interface{}{
"es.max-num-spans": "100",
"es-archive.max-num-spans": "101",
})
objs := []runtime.Object{existing}

s := scheme.Scheme
s.AddKnownTypes(v1.SchemeGroupVersion, &v1.Jaeger{})
s.AddKnownTypes(v1.SchemeGroupVersion, &v1.JaegerList{})
cl := fake.NewFakeClient(objs...)

// test
assert.NoError(t, ManagedInstances(context.Background(), cl, cl, latestVersion))

// verify
persisted := &v1.Jaeger{}
assert.NoError(t, cl.Get(context.Background(), nsn, persisted))
assert.Equal(t, latestVersion, persisted.Status.Version)

opts := persisted.Spec.Collector.Options.Map()
assert.Contains(t, opts, "es.max-doc-count")
assert.Equal(t, "100", opts["es.max-doc-count"])
assert.NotContains(t, opts, "es.max-num-spans")

assert.Contains(t, opts, "es-archive.max-doc-count")
assert.Equal(t, "101", opts["es-archive.max-doc-count"])
assert.NotContains(t, opts, "es-archive.max-num-spans")
}
1 change: 1 addition & 0 deletions pkg/upgrade/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ var (
"1.15.0": upgrade1_15_0,
"1.17.0": upgrade1_17_0,
"1.18.0": upgrade1_18_0,
"1.20.0": upgrade1_20_0,
}
)
2 changes: 1 addition & 1 deletion versions.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The Jaeger version to use by default. This is updated manually. Make sure to update the changelog
# and add an upgrade procedure (pkg/upgrade) for the new version.
jaeger=1.19.2
jaeger=1.20.0

# DO NOT EDIT the next value, it is updated automatically during the release.
# Represents the current (latest) release of the Jaeger Operator.
Expand Down

0 comments on commit 7d7d6ab

Please sign in to comment.