From d61abd480171d8376b0b65a81f0021d3a9c0bdfd Mon Sep 17 00:00:00 2001 From: Lucas Serven Date: Mon, 26 Mar 2018 14:37:41 +0200 Subject: [PATCH] *: cleanup bazel rules This commit cleans up several Bazel rules to remove mentions of code that was previously in the Track-1 flow of the Tectonic Installer. --- BUILD.bazel | 30 +- Documentation/BUILD.bazel | 14 - Documentation/dev/build.md | 4 +- Jenkinsfile | 8 - Makefile | 214 ----------- WORKSPACE | 19 - contrib/terraform-examples/BUILD.bazel | 21 -- contrib/terraform-examples/Gopkg.toml | 3 - contrib/terraform-examples/README.md | 8 - contrib/terraform-examples/main.go | 213 ----------- examples/BUILD.bazel | 15 - examples/terraform.tfvars.aws | 342 ------------------ makelib/custom-providers.mk | 12 - modules/bootkube-ut2/assets.tf | 188 ---------- modules/bootkube-ut2/outputs.tf | 54 --- modules/bootkube-ut2/resources/bootkube.path | 7 - .../bootkube-ut2/resources/bootkube.service | 16 - modules/bootkube-ut2/resources/bootkube.sh | 22 -- .../bootkube-ut2/resources/kco-config.yaml | 17 - modules/bootkube-ut2/resources/kubeconfig | 16 - .../bootkube-ut2/resources/kubeconfig-kubelet | 15 - .../manifests/01-tectonic-namespace.yaml | 6 - .../manifests/02-ingress-namespace.yaml | 9 - .../resources/manifests/app-version-kind.yaml | 10 - .../app-version-tectonic-network.yaml | 15 - .../manifests/kube-apiserver-secret.yaml | 19 - .../manifests/kube-cloud-config.yaml | 8 - .../kube-controller-manager-secret.yaml | 11 - .../manifests/kubelet-bootstrap-token.yaml | 10 - .../resources/manifests/pull.json | 12 - .../manifests/tectonic-network-operator.yaml | 59 --- modules/bootkube-ut2/service-account.tf | 15 - modules/bootkube-ut2/variables.tf | 257 ------------- modules/bootkube/assets.tf | 38 ++ modules/bootkube/resources/bootkube.sh | 1 + .../resources/manifests/cluster-config.yaml | 15 - .../tectonic-node-controller-config.yaml | 0 .../tectonic-node-controller-pod.yaml | 0 .../manifests/tectonic-node-controller.yaml | 0 .../resources/tnc-config | 0 modules/bootkube/variables.tf | 73 ++++ modules/bootstrap-ssh/main.tf | 28 -- modules/bootstrap-ssh/variables.tf | 7 - modules/dns/azure/records.tf | 79 ---- modules/dns/azure/variables.tf | 67 ---- modules/dns/designate/etcd.tf | 24 -- modules/dns/designate/master.tf | 8 - modules/dns/designate/outputs.tf | 15 - modules/dns/designate/tectonic.tf | 21 -- modules/dns/designate/variables.tf | 56 --- modules/dns/designate/worker.tf | 18 - modules/dns/gcp/outputs.tf | 13 - modules/dns/gcp/records.tf | 25 -- modules/dns/gcp/variables.tf | 43 --- modules/openstack/etcd/ignition.tf | 59 --- modules/openstack/etcd/output.tf | 3 - modules/openstack/etcd/variables.tf | 46 --- modules/openstack/nodes/ignition.tf | 85 ----- modules/openstack/nodes/output.tf | 3 - .../nodes/resources/etcd-member.service | 6 - modules/openstack/nodes/variables-ignition.tf | 1 - modules/openstack/nodes/variables.tf | 53 --- modules/openstack/secgroups/output.tf | 44 --- .../secgroups/rules/default/secgroup.tf | 17 - .../secgroups/rules/default/variables.tf | 3 - .../secgroups/rules/etcd/secgroup.tf | 9 - .../secgroups/rules/etcd/variables.tf | 7 - .../openstack/secgroups/rules/k8s/secgroup.tf | 59 --- .../secgroups/rules/k8s/variables.tf | 7 - .../secgroups/rules/k8s_nodes/secgroup.tf | 9 - .../secgroups/rules/k8s_nodes/variables.tf | 7 - modules/openstack/secgroups/secgroup.tf | 45 --- modules/openstack/secgroups/variables.tf | 7 - modules/openstack/secrets/secrets.tf | 26 -- modules/openstack/secrets/variables.tf | 13 - steps/assets/tectonic.tf | 2 +- variables.bzl | 3 - 77 files changed, 117 insertions(+), 2597 deletions(-) delete mode 100644 Documentation/BUILD.bazel delete mode 100644 Makefile delete mode 100644 contrib/terraform-examples/BUILD.bazel delete mode 100644 contrib/terraform-examples/Gopkg.toml delete mode 100644 contrib/terraform-examples/README.md delete mode 100644 contrib/terraform-examples/main.go delete mode 100644 examples/terraform.tfvars.aws delete mode 100644 makelib/custom-providers.mk delete mode 100644 modules/bootkube-ut2/assets.tf delete mode 100644 modules/bootkube-ut2/outputs.tf delete mode 100644 modules/bootkube-ut2/resources/bootkube.path delete mode 100644 modules/bootkube-ut2/resources/bootkube.service delete mode 100644 modules/bootkube-ut2/resources/bootkube.sh delete mode 100644 modules/bootkube-ut2/resources/kco-config.yaml delete mode 100644 modules/bootkube-ut2/resources/kubeconfig delete mode 100644 modules/bootkube-ut2/resources/kubeconfig-kubelet delete mode 100644 modules/bootkube-ut2/resources/manifests/01-tectonic-namespace.yaml delete mode 100644 modules/bootkube-ut2/resources/manifests/02-ingress-namespace.yaml delete mode 100644 modules/bootkube-ut2/resources/manifests/app-version-kind.yaml delete mode 100644 modules/bootkube-ut2/resources/manifests/app-version-tectonic-network.yaml delete mode 100644 modules/bootkube-ut2/resources/manifests/kube-apiserver-secret.yaml delete mode 100644 modules/bootkube-ut2/resources/manifests/kube-cloud-config.yaml delete mode 100644 modules/bootkube-ut2/resources/manifests/kube-controller-manager-secret.yaml delete mode 100644 modules/bootkube-ut2/resources/manifests/kubelet-bootstrap-token.yaml delete mode 100644 modules/bootkube-ut2/resources/manifests/pull.json delete mode 100644 modules/bootkube-ut2/resources/manifests/tectonic-network-operator.yaml delete mode 100644 modules/bootkube-ut2/service-account.tf delete mode 100644 modules/bootkube-ut2/variables.tf delete mode 100644 modules/bootkube/resources/manifests/cluster-config.yaml rename modules/{bootkube-ut2 => bootkube}/resources/manifests/tectonic-node-controller-config.yaml (100%) rename modules/{bootkube-ut2 => bootkube}/resources/manifests/tectonic-node-controller-pod.yaml (100%) rename modules/{bootkube-ut2 => bootkube}/resources/manifests/tectonic-node-controller.yaml (100%) rename modules/{bootkube-ut2 => bootkube}/resources/tnc-config (100%) delete mode 100644 modules/bootstrap-ssh/main.tf delete mode 100644 modules/bootstrap-ssh/variables.tf delete mode 100644 modules/dns/azure/records.tf delete mode 100644 modules/dns/azure/variables.tf delete mode 100644 modules/dns/designate/etcd.tf delete mode 100644 modules/dns/designate/master.tf delete mode 100644 modules/dns/designate/outputs.tf delete mode 100644 modules/dns/designate/tectonic.tf delete mode 100644 modules/dns/designate/variables.tf delete mode 100644 modules/dns/designate/worker.tf delete mode 100644 modules/dns/gcp/outputs.tf delete mode 100644 modules/dns/gcp/records.tf delete mode 100644 modules/dns/gcp/variables.tf delete mode 100644 modules/openstack/etcd/ignition.tf delete mode 100644 modules/openstack/etcd/output.tf delete mode 100644 modules/openstack/etcd/variables.tf delete mode 100644 modules/openstack/nodes/ignition.tf delete mode 100644 modules/openstack/nodes/output.tf delete mode 100644 modules/openstack/nodes/resources/etcd-member.service delete mode 120000 modules/openstack/nodes/variables-ignition.tf delete mode 100644 modules/openstack/nodes/variables.tf delete mode 100644 modules/openstack/secgroups/output.tf delete mode 100644 modules/openstack/secgroups/rules/default/secgroup.tf delete mode 100644 modules/openstack/secgroups/rules/default/variables.tf delete mode 100644 modules/openstack/secgroups/rules/etcd/secgroup.tf delete mode 100644 modules/openstack/secgroups/rules/etcd/variables.tf delete mode 100644 modules/openstack/secgroups/rules/k8s/secgroup.tf delete mode 100644 modules/openstack/secgroups/rules/k8s/variables.tf delete mode 100644 modules/openstack/secgroups/rules/k8s_nodes/secgroup.tf delete mode 100644 modules/openstack/secgroups/rules/k8s_nodes/variables.tf delete mode 100644 modules/openstack/secgroups/secgroup.tf delete mode 100644 modules/openstack/secgroups/variables.tf delete mode 100644 modules/openstack/secrets/secrets.tf delete mode 100644 modules/openstack/secrets/variables.tf delete mode 100644 variables.bzl diff --git a/BUILD.bazel b/BUILD.bazel index 087e59646a..66ac9f108c 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -4,12 +4,6 @@ package( default_visibility = ["//visibility:public"], ) -template_files = glob([ - "modules/**/*", - "platforms/**/*", - "steps/**/*", -]) - config_setting( name = "darwin", values = {"cpu": "darwin"}, @@ -47,21 +41,6 @@ genrule( exports_files(["config.tf"]) -genrule( - name = "templates", - message = "Copying templates...", - output_to_bindir = 1, - srcs = template_files, - outs = ["templates/%s" % f for f in template_files], - cmd = '\n'.join([ - "for tf_file in $(SRCS); do", - "target=\"$(@D)/templates/$$(dirname $${tf_file})\"", - "mkdir -p $${target}", - "cp $${tf_file} $${target}", - "done" - ]), -) - load("@io_bazel_rules_go//go:def.bzl", "go_prefix") go_prefix("github.com/coreos/tectonic-installer") @@ -120,7 +99,7 @@ genrule( pkg_tar( name = "tarball_terraform_configuration", mode = "0644", - srcs = glob(["modules/**"]) + glob(["platforms/**"]) + glob(["steps/**"]) + ["config.tf"], + srcs = glob(["modules/**"], exclude=["modules/update-payload/**"]) + glob(["steps/**"]) + ["config.tf"], strip_prefix = ".", ) @@ -166,14 +145,12 @@ pkg_tar( srcs = ["@terraform_provider_matchbox_linux//:terraform-provider-matchbox"], ) -load("//:variables.bzl", "PLATFORMS") - pkg_tar( name = "tarball_examples", package_dir = "examples", # As long as we are not auto-generating the tectonic cli configuration # examples, make sure to add the manually created once to the tarball. - srcs = ["//examples:terraform.tfvars." + p for p in PLATFORMS] + ["//examples:tectonic_cli_configs"], + srcs = ["//examples:tectonic_cli_configs"], ) filegroup( @@ -181,9 +158,6 @@ filegroup( srcs = glob( ["modules/**/*.tf"], exclude_directories=1, - ) + glob( - ["platforms/**/*.tf"], - exclude_directories=1, ) + glob( ["steps/**/*.tf"], exclude_directories=1, diff --git a/Documentation/BUILD.bazel b/Documentation/BUILD.bazel deleted file mode 100644 index 0f3f339e57..0000000000 --- a/Documentation/BUILD.bazel +++ /dev/null @@ -1,14 +0,0 @@ -load("//:variables.bzl", "PLATFORMS") - -# DOCS is a dict of tuples matching {"name": ("src", "out"), ...}. -DOCS = {p: (PLATFORMS[p] + "/variables.tf", "variables/" + p + ".md") for p in PLATFORMS.keys()} -DOCS["config"] = ("//:config.tf", "variables/config.md") - -[genrule( - name = doc[0], - message = "Compiling docs for " + doc[0] + "...", - srcs = [doc[1][0]], - outs = [doc[1][1]], - cmd = "echo '' > $@ && echo '# Terraform variables' >> $@ && $(location @com_github_segmentio_terraform-docs//:terraform-docs) --no-required markdown $< >> $@", - tools = ["@com_github_segmentio_terraform-docs//:terraform-docs"], -) for doc in DOCS.items()] diff --git a/Documentation/dev/build.md b/Documentation/dev/build.md index 5b02f7d809..f0bbead341 100644 --- a/Documentation/dev/build.md +++ b/Documentation/dev/build.md @@ -64,7 +64,7 @@ tectonic ├── config.tf ├── examples ├── modules -├── platforms +├── steps └── tectonic-installer ├── darwin │   ├── tectonic @@ -90,7 +90,7 @@ tectonic_1.2.3-beta ├── config.tf ├── examples ├── modules -├── platforms +├── steps └── tectonic-installer ``` diff --git a/Jenkinsfile b/Jenkinsfile index 0be252ad5f..c10430a7aa 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -174,14 +174,6 @@ pipeline { archiveArtifacts allowEmptyArchive: true, artifacts: 'tectonic.tar.gz' } - withDockerContainer(params.builder_image) { - sh """#!/bin/bash -ex - mkdir -p \$(dirname $GO_PROJECT) && ln -sf $WORKSPACE $GO_PROJECT - - cd $GO_PROJECT/ - make structure-check - """ - } withDockerContainer(tectonicSmokeTestEnvImage) { sh"""#!/bin/bash -ex cd tests/rspec diff --git a/Makefile b/Makefile deleted file mode 100644 index 64f1c87cfb..0000000000 --- a/Makefile +++ /dev/null @@ -1,214 +0,0 @@ -CLUSTER ?= demo -PLATFORM ?= aws -TMPDIR ?= /tmp -GOOS=$(shell uname -s | tr '[:upper:]' '[:lower:]') -GOARCH=amd64 -TOP_DIR := $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))) -BUILD_DIR = $(TOP_DIR)/build/$(CLUSTER) -PLUGIN_DIR = $(BUILD_DIR)/terraform.d/plugins/$(GOOS)_$(GOARCH) -INSTALLER_PATH = $(TOP_DIR)/installer/bin/$(shell uname | tr '[:upper:]' '[:lower:]') -INSTALLER_BIN = $(INSTALLER_PATH)/installer -TF_DOCS := $(shell which terraform-docs 2> /dev/null) -TF_EXAMPLES := $(shell which terraform-examples 2> /dev/null) -TF_CMD = terraform -TEST_COMMAND = /bin/bash -c "bundler exec rspec spec/${TEST}" - -include ./makelib/*.mk - -$(info Using build directory [${BUILD_DIR}]) - -.PHONY: all -all: $(INSTALLER_BIN) custom-providers - -$(INSTALLER_BIN): - $(MAKE) build -C $(TOP_DIR)/installer - -.PHONY: localconfig -localconfig: - mkdir -p $(BUILD_DIR) - cp examples/*$(subst /,-,$(PLATFORM)) $(BUILD_DIR)/terraform.tfvars - -$(PLUGIN_DIR): - mkdir -p $(PLUGIN_DIR) - ln -s $(INSTALLER_PATH)/terraform-provider-* $(PLUGIN_DIR) - -.PHONY: terraform-init -terraform-init: custom-providers $(PLUGIN_DIR) -ifneq ($(shell $(TF_CMD) version | grep -E "Terraform v0\.1[0-9]\.[0-9]+"), ) - cd $(BUILD_DIR) && $(TF_CMD) init $(TF_INIT_OPTIONS) $(TOP_DIR)/platforms/$(PLATFORM) -else - cd $(BUILD_DIR) && $(TF_CMD) get $(TF_GET_OPTIONS) $(TOP_DIR)/platforms/$(PLATFORM) -endif - -.PHONY: plan -plan: terraform-init - cd $(BUILD_DIR) && $(TF_CMD) plan $(TF_PLAN_OPTIONS) $(TOP_DIR)/platforms/$(PLATFORM) - -.PHONY: apply -apply: terraform-init - cd $(BUILD_DIR) && $(TF_CMD) apply $(TF_APPLY_OPTIONS) -auto-approve $(TOP_DIR)/platforms/$(PLATFORM) - -.PHONY: destroy -destroy: terraform-init - cd $(BUILD_DIR) && $(TF_CMD) destroy $(TF_DESTROY_OPTIONS) -force $(TOP_DIR)/platforms/$(PLATFORM) - -define terraform-docs - $(if $(TF_DOCS),,$(error terraform-docs revision >= a8b59f8 is required (https://github.com/segmentio/terraform-docs))) - - @echo '' > $1 - @echo '# Terraform variables' >> $1 - @echo $2 >> $1 - terraform-docs --no-required markdown $3 $4 $5 $6 >> $1 -endef - -define terraform-examples - $(if $(TF_EXAMPLES),,$(error terraform-examples is required. Execute "go get github.com/coreos/tectonic-installer/contrib/terraform-examples" to install it.)) - terraform-examples $2 $3 $4 $5 > $1 -endef - -.PHONY: docs -docs: - $(call terraform-docs, Documentation/variables/config.md, \ - 'This document gives an overview of variables used in all platforms of the Tectonic SDK.', \ - config.tf) - - $(call terraform-docs, Documentation/variables/aws.md, \ - 'This document gives an overview of variables used in the AWS platform of the Tectonic SDK.', \ - platforms/aws/variables.tf) - - $(call terraform-docs, Documentation/variables/govcloud.md, \ - 'This document gives an overview of variables used in the GovCloud AWS platform of the Tectonic SDK.', \ - platforms/govcloud/variables.tf) - - $(call terraform-docs, Documentation/variables/azure.md, \ - 'This document gives an overview of variables used in the Azure platform of the Tectonic SDK.', \ - platforms/azure/variables.tf) - - $(call terraform-docs, Documentation/variables/openstack-neutron.md, \ - 'This document gives an overview of variables used in the Openstack/Neutron platform of the Tectonic SDK.', \ - platforms/openstack/neutron/variables.tf) - - $(call terraform-docs, Documentation/variables/metal.md, \ - 'This document gives an overview of variables used in the bare metal platform of the Tectonic SDK.', \ - platforms/metal/variables.tf) - - $(call terraform-docs, Documentation/variables/vmware.md, \ - 'This document gives an overview of variables used in the VMware platform of the Tectonic SDK.', \ - platforms/vmware/variables.tf) - - $(call terraform-docs, Documentation/variables/gcp.md, \ - 'This document gives an overview of variables used in the Google Cloud platform of the Tectonic SDK.', \ - platforms/gcp/variables.tf) - -.PHONY: examples -examples: - $(call terraform-examples, examples/terraform.tfvars.aws, \ - config.tf, \ - platforms/aws/variables.tf) - - $(call terraform-examples, examples/terraform.tfvars.govcloud, \ - config.tf, \ - platforms/govcloud/variables.tf) - - $(call terraform-examples, \ - examples/terraform.tfvars.azure, \ - config.tf, \ - platforms/azure/variables.tf) - - $(call terraform-examples, \ - examples/terraform.tfvars.openstack-neutron, \ - config.tf, \ - platforms/openstack/neutron/variables.tf) - - $(call terraform-examples, \ - examples/terraform.tfvars.metal, \ - config.tf, \ - platforms/metal/variables.tf) - - $(call terraform-examples, \ - examples/terraform.tfvars.vmware, \ - config.tf, \ - platforms/vmware/variables.tf) - - $(call terraform-examples, \ - examples/terraform.tfvars.gcp, \ - config.tf, \ - platforms/gcp/variables.tf) -.PHONY: clean -clean: - rm -rf $(BUILD_DIR) - $(MAKE) clean -C $(TOP_DIR)/installer - rm -f $(TF_RC) - -# This target is used by the GitHub PR checker to validate canonical syntax on all files. -# -.PHONY: structure-check -structure-check: - $(eval FMT_ERR := $(shell terraform fmt -list -write=false .)) - @if [ "$(FMT_ERR)" != "" ]; then echo "misformatted files (run 'terraform fmt .' to fix):" $(FMT_ERR); exit 1; fi - - @if $(MAKE) docs && ! git diff --exit-code; then echo "outdated docs (run 'make docs' to fix)"; exit 1; fi - @if $(MAKE) examples && ! git diff --exit-code; then echo "outdated examples (run 'make examples' to fix)"; exit 1; fi - -SMOKE_SOURCES := $(shell find $(TOP_DIR)/tests/smoke -name '*.go') -bin/smoke: $(SMOKE_SOURCES) - @CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go test ./tests/smoke/ -c -o bin/smoke - -.PHONY: vendor-smoke -vendor-smoke: $(TOP_DIR)/tests/smoke/glide.yaml - @cd $(TOP_DIR)/tests/smoke && glide up -v - @cd $(TOP_DIR)/tests/smoke && glide-vc --use-lock-file --no-tests --only-code - -.PHONY: e2e-docker-image -e2e-docker-image: images/kubernetes-e2e/Dockerfile - @export E2E_IMAGE="quay.io/coreos/kube-conformance:$$(grep 'ARG E2E_REF' $< | cut -d '=' -f2 | sed 's/+/_/')"; \ - echo "Building E2E image $${E2E_IMAGE}"; \ - docker build -t $${E2E_IMAGE} $(dir $<) - -.PHONY: smoke-test-env-docker-image -smoke-test-env-docker-image: - docker build -t quay.io/coreos/tectonic-smoke-test-env -f images/tectonic-smoke-test-env/Dockerfile . - -.PHONY: tests/smoke -tests/smoke: bin/smoke smoke-test-env-docker-image - docker run \ - --rm \ - -it \ - -v "${CURDIR}":"${CURDIR}" \ - -w "${CURDIR}/tests/rspec" \ - -v "${TF_VAR_tectonic_license_path}":"${TF_VAR_tectonic_license_path}" \ - -v "${TF_VAR_tectonic_pull_secret_path}":"${TF_VAR_tectonic_pull_secret_path}" \ - -v "${HOME}/.ssh:/root/.ssh:ro" \ - -v "/var/run/docker.sock:/var/run/docker.sock" \ - -v "${TF_VAR_tectonic_azure_ssh_key}":"${TF_VAR_tectonic_azure_ssh_key}" \ - -e CLUSTER \ - -e AWS_ACCESS_KEY_ID \ - -e AWS_SECRET_ACCESS_KEY \ - -e ARM_CLIENT_ID \ - -e ARM_CLIENT_SECRET \ - -e ARM_ENVIRONMENT \ - -e ARM_SUBSCRIPTION_ID \ - -e ARM_TENANT_ID \ - -e GOOGLE_APPLICATION_CREDENTIALS \ - -e GOOGLE_CREDENTIALS \ - -e GOOGLE_CLOUD_KEYFILE_JSON \ - -e GCLOUD_KEYFILE_JSON \ - -e GOOGLE_PROJECT \ - -e TF_VAR_tectonic_gcp_ssh_key \ - -e TF_VAR_tectonic_aws_region \ - -e TF_VAR_tectonic_aws_ssh_key \ - -e TF_VAR_tectonic_azure_location \ - -e TF_VAR_tectonic_license_path \ - -e TF_VAR_tectonic_pull_secret_path \ - -e TF_VAR_tectonic_base_domain \ - -e TF_VAR_tectonic_admin_email \ - -e TF_VAR_tectonic_admin_password \ - -e TECTONIC_TESTS_DONT_CLEAN_UP \ - -e RUN_SMOKE_TESTS \ - -e RUN_CONFORMANCE_TESTS \ - -e KUBE_CONFORMANCE_IMAGE \ - -e COMPONENT_TEST_IMAGES \ - --cap-add NET_ADMIN \ - --device /dev/net/tun \ - quay.io/coreos/tectonic-smoke-test-env \ - $(TEST_COMMAND) diff --git a/WORKSPACE b/WORKSPACE index 6c1100cbcb..12b54518fd 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -54,22 +54,3 @@ visibility = ["//visibility:public"] strip_prefix = "terraform-provider-matchbox-v%s-%s-amd64/" % (provider_matchbox_version, platform), url = "https://github.com/coreos/terraform-provider-matchbox/releases/download/v%s/terraform-provider-matchbox-v%s-%s-amd64.tar.gz" % (provider_matchbox_version, provider_matchbox_version, platform), ) for platform in supported_platforms] - -# Import Go dependencies. -go_repository( - name = "com_github_hashicorp_hcl", - importpath = "github.com/hashicorp/hcl", - commit = "23c074d0eceb2b8a5bfdbb271ab780cde70f05a8", -) - -go_repository( - name = "com_github_segmentio_terraform-docs", - importpath = "github.com/segmentio/terraform-docs", - tag = "v0.3.0", -) - -go_repository( - name = "com_github_tj_docopt", - importpath = "github.com/tj/docopt", - tag = "v1.0.0", -) diff --git a/contrib/terraform-examples/BUILD.bazel b/contrib/terraform-examples/BUILD.bazel deleted file mode 100644 index 7a39e39ee9..0000000000 --- a/contrib/terraform-examples/BUILD.bazel +++ /dev/null @@ -1,21 +0,0 @@ -# gazelle:ignore -load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") - -go_library( - name = "go_default_library", - srcs = ["main.go"], - importpath = "github.com/coreos/tectonic-installer/contrib/terraform-examples", - visibility = ["//visibility:private"], - deps = [ - "@com_github_hashicorp_hcl//:go_default_library", - "@com_github_hashicorp_hcl//hcl/ast:go_default_library", - "@com_github_hashicorp_hcl//hcl/token:go_default_library", - ], -) - -go_binary( - name = "terraform-examples", - embed = [":go_default_library"], - importpath = "github.com/coreos/tectonic-installer/contrib/terraform-examples", - visibility = ["//visibility:public"], -) diff --git a/contrib/terraform-examples/Gopkg.toml b/contrib/terraform-examples/Gopkg.toml deleted file mode 100644 index 54d7a43c6d..0000000000 --- a/contrib/terraform-examples/Gopkg.toml +++ /dev/null @@ -1,3 +0,0 @@ -[[constraint]] - branch = "master" - name = "github.com/hashicorp/hcl" diff --git a/contrib/terraform-examples/README.md b/contrib/terraform-examples/README.md deleted file mode 100644 index 0fd9efb9bb..0000000000 --- a/contrib/terraform-examples/README.md +++ /dev/null @@ -1,8 +0,0 @@ -## terraform-examples - -This is a very simple (and most probably incomplete) tool to generate example terraform.tfvars from files or stdin with variable declarations. - -Usage: -``` -$ usage: terraform-example [-|...] -``` diff --git a/contrib/terraform-examples/main.go b/contrib/terraform-examples/main.go deleted file mode 100644 index 69b9e11e26..0000000000 --- a/contrib/terraform-examples/main.go +++ /dev/null @@ -1,213 +0,0 @@ -package main - -import ( - "errors" - "flag" - "fmt" - "io/ioutil" - "os" - "sort" - "strings" - - "github.com/hashicorp/hcl" - "github.com/hashicorp/hcl/hcl/ast" - "github.com/hashicorp/hcl/hcl/token" -) - -type Variable struct { - Name string - Description string - Default string -} - -type Index struct { - Variables []Variable -} - -type ByName []Variable - -func (s ByName) Len() int { return len(s) } -func (s ByName) Swap(i, j int) { s[i], s[j] = s[j], s[i] } -func (s ByName) Less(i, j int) bool { return s[i].Name < s[j].Name } - -type stateFunc func(n ast.Node, v *Variable) stateFunc - -func newIndex(c []byte) (*Index, error) { - file, err := hcl.ParseBytes(c) - if err != nil { - return nil, err - } - - v := &Variable{} - idx := &Index{} - state := idx.content - - ast.Walk(file.Node, func(n ast.Node) (ast.Node, bool) { - state = state(n, v) - return n, true - }) - - idx.Variables = append(idx.Variables, *v) - idx.Variables = idx.Variables[1:] - - return idx, nil -} - -func (i *Index) content(n ast.Node, v *Variable) stateFunc { - key, ok := n.(*ast.ObjectKey) - if !ok { - return i.content - } - - if key.Token.Type != token.IDENT { - return i.content - } - - switch key.Token.Text { - case "default": - return i.defaultValue - case "description": - return i.description - case "variable": - i.Variables = append(i.Variables, *v) - *v = Variable{} - return i.variableName - } - - return i.content -} - -func (i *Index) variableName(n ast.Node, v *Variable) stateFunc { - key, ok := n.(*ast.ObjectKey) - if !ok { - return i.variableName - } - - if key.Token.Type != token.STRING { - return i.variableName - } - - v.Name = key.Token.Text - - return i.content -} - -func (i *Index) defaultValue(n ast.Node, v *Variable) stateFunc { - if _, ok := n.(*ast.ListType); ok { - return i.content - } - - if _, ok := n.(*ast.ObjectType); ok { - return i.content - } - - key, ok := n.(*ast.LiteralType) - if !ok { - return i.defaultValue - } - - switch key.Token.Type { - case token.BOOL: - v.Default = key.Token.Text - return i.content - case token.STRING: - v.Default = key.Token.Text - return i.content - } - - return i.defaultValue -} - -func (i *Index) description(n ast.Node, v *Variable) stateFunc { - key, ok := n.(*ast.LiteralType) - if !ok { - return i.description - } - - switch key.Token.Type { - case token.HEREDOC: - v.Description = key.Token.Value().(string) - return i.content - case token.STRING: - v.Description = key.Token.Value().(string) - return i.content - } - - return i.description -} - -func contents(args []string) ([]byte, error) { - if args[0] == "-" { - if len(args) > 1 { - return nil, errors.New("invalid stdin qualifier: multiple files provided") - } - - return ioutil.ReadAll(os.Stdin) - } - - var contents []byte - - for _, path := range flag.Args() { - c, err := ioutil.ReadFile(path) - if err != nil { - return nil, err - } - - contents = append(contents, c...) - contents = append(contents, []byte("\n")...) - } - - return contents, nil -} - -func main() { - flag.Usage = func() { - fmt.Fprintf(os.Stderr, "usage: terraform-example [-|...]\n") - flag.PrintDefaults() - } - flag.Parse() - - if len(flag.Args()) == 0 { - flag.Usage() - os.Exit(1) - } - - var c []byte - c, err := contents(flag.Args()) - if err != nil { - fmt.Fprintln(os.Stderr, err) - os.Exit(1) - } - - idx, err := newIndex(c) - if err != nil { - fmt.Fprintln(os.Stderr, err) - os.Exit(1) - } - - sort.Sort(ByName(idx.Variables)) - - for _, v := range idx.Variables { - if strings.HasPrefix(v.Description, "(internal)") { - continue - } - - fmt.Printf("\n") - - v.Name = strings.Trim(v.Name, `"`) - - if strings.HasPrefix(v.Description, "(optional)") { - v.Name = `// ` + v.Name - } - - for _, l := range strings.Split(strings.TrimSpace(v.Description), "\n") { - fmt.Printf("// %s\n", l) - } - - if v.Default == "" { - fmt.Printf("%s = \"\"\n", v.Name) - } else { - fmt.Printf("%s = %s\n", v.Name, v.Default) - } - } -} diff --git a/examples/BUILD.bazel b/examples/BUILD.bazel index 0f6822ce7d..dbdea724d2 100644 --- a/examples/BUILD.bazel +++ b/examples/BUILD.bazel @@ -1,18 +1,3 @@ -load("//:variables.bzl", "PLATFORMS") - -# EXAMPLES is a dict of tuples matching {"name": ("src", "out"), ...}. -EXAMPLES = {p: (PLATFORMS[p] + "/variables.tf", "terraform.tfvars." + p) for p in PLATFORMS.keys()} - -[genrule( - name = example[0], - message = "Compiling examples for " + example[0] + "...", - srcs = ["//:config.tf", example[1][0]], - outs = [example[1][1]], - cmd = "$(location //contrib/terraform-examples:terraform-examples) $(SRCS) > $@", - tools = ["//contrib/terraform-examples:terraform-examples"], - visibility = ["//visibility:public"], -) for example in EXAMPLES.items()] - filegroup( name= "tectonic_cli_configs", srcs = glob(["tectonic.*.yaml"]), diff --git a/examples/terraform.tfvars.aws b/examples/terraform.tfvars.aws deleted file mode 100644 index 964e8ef55d..0000000000 --- a/examples/terraform.tfvars.aws +++ /dev/null @@ -1,342 +0,0 @@ - -// (optional) Extra AWS tags to be applied to created autoscaling group resources. -// This is a list of maps having the keys `key`, `value` and `propagate_at_launch`. -// -// Example: `[ { key = "foo", value = "bar", propagate_at_launch = true } ]` -// tectonic_autoscaling_group_extra_tags = "" - -// (optional) Unique name under which the Amazon S3 bucket will be created. Bucket name must start with a lower case name and is limited to 63 characters. -// The Tectonic Installer uses the bucket to store tectonic assets and kubeconfig. -// If name is not provided the installer will construct the name using "tectonic_cluster_name", current AWS region and "tectonic_base_domain" -// tectonic_aws_assets_s3_bucket_name = "" - -// (optional) AMI override for all nodes. Example: `ami-foobar123`. -// tectonic_aws_ec2_ami_override = "" - -// Instance size for the etcd node(s). Example: `t2.medium`. Read the [etcd recommended hardware](https://coreos.com/etcd/docs/latest/op-guide/hardware.html) guide for best performance -tectonic_aws_etcd_ec2_type = "t2.medium" - -// (optional) List of additional security group IDs for etcd nodes. -// -// Example: `["sg-51530134", "sg-b253d7cc"]` -// tectonic_aws_etcd_extra_sg_ids = "" - -// (optional) Name of IAM role to use for the instance profiles of etcd nodes. -// The name is also the last part of a role's ARN. -// -// Example: -// * Role ARN = arn:aws:iam::123456789012:role/tectonic-installer -// * Role Name = tectonic-installer -// tectonic_aws_etcd_iam_role_name = "" - -// The amount of provisioned IOPS for the root block device of etcd nodes. -// Ignored if the volume type is not io1. -tectonic_aws_etcd_root_volume_iops = "100" - -// The size of the volume in gigabytes for the root block device of etcd nodes. -tectonic_aws_etcd_root_volume_size = "30" - -// The type of volume for the root block device of etcd nodes. -tectonic_aws_etcd_root_volume_type = "gp2" - -// (optional) List of subnet IDs within an existing VPC to deploy master nodes into. -// Required to use an existing VPC and the list must match the AZ count. -// -// Example: `["subnet-111111", "subnet-222222", "subnet-333333"]` -// tectonic_aws_external_master_subnet_ids = "" - -// (optional) If set, the given Route53 zone ID will be used as the internal (private) zone. -// This zone will be used to create etcd DNS records as well as internal API and internal Ingress records. -// If set, no additional private zone will be created. -// -// Example: `"Z1ILINNUJGTAO1"` -// tectonic_aws_external_private_zone = "" - -// (optional) ID of an existing VPC to launch nodes into. -// If unset a new VPC is created. -// -// Example: `vpc-123456` -// tectonic_aws_external_vpc_id = "" - -// (optional) List of subnet IDs within an existing VPC to deploy worker nodes into. -// Required to use an existing VPC and the list must match the AZ count. -// -// Example: `["subnet-111111", "subnet-222222", "subnet-333333"]` -// tectonic_aws_external_worker_subnet_ids = "" - -// (optional) Extra AWS tags to be applied to created resources. -// -// Example: `{ "key" = "value", "foo" = "bar" }` -// tectonic_aws_extra_tags = "" - -// (optional) Name of IAM role to use to access AWS in order to deploy the Tectonic Cluster. -// The name is also the full role's ARN. -// -// Example: -// * Role ARN = arn:aws:iam::123456789012:role/tectonic-installer -// tectonic_aws_installer_role = "" - -// (optional) This configures master availability zones and their corresponding subnet CIDRs directly. -// -// Example: -// `{ eu-west-1a = "10.0.0.0/20", eu-west-1b = "10.0.16.0/20" }` -// tectonic_aws_master_custom_subnets = "" - -// Instance size for the master node(s). Example: `t2.medium`. -tectonic_aws_master_ec2_type = "t2.medium" - -// (optional) List of additional security group IDs for master nodes. -// -// Example: `["sg-51530134", "sg-b253d7cc"]` -// tectonic_aws_master_extra_sg_ids = "" - -// (optional) Name of IAM role to use for the instance profiles of master nodes. -// The name is also the last part of a role's ARN. -// -// Example: -// * Role ARN = arn:aws:iam::123456789012:role/tectonic-installer -// * Role Name = tectonic-installer -// tectonic_aws_master_iam_role_name = "" - -// The amount of provisioned IOPS for the root block device of master nodes. -// Ignored if the volume type is not io1. -tectonic_aws_master_root_volume_iops = "100" - -// The size of the volume in gigabytes for the root block device of master nodes. -tectonic_aws_master_root_volume_size = "30" - -// The type of volume for the root block device of master nodes. -tectonic_aws_master_root_volume_type = "gp2" - -// (optional) If set to true, create private-facing ingress resources (ELB, A-records). -// If set to false, no private-facing ingress resources will be provisioned and all DNS records will be created in the public Route53 zone. -// tectonic_aws_private_endpoints = true - -// (optional) This declares the AWS credentials profile to use. -// tectonic_aws_profile = "default" - -// (optional) If set to true, create public-facing ingress resources (ELB, A-records). -// If set to false, no public-facing ingress resources will be created. -// tectonic_aws_public_endpoints = true - -// The target AWS region for the cluster. -tectonic_aws_region = "eu-west-1" - -// Name of an SSH key located within the AWS region. Example: coreos-user. -tectonic_aws_ssh_key = "" - -// Block of IP addresses used by the VPC. -// This should not overlap with any other networks, such as a private datacenter connected via Direct Connect. -tectonic_aws_vpc_cidr_block = "10.0.0.0/16" - -// (optional) This configures worker availability zones and their corresponding subnet CIDRs directly. -// -// Example: `{ eu-west-1a = "10.0.64.0/20", eu-west-1b = "10.0.80.0/20" }` -// tectonic_aws_worker_custom_subnets = "" - -// Instance size for the worker node(s). Example: `t2.medium`. -tectonic_aws_worker_ec2_type = "t2.medium" - -// (optional) List of additional security group IDs for worker nodes. -// -// Example: `["sg-51530134", "sg-b253d7cc"]` -// tectonic_aws_worker_extra_sg_ids = "" - -// (optional) Name of IAM role to use for the instance profiles of worker nodes. -// The name is also the last part of a role's ARN. -// -// Example: -// * Role ARN = arn:aws:iam::123456789012:role/tectonic-installer -// * Role Name = tectonic-installer -// tectonic_aws_worker_iam_role_name = "" - -// (optional) List of ELBs to attach all worker instances to. -// This is useful for exposing NodePort services via load-balancers managed separately from the cluster. -// -// Example: -// * `["ingress-nginx"]` -// tectonic_aws_worker_load_balancers = "" - -// The amount of provisioned IOPS for the root block device of worker nodes. -// Ignored if the volume type is not io1. -tectonic_aws_worker_root_volume_iops = "100" - -// The size of the volume in gigabytes for the root block device of worker nodes. -tectonic_aws_worker_root_volume_size = "30" - -// The type of volume for the root block device of worker nodes. -tectonic_aws_worker_root_volume_type = "gp2" - -// The base DNS domain of the cluster. It must NOT contain a trailing period. Some -// DNS providers will automatically add this if necessary. -// -// Example: `openstack.dev.coreos.systems`. -// -// Note: This field MUST be set manually prior to creating the cluster. -// This applies only to cloud platforms. -// -// [Azure-specific NOTE] -// To use Azure-provided DNS, `tectonic_base_domain` should be set to `""` -// If using DNS records, ensure that `tectonic_base_domain` is set to a properly configured external DNS zone. -// Instructions for configuring delegated domains for Azure DNS can be found here: https://docs.microsoft.com/en-us/azure/dns/dns-delegate-domain-azure-dns -tectonic_base_domain = "" - -// (optional) The content of the PEM-encoded CA certificate, used to generate Tectonic Console's server certificate. -// If left blank, a CA certificate will be automatically generated. -// tectonic_ca_cert = "" - -// (optional) The content of the PEM-encoded CA key, used to generate Tectonic Console's server certificate. -// This field is mandatory if `tectonic_ca_cert` is set. -// tectonic_ca_key = "" - -// (optional) The algorithm used to generate tectonic_ca_key. -// The default value is currently recommended. -// This field is mandatory if `tectonic_ca_cert` is set. -// tectonic_ca_key_alg = "RSA" - -// (optional) This declares the IP range to assign Kubernetes pod IPs in CIDR notation. -// tectonic_cluster_cidr = "10.2.0.0/16" - -// The name of the cluster. -// If used in a cloud-environment, this will be prepended to `tectonic_base_domain` resulting in the URL to the Tectonic console. -// -// Note: This field MUST be set manually prior to creating the cluster. -// Warning: Special characters in the name like '.' may cause errors on OpenStack platforms due to resource name constraints. -tectonic_cluster_name = "" - -// (optional) The Container Linux update channel. -// -// Examples: `stable`, `beta`, `alpha` -// tectonic_container_linux_channel = "stable" - -// The Container Linux version to use. Set to `latest` to select the latest available version for the selected update channel. -// -// Examples: `latest`, `1465.6.0` -tectonic_container_linux_version = "latest" - -// (optional) A list of PEM encoded CA files that will be installed in /etc/ssl/certs on etcd, master, and worker nodes. -// tectonic_custom_ca_pem_list = "" - -// (optional) This only applies if you use the modules/dns/ddns module. -// -// Specifies the RFC2136 Dynamic DNS server key algorithm. -// tectonic_ddns_key_algorithm = "" - -// (optional) This only applies if you use the modules/dns/ddns module. -// -// Specifies the RFC2136 Dynamic DNS server key name. -// tectonic_ddns_key_name = "" - -// (optional) This only applies if you use the modules/dns/ddns module. -// -// Specifies the RFC2136 Dynamic DNS server key secret. -// tectonic_ddns_key_secret = "" - -// (optional) This only applies if you use the modules/dns/ddns module. -// -// Specifies the RFC2136 Dynamic DNS server IP/host to register IP addresses to. -// tectonic_ddns_server = "" - -// (optional) DNS prefix used to construct the console and API server endpoints. -// tectonic_dns_name = "" - -// (optional) Enable boot diagnostics for example the boot logs. -// It is only supported for Azure cloud provider. -// Used to collect the boot logs for debug purposes. -// tectonic_enable_boot_diagnostics = "false" - -// (optional) The path of the file containing the CA certificate for TLS communication with etcd. -// -// Note: This works only when used in conjunction with an external etcd cluster. -// If set, the variable `tectonic_etcd_servers` must also be set. -// tectonic_etcd_ca_cert_path = "/dev/null" - -// (optional) The path of the file containing the client certificate for TLS communication with etcd. -// -// Note: This works only when used in conjunction with an external etcd cluster. -// If set, the variables `tectonic_etcd_servers`, `tectonic_etcd_ca_cert_path`, and `tectonic_etcd_client_key_path` must also be set. -// tectonic_etcd_client_cert_path = "/dev/null" - -// (optional) The path of the file containing the client key for TLS communication with etcd. -// -// Note: This works only when used in conjunction with an external etcd cluster. -// If set, the variables `tectonic_etcd_servers`, `tectonic_etcd_ca_cert_path`, and `tectonic_etcd_client_cert_path` must also be set. -// tectonic_etcd_client_key_path = "/dev/null" - -// The number of etcd nodes to be created. -// If set to zero, the count of etcd nodes will be determined automatically. -// -// Note: This is not supported on bare metal. -tectonic_etcd_count = "0" - -// (optional) List of external etcd v3 servers to connect with (hostnames/IPs only). -// Needs to be set if using an external etcd cluster. -// Note: If this variable is defined, the installer will not create self-signed certs. -// To provide a CA certificate to trust the etcd servers, set "tectonic_etcd_ca_cert_path". -// -// Example: `["etcd1", "etcd2", "etcd3"]` -// tectonic_etcd_servers = "" - -// (optional) HTTP proxy address. -// -// Example: `http://myproxy.example.com` -// tectonic_http_proxy_address = "" - -// (optional) HTTPS proxy address. -// -// Example: `http://myproxy.example.com` -// tectonic_https_proxy_address = "" - -// (optional) Start iscsid.service to enable iscsi volume attachment. -// tectonic_iscsi_enabled = "false" - -// The path to the tectonic licence file. -// You can download the Tectonic license file from your Account overview page at [1]. -// -// [1] https://account.coreos.com/overview -tectonic_license_path = "" - -// The number of master nodes to be created. -// This applies only to cloud platforms. -tectonic_master_count = "1" - -// (optional) Configures the network to be used in Tectonic. One of the following values can be used: -// -// - "flannel": enables overlay networking only. This is implemented by flannel using VXLAN. -// -// - "canal": enables overlay networking including network policy. Overlay is implemented by flannel using VXLAN. Network policy is implemented by Calico. -// -// - "calico-ipip": [ALPHA] enables BGP based networking. Routing and network policy is implemented by Calico. Note this has been tested on baremetal installations only. -// -// - "none": disables the installation of any Pod level networking layer provided by Tectonic. By setting this value, users are expected to deploy their own solution to enable network connectivity for Pods and Services. -// tectonic_networking = "canal" - -// (optional) List of local endpoints that will not use HTTP proxy. -// -// Example: `["127.0.0.1","localhost",".example.com","10.3.0.1"]` -// tectonic_no_proxy = "" - -// The path the pull secret file in JSON format. -// This is known to be a "Docker pull secret" as produced by the docker login [1] command. -// A sample JSON content is shown in [2]. -// You can download the pull secret from your Account overview page at [3]. -// -// [1] https://docs.docker.com/engine/reference/commandline/login/ -// -// [2] https://coreos.com/os/docs/latest/registry-authentication.html#manual-registry-auth-setup -// -// [3] https://account.coreos.com/overview -tectonic_pull_secret_path = "" - -// (optional) This declares the IP range to assign Kubernetes service cluster IPs in CIDR notation. -// The maximum size of this IP range is /12 -// tectonic_service_cidr = "10.3.0.0/16" - -// Validity period of the self-signed certificates (in hours). -// Default is 3 years. -// This setting is ignored if user provided certificates are used. -tectonic_tls_validity_period = "26280" - -// The number of worker nodes to be created. -// This applies only to cloud platforms. -tectonic_worker_count = "3" diff --git a/makelib/custom-providers.mk b/makelib/custom-providers.mk deleted file mode 100644 index 97fbb5d15e..0000000000 --- a/makelib/custom-providers.mk +++ /dev/null @@ -1,12 +0,0 @@ -PROVIDER_MATCHBOX_VERSION = v0.2.2 - -.PHONY: -custom-providers: $(INSTALLER_PATH)/terraform-provider-matchbox - -$(INSTALLER_PATH)/terraform-provider-matchbox: - curl -L -o $(TMPDIR)/terraform-provider-matchbox-$(PROVIDER_MATCHBOX_VERSION)-$(GOOS)-$(GOARCH).tar.gz \ - https://github.com/coreos/terraform-provider-matchbox/releases/download/$(PROVIDER_MATCHBOX_VERSION)/terraform-provider-matchbox-$(PROVIDER_MATCHBOX_VERSION)-$(GOOS)-$(GOARCH).tar.gz - cd $(TMPDIR) && tar xvf terraform-provider-matchbox-$(PROVIDER_MATCHBOX_VERSION)-$(GOOS)-$(GOARCH).tar.gz - mkdir -p $(INSTALLER_PATH) - cp $(TMPDIR)/terraform-provider-matchbox-$(PROVIDER_MATCHBOX_VERSION)-$(GOOS)-$(GOARCH)/terraform-provider-matchbox $(INSTALLER_PATH)/ - rm -rf $(TMPDIR)/terraform-provider-matchbox-$(PROVIDER_MATCHBOX_VERSION)-$(GOOS)-$(GOARCH)* diff --git a/modules/bootkube-ut2/assets.tf b/modules/bootkube-ut2/assets.tf deleted file mode 100644 index 39b9ececbb..0000000000 --- a/modules/bootkube-ut2/assets.tf +++ /dev/null @@ -1,188 +0,0 @@ -# Kubelet tls bootstraping id and secret -resource "random_string" "kubelet_bootstrap_token_id" { - length = 6 - special = false - upper = false -} - -resource "random_string" "kubelet_bootstrap_token_secret" { - length = 16 - special = false - upper = false -} - -# Self-hosted manifests (resources/generated/manifests/) -resource "template_dir" "bootkube" { - source_dir = "${path.module}/resources/manifests" - destination_dir = "./generated/manifests" - - vars { - tectonic_network_operator_image = "${var.container_images["tectonic_network_operator"]}" - tnc_bootstrap_image = "${var.container_images["tnc_bootstrap"]}" - - kco_config = "${indent(4, chomp(data.template_file.kco-config_yaml.rendered))}" - - calico_mtu = "${var.calico_mtu}" - cloud_provider_config = "${var.cloud_provider_config}" - cluster_cidr = "${var.cluster_cidr}" - tectonic_networking = "${var.tectonic_networking}" - - root_ca_cert = "${base64encode(var.root_ca_cert_pem)}" - aggregator_ca_cert = "${base64encode(var.aggregator_ca_cert_pem)}" - kube_ca_cert = "${base64encode(var.kube_ca_cert_pem)}" - kube_ca_key = "${base64encode(var.kube_ca_key_pem)}" - kubelet_bootstrap_token_id = "${random_string.kubelet_bootstrap_token_id.result}" - kubelet_bootstrap_token_secret = "${random_string.kubelet_bootstrap_token_secret.result}" - apiserver_key = "${base64encode(var.apiserver_key_pem)}" - apiserver_cert = "${base64encode(var.apiserver_cert_pem)}" - apiserver_proxy_key = "${base64encode(var.apiserver_proxy_key_pem)}" - apiserver_proxy_cert = "${base64encode(var.apiserver_proxy_cert_pem)}" - oidc_ca_cert = "${base64encode(var.oidc_ca_cert)}" - pull_secret = "${base64encode(file(var.pull_secret_path))}" - serviceaccount_pub = "${base64encode(tls_private_key.service_account.public_key_pem)}" - serviceaccount_key = "${base64encode(tls_private_key.service_account.private_key_pem)}" - kube_dns_service_ip = "${cidrhost(var.service_cidr, 10)}" - - etcd_ca_cert = "${base64encode(var.etcd_ca_cert_pem)}" - etcd_client_cert = "${base64encode(var.etcd_client_cert_pem)}" - etcd_client_key = "${base64encode(var.etcd_client_key_pem)}" - - tnc_config = "${indent(4, chomp(data.template_file.tnc_config.rendered))}" - } -} - -# kubeconfig (resources/generated/auth/kubeconfig) -data "template_file" "kubeconfig" { - template = "${file("${path.module}/resources/kubeconfig")}" - - vars { - root_ca_cert = "${base64encode(var.root_ca_cert_pem)}" - admin_cert = "${base64encode(var.admin_cert_pem)}" - admin_key = "${base64encode(var.admin_key_pem)}" - server = "${var.kube_apiserver_url}" - cluster_name = "${var.cluster_name}" - } -} - -resource "local_file" "kubeconfig" { - content = "${data.template_file.kubeconfig.rendered}" - filename = "./generated/auth/kubeconfig" -} - -# kubeconfig-kubelet (resources/generated/auth/kubeconfig-kubelet) -data "template_file" "kubeconfig-kubelet" { - template = "${file("${path.module}/resources/kubeconfig-kubelet")}" - - vars { - root_ca_cert = "${base64encode(var.root_ca_cert_pem)}" - kubelet_bootstrap_token_id = "${random_string.kubelet_bootstrap_token_id.result}" - kubelet_bootstrap_token_secret = "${random_string.kubelet_bootstrap_token_secret.result}" - server = "${var.kube_apiserver_url}" - cluster_name = "${var.cluster_name}" - } -} - -resource "local_file" "kubeconfig-kubelet" { - content = "${data.template_file.kubeconfig-kubelet.rendered}" - filename = "./generated/auth/kubeconfig-kubelet" -} - -# kvo-config.yaml (resources/generated/kco-config.yaml) -data "template_file" "kco-config_yaml" { - template = "${file("${path.module}/resources/kco-config.yaml")}" - - vars { - kube_apiserver_url = "${var.kube_apiserver_url}" - - cloud_config_path = "${var.cloud_config_path}" - cloud_provider_profile = "${var.cloud_provider != "" ? "${var.cloud_provider}" : "metal"}" - - advertise_address = "${var.advertise_address}" - cluster_cidr = "${var.cluster_cidr}" - - etcd_servers = "${join(",", formatlist("https://%s:2379", var.etcd_endpoints))}" - - service_cidr = "${var.service_cidr}" - - oidc_client_id = "${var.oidc_client_id}" - oidc_groups_claim = "${var.oidc_groups_claim}" - oidc_issuer_url = "${var.oidc_issuer_url}" - oidc_username_claim = "${var.oidc_username_claim}" - } -} - -resource "local_file" "kco-config_yaml" { - content = "${data.template_file.kco-config_yaml.rendered}" - filename = "./generated/kco-config.yaml" -} - -# bootkube.sh (resources/generated/bootkube.sh) -data "template_file" "bootkube_sh" { - template = "${file("${path.module}/resources/bootkube.sh")}" - - vars { - bootkube_image = "${var.container_images["bootkube"]}" - kube_core_renderer_image = "${var.container_images["kube_core_renderer"]}" - } -} - -resource "local_file" "bootkube_sh" { - content = "${data.template_file.bootkube_sh.rendered}" - filename = "./generated/bootkube.sh" -} - -# bootkube.service (available as output variable) -data "template_file" "bootkube_service" { - template = "${file("${path.module}/resources/bootkube.service")}" -} - -data "ignition_systemd_unit" "bootkube_service" { - name = "bootkube.service" - enabled = false - content = "${data.template_file.bootkube_service.rendered}" -} - -# bootkube.path (available as output variable) -data "template_file" "bootkube_path_unit" { - template = "${file("${path.module}/resources/bootkube.path")}" -} - -data "ignition_systemd_unit" "bootkube_path_unit" { - name = "bootkube.path" - enabled = true - content = "${data.template_file.bootkube_path_unit.rendered}" -} - -# TNC -resource "local_file" "tnc_pod_config" { - content = "${data.template_file.tnc_config.rendered}" - filename = "./generated/tnc-config" -} - -data "template_file" "tnc_config" { - template = "${file("${path.module}/resources/tnc-config")}" - - vars { - cloud_provider_config = "${var.cloud_provider_config}" - - http_proxy = "${var.http_proxy}" - https_proxy = "${var.https_proxy}" - no_proxy = "${join(",", var.no_proxy)}" - kubelet_image_url = "${replace(var.container_images["hyperkube"],var.image_re,"$1")}" - kubelet_image_tag = "${replace(var.container_images["hyperkube"],var.image_re,"$2")}" - iscsi_enabled = "${var.iscsi_enabled}" - kubeconfig_fetch_cmd = "${var.kubeconfig_fetch_cmd != "" ? "ExecStartPre=${var.kubeconfig_fetch_cmd}" : ""}" - tectonic_torcx_image_url = "${replace(var.container_images["tectonic_torcx"],var.image_re,"$1")}" - tectonic_torcx_image_tag = "${replace(var.container_images["tectonic_torcx"],var.image_re,"$2")}" - torcx_skip_setup = "false" - torcx_store_url = "${var.torcx_store_url}" - bootstrap_upgrade_cl = "${var.bootstrap_upgrade_cl}" - master_node_label = "${var.kubelet_master_node_label}" - worker_node_label = "${var.kubelet_worker_node_label}" - node_taints_param = "${var.kubelet_node_taints != "" ? "--register-with-taints=${var.kubelet_node_taints}" : ""}" - cluster_dns_ip = "${var.kube_dns_service_ip}" - cloud_provider = "${var.cloud_provider}" - debug_config = "${var.kubelet_debug_config}" - cluster_name = "${var.cluster_name}" - } -} diff --git a/modules/bootkube-ut2/outputs.tf b/modules/bootkube-ut2/outputs.tf deleted file mode 100644 index e1f72cbbe2..0000000000 --- a/modules/bootkube-ut2/outputs.tf +++ /dev/null @@ -1,54 +0,0 @@ -# This output is meant to be used to inject a dependency on the generated -# assets. As of Terraform v0.9, it is difficult to make a module depend on -# another module (no depends_on, no triggers), or to make a data source -# depend on a module (no depends_on, no triggers, generally no dummy variable). -# -# For instance, using the 'archive_file' data source against the generated -# assets, which is a common use-case, is tricky. There is no mechanism for -# defining explicit dependencies and the only available variables are for the -# source, destination and archive type, leaving little opportunities for us to -# inject a dependency. Thanks to the property described below, this output can -# be used as part of the output filename, in order to enforce the creation of -# the archive after the assets have been properly generated. -# -# Both localfile and template_dir providers compute their IDs by hashing -# the content of the resources on disk. Because this output is computed from the -# combination of all the resources' IDs, it can't be guessed and can only be -# interpolated once the assets have all been created. -output "id" { - value = "${sha1(" - ${local_file.kubeconfig.id} - ${local_file.kubeconfig-kubelet.id} - ${local_file.bootkube_sh.id} - ${local_file.kco-config_yaml.id} - ${template_dir.bootkube.id} - ")}" -} - -output "kubeconfig" { - value = "${data.template_file.kubeconfig.rendered}" -} - -output "kubeconfig-kubelet" { - value = "${data.template_file.kubeconfig-kubelet.rendered}" -} - -output "systemd_service_rendered" { - value = "${data.template_file.bootkube_service.rendered}" -} - -output "systemd_service_id" { - value = "${data.ignition_systemd_unit.bootkube_service.id}" -} - -output "systemd_path_unit_rendered" { - value = "${data.template_file.bootkube_path_unit.rendered}" -} - -output "systemd_path_unit_id" { - value = "${data.ignition_systemd_unit.bootkube_path_unit.id}" -} - -output "kube_dns_service_ip" { - value = "${cidrhost(var.service_cidr, 10)}" -} diff --git a/modules/bootkube-ut2/resources/bootkube.path b/modules/bootkube-ut2/resources/bootkube.path deleted file mode 100644 index d1c3de7745..0000000000 --- a/modules/bootkube-ut2/resources/bootkube.path +++ /dev/null @@ -1,7 +0,0 @@ -[Unit] -Description=Trigger for bootkube.service -[Path] -PathExists=/opt/tectonic/bootkube.sh -Unit=bootkube.service -[Install] -WantedBy=multi-user.target diff --git a/modules/bootkube-ut2/resources/bootkube.service b/modules/bootkube-ut2/resources/bootkube.service deleted file mode 100644 index 60b54cdbcc..0000000000 --- a/modules/bootkube-ut2/resources/bootkube.service +++ /dev/null @@ -1,16 +0,0 @@ -[Unit] -Description=Bootstrap a Kubernetes cluster -ConditionPathExists=!/opt/tectonic/init_bootkube.done -Wants=kubelet.service -After=kubelet.service - -[Service] -Type=oneshot -RemainAfterExit=true -WorkingDirectory=/opt/tectonic - -User=root -Group=root - -ExecStart=/usr/bin/bash /opt/tectonic/bootkube.sh -ExecStartPost=/bin/touch /opt/tectonic/init_bootkube.done diff --git a/modules/bootkube-ut2/resources/bootkube.sh b/modules/bootkube-ut2/resources/bootkube.sh deleted file mode 100644 index 0a4ff20498..0000000000 --- a/modules/bootkube-ut2/resources/bootkube.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -set -e - -# shellcheck disable=SC2154 -/usr/bin/docker run \ - --volume "$(pwd)":/assets \ - --volume /etc/kubernetes:/etc/kubernetes \ - "${kube_core_renderer_image}" \ - --config=/assets/kco-config.yaml \ - --output=/assets - -mkdir -p /etc/kubernetes/manifests/ -mv /opt/tectonic/manifests/tectonic-node-controller-pod.yaml /etc/kubernetes/manifests/ - -# shellcheck disable=SC2154 -/usr/bin/docker run \ - --volume "$(pwd)":/assets \ - --volume /etc/kubernetes:/etc/kubernetes \ - --network=host \ - --entrypoint=/bootkube \ - "${bootkube_image}" \ - start --asset-dir=/assets diff --git a/modules/bootkube-ut2/resources/kco-config.yaml b/modules/bootkube-ut2/resources/kco-config.yaml deleted file mode 100644 index 53e385b5f9..0000000000 --- a/modules/bootkube-ut2/resources/kco-config.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -kind: KubeCoreOperatorConfig -clusterConfig: - apiserver_url: ${kube_apiserver_url} -authConfig: - oidc_client_id: ${oidc_client_id} - oidc_issuer_url: ${oidc_issuer_url} - oidc_groups_claim: ${oidc_groups_claim} - oidc_username_claim: ${oidc_username_claim} -cloudProviderConfig: - cloud_config_path: ${cloud_config_path} - cloud_provider_profile: ${cloud_provider_profile} -networkConfig: - advertise_address: ${advertise_address} - cluster_cidr: ${cluster_cidr} - etcd_servers: ${etcd_servers} - service_cidr: ${service_cidr} diff --git a/modules/bootkube-ut2/resources/kubeconfig b/modules/bootkube-ut2/resources/kubeconfig deleted file mode 100644 index c7f674750a..0000000000 --- a/modules/bootkube-ut2/resources/kubeconfig +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: Config -clusters: -- name: ${cluster_name} - cluster: - server: ${server} - certificate-authority-data: ${root_ca_cert} -users: -- name: admin - user: - client-certificate-data: ${admin_cert} - client-key-data: ${admin_key} -contexts: -- context: - cluster: ${cluster_name} - user: admin diff --git a/modules/bootkube-ut2/resources/kubeconfig-kubelet b/modules/bootkube-ut2/resources/kubeconfig-kubelet deleted file mode 100644 index 91222ba609..0000000000 --- a/modules/bootkube-ut2/resources/kubeconfig-kubelet +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Config -clusters: -- name: ${cluster_name} - cluster: - server: ${server} - certificate-authority-data: ${root_ca_cert} -users: -- name: kubelet - user: - token: ${kubelet_bootstrap_token_id}.${kubelet_bootstrap_token_secret} -contexts: -- context: - cluster: ${cluster_name} - user: kubelet diff --git a/modules/bootkube-ut2/resources/manifests/01-tectonic-namespace.yaml b/modules/bootkube-ut2/resources/manifests/01-tectonic-namespace.yaml deleted file mode 100644 index 845a8e2497..0000000000 --- a/modules/bootkube-ut2/resources/manifests/01-tectonic-namespace.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: tectonic-system # Create the namespace first. - labels: # network policy can only select by labels - name: tectonic-system diff --git a/modules/bootkube-ut2/resources/manifests/02-ingress-namespace.yaml b/modules/bootkube-ut2/resources/manifests/02-ingress-namespace.yaml deleted file mode 100644 index aed8a26db9..0000000000 --- a/modules/bootkube-ut2/resources/manifests/02-ingress-namespace.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - # This is the namespace used to hold the tectonic ingress controllers - name: tectonic-ingress - # Give the namespace a label, so we can select for it in networkpolicy - labels: - kubernetes.io/ingress.class: tectonic - name: tectonic-ingress diff --git a/modules/bootkube-ut2/resources/manifests/app-version-kind.yaml b/modules/bootkube-ut2/resources/manifests/app-version-kind.yaml deleted file mode 100644 index ebcd04e9eb..0000000000 --- a/modules/bootkube-ut2/resources/manifests/app-version-kind.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: "apiextensions.k8s.io/v1beta1" -kind: "CustomResourceDefinition" -metadata: - name: "appversions.tco.coreos.com" -spec: - group: "tco.coreos.com" - version: "v1" - names: - plural: "appversions" - kind: "AppVersion" diff --git a/modules/bootkube-ut2/resources/manifests/app-version-tectonic-network.yaml b/modules/bootkube-ut2/resources/manifests/app-version-tectonic-network.yaml deleted file mode 100644 index 8ba5af27b3..0000000000 --- a/modules/bootkube-ut2/resources/manifests/app-version-tectonic-network.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: tco.coreos.com/v1 -kind: AppVersion -metadata: - name: tectonic-network - namespace: tectonic-system - labels: - managed-by-channel-operator: "true" -spec: - desiredVersion: - paused: false -status: - currentVersion: - paused: false -upgradereq: 1 -upgradecomp: 0 diff --git a/modules/bootkube-ut2/resources/manifests/kube-apiserver-secret.yaml b/modules/bootkube-ut2/resources/manifests/kube-apiserver-secret.yaml deleted file mode 100644 index 366431875d..0000000000 --- a/modules/bootkube-ut2/resources/manifests/kube-apiserver-secret.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: kube-apiserver - namespace: kube-system -type: Opaque -data: - aggregator-ca.crt: ${aggregator_ca_cert} - apiserver.key: ${apiserver_key} - apiserver.crt: ${apiserver_cert} - apiserver-proxy.key: ${apiserver_proxy_key} - apiserver-proxy.crt: ${apiserver_proxy_cert} - service-account.pub: ${serviceaccount_pub} - root-ca.crt: ${root_ca_cert} - kube-ca.crt: ${kube_ca_cert} - etcd-client-ca.crt: ${etcd_ca_cert} - etcd-client.crt: ${etcd_client_cert} - etcd-client.key: ${etcd_client_key} - oidc-ca.crt: ${oidc_ca_cert} diff --git a/modules/bootkube-ut2/resources/manifests/kube-cloud-config.yaml b/modules/bootkube-ut2/resources/manifests/kube-cloud-config.yaml deleted file mode 100644 index 02d0846a9a..0000000000 --- a/modules/bootkube-ut2/resources/manifests/kube-cloud-config.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: kube-cloud-cfg - namespace: kube-system -type: Opaque -data: - config: ${base64encode(cloud_provider_config)} diff --git a/modules/bootkube-ut2/resources/manifests/kube-controller-manager-secret.yaml b/modules/bootkube-ut2/resources/manifests/kube-controller-manager-secret.yaml deleted file mode 100644 index 7a3c83dc97..0000000000 --- a/modules/bootkube-ut2/resources/manifests/kube-controller-manager-secret.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: kube-controller-manager - namespace: kube-system -type: Opaque -data: - service-account.key: ${serviceaccount_key} - root-ca.crt: ${root_ca_cert} - kube-ca.crt: ${kube_ca_cert} - kube-ca.key: ${kube_ca_key} diff --git a/modules/bootkube-ut2/resources/manifests/kubelet-bootstrap-token.yaml b/modules/bootkube-ut2/resources/manifests/kubelet-bootstrap-token.yaml deleted file mode 100644 index 852a6945b7..0000000000 --- a/modules/bootkube-ut2/resources/manifests/kubelet-bootstrap-token.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: bootstrap-token-${kubelet_bootstrap_token_id} - namespace: kube-system -type: bootstrap.kubernetes.io/token -stringData: - token-id: ${kubelet_bootstrap_token_id} - token-secret: ${kubelet_bootstrap_token_secret} - usage-bootstrap-authentication: "true" diff --git a/modules/bootkube-ut2/resources/manifests/pull.json b/modules/bootkube-ut2/resources/manifests/pull.json deleted file mode 100644 index a442286df2..0000000000 --- a/modules/bootkube-ut2/resources/manifests/pull.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "apiVersion": "v1", - "kind": "Secret", - "type": "kubernetes.io/dockerconfigjson", - "metadata": { - "namespace": "kube-system", - "name": "coreos-pull-secret" - }, - "data": { - ".dockerconfigjson": "${pull_secret}" - } -} diff --git a/modules/bootkube-ut2/resources/manifests/tectonic-network-operator.yaml b/modules/bootkube-ut2/resources/manifests/tectonic-network-operator.yaml deleted file mode 100644 index c05c7023a2..0000000000 --- a/modules/bootkube-ut2/resources/manifests/tectonic-network-operator.yaml +++ /dev/null @@ -1,59 +0,0 @@ -apiVersion: apps/v1beta2 -kind: DaemonSet -metadata: - name: tectonic-network-operator - namespace: kube-system - labels: - k8s-app: tectonic-network-operator - managed-by-channel-operator: "true" -spec: - selector: - matchLabels: - k8s-app: tectonic-network-operator - updateStrategy: - rollingUpdate: - maxUnavailable: 1 - type: RollingUpdate - template: - metadata: - labels: - k8s-app: tectonic-network-operator - tectonic-app-version-name: tectonic-network - spec: - containers: - - name: tectonic-network-operator - image: ${tectonic_network_operator_image} - resources: - limits: - cpu: 20m - memory: 50Mi - requests: - cpu: 20m - memory: 50Mi - volumeMounts: - - name: cluster-config - mountPath: /etc/cluster-config - hostNetwork: true - restartPolicy: Always - imagePullSecrets: - - name: coreos-pull-secret - securityContext: - runAsNonRoot: true - runAsUser: 65534 - volumes: - - name: cluster-config - configMap: - name: cluster-config-v1 - items: - - key: network-config - path: network-config - nodeSelector: - node-role.kubernetes.io/master: "" - tolerations: - - key: "node-role.kubernetes.io/master" - operator: "Exists" - effect: "NoSchedule" - updateStrategy: - rollingUpdate: - maxUnavailable: 1 - type: RollingUpdate diff --git a/modules/bootkube-ut2/service-account.tf b/modules/bootkube-ut2/service-account.tf deleted file mode 100644 index 00fbaf11a7..0000000000 --- a/modules/bootkube-ut2/service-account.tf +++ /dev/null @@ -1,15 +0,0 @@ -# Kubernete's Service Account (resources/generated/tls/{service-account.key,service-account.pub}) -resource "tls_private_key" "service_account" { - algorithm = "RSA" - rsa_bits = "2048" -} - -resource "local_file" "service_account_key" { - content = "${tls_private_key.service_account.private_key_pem}" - filename = "./generated/tls/service-account.key" -} - -resource "local_file" "service_account_crt" { - content = "${tls_private_key.service_account.public_key_pem}" - filename = "./generated/tls/service-account.pub" -} diff --git a/modules/bootkube-ut2/variables.tf b/modules/bootkube-ut2/variables.tf deleted file mode 100644 index b11957f84b..0000000000 --- a/modules/bootkube-ut2/variables.tf +++ /dev/null @@ -1,257 +0,0 @@ -variable "advertise_address" { - description = "The IP address on which to advertise the apiserver to members of the cluster" - type = "string" -} - -variable "apiserver_cert_pem" { - type = "string" - description = "The API server certificate in PEM format." -} - -variable "apiserver_key_pem" { - type = "string" - description = "The API server key in PEM format." -} - -variable "apiserver_proxy_cert_pem" { - type = "string" - description = "The API server proxy certificate in PEM format." -} - -variable "apiserver_proxy_key_pem" { - type = "string" - description = "The API server proxy key in PEM format." -} - -variable "cloud_provider" { - description = "The provider for cloud services (empty string for no provider)" - type = "string" -} - -variable "cloud_provider_config" { - description = "Content of cloud provider config" - type = "string" - default = "" -} - -variable "cluster_cidr" { - description = "A CIDR notation IP range from which to assign pod IPs" - type = "string" -} - -variable "cluster_name" { - type = "string" -} - -variable "container_images" { - description = "Container images to use" - type = "map" -} - -variable "etcd_ca_cert_pem" { - type = "string" - description = "The etcd CA certificate in PEM format." -} - -variable "etcd_client_cert_pem" { - type = "string" - description = "The etcd client certificate in PEM format." -} - -variable "etcd_client_key_pem" { - type = "string" - description = "The etcd client key in PEM format." -} - -variable "etcd_endpoints" { - description = "List of etcd endpoints to connect with (hostnames/IPs only)" - type = "list" -} - -variable "etcd_peer_cert_pem" { - type = "string" - description = "The etcd peer certificate in PEM format." -} - -variable "etcd_peer_key_pem" { - type = "string" - description = "The etcd peer key in PEM format." -} - -variable "etcd_server_cert_pem" { - type = "string" - description = "The etcd server certificate in PEM format." -} - -variable "etcd_server_key_pem" { - type = "string" - description = "The etcd server key in PEM format." -} - -variable "kube_apiserver_url" { - description = "URL used to reach kube-apiserver" - type = "string" -} - -variable "root_ca_cert_pem" { - type = "string" - description = "The Root CA in PEM format." -} - -variable "aggregator_ca_cert_pem" { - type = "string" - description = "The Aggregated API Server CA in PEM format." -} - -variable "kube_ca_cert_pem" { - type = "string" - description = "The Kubernetes CA in PEM format." -} - -variable "kube_ca_key_pem" { - type = "string" - description = "The Kubernetes CA key in PEM format." -} - -variable "admin_cert_pem" { - type = "string" - description = "The kubelet certificate in PEM format." -} - -variable "admin_key_pem" { - type = "string" - description = "The kubelet key in PEM format." -} - -variable "master_count" { - description = "The number of the master nodes" - type = "string" -} - -variable "oidc_ca_cert" { - type = "string" -} - -variable "oidc_client_id" { - description = "The client ID for the OpenID Connect client" - type = "string" -} - -variable "oidc_groups_claim" { - description = "The OpenID claim to use for specifying user groups (string or array of strings)" - type = "string" -} - -variable "oidc_issuer_url" { - description = "The URL of the OpenID issuer, only HTTPS scheme will be accepted" - type = "string" -} - -variable "oidc_username_claim" { - description = "The OpenID claim to use as the user name" - type = "string" -} - -variable "cloud_config_path" { - description = "The path to the secret file that contains the cloud config contents. Either be empty ('') or ('/etc/kubernetes/cloud/config')." - type = "string" -} - -variable "service_cidr" { - description = "A CIDR notation IP range from which to assign service cluster IPs" - type = "string" -} - -variable "versions" { - description = "Container versions to use" - type = "map" -} - -variable "pull_secret_path" { - type = "string" - description = "Path on disk to your Tectonic pull secret. Obtain this from your Tectonic Account: https://account.coreos.com." - default = "/Users/coreos/Desktop/config.json" -} - -variable "calico_mtu" { - description = "sets the MTU size for workload interfaces and the IP-in-IP tunnel device" - type = "string" -} - -variable "tectonic_networking" { - description = "configures the network to be used in the cluster" - type = "string" -} - -variable "http_proxy" { - type = "string" - description = "HTTP proxy address." -} - -variable "https_proxy" { - type = "string" - description = "HTTPS proxy address." -} - -variable "no_proxy" { - type = "list" - description = "List of local endpoints that will not use HTTP proxy." -} - -variable "iscsi_enabled" { - type = "string" - default = "false" -} - -variable "kubeconfig_fetch_cmd" { - type = "string" - description = "(optional) The command that fetches `/etc/kubernetes/kubeconfig`." - default = "" -} - -variable "bootstrap_upgrade_cl" { - type = "string" - description = "(optional) Whether to trigger a ContainerLinux OS upgrade during the bootstrap process." - default = "true" -} - -variable "torcx_store_url" { - type = "string" - description = "(optional) URL template for torcx store. Leave empty to use the default CoreOS endpoint." - default = "" -} - -variable "kubelet_node_taints" { - type = "string" - description = "(optional) Taints that Kubelet will apply on the node" - default = "" -} - -variable "kube_dns_service_ip" { - type = "string" - description = "Service IP used to reach kube-dns" -} - -variable "kubelet_debug_config" { - type = "string" - default = "" - description = "internal debug flags for the kubelet (used in CI only)" -} - -variable "kubelet_master_node_label" { - type = "string" - description = "Label that Kubelet will apply on the master node" -} - -variable "kubelet_worker_node_label" { - type = "string" - description = "Label that Kubelet will apply on the worker node" -} - -variable "image_re" { - description = <