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

[Feature][Helm] make api/master/worker/alert application.yaml configurable #15922

Merged
merged 1 commit into from
May 17, 2024

Conversation

pegasas
Copy link
Contributor

@pegasas pegasas commented Apr 26, 2024

Purpose of the pull request

fix #15473
part of #15924

Brief change log

make Alert application.yaml configurable

Verify this pull request

This pull request is code cleanup without any test coverage.

(or)

This pull request is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(or)

If your pull request contain incompatible change, you should also add it to docs/docs/en/guide/upgrede/incompatible.md

@@ -794,6 +794,97 @@ alert:
labels: {}
# -- serviceMonitor.annotations ServiceMonitor annotations
annotations: {}
configmap:
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need to put everything into values. In the future, probably we will have separated configmaps for api server, master server and worker server. Why not put them directly in configmap-dolphinscheduler-alert.yam?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think we need to put everything into values. In the future, probably we will have separated configmaps for api server, master server and worker server. Why not put them directly in configmap-dolphinscheduler-alert.yam?

it seems like 2 points?
1.not put everything into values, i agree. maybe we can choose some important items here.
2.because we can not just put application.yaml into cm but other config items. i think it may be more extendable if configured in values.yaml

Copy link
Member

Choose a reason for hiding this comment

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

We could put application.yaml into configmap, and make some important items of application.yaml as variables and access them through values.yaml. For example api server, alert server and master server all need access to db and there are db related configs in the application.yaml for all of them. So you may put db related configs in values.yaml, and share those configs across different application.yaml for alert server, api server and master server. The same for registry related configs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could put application.yaml into configmap, and make some important items of application.yaml as variables and access them through values.yaml. For example api server, alert server and master server all need access to db and there are db related configs in the application.yaml for all of them. So you may put db related configs in values.yaml, and share those configs across different application.yaml for alert server, api server and master server. The same for registry related configs.

I got your point.
will apply these changes.

@codecov-commenter
Copy link

codecov-commenter commented Apr 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 40.58%. Comparing base (61915a2) to head (3933e1e).

❗ Current head 3933e1e differs from pull request most recent head 3037830. Consider uploading reports for the commit 3037830 to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##                dev   #15922   +/-   ##
=========================================
  Coverage     40.58%   40.58%           
- Complexity     5215     5216    +1     
=========================================
  Files          1380     1380           
  Lines         46056    46056           
  Branches       4916     4916           
=========================================
+ Hits          18692    18693    +1     
  Misses        25437    25437           
+ Partials       1927     1926    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pegasas pegasas changed the title [Feature][Helm] make Alert application.yaml configurable [Feature][Helm] make api/master/worker/alert application.yaml configurable Apr 28, 2024
Comment on lines +37 to +49
registry:
type: zookeeper
zookeeper:
namespace: dolphinscheduler
connect-string: localhost:2181
retry-policy:
base-sleep-time: 60ms
max-sleep: 300ms
max-retries: 5
session-timeout: 30s
connection-timeout: 9s
block-until-connected: 600ms
digest: ~
Copy link
Member

Choose a reason for hiding this comment

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

Can these move into values.yaml?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this pr will add configmap and split db config only,
then will raise another to split.registry.

finally maybe will deprecate old db registry config.

Comment on lines 132 to 141
datasource:
profile: postgresql
config:
driver-class-name: org.postgresql.Driver
url: jdbc:postgresql://127.0.0.1:5432/dolphinscheduler
username: root
password: root
hikari:
connection-test-query: select 1
pool-name: DolphinScheduler
Copy link
Member

Choose a reason for hiding this comment

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

It's incompatible with old db config, cuz ENV has higher priority.
Additionally, I recommend that enable option for different datasource should be provided here like before.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've already consider this situation.
now application.yaml in docker are all configured like this way and env will overwrite this config.
so i kept old db config above so that they will become env to overwrite.
it is compatible already.

Copy link
Member

Choose a reason for hiding this comment

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

Can I understand that you just want to define new db configs firstly in this PR and you will replace old db configs in future PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

#15924 (comment)
Exactly,
I will abandon that in next following plan.
image

Copy link
Member

Choose a reason for hiding this comment

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

Got it. If you want to do this step by step, I suggest you in this PR, just define new configMap and do not modify values.yaml. In future PR, replace old db/registry config with new db/registry all together.

From my perspective, this way is clearer :D

Copy link
Contributor Author

@pegasas pegasas Apr 30, 2024

Choose a reason for hiding this comment

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

sure,
this is better
i will follow this guideline here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it. If you want to do this step by step, I suggest you in this PR, just define new configMap and do not modify values.yaml. In future PR, replace old db/registry config with new db/registry all together.

From my perspective, this way is clearer :D

Done.

Copy link

sonarcloud bot commented May 16, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link
Member

@Radeity Radeity left a comment

Choose a reason for hiding this comment

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

LGTM

@ruanwenjun ruanwenjun merged commit 79f90a8 into apache:dev May 17, 2024
62 of 63 checks passed
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.

[Feature][Helm] make API/Master/Worker/Alert application.yaml configurable on k8s
5 participants