<commit_before>module "master" {
  source                    = "./modules/master"
  name                      = "${ var.name }"
  hostname = "${ var.name }-master"
  hostname_suffix = "${ var.name }.${ var.cloud_provider }.local"
  master_node_count         = "${ var.master_node_count }"
  packet_facility           = "${ var.packet_facility }"
  packet_project_id         = "${ var.packet_project_id }"
  packet_billing_cycle      = "${ var.packet_billing_cycle }"
  packet_operating_system   = "${ var.packet_operating_system }"
  packet_master_device_plan = "${ var.packet_master_device_plan }"
  master_cloud_init = "${ module.master_templates.master_cloud_init }"
}

module "worker" {
  source                    = "./modules/worker"
  name                      = "${ var.name }"
  hostname = "${ var.name }-worker"
  hostname_suffix = "${ var.name }.${ var.cloud_provider }.local"
  worker_node_count         = "${ var.worker_node_count }"
  packet_facility           = "${ var.packet_facility }"
  packet_project_id         = "${ var.packet_project_id }"
  packet_billing_cycle      = "${ var.packet_billing_cycle }"
  packet_operating_system   = "${ var.packet_operating_system }"
  packet_worker_device_plan = "${ var.packet_worker_device_plan }"
  worker_cloud_init = "${ module.worker_templates.worker_cloud_init }"
}


module "tls" {
  source = "../tls"

  tls_ca_cert_subject_common_name = "kubernetes"
  tls_ca_cert_subject_locality = "San Francisco"
  tls_ca_cert_subject_organization = "Kubernetes"
  tls_ca_cert_subject_organization_unit = "Kubernetes" 
  tls_ca_cert_subject_province = "California"
  tls_ca_cert_subject_country = "US"
  tls_ca_cert_validity_period_hours = 1000
  tls_ca_cert_early_renewal_hours = 100

  tls_admin_cert_subject_common_name = "admin"
  tls_admin_cert_subject_locality = "San Francisco"
  tls_admin_cert_subject_organization = "system:masters"
  tls_admin_cert_subject_organization_unit = "Kubernetes"
  tls_admin_cert_subject_province = "Callifornia"
  tls_admin_cert_subject_country = "US"
  tls_admin_cert_validity_period_hours = 1000
  tls_admin_cert_early_renewal_hours = 100
  tls_admin_cert_ip_addresses = "127.0.0.1"
  tls_admin_cert_dns_names = "kubernetes,kubernetes.default,kubernetes.default.svc,kubernetes.default.svc.cluster.local"

  tls_apiserver_cert_subject_common_name = "kubernetes"
  tls_apiserver_cert_subject_locality = "San Francisco"
  tls_apiserver_cert_subject_organization = "Kubernetes"
  tls_apiserver_cert_subject_organization_unit = "Kubernetes"
  tls_apiserver_cert_subject_province = "California"
  tls_apiserver_cert_subject_country = "US"
  tls_apiserver_cert_validity_period_hours = "1000"
  tls_apiserver_cert_early_renewal_hours = "100"
  tls_apiserver_cert_ip_addresses = "127.0.0.1,172.16.31.10,${ var.dns_service_ip }"
  tls_apiserver_cert_dns_names = "kubernetes,kubernetes.default,kubernetes.default.svc,kubernetes.default.svc.cluster.local,*.${ var.name }.${ var.cloud_provider }.local"

  tls_controller_cert_subject_common_name = "system:kube-controller-manager"
  tls_controller_cert_subject_locality = "San Francisco"
  tls_controller_cert_subject_organization = "system:kube-controller-manager"
  tls_controller_cert_subject_organization_unit = "Kubernetes"
  tls_controller_cert_subject_province = "California"
  tls_controller_cert_subject_country = "US"
  tls_controller_cert_validity_period_hours = "1000"
  tls_controller_cert_early_renewal_hours = "100"
  tls_controller_cert_ip_addresses = "127.0.0.1"
  tls_controller_cert_dns_names = "kubernetes,kubernetes.default,kubernetes.default.svc,kubernetes.default.svc.cluster.local" 
  

  tls_scheduler_cert_subject_common_name = "system:kube-scheduler"
  tls_scheduler_cert_subject_locality = "San Francisco"
  tls_scheduler_cert_subject_organization = "system:kube-scheduler"
  tls_scheduler_cert_subject_organization_unit = "Kubernetes"
  tls_scheduler_cert_subject_province = "California"
  tls_scheduler_cert_subject_country = "US"
  tls_scheduler_cert_validity_period_hours = "1000"
  tls_scheduler_cert_early_renewal_hours = "100"
  tls_scheduler_cert_ip_addresses = "127.0.0.1"
  tls_scheduler_cert_dns_names = "kubernetes,kubernetes.default,kubernetes.default.svc,kubernetes.default.svc.cluster.local" 
  

  tls_kubelet_cert_subject_common_name = "kubernetes"
  tls_kubelet_cert_subject_locality = "San Francisco"
  tls_kubelet_cert_subject_organization = "Kubernetes"
  tls_kubelet_cert_subject_organization_unit = "Kubernetes"
  tls_kubelet_cert_subject_province = "California"
  tls_kubelet_cert_subject_country = "US"
  tls_kubelet_cert_validity_period_hours = "1000"
  tls_kubelet_cert_early_renewal_hours = "100"
  tls_kubelet_cert_ip_addresses = "127.0.0.1"
  tls_kubelet_cert_dns_names = "kubernetes,kubernetes.default,kubernetes.default.svc,kubernetes.default.svc.cluster.local,*.${ var.name }.${ var.cloud_provider }.local" 


  tls_proxy_cert_subject_common_name = "system:kube-proxy"
  tls_proxy_cert_subject_locality = "San Francisco"
  tls_proxy_cert_subject_organization = "system:node-proxier"
  tls_proxy_cert_subject_organization_unit = "Kubernetes"
  tls_proxy_cert_subject_province = "California"
  tls_proxy_cert_subject_country = "US"
  tls_proxy_cert_validity_period_hours = "1000"
  tls_proxy_cert_early_renewal_hours = "100"
  tls_proxy_cert_ip_addresses = "127.0.0.1"
  tls_proxy_cert_dns_names = "kubernetes,kubernetes.default,kubernetes.default.svc,kubernetes.default.svc.cluster.local" 

}


module "master_templates" {
  source = "/cncf/master_templates-v1.13.0-ubuntu"

  name = "${ var.name }"
  arch = "${ var.arch }"

  hostname = ""
  hostname_suffix = ""<commit_msg>Increase cert validity period<commit_after>module "master" {
  source                    = "./modules/master"
  name                      = "${ var.name }"
  hostname = "${ var.name }-master"
  hostname_suffix = "${ var.name }.${ var.cloud_provider }.local"
  master_node_count         = "${ var.master_node_count }"
  packet_facility           = "${ var.packet_facility }"
  packet_project_id         = "${ var.packet_project_id }"
  packet_billing_cycle      = "${ var.packet_billing_cycle }"
  packet_operating_system   = "${ var.packet_operating_system }"
  packet_master_device_plan = "${ var.packet_master_device_plan }"
  master_cloud_init = "${ module.master_templates.master_cloud_init }"
}

module "worker" {
  source                    = "./modules/worker"
  name                      = "${ var.name }"
  hostname = "${ var.name }-worker"
  hostname_suffix = "${ var.name }.${ var.cloud_provider }.local"
  worker_node_count         = "${ var.worker_node_count }"
  packet_facility           = "${ var.packet_facility }"
  packet_project_id         = "${ var.packet_project_id }"
  packet_billing_cycle      = "${ var.packet_billing_cycle }"
  packet_operating_system   = "${ var.packet_operating_system }"
  packet_worker_device_plan = "${ var.packet_worker_device_plan }"
  worker_cloud_init = "${ module.worker_templates.worker_cloud_init }"
}


module "tls" {
  source = "../tls"

  tls_ca_cert_subject_common_name = "kubernetes"
  tls_ca_cert_subject_locality = "San Francisco"
  tls_ca_cert_subject_organization = "Kubernetes"
  tls_ca_cert_subject_organization_unit = "Kubernetes" 
  tls_ca_cert_subject_province = "California"
  tls_ca_cert_subject_country = "US"
  tls_ca_cert_validity_period_hours = 1000
  tls_ca_cert_early_renewal_hours = 100

  tls_admin_cert_subject_common_name = "admin"
  tls_admin_cert_subject_locality = "San Francisco"
  tls_admin_cert_subject_organization = "system:masters"
  tls_admin_cert_subject_organization_unit = "Kubernetes"
  tls_admin_cert_subject_province = "Callifornia"
  tls_admin_cert_subject_country = "US"
  tls_admin_cert_validity_period_hours = 1000
  tls_admin_cert_early_renewal_hours = 100
  tls_admin_cert_ip_addresses = "127.0.0.1"
  tls_admin_cert_dns_names = "kubernetes,kubernetes.default,kubernetes.default.svc,kubernetes.default.svc.cluster.local"

  tls_apiserver_cert_subject_common_name = "kubernetes"
  tls_apiserver_cert_subject_locality = "San Francisco"
  tls_apiserver_cert_subject_organization = "Kubernetes"
  tls_apiserver_cert_subject_organization_unit = "Kubernetes"
  tls_apiserver_cert_subject_province = "California"
  tls_apiserver_cert_subject_country = "US"
  tls_apiserver_cert_validity_period_hours = "1000"
  tls_apiserver_cert_early_renewal_hours = "100"
  tls_apiserver_cert_ip_addresses = "127.0.0.1,172.16.31.10,${ var.dns_service_ip }"
  tls_apiserver_cert_dns_names = "kubernetes,kubernetes.default,kubernetes.default.svc,kubernetes.default.svc.cluster.local,*.${ var.name }.${ var.cloud_provider }.local"

  tls_controller_cert_subject_common_name = "system:kube-controller-manager"
  tls_controller_cert_subject_locality = "San Francisco"
  tls_controller_cert_subject_organization = "system:kube-controller-manager"
  tls_controller_cert_subject_organization_unit = "Kubernetes"
  tls_controller_cert_subject_province = "California"
  tls_controller_cert_subject_country = "US"
  tls_controller_cert_validity_period_hours = "1000"
  tls_controller_cert_early_renewal_hours = "100"
  tls_controller_cert_ip_addresses = "127.0.0.1"
  tls_controller_cert_dns_names = "kubernetes,kubernetes.default,kubernetes.default.svc,kubernetes.default.svc.cluster.local" 
  

  tls_scheduler_cert_subject_common_name = "system:kube-scheduler"
  tls_scheduler_cert_subject_locality = "San Francisco"
  tls_scheduler_cert_subject_organization = "system:kube-scheduler"
  tls_scheduler_cert_subject_organization_unit = "Kubernetes"
  tls_scheduler_cert_subject_province = "California"
  tls_scheduler_cert_subject_country = "US"
  tls_scheduler_cert_validity_period_hours = "1000"
  tls_scheduler_cert_early_renewal_hours = "100"
  tls_scheduler_cert_ip_addresses = "127.0.0.1"
  tls_scheduler_cert_dns_names = "kubernetes,kubernetes.default,kubernetes.default.svc,kubernetes.default.svc.cluster.local" 
  

  tls_kubelet_cert_subject_common_name = "kubernetes"
  tls_kubelet_cert_subject_locality = "San Francisco"
  tls_kubelet_cert_subject_organization = "Kubernetes"
  tls_kubelet_cert_subject_organization_unit = "Kubernetes"
  tls_kubelet_cert_subject_province = "California"
  tls_kubelet_cert_subject_country = "US"
  tls_kubelet_cert_validity_period_hours = "1000"
  tls_kubelet_cert_early_renewal_hours = "100"
  tls_kubelet_cert_ip_addresses = "127.0.0.1"
  tls_kubelet_cert_dns_names = "kubernetes,kubernetes.default,kubernetes.default.svc,kubernetes.default.svc.cluster.local,*.${ var.name }.${ var.cloud_provider }.local" 


  tls_proxy_cert_subject_common_name = "system:kube-proxy"
  tls_proxy_cert_subject_locality = "San Francisco"
  tls_proxy_cert_subject_organization = "system:node-proxier"
  tls_proxy_cert_subject_organization_unit = "Kubernetes"
  tls_proxy_cert_subject_province = "California"
  tls_proxy_cert_subject_country = "US"
  tls_proxy_cert_validity_period_hours = "10000"
  tls_proxy_cert_early_renewal_hours = "100"
  tls_proxy_cert_ip_addresses = "127.0.0.1"
  tls_proxy_cert_dns_names = "kubernetes,kubernetes.default,kubernetes.default.svc,kubernetes.default.svc.cluster.local" 

}


module "master_templates" {
  source = "/cncf/master_templates-v1.13.0-ubuntu"

  name = "${ var.name }"
  arch = "${ var.arch }"

  hostname = ""
  hostname_suffix = ""
{'fraction_non_alphanumeric': 0.09604370429112698, 'fraction_numerical': 0.017358357564543132, 'mean_word_length': 5.575898030127463, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 14, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5585624', 'n_tokens_mistral': 4344, 'n_tokens_neox': 3890, 'n_words': 439}