-
Notifications
You must be signed in to change notification settings - Fork 34
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
Autoxhelm create ArgoCD application #1355
Conversation
54ed544
to
5b82f23
Compare
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.
Idempotence of autox + a few minor naming changes, and visibility changes (for kubeclient).
targetRevision: {{ .chart.version }} | ||
syncPolicy: | ||
automated: | ||
prune: true |
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.
Document what prune
and selfHeal
mean.
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.
prune
:
https://argo-cd.readthedocs.io/en/stable/user-guide/auto_sync/#automatic-pruning
By default (and as a safety mechanism), automated sync will not delete resources when Argo CD detects the resource is no longer defined in Git. To prune the resources, a manual sync can always be performed (with pruning checked). Pruning can also be enabled to happen automatically as part of the automated sync by... setting this option.
@sriumcp @kalantar If this is related to git, then should we get rid of it?
selfHeal
:
https://argo-cd.readthedocs.io/en/stable/user-guide/auto_sync/#automatic-self-healing
By default, changes that are made to the live cluster will not trigger automated sync. To enable automatic sync when the live cluster's state deviates from the state defined in Git... set this option.
We want the changes to trigger a sync but I'm not sure what how Argo CD's Git usage means in relationship with what we are doing.
autox/informer.go
Outdated
) | ||
|
||
type chartAction int64 | ||
|
||
const ( | ||
releaseAction chartAction = 0 | ||
deleteAction chartAction = 1 | ||
|
||
applicationTemplateFilePath string = "application.tpl" |
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.
Decide between embed and using an arguCD typed application struct.
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.
ignore approve
!
dc45464
to
0c00b4e
Compare
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.
Please see initial comments. More comments to follow.
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.
Please see requested changes.
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.
Please see comments on informer.
be66969
to
29072d0
Compare
Signed-off-by: Srinivasan Parthasarathy <[email protected]> Signed-off-by: Alan Cha <[email protected]>
Signed-off-by: Srinivasan Parthasarathy <[email protected]> Signed-off-by: Alan Cha <[email protected]>
Signed-off-by: Alan Cha <[email protected]>
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.
Please see a small change requested for delete logic.
Signed-off-by: Alan Cha <[email protected]>
Signed-off-by: Alan Cha <[email protected]>
Signed-off-by: Alan Cha <[email protected]>
Signed-off-by: Alan Cha <[email protected]>
Signed-off-by: Alan Cha <[email protected]>
Signed-off-by: Alan Cha <[email protected]>
Signed-off-by: Alan Cha <[email protected]>
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.
Minor comment.
Signed-off-by: Alan Cha <[email protected]>
Signed-off-by: Alan Cha <[email protected]>
Signed-off-by: Alan Cha <[email protected]>
Update workflows Signed-off-by: Alan Cha <[email protected]>
Signed-off-by: Alan Cha <[email protected]>
autox/informer_test.go
Outdated
|
||
// autoX handler will call on applyHelmRelease and deleteHelmRelease | ||
applyHelmReleaseInvocations := 0 | ||
applyHelmRelease = func(releaseName string, specGroupName string, releaseSpec releaseSpec, namespace string, additionalValues map[string]string) error { |
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.
Query the cluster. Do not mock applyHelmRelease
and delete
. Instead query the cluster and make sure it looks right (e.g., no objects after delete; appropriate application objects after apply).
Signed-off-by: Alan Cha <[email protected]>
Signed-off-by: Alan Cha <[email protected]>
Signed-off-by: Alan Cha <[email protected]>
Signed-off-by: Alan Cha <[email protected]>
Signed-off-by: Alan Cha <[email protected]>
See #1387 |
No description provided.