Skip to content

feat: add metadata property to NodeInfos#377

Merged
gcusnieux merged 1 commit intoalphafrom
cj-2542-gateway-technical-id
Nov 21, 2024
Merged

feat: add metadata property to NodeInfos#377
gcusnieux merged 1 commit intoalphafrom
cj-2542-gateway-technical-id

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 force-pushed the cj-2542-gateway-technical-id branch from 081d71a to 437efce Compare November 6, 2024 16:42
@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
}

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

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 force-pushed the cj-2542-gateway-technical-id branch from 437efce to 4cdec3e Compare November 15, 2024 09:06
@gcusnieux gcusnieux changed the title feat: add additionalInformation property to NodeInfos feat: add metadata property to NodeInfos Nov 15, 2024
@gcusnieux gcusnieux force-pushed the cj-2542-gateway-technical-id branch from 4cdec3e to 5be1dc1 Compare November 15, 2024 14:54
@gcusnieux gcusnieux force-pushed the cj-2542-gateway-technical-id branch from 5be1dc1 to 8cd5f43 Compare November 19, 2024 13:50
@gcusnieux gcusnieux merged commit c2098b0 into alpha Nov 21, 2024
@gcusnieux gcusnieux deleted the cj-2542-gateway-technical-id branch November 21, 2024 09:23
@graviteeio
Copy link
Contributor

🎉 This PR is included in version 7.0.0-alpha.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@graviteeio
Copy link
Contributor

🎉 This PR is included in version 7.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants