Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for INSTALL_K3S_SELINUX_WARN #109

Merged
merged 2 commits into from
Dec 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion agent_nodes.tf
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ resource "null_resource" "agents_install" {
// Install k3s
provisioner "remote-exec" {
inline = [
"INSTALL_K3S_VERSION=${local.k3s_version} sh /tmp/k3s-installer agent ${local.agents_metadata[each.key].flags}",
"INSTALL_K3S_SELINUX_WARN=${var.k3s_selinux_warn} INSTALL_K3S_VERSION=${local.k3s_version} sh /tmp/k3s-installer agent ${local.agents_metadata[each.key].flags}",
"until systemctl is-active --quiet k3s-agent.service; do sleep 1; done"
]
}
Expand Down
2 changes: 1 addition & 1 deletion server_nodes.tf
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ resource "null_resource" "servers_install" {
// Install k3s server
provisioner "remote-exec" {
inline = [
"INSTALL_K3S_VERSION=${local.k3s_version} sh /tmp/k3s-installer server ${local.servers_metadata[each.key].flags}",
"INSTALL_K3S_SELINUX_WARN=${var.k3s_selinux_warn} INSTALL_K3S_VERSION=${local.k3s_version} sh /tmp/k3s-installer server ${local.servers_metadata[each.key].flags}",
"until ${local.kubectl_cmd} get node ${local.servers_metadata[each.key].name}; do sleep 1; done"
]
}
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ variable "k3s_version" {
default = "latest"
}

variable "k3s_selinux_warn" {
description = "Force the install script to log a warning rather than fail when k3s tries to install the SELinux policies."
type = bool
default = false
}

variable "name" {
description = "K3s cluster domain name (see https://rancher.com/docs/k3s/latest/en/installation/install-options/). This input is deprecated and will be remove in the next major release. Use `cluster_domain` instead."
type = string
Expand Down