This repository has been archived by the owner on Feb 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 266
Ignition assets #2940
Merged
Merged
Ignition assets #2940
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f902fbd
platform/aws: add ncg ignition for workers
enxebre 0043892
platform/aws: add ncg ignition for masters
enxebre b8a557d
platform/aws: add ignition for bootstrap master
enxebre 5cbcf62
platform/aws: remove leader election code
enxebre 676ed0f
platform/aws: add ignition for etcd
enxebre f56aa23
platform/aws: add support for the NCG
enxebre 51a18bb
terraform fmt
enxebre File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,13 @@ | ||
resource "aws_s3_bucket_object" "ignition_etcd" { | ||
count = "${length(var.external_endpoints) == 0 ? var.instance_count : 0}" | ||
|
||
bucket = "${var.s3_bucket}" | ||
key = "ignition_etcd_${count.index}.json" | ||
content = "${data.ignition_config.etcd.*.rendered[count.index]}" | ||
acl = "private" | ||
|
||
server_side_encryption = "AES256" | ||
|
||
tags = "${merge(map( | ||
"Name", "${var.cluster_name}-ignition-etcd-${count.index}", | ||
"KubernetesCluster", "${var.cluster_name}", | ||
"tectonicClusterID", "${var.cluster_id}" | ||
), var.extra_tags)}" | ||
locals { | ||
ignition_etcd_keys = ["ignition_etcd_0.json", "ignition_etcd_1.json", "ignition_etcd_2.json"] | ||
} | ||
|
||
data "ignition_config" "s3" { | ||
count = "${length(var.external_endpoints) == 0 ? var.instance_count : 0}" | ||
|
||
replace { | ||
source = "${format("s3://%s/%s", var.s3_bucket, aws_s3_bucket_object.ignition_etcd.*.key[count.index])}" | ||
verification = "sha512-${sha512(data.ignition_config.etcd.*.rendered[count.index])}" | ||
source = "${format("s3://%s/%s", var.s3_bucket, local.ignition_etcd_keys[count.index])}" | ||
|
||
# TODO: add verification | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,17 @@ | ||
resource "aws_s3_bucket_object" "ignition_master" { | ||
bucket = "${var.s3_bucket}" | ||
key = "ignition_master.json" | ||
content = "${data.ignition_config.main.rendered}" | ||
acl = "private" | ||
|
||
server_side_encryption = "AES256" | ||
data "ignition_config" "s3" { | ||
append { | ||
source = "http://${var.cluster_name}-ncg.${var.base_domain}/ignition?profile=master" | ||
} | ||
|
||
tags = "${merge(map( | ||
"Name", "${var.cluster_name}-ignition-master", | ||
"KubernetesCluster", "${var.cluster_name}", | ||
"tectonicClusterID", "${var.cluster_id}" | ||
), var.extra_tags)}" | ||
files = ["${data.ignition_file.kubeconfig.id}"] | ||
} | ||
|
||
data "ignition_config" "s3" { | ||
replace { | ||
source = "${format("s3://%s/%s", var.s3_bucket, aws_s3_bucket_object.ignition_master.key)}" | ||
verification = "sha512-${sha512(data.ignition_config.main.rendered)}" | ||
data "ignition_file" "kubeconfig" { | ||
filesystem = "root" | ||
path = "/etc/kubernetes/kubeconfig" | ||
mode = 0644 | ||
|
||
content { | ||
content = "${var.kubeconfig_content}" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
It think these should be called something 'bootstrap_*' rather then "s3"
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.
that will be the ignition config for all masters not only bootstrap, so may be ignition_masters