Daniel Nephin
862d9b9d43
Merge pull request #10047 from hashicorp/dnephin/config-entry-validate
...
state: reduce arguments to validateProposedConfigEntryInServiceGraph
2021-05-06 18:11:52 +00:00
Freddy
c652580b5b
Rename "cluster" config entry to "mesh" ( #10127 )
...
This config entry is being renamed primarily because in k8s the name
cluster could be confusing given that the config entry applies across
federated datacenters.
Additionally, this config entry will only apply to Consul as a service
mesh, so the more generic "cluster" name is not needed.
2021-04-28 22:14:03 +00:00
freddygv
f7094f91c7
Avoid returning a nil slice
2021-04-14 10:52:05 -06:00
freddygv
8e74eaa684
Update viz endpoint to include topology from intentions
2021-04-14 10:20:15 -06:00
freddygv
932fbddd27
Augment intention decision summary with DefaultAllow mode
2021-04-12 19:32:09 -06:00
Daniel Nephin
34f1facebb
Merge pull request #9950 from hashicorp/dnephin/state-use-txn-everywhere
...
state: use Txn interface everywhere
2021-04-08 12:02:03 -04:00
Daniel Nephin
c40e1a2ac6
Merge pull request #9880 from hashicorp/dnephin/catalog-events-test-pattern
...
state: use runCase pattern for large test
2021-04-08 11:54:41 -04:00
R.B. Boyer
499fee73b3
connect: add toggle to globally disable wildcard outbound network access when transparent proxy is enabled ( #9973 )
...
This adds a new config entry kind "cluster" with a single special name "cluster" where this can be controlled.
2021-04-06 13:19:59 -05:00
Daniel Nephin
6e69829edb
state: support additional test cases in indexer tests
...
And add a few additional cases.
2021-03-31 14:39:33 -04:00
Kyle Havlovitz
a2869b280b
Backport enterprise changes to prevent merge conflicts
...
Co-Authored-By: Kyle Havlovitz <kylehav@gmail.com>
2021-03-31 14:05:26 -04:00
Daniel Nephin
1f64b3a7de
state: use tableIndex constant
2021-03-29 18:52:20 -04:00
Daniel Nephin
9514698b10
state: use ReadTxn and WriteTxn interface
...
Instead of *txn, so that we can replace the txn implementation with others, and so
that the function is easily documented as a read or write function.
2021-03-29 18:52:16 -04:00
Daniel Nephin
d0e5cd66f0
state: convert checks.service index to new pattern
2021-03-29 16:38:53 -04:00
Daniel Nephin
3092c627fe
state: convert checks.status indexer
...
As part of this change the indexer will now be case insensitive by using
the lower case value. This should be safe because previously we always
had lower case strings.
This change was made out of convenience. All the other indexers use
lowercase, so we can re-use the indexFromQuery function by using
lowercase here as well.
2021-03-29 16:38:50 -04:00
Daniel Nephin
628eed3748
state: add tests for checks indexers
2021-03-29 16:38:47 -04:00
Daniel Nephin
ce631d0bba
state: use constants for table checks
2021-03-29 16:38:43 -04:00
Daniel Nephin
cf2646e0d1
state: pass Query in from caller
...
To reduce the number of arguments
2021-03-29 15:42:30 -04:00
Daniel Nephin
9eea19da59
state: convert services.kind to functional indexer pattern
2021-03-29 15:42:30 -04:00
Daniel Nephin
b6553af222
state: add tests for services.kind indexer
2021-03-29 15:42:27 -04:00
Daniel Nephin
0c61abcc31
state: convert services table service and connect indexer
...
To the new functional indexer pattern
2021-03-29 15:42:24 -04:00
Daniel Nephin
395ebce510
state: add tests for services table service and connect indexers
2021-03-29 15:42:22 -04:00
Daniel Nephin
2d2c3e1190
state: use constant for tableServices
2021-03-29 15:42:18 -04:00
Daniel Nephin
341265ec69
state: remove duplication of Query indexer
2021-03-29 14:35:11 -04:00
Daniel Nephin
08ee12ab34
state: remove duplication in acl tables schema
2021-03-29 14:21:27 -04:00
Daniel Nephin
72960388a3
state: reduce duplication in catalog table schema
2021-03-29 14:21:23 -04:00
Daniel Nephin
7de186f291
state: share more indexer functions for config_entries
2021-03-29 14:21:20 -04:00
Daniel Nephin
024dcbef03
state: remove old schema test
...
This test has been replaced by TestNewDBSchema_Indexers
2021-03-29 14:21:13 -04:00
Daniel Nephin
8591feb58a
state: use addNamespaceIndex again
2021-03-29 14:21:02 -04:00
Daniel Nephin
ac210cdc48
Merge pull request #9911 from hashicorp/dnephin/state-index-acl-roles
...
state: convert ACLRoles policies index to new functional indexer pattern
2021-03-24 18:28:19 -04:00
Daniel Nephin
8743e925d5
state: add tests for checks.ID indexer
2021-03-22 18:06:43 -04:00
Daniel Nephin
30281a5332
state: use tx.First instead of tx.FirstWatch
...
Where appropriate. After removing the helper function a bunch of these calls can
be changed to tx.First.
2021-03-22 18:06:33 -04:00
Daniel Nephin
1cdcfb8260
state: convert checks.ID index to new pattern
2021-03-22 18:06:08 -04:00
Daniel Nephin
6324f37241
state: use uuid for acl-roles.policies index
...
Previously we were encoding the UUID as a string, but the index it references uses a UUID
so this index can also use an encoded UUID to save a bit of memory.
2021-03-19 19:45:37 -04:00
Daniel Nephin
43df402e51
state: convert acl-roles.policies index to new pattern
2021-03-19 19:45:37 -04:00
Daniel Nephin
00b6f0b41a
state: convert acl-roles.name index to the functional indexer pattern
2021-03-19 19:45:37 -04:00
Daniel Nephin
d7f5094702
state: add indexer tests for acl-roles table
2021-03-19 19:45:37 -04:00
Daniel Nephin
a058c31ead
state: use constants for acl-roles table and indexes
2021-03-19 19:45:37 -04:00
Daniel Nephin
eb6769ccc6
state: convert acl-policies table to new pattern
2021-03-19 15:24:00 -04:00
Daniel Nephin
340462dd72
state: use constants and add tests for acl-policies table
2021-03-19 15:19:57 -04:00
Daniel Nephin
0c14f3818d
state: add indexer test for services.ID index
2021-03-19 14:13:14 -04:00
Daniel Nephin
dbd3cef1ed
state: handle wildcard for services.ID index
...
When listing services, use the id_prefix directly if wildcards are allowed.
Error if a wildcard is used for a query that does not index the wildcard
2021-03-19 14:12:19 -04:00
Daniel Nephin
627c469f08
state: fix prefix index with the new pattern
...
Prefix queries are generally being used to match part of a partial
index. We can support these indexes by using a function that accept
different types for each subset of the index.
What I found interesting is that in the generic StringFieldIndexer the
implementation for PrefixFromArgs would remove the trailing null, but
at least in these 2 cases we actually want a null terminated string.
We simply want fewer components in the string.
2021-03-19 14:12:17 -04:00
Daniel Nephin
d90845f26d
state: move services.ID to new pattern
2021-03-19 14:11:59 -04:00
Daniel Nephin
4d1d19ed46
state: add tests for gateway-service table indexers
2021-03-18 12:09:42 -04:00
Daniel Nephin
11b4de719c
state: use constants and remove wrapping
...
for GatewayServices table
2021-03-18 12:08:59 -04:00
Daniel Nephin
d879fe581d
state: Move UpstreamDownstream to state package
2021-03-18 12:08:59 -04:00
Daniel Nephin
65f5b99247
state: add tests for mesh-topology table indexers
2021-03-18 12:08:57 -04:00
Daniel Nephin
c749c6c927
state: use constants for mesh-topology table operations
2021-03-18 12:08:03 -04:00
Freddy
0bab999fe4
Merge pull request #9899 from hashicorp/wildcard-ixn-oss
...
Add methods to check intention has wildcard src or dst
2021-03-18 08:33:07 -06:00
freddygv
9713e3ba38
Add methods to check intention has wildcard src or dst
2021-03-17 22:15:48 -06:00