-
Notifications
You must be signed in to change notification settings - Fork 56
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
Support for pulumi.com/reconciliation-request #672
Comments
Added to epic #586 |
Confirmed with @rquitales two assumptions:
|
Another thought: when the prerequisite stack is failing, it would be counter-productive to keep touching its annotation. The prerequisite stack may have a backoff in effect (see #677), and one wouldn't want to interfere. |
Some example manifests for exercising the prerequisites feature. In this case, we would expect the "child" stacks to force the "parent" stack to be re-synced periodically. This functionality is powered by the
Use parent.yaml apiVersion: v1
kind: ServiceAccount
metadata:
name: prereqs
namespace: default
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: prereqs:system:auth-delegator
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:auth-delegator
subjects:
- kind: ServiceAccount
name: prereqs
namespace: default
---
apiVersion: pulumi.com/v1
kind: Stack
metadata:
name: parent
namespace: default
spec:
serviceAccountName: prereqs
fluxSource:
sourceRef:
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
name: pulumi-examples
dir: random-yaml/
stack: parent
continueResyncOnCommitMatch: false
destroyOnFinalize: true
envRefs:
PULUMI_ACCESS_TOKEN:
type: Secret
secret:
name: pulumi-api-secret
key: accessToken child-1.yaml apiVersion: pulumi.com/v1
kind: Stack
metadata:
name: child-1
namespace: default
spec:
prerequisites:
- name: parent
requirement:
succeededWithinDuration: 5m
serviceAccountName: prereqs
fluxSource:
sourceRef:
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
name: pulumi-examples
dir: random-yaml/
stack: child-1
continueResyncOnCommitMatch: true
resyncFrequencySeconds: 60
destroyOnFinalize: true
envRefs:
PULUMI_ACCESS_TOKEN:
type: Secret
secret:
name: pulumi-api-secret
key: accessToken child-2.yaml apiVersion: pulumi.com/v1
kind: Stack
metadata:
name: child-2
namespace: default
spec:
prerequisites:
- name: parent
requirement:
succeededWithinDuration: 1m
serviceAccountName: prereqs
fluxSource:
sourceRef:
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
name: pulumi-examples
dir: random-yaml/
stack: child-2
continueResyncOnCommitMatch: true
resyncFrequencySeconds: 60
destroyOnFinalize: true
envRefs:
PULUMI_ACCESS_TOKEN:
type: Secret
secret:
name: pulumi-api-secret
key: accessToken |
One of the features of
Stack
is support for the Flux on-demand reconciliation protocol (ref), based onpulumi.com/reconciliation-request
annotation.The intention is to force a stack update when the stack is in a ready state, independent of the branch polling and periodic resyncs. As an annotation, the stack generation does not change. The workspace needn't be replaced, which notably happens whenever generation does change. The last update should incorporate the annotation value.
The "prerequisites" feature leverages this feature when the
SucceededWithinDuration
field on a given prerequisite is set. The field is proactive in nature; for example, given that stack A depends on stack B, a value of 5m on A will force a resync of stack B every 5 minutes even if B doesn't use periodic resync. A more "passive" (assumedly incorrect) interpretation of the feature, would be to check that B was recently synced while relying only on the natural causes of resync. See also: #443The text was updated successfully, but these errors were encountered: