Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

FLPATH-274 enable spring-cloud-config #225

Merged
merged 1 commit into from
Apr 18, 2023

Conversation

sergiubodiu
Copy link
Contributor

I've enabled it for local development where the configserver can be passed through variable or located at default location localhost:8888
For testing purposes created demo config server https://github.com/sergiubodiu/parodos-configserver with configurations copied from local development
https://github.com/sergiubodiu/parodos-config-repo

Copy link
Collaborator

@pkliczewski pkliczewski left a comment

Choose a reason for hiding this comment

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

lgtm

Comment on lines -46 to -48
springdoc:
writer-with-order-by-keys: true
writer-with-default-pretty-printer: true
Copy link
Contributor

Choose a reason for hiding this comment

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

These are necessary to properly generate SDK files. Why do you delete them?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These properties are redundant, they are in application.yml so for local profile it will be inherited from the https://github.com/parodos-dev/parodos/blob/main/notification-service/src/main/resources/application.yml

Copy link
Contributor

Choose a reason for hiding this comment

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

You're right! Thanks

@pkliczewski
Copy link
Collaborator

The change looks good to me, please rebase

@pkliczewski
Copy link
Collaborator

/lgtm

@sergiubodiu
Copy link
Contributor Author

rebased, please review again.
Fixed flakiness in the test because of multiple json libraries in the build path see spring-projects/spring-boot#9248
Fixed has for new JDK17 dependency CI

@@ -24,7 +24,7 @@ public void testGetHash() {
// when
assertDoesNotThrow(() -> {
String hash = this.workFlowVersionService.getHash(object);
assertEquals(hash, "b0c8ed039dc102c0bab6a5e979931a0b");
assertEquals(hash, "3ffe85fac846ce265bcef0534e6334b7");
Copy link
Collaborator

Choose a reason for hiding this comment

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

This change won't be needed after #239

Copy link
Collaborator

@pkliczewski pkliczewski left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link
Collaborator

@pkliczewski pkliczewski left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Apr 17, 2023
@masayag
Copy link
Collaborator

masayag commented Apr 17, 2023

@sergiubodiu since the target deployment of parodos is k8s/openshift, what changes will be required to support configmap and secret as configuration resources of the application?
https://github.com/spring-cloud/spring-cloud-kubernetes#spring-cloud-kubernetes-configserver

@sergiubodiu
Copy link
Contributor Author

sergiubodiu commented Apr 18, 2023

Needs approve label to be merged. @masayag it doesn't require changes on parodos as we're consumer of the configuration. Spring-Cloud-Kubernetes config server is a server side change. Parodos being a client will consume those secrets / config maps and inject it into the variables that we define.

I created a demo server https://github.com/sergiubodiu/parodos-configserver

However if we want to configure dynamic Kubernetes clients we could look into Fabric8 or the next gen https://github.com/eclipse/jkube both have a lot of red hat contributors
https://developers.redhat.com/articles/2023/01/05/how-use-fabric8-kubernetes-client

@masayag
Copy link
Collaborator

masayag commented Apr 18, 2023

Needs approve label to be merged. @masayag it doesn't require changes on parodos as we're consumer of the configuration. Spring-Cloud-Kubernetes config server is a server side change. Parodos being a client will consume those secrets / config maps and inject it into the variables that we define.

I created a demo server https://github.com/sergiubodiu/parodos-configserver

Should the config-server be distributed as part of parodos deployment or is the expectation for a user to have its own config-server?

My question is, should we move the parodos-configserver project into parodos organization and use it in our tests when deployed on top of k8s?
In that case, we'll have to build and deploy parodos-configserver image to be applied on k8s. But we'll be able to demo and show how it is working as part of our build process.

However if we want to configure dynamic Kubernetes clients we could look into Fabric8 or the next gen https://github.com/eclipse/jkube both have a lot of red hat contributors https://developers.redhat.com/articles/2023/01/05/how-use-fabric8-kubernetes-client

@masayag
Copy link
Collaborator

masayag commented Apr 18, 2023

/approve

@openshift-ci
Copy link

openshift-ci bot commented Apr 18, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: masayag

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@pkliczewski
Copy link
Collaborator

@sergiubodiu please rebase and we will merge. All labels are added

@openshift-merge-robot openshift-merge-robot merged commit 9041d0c into parodos-dev:main Apr 18, 2023
@sergiubodiu sergiubodiu deleted the FLPATH-274 branch April 18, 2023 13:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants