-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update to jcp version with v3 support * Kick dockerhub * Use only one snapshot collecting callback * Fix ktlint and detekt * Remove optional operator * Change java-control-plane version to stable * Remove duplicate snapshot collecting callback * Migrate all v2 resources to v3. * Remove setSni no longer needed for Envoys <= 1.14.0-dev * Use one cache for resources * Remove ApiVersion.V3 from RDS * Restore v2/v3 caches * Fix v2 cache metric * tmp * Added logic to generate V3 clusters * Changed name * Keep v3 clusters * Fix v3 api * Removed unused import * Changed debug endpoint path, fixed deprecated fields * Fixed metrics * Code review changes, copied v3 cache test, change debug endpoint * Fixed produces to work with older tools Co-authored-by: slonka <[email protected]> Co-authored-by: Lukasz Dziedziak <[email protected]>
- Loading branch information
1 parent
7aa1030
commit e73204a
Showing
64 changed files
with
1,827 additions
and
632 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
...rol-core/src/main/java/pl/allegro/tech/servicemesh/envoycontrol/GroupCacheStatusInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package pl.allegro.tech.servicemesh.envoycontrol; | ||
|
||
import io.envoyproxy.controlplane.cache.CacheStatusInfo; | ||
import io.envoyproxy.controlplane.cache.StatusInfo; | ||
import java.util.ArrayList; | ||
import java.util.Collection; | ||
import javax.annotation.concurrent.ThreadSafe; | ||
|
||
/** | ||
* {@code GroupCacheStatusInfo} provides an implementation of {@link StatusInfo} for a group of {@link CacheStatusInfo}. | ||
* This class is copy of {@link io.envoyproxy.controlplane.cache.GroupCacheStatusInfo} | ||
*/ | ||
@ThreadSafe | ||
class GroupCacheStatusInfo<T> implements StatusInfo<T> { | ||
private final Collection<CacheStatusInfo<T>> statuses; | ||
|
||
public GroupCacheStatusInfo(Collection<CacheStatusInfo<T>> statuses) { | ||
this.statuses = new ArrayList<>(statuses); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public long lastWatchRequestTime() { | ||
return statuses.stream().mapToLong(CacheStatusInfo::lastWatchRequestTime).max().orElse(0); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public T nodeGroup() { | ||
return statuses.stream().map(CacheStatusInfo::nodeGroup).findFirst().orElse(null); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public int numWatches() { | ||
return statuses.stream().mapToInt(CacheStatusInfo::numWatches).sum(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
...y-control-core/src/main/java/pl/allegro/tech/servicemesh/envoycontrol/v2/SimpleCache.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package pl.allegro.tech.servicemesh.envoycontrol.v2; | ||
|
||
import io.envoyproxy.controlplane.cache.NodeGroup; | ||
import io.envoyproxy.controlplane.cache.v2.Snapshot; | ||
|
||
public class SimpleCache<T> extends pl.allegro.tech.servicemesh.envoycontrol.SimpleCache<T, Snapshot> { | ||
public SimpleCache(NodeGroup<T> nodeGroup, Boolean shouldSendMissingEndpoints) { | ||
super(nodeGroup, shouldSendMissingEndpoints); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
...y-control-core/src/main/java/pl/allegro/tech/servicemesh/envoycontrol/v3/SimpleCache.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package pl.allegro.tech.servicemesh.envoycontrol.v3; | ||
|
||
import io.envoyproxy.controlplane.cache.NodeGroup; | ||
import io.envoyproxy.controlplane.cache.v3.Snapshot; | ||
|
||
public class SimpleCache<T> extends pl.allegro.tech.servicemesh.envoycontrol.SimpleCache<T, Snapshot> { | ||
public SimpleCache(NodeGroup<T> nodeGroup, Boolean shouldSendMissingEndpoints) { | ||
super(nodeGroup, shouldSendMissingEndpoints); | ||
} | ||
} |
Oops, something went wrong.