R.B. Boyer
82245585c6
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
f0590e7c18
state: support additional test cases in indexer tests
...
And add a few additional cases.
2021-03-31 14:39:33 -04:00
Kyle Havlovitz
3cdd495600
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
d785c86db1
state: convert checks.service index to new pattern
2021-03-29 16:38:53 -04:00
Daniel Nephin
f859ba6d4b
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
9251ac881a
state: add tests for checks indexers
2021-03-29 16:38:47 -04:00
Daniel Nephin
98d6dcbdf8
state: use constants for table checks
2021-03-29 16:38:43 -04:00
Daniel Nephin
bcbdc9cab3
state: pass Query in from caller
...
To reduce the number of arguments
2021-03-29 15:42:30 -04:00
Daniel Nephin
372d274b34
state: convert services.kind to functional indexer pattern
2021-03-29 15:42:30 -04:00
Daniel Nephin
bcde8d2fad
state: add tests for services.kind indexer
2021-03-29 15:42:27 -04:00
Daniel Nephin
9f9eadd569
state: convert services table service and connect indexer
...
To the new functional indexer pattern
2021-03-29 15:42:24 -04:00
Daniel Nephin
11311c1fcc
state: add tests for services table service and connect indexers
2021-03-29 15:42:22 -04:00
Daniel Nephin
9a3daf3100
state: use constant for tableServices
2021-03-29 15:42:18 -04:00
Daniel Nephin
ec04df66bd
state: remove duplication of Query indexer
2021-03-29 14:35:11 -04:00
Daniel Nephin
28866e48ad
state: remove duplication in acl tables schema
2021-03-29 14:21:27 -04:00
Daniel Nephin
c6a1ca701d
state: reduce duplication in catalog table schema
2021-03-29 14:21:23 -04:00
Daniel Nephin
d9dacb8388
state: share more indexer functions for config_entries
2021-03-29 14:21:20 -04:00
Daniel Nephin
f303120f2d
state: remove old schema test
...
This test has been replaced by TestNewDBSchema_Indexers
2021-03-29 14:21:13 -04:00
Daniel Nephin
150decff2a
state: use addNamespaceIndex again
2021-03-29 14:21:02 -04:00
Daniel Nephin
4a3b462c28
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
25b791ba47
state: add tests for checks.ID indexer
2021-03-22 18:06:43 -04:00
Daniel Nephin
abbe5c3701
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
49938bc472
state: convert checks.ID index to new pattern
2021-03-22 18:06:08 -04:00
Daniel Nephin
1d3fe64bba
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
3c01bb1156
state: convert acl-roles.policies index to new pattern
2021-03-19 19:45:37 -04:00
Daniel Nephin
474e95b9f5
state: convert acl-roles.name index to the functional indexer pattern
2021-03-19 19:45:37 -04:00
Daniel Nephin
f836ed256b
state: add indexer tests for acl-roles table
2021-03-19 19:45:37 -04:00
Daniel Nephin
6bc2c0e1ce
state: use constants for acl-roles table and indexes
2021-03-19 19:45:37 -04:00
Daniel Nephin
d4e02024fe
state: convert acl-policies table to new pattern
2021-03-19 15:24:00 -04:00
Daniel Nephin
845a10354e
state: use constants and add tests for acl-policies table
2021-03-19 15:19:57 -04:00
Daniel Nephin
f6533a08f8
state: add indexer test for services.ID index
2021-03-19 14:13:14 -04:00
Daniel Nephin
1d1c03d0cd
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
bae69b2352
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
ec50454fb3
state: move services.ID to new pattern
2021-03-19 14:11:59 -04:00
Daniel Nephin
f5a52a4501
state: add tests for gateway-service table indexers
2021-03-18 12:09:42 -04:00
Daniel Nephin
66632538d8
state: use constants and remove wrapping
...
for GatewayServices table
2021-03-18 12:08:59 -04:00
Daniel Nephin
d77bdd26c5
state: Move UpstreamDownstream to state package
2021-03-18 12:08:59 -04:00
Daniel Nephin
ca3686f4aa
state: add tests for mesh-topology table indexers
2021-03-18 12:08:57 -04:00
Daniel Nephin
8a1a11814d
state: use constants for mesh-topology table operations
2021-03-18 12:08:03 -04:00
Freddy
28c29e6ab4
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
1c46470a29
Add methods to check intention has wildcard src or dst
2021-03-17 22:15:48 -06:00
freddygv
6c43195e2a
Merge master and fix upstream config protocol defaulting
2021-03-17 21:13:40 -06:00
freddygv
0c8b618ca0
Temporarily silence spurious wakeup. Addressing false positive in beta.
2021-03-17 17:25:29 -06:00
freddygv
60690cf5c9
Merge remote-tracking branch 'origin/master' into intention-topology-endpoint
2021-03-17 17:14:38 -06:00
freddygv
d19a5830dd
Do not include consul as upstream or downstream
2021-03-17 13:40:04 -06:00
Daniel Nephin
d2591312f8
state: add tests for config-entry indexers
2021-03-17 14:41:46 -04:00
Daniel Nephin
1b8f8b135e
state: convert config-entries kind index to new pattern
2021-03-17 14:40:57 -04:00
Daniel Nephin
bfcf463c3a
state: remove config-entries namespace index
...
Use a prefix of the ID index instead.
2021-03-17 14:40:57 -04:00
Daniel Nephin
dcbb1ba5dd
state: remove unnecessary method receiver
2021-03-17 14:40:57 -04:00
Daniel Nephin
b43977423f
state: convert config-entries table to new indexer pattern
...
Using functional indexes to isolate enterprise differentiation and
remove reflection.
2021-03-17 14:40:57 -04:00