Skip to content
This repository has been archived by the owner on Feb 5, 2020. It is now read-only.

*/rm-assets: activate using path activation #2421

Merged
merged 1 commit into from
Nov 20, 2017

Conversation

s-urbaniak
Copy link
Contributor

No description provided.

@coreosbot
Copy link

Can one of the admins verify this patch?

@s-urbaniak
Copy link
Contributor Author

/cc @squat

@@ -1,7 +1,7 @@
[Unit]
Description=Clean up install assets from S3
Copy link
Member

@enxebre enxebre Nov 17, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couldn't we just run rm-assets.sh as a ExecStartPost in bootkube tectonic service to alleviate dependency hassle? then each platform implements the cleaning up as they wish (basically adding or not the cloud storage api call)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some platforms don't have the notion of rm-assets.sh which semantically only deletes remote assets.

Local assets are being removed inside tectonic.sh but here I believe another service makes sense.

Platforms not supporting pull semantics (openstack, vmware, baremetal) don't need this service.

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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.

data "ignition_systemd_unit" "rm_assets" {
name = "rm-assets.service"
enable = "${var.assets_location != "" ? true : false}"
enable = false
content = "${file("${path.module}/resources/services/rm-assets.service")}"
Copy link
Member

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?

Copy link
Contributor

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

Copy link
Contributor

@trawler trawler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cpanato
Copy link
Contributor

cpanato commented Nov 17, 2017

retest this please

@s-urbaniak
Copy link
Contributor Author

@squat PTAL

@@ -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 = ["*"]
Copy link
Contributor

Choose a reason for hiding this comment

The 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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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.

Copy link
Contributor

@squat squat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one small question, but LGTM

@s-urbaniak s-urbaniak merged commit e6bd457 into coreos:master Nov 20, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants