-
Notifications
You must be signed in to change notification settings - Fork 262
*/rm-assets: activate using path activation #2421
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| [Unit] | ||
| Description=Trigger for rm-assets.service | ||
| [Path] | ||
| PathExists=/opt/tectonic/manifests | ||
| Unit=rm-assets.service | ||
| [Install] | ||
| WantedBy=multi-user.target |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| [Unit] | ||
| Description=Clean up install assets from S3 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. couldn't we just run
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. some platforms don't have the notion of Local assets are being removed inside Platforms not supporting pull semantics (openstack, vmware, baremetal) don't need this service.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We also internally discussed the idea of running a one-shot k8s Job post-install, but this is better punted to a later refactoring (track 2), as this adds yet more manifest skew. |
||
| ConditionPathExists=/opt/tectonic/init_tectonic.done | ||
| After=tectonic.service | ||
| ConditionPathExists=!/opt/tectonic/init_rm_assets.done | ||
| After=bootkube.service tectonic.service | ||
|
|
||
| [Service] | ||
| Type=oneshot | ||
|
|
@@ -13,6 +13,7 @@ Group=root | |
|
|
||
| ExecStartPre=/usr/bin/bash /opt/rm-assets.sh | ||
| ExecStart=/usr/bin/echo "cleaned up installation assets" | ||
| ExecStartPost=/bin/touch /opt/tectonic/init_rm_assets.done | ||
|
|
||
| [Install] | ||
| WantedBy=multi-user.target | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,6 +15,10 @@ resource "aws_s3_bucket" "tectonic" { | |
| "KubernetesCluster", "${var.tectonic_cluster_name}", | ||
| "tectonicClusterID", "${module.tectonic.cluster_id}" | ||
| ), var.tectonic_aws_extra_tags)}" | ||
|
|
||
| lifecycle { | ||
| ignore_changes = ["*"] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we need to ignore lifecycle changes on the bucket too even though only the one file is changing?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When I did experimentation locally and removed one file from the bucket, this affected also the bucket itself, hence I had to add this here. |
||
| } | ||
| } | ||
|
|
||
| # Bootkube / Tectonic assets | ||
|
|
@@ -34,6 +38,10 @@ resource "aws_s3_bucket_object" "tectonic_assets" { | |
| "KubernetesCluster", "${var.tectonic_cluster_name}", | ||
| "tectonicClusterID", "${module.tectonic.cluster_id}" | ||
| ), var.tectonic_aws_extra_tags)}" | ||
|
|
||
| lifecycle { | ||
| ignore_changes = ["*"] | ||
| } | ||
| } | ||
|
|
||
| # kubeconfig | ||
|
|
||
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.
is this meant to be always disabled?
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.
yes the idea is for it to be path-activated