Skip to content

Commit

Permalink
update changelog based on changes made to 1.2.x (#2348)
Browse files Browse the repository at this point in the history
* update changelog based on changes made to 1.2.x

* fixed test cases
- enterprise cases were in the OSS test cases
  • Loading branch information
wilkermichael authored Jun 13, 2023
1 parent 80b1f52 commit e691f46
Show file tree
Hide file tree
Showing 10 changed files with 337 additions and 327 deletions.
11 changes: 0 additions & 11 deletions .changelog/1975.txt

This file was deleted.

3 changes: 0 additions & 3 deletions .changelog/1976.txt

This file was deleted.

3 changes: 3 additions & 0 deletions .changelog/2048.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
helm: add samenessGroup CRD
```
3 changes: 3 additions & 0 deletions .changelog/2075.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
helm: add samenessGroup field to exported services CRD
```
3 changes: 3 additions & 0 deletions .changelog/2086.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
helm: add samenessGroup field to service resolver CRD
```
3 changes: 3 additions & 0 deletions .changelog/2097.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
helm: add samenessGroup field to source intention CRD
```
9 changes: 9 additions & 0 deletions .changelog/2102.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,12 @@ Also, `golang.org/x/net` has been updated to v0.7.0 to resolve CVEs [CVE-2022-41
](https://github.com/advisories/GHSA-vvpx-j8f3-3w6h
.)
```

```release-note:improvement
cli: update minimum go version for project to 1.20.
```

```release-note:improvement
control-plane: update minimum go version for project to 1.20.
```

3 changes: 3 additions & 0 deletions .changelog/2165.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
control-plane: add FIPS support
```
313 changes: 313 additions & 0 deletions control-plane/controllers/configentry_controller_ent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,119 @@ func TestConfigEntryController_createsEntConfigEntry(t *testing.T) {
require.Equal(t, "", resource.Members[0].Partition)
},
},
{
kubeKind: "ControlPlaneRequestLimit",
consulKind: capi.RateLimitIPConfig,
configEntryResource: &v1alpha1.ControlPlaneRequestLimit{
ObjectMeta: metav1.ObjectMeta{
Name: "foo",
Namespace: kubeNS,
},
Spec: v1alpha1.ControlPlaneRequestLimitSpec{
Mode: "permissive",
ReadWriteRatesConfig: v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
ACL: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
Catalog: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
ConfigEntry: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
ConnectCA: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
Coordinate: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
DiscoveryChain: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
Health: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
Intention: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
KV: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
Tenancy: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
PreparedQuery: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
Session: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
Txn: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
},
},
reconciler: func(client client.Client, cfg *consul.Config, watcher consul.ServerConnectionManager, logger logr.Logger) testReconciler {
return &ControlPlaneRequestLimitController{
Client: client,
Log: logger,
ConfigEntryController: &ConfigEntryController{
ConsulClientConfig: cfg,
ConsulServerConnMgr: watcher,
DatacenterName: datacenterName,
},
}
},
compare: func(t *testing.T, consulEntry capi.ConfigEntry) {
resource, ok := consulEntry.(*capi.RateLimitIPConfigEntry)
require.True(t, ok, "cast error")
require.Equal(t, "permissive", resource.Mode)
require.Equal(t, 100.0, resource.ReadRate)
require.Equal(t, 100.0, resource.WriteRate)
require.Equal(t, 100.0, resource.ACL.ReadRate)
require.Equal(t, 100.0, resource.ACL.WriteRate)
require.Equal(t, 100.0, resource.Catalog.ReadRate)
require.Equal(t, 100.0, resource.Catalog.WriteRate)
require.Equal(t, 100.0, resource.ConfigEntry.ReadRate)
require.Equal(t, 100.0, resource.ConfigEntry.WriteRate)
require.Equal(t, 100.0, resource.ConnectCA.ReadRate)
require.Equal(t, 100.0, resource.ConnectCA.WriteRate)
require.Equal(t, 100.0, resource.Coordinate.ReadRate)
require.Equal(t, 100.0, resource.Coordinate.WriteRate)
require.Equal(t, 100.0, resource.DiscoveryChain.ReadRate)
require.Equal(t, 100.0, resource.DiscoveryChain.WriteRate)
require.Equal(t, 100.0, resource.Health.ReadRate)
require.Equal(t, 100.0, resource.Health.WriteRate)
require.Equal(t, 100.0, resource.Intention.ReadRate)
require.Equal(t, 100.0, resource.Intention.WriteRate)
require.Equal(t, 100.0, resource.KV.ReadRate)
require.Equal(t, 100.0, resource.KV.WriteRate)
require.Equal(t, 100.0, resource.Tenancy.ReadRate)
require.Equal(t, 100.0, resource.Tenancy.WriteRate)
require.Equal(t, 100.0, resource.PreparedQuery.ReadRate)
require.Equal(t, 100.0, resource.PreparedQuery.WriteRate)
require.Equal(t, 100.0, resource.Session.ReadRate)
require.Equal(t, 100.0, resource.Session.WriteRate)
require.Equal(t, 100.0, resource.Txn.ReadRate)
require.Equal(t, 100.0, resource.Txn.WriteRate, 100.0)
},
},
}

for _, c := range cases {
Expand Down Expand Up @@ -191,6 +304,123 @@ func TestConfigEntryController_updatesEntConfigEntry(t *testing.T) {
require.Equal(t, "", resource.Members[0].Partition)
},
},
{
kubeKind: "ControlPlaneRequestLimit",
consulKind: capi.RateLimitIPConfig,
configEntryResource: &v1alpha1.ControlPlaneRequestLimit{
ObjectMeta: metav1.ObjectMeta{
Name: "foo",
Namespace: kubeNS,
},
Spec: v1alpha1.ControlPlaneRequestLimitSpec{
Mode: "permissive",
ReadWriteRatesConfig: v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
ACL: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
Catalog: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
ConfigEntry: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
ConnectCA: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
Coordinate: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
DiscoveryChain: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
Health: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
Intention: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
KV: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
Tenancy: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
PreparedQuery: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
Session: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
Txn: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
},
},
reconciler: func(client client.Client, cfg *consul.Config, watcher consul.ServerConnectionManager, logger logr.Logger) testReconciler {
return &ControlPlaneRequestLimitController{
Client: client,
Log: logger,
ConfigEntryController: &ConfigEntryController{
ConsulClientConfig: cfg,
ConsulServerConnMgr: watcher,
DatacenterName: datacenterName,
},
}
},
updateF: func(resource common.ConfigEntryResource) {
ipRateLimit := resource.(*v1alpha1.ControlPlaneRequestLimit)
ipRateLimit.Spec.Mode = "enforcing"
},
compare: func(t *testing.T, consulEntry capi.ConfigEntry) {
resource, ok := consulEntry.(*capi.RateLimitIPConfigEntry)
require.True(t, ok, "cast error")
require.Equal(t, "enforcing", resource.Mode)
require.Equal(t, 100.0, resource.ReadRate)
require.Equal(t, 100.0, resource.WriteRate)
require.Equal(t, 100.0, resource.ACL.ReadRate)
require.Equal(t, 100.0, resource.ACL.WriteRate)
require.Equal(t, 100.0, resource.Catalog.ReadRate)
require.Equal(t, 100.0, resource.Catalog.WriteRate)
require.Equal(t, 100.0, resource.ConfigEntry.ReadRate)
require.Equal(t, 100.0, resource.ConfigEntry.WriteRate)
require.Equal(t, 100.0, resource.ConnectCA.ReadRate)
require.Equal(t, 100.0, resource.ConnectCA.WriteRate)
require.Equal(t, 100.0, resource.Coordinate.ReadRate)
require.Equal(t, 100.0, resource.Coordinate.WriteRate)
require.Equal(t, 100.0, resource.DiscoveryChain.ReadRate)
require.Equal(t, 100.0, resource.DiscoveryChain.WriteRate)
require.Equal(t, 100.0, resource.Health.ReadRate)
require.Equal(t, 100.0, resource.Health.WriteRate)
require.Equal(t, 100.0, resource.Intention.ReadRate)
require.Equal(t, 100.0, resource.Intention.WriteRate)
require.Equal(t, 100.0, resource.KV.ReadRate)
require.Equal(t, 100.0, resource.KV.WriteRate)
require.Equal(t, 100.0, resource.Tenancy.ReadRate)
require.Equal(t, 100.0, resource.Tenancy.WriteRate)
require.Equal(t, 100.0, resource.PreparedQuery.ReadRate)
require.Equal(t, 100.0, resource.PreparedQuery.WriteRate)
require.Equal(t, 100.0, resource.Session.ReadRate)
require.Equal(t, 100.0, resource.Session.WriteRate)
require.Equal(t, 100.0, resource.Txn.ReadRate)
require.Equal(t, 100.0, resource.Txn.WriteRate)
},
},
}

for _, c := range cases {
Expand Down Expand Up @@ -296,6 +526,89 @@ func TestConfigEntryController_deletesEntConfigEntry(t *testing.T) {
}
},
},
{

kubeKind: "ControlPlaneRequestLimit",
consulKind: capi.RateLimitIPConfig,
configEntryResourceWithDeletion: &v1alpha1.ControlPlaneRequestLimit{
ObjectMeta: metav1.ObjectMeta{
Name: "foo",
Namespace: kubeNS,
DeletionTimestamp: &metav1.Time{Time: time.Now()},
Finalizers: []string{FinalizerName},
},
Spec: v1alpha1.ControlPlaneRequestLimitSpec{
Mode: "permissive",
ReadWriteRatesConfig: v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
ACL: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
Catalog: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
ConfigEntry: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
ConnectCA: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
Coordinate: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
DiscoveryChain: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
Health: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
Intention: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
KV: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
Tenancy: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
PreparedQuery: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
Session: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
Txn: &v1alpha1.ReadWriteRatesConfig{
ReadRate: 100.0,
WriteRate: 100.0,
},
},
},
reconciler: func(client client.Client, cfg *consul.Config, watcher consul.ServerConnectionManager, logger logr.Logger) testReconciler {
return &ControlPlaneRequestLimitController{
Client: client,
Log: logger,
ConfigEntryController: &ConfigEntryController{
ConsulClientConfig: cfg,
ConsulServerConnMgr: watcher,
DatacenterName: datacenterName,
},
}
},
},
}

for _, c := range cases {
Expand Down
Loading

0 comments on commit e691f46

Please sign in to comment.