Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Is it posibble to create dynamic dependsOn values?#1732

Unanswered
juangon asked this question inQ&A
Discussion options

Hi!
I have a DependentResource (Ingress) that depending on other dependendant's reconcilePrecondition should use a dependsOn list or other different (because some depedent will exists or not). Is it possible to create a dynamic "dependsOn" list for some Depedent resource?

Thanks very much!

You must be logged in to vote

Replies: 1 comment 14 replies

Comment options

I'm not sure I understand… Could you maybe detail your use case more, please? Shouldn't your dependent just implement areconcilePrecondition to say that it should only be created if some other dependent exists?

You must be logged in to vote
14 replies
@metacosm
Comment options

Yes, this should be doable with a reconcile precondition onA where the precondition is checking which resources it needs to wait on based on whetherB orC are created. At least, that's what I would try first.

@juangon
Comment options

So the reconcilePrecondition is evaluated multiple times, not once right? I that case there I could check the status, not only the spec

@metacosm
Comment options

Hmm, you probably shouldn't storeexternal state in the status… Seehttps://javaoperatorsdk.io/docs/dependent-resources#external-state-tracking-dependent-resources (but maybe that's not what you're doing).
To be clearer, it's fine to make decisions based on resources' status (like, for example, if a pod is ready or not).

@juangon
Comment options

Oh sure, I mean I could check if dependent resource status has some expected status so the condition is true ir false

@csviri
Comment options

So the reconcilePrecondition is evaluated multiple times, not once right? I that case there I could check the status, not only the spec

I mean it will be triggered again (the whole reconiliation) anyway if some of other resources (B,C) changes.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
3 participants
@juangon@metacosm@csviri

[8]ページ先頭

©2009-2026 Movatter.jp