-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/121 apply blueprint continuously #124
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
alexander-dammeier
merged 124 commits into
v2/develop
from
feature/121-apply-blueprint-continuously
Oct 17, 2025
Merged
Changes from 49 commits
Commits
Show all changes
124 commits
Select commit
Hold shift + click to select a range
bb8af47
#119 add standard labels to dogus and coponents
alexander-dammeier aa7bea4
#121 create state diff without loading the blueprint again
alexander-dammeier a5de572
#119 update changelog
alexander-dammeier ae79469
#119 fix duplicate error if config key is present and absent
alexander-dammeier 2085982
#121 WIP: do not load blueprint in every use case
alexander-dammeier 9973c7b
Merge branch 'v2/develop' into feature/121-apply-blueprint-continuously
alexander-dammeier f346f9e
Merge branch 'feature/121-non-blocking-health-checks' into feature/12…
alexander-dammeier 07cf18a
Merge branch 'feature/121-remove-maintenance-mode' into feature/121-a…
alexander-dammeier cee514f
#121 WIP: use bluerpint instead of the id to call use cases
alexander-dammeier 7fe4543
#121 fix reconciler tests
alexander-dammeier 4e32076
#121 remove StatusPhaseStaticallyValidated
alexander-dammeier 82ea608
#121 fix tests
alexander-dammeier ad52028
#121 remove BlueprintSpecStaticallyValidated event
alexander-dammeier 1e42af1
#121 remove StatusPhaseValidated status
alexander-dammeier dcd9618
#121 remove BlueprintSpecValidated event
alexander-dammeier 19a8262
#121 remove StatusPhaseInvalid
alexander-dammeier b37cfbf
#121 remove StatusPhaseEffectiveBlueprintGenerated
alexander-dammeier b97f726
#121 remove EffectiveBlueprintCalculatedEvent
alexander-dammeier bce1e0c
#121 remove StatusPhaseStateDiffDetermined
alexander-dammeier 1aed68a
#121 remove StatusPhaseEcosystemHealthyUpfront
alexander-dammeier 7ba9da7
#121 remove StatusPhaseEcosystemUnhealthyUpfront
alexander-dammeier 211cee1
#121 remove blueprint pre-processing
alexander-dammeier ba285ae
#121 remove StatusPhaseEcosystemHealthyAfterwards
alexander-dammeier 1cfd2fe
#121 remove censoring in post-processing
alexander-dammeier 9d46832
#121 do not write sensitive data in blueprint CR
alexander-dammeier 0aeff2a
#121 remove unused censoring functions
alexander-dammeier 7eb4861
#121 remove StatusPhaseEcosystemUnhealthyAfterwards
alexander-dammeier 486d591
#121 check if changes need to be made or early exit
alexander-dammeier 807cd04
#121 make self upgrade non-blocking
alexander-dammeier 217e008
#121 remove self upgrade statuses
alexander-dammeier 1e4c0e1
#121 remove StatusPhaseApplyEcosystemConfig
alexander-dammeier 498763d
#121 remove config status phases
alexander-dammeier 30a6efb
#121 write down ideas for state diff
alexander-dammeier 2026c36
#121 remove StatusPhaseInProgress
alexander-dammeier a7a6875
#121 unify health checks, extract component apply
alexander-dammeier 70ced3b
#121 extract dogu apply
alexander-dammeier 5d99e31
#121 remove dogu restarts
alexander-dammeier 8372290
#121 fix tests after renaming mock
alexander-dammeier eb01371
Merge branch 'v2/develop' into feature/121-apply-blueprint-continuously
alexander-dammeier cdcdce0
#121 update changelog
alexander-dammeier d77f197
#121 rename post-processing to completeBp; remove last status phases
alexander-dammeier a30adaa
#121 load and persist conditions via repository
alexander-dammeier 10940cf
#121 fix event test
alexander-dammeier 85c9620
#121 always write a reason in conditions
alexander-dammeier ac92073
#121 remove unused blocking health checks; reduce log output
alexander-dammeier a5df1fc
#121 handle DogusApplied conditions after determining StateDiff
alexander-dammeier 8673e62
#121 remove retry while loading dogu.jsons
alexander-dammeier 46f390f
#121 add cache for dogu descriptors
alexander-dammeier fd4dd64
#121 fix tests
alexander-dammeier 0d54958
#121 change slice-pointer of conditions to normal slice
meiserloh 643e9a8
#121 add TODO
meiserloh 7224d31
#121 remove cache and use local dogu descriptor repository
meiserloh 371a5ca
#121 prevent additional health checks, when unnecessary
meiserloh 03b045b
[#125] ignore nginx dependency
13be6bc
#121 Update to newest CRD version
meiserloh ecde0fd
#121 Add unit test for spec change usecase
nhinze23 ba7e13d
[#125] replace annotation dependency with validate capabilities
c2506bf
#121 Fix tests and nil pointer problems
meiserloh 315dce2
Merge remote-tracking branch 'origin/feature/121.2-apply-blueprint-co…
meiserloh e499e6e
[#125] install component crd
166b3aa
[#125] install component crd
9382d7e
#121 flatten config in domain
meiserloh 51d641c
Merge pull request #126 from cloudogu/feature/125-ignore-nginx-depend…
kahoona77 b558509
Bump version
kahoona77 8ff6e30
Update changelog
kahoona77 74b6429
Merge branch 'release/v2.8.0' into develop
kahoona77 2fde501
#121 add tests
meiserloh 8deed0e
#121 incorporate cesmarvin review
meiserloh 0746b2c
#121 display only changes in stateDiff
meiserloh 83d6311
#121 incorporate review comments
meiserloh 7b169ed
Merge remote-tracking branch 'origin/develop' into feature/121.2-appl…
meiserloh b3db9e0
#121 rename domain DryRun to Stopped
meiserloh d0acd5b
#121 blueprint should be applied until completed
meiserloh 637c8d4
#121 apply blueprint if not completed
meiserloh e518dea
#121 improve tests
meiserloh 04a12f9
#121 reduce state diff events
meiserloh fa4e54e
#121 remove applied conditions in favor of LastApplySucceeded
meiserloh 0e61e6a
#121 set conditions to unknown on first reconcile
meiserloh e5911f0
#121 fix sonar issues
meiserloh 109bfd0
#121 reduce complexity further
meiserloh ed11c5d
#121 remove serialization of statediff to domain
meiserloh 5395651
#121 remove serialization of statediff to domain
meiserloh d682af5
#121 enforce singlton cr
meiserloh 08f542e
#121 fix logging for multiple blueprint errors
meiserloh 8587953
#121 Upgrade to Golang v1.25.1 and Makefiles to v10.3.0
meiserloh d797621
#121 add DogusUpToDate Use Case
meiserloh c41e8f8
#121 pause reconciliation on config and version change
meiserloh c31d1a1
#121 censor sensitive config values in effective Blueprint
meiserloh ba2159f
#121 add display name to blueprint
meiserloh 8d6559e
#121 clean up roles
meiserloh 7e92c85
#121 clean up dependencies
meiserloh 1aa0237
#121 fix todos
meiserloh 6542ba8
#121 use k8s.ui/utils/ptr package instead of own helper
meiserloh 710a299
#121 remove ReverseProxyConfig-Pointer from domain
meiserloh 9c9200d
#121 remove Subfolder-Pointer from domain
meiserloh 42904c4
#121 remove rewriteTarget- & additionalConfig-Pointer from domain
meiserloh e18577c
#121 remove config-Pointer from domain
meiserloh ece4020
#121 allow empty values in config
meiserloh 1e094a2
#121 remove Todo
meiserloh 7d8145a
#121 combine stateDiff events and throw ecosystemUnhealty only once
meiserloh 14e31e4
#121 check ecosystem health before stateDiff to avoid overhead
meiserloh 89fba7e
#121 upgrade makefiles to 10.4.0
meiserloh 099c4dd
#121 apply cesmarvin review
meiserloh 1024804
#121 apply cesmarvin review
meiserloh ca875ca
#121 update docs
meiserloh 42762ff
#121 add stopped event and log
meiserloh 81a97d2
#121 validate that sensitive config is not allowed to have normal values
meiserloh a206826
#121 only log stopped + event when actually stopped
meiserloh fed9ba6
#121 add debug log line for no ops reconciles
meiserloh 1fdf8df
#121 retry notFoundErrors with backoff to handle not blueprints too
meiserloh 7d84bce
#121 Handle all NotFoundErrors with retry except blueprints
meiserloh 3dd94be
#121 set executable to false on missing config reference
meiserloh 0d0d76e
#121 extract apply and preparation use case and clean up tests
meiserloh 6522e73
#121 move domain object changes into aggregate
meiserloh f2f8548
#121 Move blueprint changes into the aggregate
meiserloh f93e267
#121 remove unnecessary rights to update finalizers
meiserloh 7476cd7
#121 merge proxy config dogu action into one to simplify the status
meiserloh 941962a
#121 remove unnecessary patch and update rights to whole blueprint
meiserloh bd8309a
#121 use crd-conditions
meiserloh b340d29
#121 fix typo
meiserloh ef37916
#121 clarify messages of not allowed actions
meiserloh 4834589
Merge pull request #127 from cloudogu/feature/121.2-apply-blueprint-c…
alexander-dammeier 9bd11ce
Merge branch 'v2/develop' into feature/121-apply-blueprint-continuously
alexander-dammeier b2601e3
#121 fix docs
alexander-dammeier 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,78 @@ | ||
| package doguregistry | ||
|
|
||
| import ( | ||
| "context" | ||
| "fmt" | ||
|
|
||
| cescommons "github.com/cloudogu/ces-commons-lib/dogu" | ||
| "github.com/cloudogu/cesapp-lib/core" | ||
| gocache "github.com/patrickmn/go-cache" | ||
| "sigs.k8s.io/controller-runtime/pkg/log" | ||
| ) | ||
|
|
||
| // TODO: We should move this implementation in the dogu-descriptor-lib, so others can profit from it as well. | ||
|
|
||
| type Cache struct { | ||
| repository remoteDoguDescriptorRepository | ||
| cache *gocache.Cache | ||
| } | ||
|
|
||
| func NewCache(repository remoteDoguDescriptorRepository, cache *gocache.Cache) *Cache { | ||
| return &Cache{ | ||
| repository: repository, | ||
| cache: cache, | ||
| } | ||
| } | ||
|
|
||
| func (c *Cache) GetLatest(ctx context.Context, name cescommons.QualifiedName) (*core.Dogu, error) { | ||
| // we cannot cache latest for sure | ||
| dogu, err := c.repository.GetLatest(ctx, name) | ||
| if err != nil { | ||
| return nil, err | ||
| } | ||
| version, err := core.ParseVersion(dogu.Version) | ||
| if err != nil { | ||
| return nil, fmt.Errorf("cannot populate cache as latest dogu version cannot be parsed from response: %w", err) | ||
| } | ||
| c.SetCached( | ||
| cescommons.QualifiedVersion{ | ||
| Name: name, | ||
| Version: version, | ||
| }, | ||
| dogu, | ||
| ) | ||
| return dogu, nil | ||
| } | ||
|
|
||
| func (c *Cache) Get(ctx context.Context, version cescommons.QualifiedVersion) (*core.Dogu, error) { | ||
| logger := log.FromContext(ctx).WithName("DoguDescriptorCache") | ||
| dogu, found := c.GetCached(version) | ||
| if found { | ||
| logger.V(2).Info("dogu descriptor cache hit", "dogu", version) | ||
| return dogu, nil | ||
| } | ||
|
|
||
| // cache missed | ||
| dogu, err := c.repository.Get(ctx, version) | ||
| if err != nil { | ||
| return nil, err | ||
| } | ||
| c.SetCached(version, dogu) | ||
| return dogu, nil | ||
| } | ||
|
|
||
| func cacheKeyFromReference(qualifiedDoguVersion cescommons.QualifiedVersion) string { | ||
| return fmt.Sprintf("%s:%s", qualifiedDoguVersion.Name.String(), qualifiedDoguVersion.Version.String()) | ||
| } | ||
|
|
||
| func (c *Cache) GetCached(qualifiedDoguVersion cescommons.QualifiedVersion) (*core.Dogu, bool) { | ||
| cached, found := c.cache.Get(cacheKeyFromReference(qualifiedDoguVersion)) | ||
| if found { | ||
| return cached.(*core.Dogu), found | ||
meiserloh marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
| return nil, found | ||
| } | ||
|
|
||
| func (c *Cache) SetCached(qualifiedDoguVersion cescommons.QualifiedVersion, dogu *core.Dogu) { | ||
| c.cache.SetDefault(cacheKeyFromReference(qualifiedDoguVersion), dogu) | ||
| } | ||
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
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.
Uh oh!
There was an error while loading. Please reload this page.