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

Use subPath for ydb config #191

Merged
merged 13 commits into from
Apr 19, 2024
Merged

Use subPath for ydb config #191

merged 13 commits into from
Apr 19, 2024

Conversation

kobzonega
Copy link
Contributor

@kobzonega kobzonega commented Apr 10, 2024

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

The current configuration management logic in ydb-operator works like this:

  • Inline configuration from Storage .spec.configuration is placed in the ConfigMap.
  • A StatefulSet is created with a link to the ConfigMap created
  • Thus, changing the configuration causes the static config to be updated almost immediately in all running pods
  • If the process unexpectedly exits, the pod will launch with a new configuration.

We want to reach a state where the creation process with a new configuration and a link to the updated ConfigMap occurs only when a pod is deleted.

Issue Number: YDBOPS-8801

What is the new behavior?

  • mountPath for pod volumeMount with ConfigMap by absolute path to file
  • add subPath with link to api.ConfigFileName that prevent ConfigMap updates for container
  • annotation ydb.tech/configuration-checksum with value of sha hash of current configuration used
  • labels ydb.tech/storage-generation and ydb.tech/database-generation with values from the object they were created from
  • some unit-tests to check label and annotation propagation to podTemplate

Other information

@kobzonega kobzonega requested a review from artgromov April 18, 2024 10:35
@artgromov artgromov added the ok-to-test Testing pipelines will run label Apr 19, 2024
@github-actions github-actions bot removed the ok-to-test Testing pipelines will run label Apr 19, 2024
@kobzonega kobzonega merged commit 2213de1 into master Apr 19, 2024
14 checks passed
@kobzonega kobzonega deleted the YDBOPS-8801 branch April 19, 2024 11:42
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.

3 participants