Skip to content
Commits on Source (3)
...@@ -116,8 +116,9 @@ k8s_allowed_remote_ips = [ ...@@ -116,8 +116,9 @@ k8s_allowed_remote_ips = [
master_allowed_ports = [] master_allowed_ports = []
worker_allowed_ports = [] worker_allowed_ports = []
loadbalancer_enabled = false loadbalancer_enabled = false
loadbalancer_plan = "development" loadbalancer_plan = "development"
loadbalancer_proxy_protocol = false
loadbalancers = { loadbalancers = {
# "http" : { # "http" : {
# "port" : 80, # "port" : 80,
......
...@@ -31,9 +31,10 @@ module "kubernetes" { ...@@ -31,9 +31,10 @@ module "kubernetes" {
master_allowed_ports = var.master_allowed_ports master_allowed_ports = var.master_allowed_ports
worker_allowed_ports = var.worker_allowed_ports worker_allowed_ports = var.worker_allowed_ports
loadbalancer_enabled = var.loadbalancer_enabled loadbalancer_enabled = var.loadbalancer_enabled
loadbalancer_plan = var.loadbalancer_plan loadbalancer_plan = var.loadbalancer_plan
loadbalancers = var.loadbalancers loadbalancer_outbound_proxy_protocol = var.loadbalancer_proxy_protocol ? "v2" : ""
loadbalancers = var.loadbalancers
server_groups = var.server_groups server_groups = var.server_groups
} }
......
...@@ -521,6 +521,9 @@ resource "upcloud_loadbalancer_backend" "lb_backend" { ...@@ -521,6 +521,9 @@ resource "upcloud_loadbalancer_backend" "lb_backend" {
loadbalancer = upcloud_loadbalancer.lb[0].id loadbalancer = upcloud_loadbalancer.lb[0].id
name = "lb-backend-${each.key}" name = "lb-backend-${each.key}"
properties {
outbound_proxy_protocol = var.loadbalancer_outbound_proxy_protocol
}
} }
resource "upcloud_loadbalancer_frontend" "lb_frontend" { resource "upcloud_loadbalancer_frontend" "lb_frontend" {
......
...@@ -85,6 +85,10 @@ variable "loadbalancer_plan" { ...@@ -85,6 +85,10 @@ variable "loadbalancer_plan" {
type = string type = string
} }
variable "loadbalancer_outbound_proxy_protocol" {
type = string
}
variable "loadbalancers" { variable "loadbalancers" {
description = "Load balancers" description = "Load balancers"
......
...@@ -121,6 +121,11 @@ variable "loadbalancer_plan" { ...@@ -121,6 +121,11 @@ variable "loadbalancer_plan" {
default = "development" default = "development"
} }
variable "loadbalancer_proxy_protocol" {
type = bool
default = false
}
variable "loadbalancers" { variable "loadbalancers" {
description = "Load balancers" description = "Load balancers"
......
...@@ -220,6 +220,14 @@ Stack](https://github.com/kubernetes-sigs/kubespray/blob/master/docs/dns-stack.m ...@@ -220,6 +220,14 @@ Stack](https://github.com/kubernetes-sigs/kubespray/blob/master/docs/dns-stack.m
* *kubelet_cpu_manager_policy* - If set to `static`, allows pods with certain resource characteristics to be granted increased CPU affinity and exclusivity on the node. And it should be set with `kube_reserved` or `system-reserved`, enable this with the following guide:[Control CPU Management Policies on the Node](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/) * *kubelet_cpu_manager_policy* - If set to `static`, allows pods with certain resource characteristics to be granted increased CPU affinity and exclusivity on the node. And it should be set with `kube_reserved` or `system-reserved`, enable this with the following guide:[Control CPU Management Policies on the Node](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/)
* *kubelet_cpu_manager_policy_options* - A dictionary of cpuManagerPolicyOptions to enable. Keep in mind to enable the corresponding feature gates and make sure to pass the booleans as string (i.e. don't forget the quotes)!
```yml
kubelet_cpu_manager_policy_options:
distribute-cpus-across-numa: "true"
full-pcpus-only: "true"
```
* *kubelet_topology_manager_policy* - Control the behavior of the allocation of CPU and Memory from different [NUMA](https://en.wikipedia.org/wiki/Non-uniform_memory_access) Nodes. Enable this with the following guide: [Control Topology Management Policies on a node](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). * *kubelet_topology_manager_policy* - Control the behavior of the allocation of CPU and Memory from different [NUMA](https://en.wikipedia.org/wiki/Non-uniform_memory_access) Nodes. Enable this with the following guide: [Control Topology Management Policies on a node](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager).
* *kubelet_topology_manager_scope* - The Topology Manager can deal with the alignment of resources in a couple of distinct scopes: `container` and `pod`. See [Topology Manager Scopes](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager/#topology-manager-scopes). * *kubelet_topology_manager_scope* - The Topology Manager can deal with the alignment of resources in a couple of distinct scopes: `container` and `pod`. See [Topology Manager Scopes](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager/#topology-manager-scopes).
......
...@@ -14,7 +14,7 @@ certificateKey: {{ kubeadm_certificate_key }} ...@@ -14,7 +14,7 @@ certificateKey: {{ kubeadm_certificate_key }}
{% endif %} {% endif %}
nodeRegistration: nodeRegistration:
{% if kube_override_hostname | default('') %} {% if kube_override_hostname | default('') %}
name: {{ kube_override_hostname }} name: "{{ kube_override_hostname }}"
{% endif %} {% endif %}
{% if inventory_hostname in groups['kube_control_plane'] and inventory_hostname not in groups['kube_node'] %} {% if inventory_hostname in groups['kube_control_plane'] and inventory_hostname not in groups['kube_node'] %}
taints: taints:
...@@ -76,17 +76,17 @@ etcd: ...@@ -76,17 +76,17 @@ etcd:
{% endfor %} {% endfor %}
serverCertSANs: serverCertSANs:
{% for san in etcd_cert_alt_names %} {% for san in etcd_cert_alt_names %}
- {{ san }} - "{{ san }}"
{% endfor %} {% endfor %}
{% for san in etcd_cert_alt_ips %} {% for san in etcd_cert_alt_ips %}
- {{ san }} - "{{ san }}"
{% endfor %} {% endfor %}
peerCertSANs: peerCertSANs:
{% for san in etcd_cert_alt_names %} {% for san in etcd_cert_alt_names %}
- {{ san }} - "{{ san }}"
{% endfor %} {% endfor %}
{% for san in etcd_cert_alt_ips %} {% for san in etcd_cert_alt_ips %}
- {{ san }} - "{{ san }}"
{% endfor %} {% endfor %}
{% endif %} {% endif %}
dns: dns:
...@@ -294,7 +294,7 @@ apiServer: ...@@ -294,7 +294,7 @@ apiServer:
{% endif %} {% endif %}
certSANs: certSANs:
{% for san in apiserver_sans %} {% for san in apiserver_sans %}
- {{ san }} - "{{ san }}"
{% endfor %} {% endfor %}
timeoutForControlPlane: 5m0s timeoutForControlPlane: 5m0s
controllerManager: controllerManager:
...@@ -416,7 +416,7 @@ conntrack: ...@@ -416,7 +416,7 @@ conntrack:
tcpEstablishedTimeout: {{ kube_proxy_conntrack_tcp_established_timeout }} tcpEstablishedTimeout: {{ kube_proxy_conntrack_tcp_established_timeout }}
enableProfiling: {{ kube_proxy_enable_profiling }} enableProfiling: {{ kube_proxy_enable_profiling }}
healthzBindAddress: {{ kube_proxy_healthz_bind_address }} healthzBindAddress: {{ kube_proxy_healthz_bind_address }}
hostnameOverride: {{ kube_override_hostname }} hostnameOverride: "{{ kube_override_hostname }}"
iptables: iptables:
masqueradeAll: {{ kube_proxy_masquerade_all }} masqueradeAll: {{ kube_proxy_masquerade_all }}
masqueradeBit: {{ kube_proxy_masquerade_bit }} masqueradeBit: {{ kube_proxy_masquerade_bit }}
......
...@@ -160,6 +160,10 @@ seccompDefault: {{ kubelet_seccomp_default | bool }} ...@@ -160,6 +160,10 @@ seccompDefault: {{ kubelet_seccomp_default | bool }}
{% if kubelet_cpu_manager_policy is defined %} {% if kubelet_cpu_manager_policy is defined %}
cpuManagerPolicy: {{ kubelet_cpu_manager_policy }} cpuManagerPolicy: {{ kubelet_cpu_manager_policy }}
{% endif %} {% endif %}
{% if kubelet_cpu_manager_policy_options is defined %}
cpuManagerPolicyOptions:
{{ kubelet_cpu_manager_policy_options | to_nice_yaml(indent=2) }}
{% endif %}
{% if kubelet_topology_manager_policy is defined %} {% if kubelet_topology_manager_policy is defined %}
topologyManagerPolicy: {{ kubelet_topology_manager_policy }} topologyManagerPolicy: {{ kubelet_topology_manager_policy }}
{% endif %} {% endif %}
......