-
-
Notifications
You must be signed in to change notification settings - Fork 3
feat: Add flag for db init routine #669
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
81e707c
add flag for db init routine incl. test asserts as part of cluster ops
adwk67 fc686f0
changelog
adwk67 b91afae
added a doc
adwk67 0649973
reworked crd change following decision
adwk67 3d80603
straightened up crd docs
adwk67 85d7484
Merge branch 'main' into feat/add-db-init-flag
adwk67 512852b
Merge branch 'main' into feat/add-db-init-flag
adwk67 9c7da94
Update rust/operator-binary/src/crd/mod.rs
adwk67 28a38db
improved trace message
adwk67 b2d515d
clarified doc comment
adwk67 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| = Database initialization | ||
| :description: Configure Airflow Database start-up. | ||
|
|
||
| By default, Airflow will run database initialization routines (checking and/or creating the metadata schema and creating an admin user) on start-up. | ||
| These are idempotent and can be run every time as the overhead is minimal. | ||
| However, if these steps should be skipped, a running Airflow cluster can be patched with a resource like this to deactivate the initialization: | ||
|
|
||
| [source,yaml] | ||
| ---- | ||
| --- | ||
| apiVersion: airflow.stackable.tech/v1alpha1 | ||
| kind: AirflowCluster | ||
| metadata: | ||
| name: airflow | ||
| spec: | ||
| clusterConfig: | ||
| databaseInitialization: | ||
| enabled: false # <1> | ||
| ---- | ||
| <1> Turn off the initialization routine by setting `databaseInitialization.enabled` to `false` | ||
|
|
||
| NOTE: The field `databaseInitialization.enabled` is `true` by default to be backwards-compatible. | ||
| A fresh Airflow cluster cannot be created with this field set to `false` as this results in missing metadata in the Airflow database. | ||
|
|
||
| WARNING: Setting `databaseInitialization.enabled` to `false` is an unsupported operation as subsequent updates to a running Airflow cluster can result in broken behaviour due to inconsistent metadata. | ||
| Only set `databaseInitialization.enabled` to `false` if you know what you are doing! | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| # For this assert we expect the database operation to be logged | ||
| apiVersion: kuttl.dev/v1beta1 | ||
| kind: TestAssert | ||
| timeout: 30 | ||
| commands: | ||
| - script: | | ||
| kubectl -n $NAMESPACE logs airflow-scheduler-default-0 | grep "Database migrating done!" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| # For this step we expect the database operation to NOT be logged | ||
| apiVersion: kuttl.dev/v1beta1 | ||
| kind: TestAssert | ||
| timeout: 30 | ||
| commands: | ||
| - script: | | ||
| kubectl -n $NAMESPACE logs airflow-scheduler-default-0 | grep -q "Database migrating done!" && exit 1 || exit 0 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.