Skip to content

Commit

Permalink
[Fleet] Fix version constraint for experimentalDataStreamSettings (#1350
Browse files Browse the repository at this point in the history
)
  • Loading branch information
jillguyonnet authored Jul 11, 2023
1 parent 7ba70d7 commit a699d90
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/stack/_static/kibana.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ xpack.fleet.registryUrl: "https://package-registry:8080"
xpack.fleet.agents.enabled: true
xpack.fleet.agents.fleet_server.hosts: ["https://fleet-server:8220"]

{{ if and (not (semverLessThan $version "8.7.0")) (semverLessThan $version "8.10.0") }}
{{ if and (not (semverLessThan $version "8.7.0")) (semverLessThan $version "8.10.0-SNAPSHOT") }}
xpack.fleet.enableExperimental: ["experimentalDataStreamSettings"] # Enable experimental toggles in Fleet UI
{{ end }}

Expand Down
10 changes: 10 additions & 0 deletions internal/stack/resources_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,13 @@ func TestApplyResourcesWithCustomGeoipDir(t *testing.T) {
expectedVolume := fmt.Sprintf("%s:/usr/share/elasticsearch/config/ingest-geoip", expectedGeoipPath)
assert.Contains(t, volumes, expectedVolume)
}

func TestSemverLessThan(t *testing.T) {
b, err := semverLessThan("8.9.0", "8.10.0-SNAPSHOT")
require.NoError(t, err)
assert.True(t, b)

b, err = semverLessThan("8.10.0-SNAPSHOT", "8.10.0")
require.NoError(t, err)
assert.True(t, b)
}

0 comments on commit a699d90

Please sign in to comment.