Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add metadata property to NodeInfos #377

Open
wants to merge 1 commit into
base: alpha
Choose a base branch
from

Conversation

gcusnieux
Copy link
Member

@gcusnieux gcusnieux commented Nov 6, 2024

Issue

https://gravitee.atlassian.net/browse/CJ-2542

Description

For the upgrade of Cloud gateways 30 days after control plane upgrade EPIC we need to link data plane deployment and registered nodes on cockpit side cockpit.

This PR add a generic additionalInformation environment variable.

Another task on platform team side will add the deploymentId on addtionalInformation of dataPlane.

Additional context


Gravitee.io Automatic Deployment

🚀 A prerelease version of this package has been published on Gravitee's private artifactory, you can:

  • use it directly by updating your project with version: 7.0.0-cj-2542-gateway-technical-id-SNAPSHOT
  • download it from Artifactory here

@gcusnieux gcusnieux changed the base branch from master to alpha November 6, 2024 16:42
@gcusnieux gcusnieux marked this pull request as ready for review November 13, 2024 14:01
@gcusnieux gcusnieux requested a review from a team as a code owner November 13, 2024 14:01
@gcusnieux gcusnieux requested a review from a team November 13, 2024 14:33
@@ -172,4 +171,24 @@ private String getZone() {
private int getPort() {
return Integer.parseInt(environment.getProperty("http.port", environment.getProperty("jetty.port", "-1")));
}

private Map<String, String> getAdditionalInformation() {
Map<String, String> additionalInformation = new HashMap<>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code could be using EnvironmentUtils.getPropertiesStartingWith with by example


EnvironmentUtils
            .getPropertiesStartingWith(environment, "additionalInformation")
            .entrySet()
            .stream()
            .filter(entry -> Objects.nonNull(entry.getValue()))
            .collect(Collectors.toMap(entry -> entry.getKey().substring(key.length() + 4), entry -> String.valueOf(entry.getValue())));

where the yaml would look like :

additionalInformation:
  - name1: value1
  - name2: value2

@gcusnieux gcusnieux changed the title feat: add additionalInformation property to NodeInfos feat: add metadata property to NodeInfos Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants