-
Notifications
You must be signed in to change notification settings - Fork 0
Use createOrUpdate
pattern for pod environment configmap
#191
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
Open
LimKianAn
wants to merge
8
commits into
main
Choose a base branch
from
use-create-or-update-pattern
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
1bc266e
Use `createOrUpdate` pattern
LimKianAn de1f390
Remove unnecessary abstraction
LimKianAn 6c89aea
Better error msg
LimKianAn fef8968
Revert
LimKianAn b705914
Fix err msg
LimKianAn 8227c23
Add tests
LimKianAn d92a8fd
Create namespaces explicitly
LimKianAn 7e6183f
Merge remote-tracking branch 'origin/main' into use-create-or-update-…
LimKianAn 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
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,12 @@ | ||
apiVersion: v1 | ||
data: | ||
config: eyJpZCI6IjgxZWEyMzMxLTliMTQtNDUyMi05MjgzLTdkOGQwYmM2YjExNSIsIm5hbWUiOiJuYmctcHJvZC10ZXN0IiwicHJvamVjdCI6ImI2MjFlYjk5LTQ4ODgtNDkxMS05M2ZjLTk1ODU0ZmMwMzBlOCIsInRlbmFudCI6ImZpdHMiLCJjcmVhdGVkQnkiOiJcdTAwM2NpemUwMDBcdTAwM2VbYWNoaW0uYWRtaW5AZi1pLXRzLmRlXSIsInJldGVudGlvbiI6IjQiLCJzY2hlZHVsZSI6IjMwIDAwICogKiAqIiwiczNlbmRwb2ludCI6Imh0dHBzOi8vczMucHJvZC0wMy1uYmctdzgxMDEuZml0cy5jbG91ZCIsInMzYnVja2V0bmFtZSI6ImJhY2t1cC0xMjM0NTY3OCIsInMzcmVnaW9uIjoiZHVtbXkiLCJzM2FjY2Vzc2tleSI6IjRJMjUyOFA4UkcwOThYU1NDUEJNIiwiczNzZWNyZXRrZXkiOiJJSXBCOHBjU2tLVVF2MVhadmN6RU1XM0VrbERhUmU1N0FpM2FGdllCIn0= | ||
kind: Secret | ||
metadata: | ||
labels: | ||
postgres.database.fits.cloud/is-backup: "true" | ||
postgres.database.fits.cloud/project-id: b621eb99-4888-4911-93fc-95854fc030e8 | ||
postgres.database.fits.cloud/tenant: fits | ||
name: 81ea2331-9b14-4522-9283-7d8d0bc6b115 | ||
namespace: metal-extension-cloud | ||
type: Opaque |
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I don't like the fact that we now always update the operator each time anything changes and that it will not be skipped if the operator is already installed.
Before this change, we once called this code when we initially created the namespace, and once on startup of the postgreslet. Now it will be called from the postgres_controller, meaning every time anything changes.
I would like this to stay as it was: Once on creation, once on startup and each time the
backup-config
changes.Porposal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Watch a specific namespace.
https://github.com/kubernetes-sigs/kubebuilder/blob/84f357b50e0b25e64c1e5918089f6588b79b81f1/docs/book/src/cronjob-tutorial/testdata/emptymain.go#L124