Skip to content

Commit

Permalink
kubeadm: provide feature gates to api too
Browse files Browse the repository at this point in the history
  • Loading branch information
karmab committed Feb 17, 2025
1 parent 799b02d commit 398e614
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 4 deletions.
37 changes: 33 additions & 4 deletions kvirt/cluster/kubeadm/config_bootstrap.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
{% set api_fqdn = "api.%s.sslip.io" % api_ip.replace('.', '-').replace(':', '-') if sslip|default(False) else "api.%s.%s" % (cluster, domain) %}
{% if feature_gates %}
{% set feature_gates_string = [] %}
{% for entry in feature_gates %}
{% set entry = '%s=true' % entry %}
{{ feature_gates_string.append(entry) or "" }}
{% endfor %}
{% endif %}
{% if runtime_config %}
{% set runtime_config_string = [] %}
{% for entry in runtime_config %}
{% set entry = '%s=true' % entry %}
{{ runtime_config_string.append(entry) or "" }}
{% endfor %}
{% endif %}
apiVersion: kubeadm.k8s.io/v1beta4
kind: InitConfiguration
bootstrapTokens:
Expand All @@ -20,9 +34,6 @@ networking:
podSubnet: {{ cluster_network_ipv4 }}
serviceSubnet: {{ service_network_ipv4 }}
dnsDomain: "{{ cluster }}.{{ domain }}"
apiServer:
certSANs:
- {{ api_fqdn }}
{% if disconnected_url != None %}
imageRepository: {{ disconnected_url }}
{% endif %}
Expand All @@ -34,8 +45,26 @@ dns:
proxy:
disabled: true
{% endif %}
---
apiServer:
certSANs:
- {{ api_fqdn }}
{% if feature_gates %}
extraArgs:
{% if runtime_config %}
- name: "runtime-config"
value: "{{ runtime_config_string|join(',') }}"
{% endif %}
- name: "feature-gates"
value: "{{ feature_gates_string|join(',') }}"
controllerManager:
extraArgs:
- name: "feature-gates"
value: "{{ feature_gates_string|join(',') }}"
scheduler:
extraArgs:
- name: "feature-gates"
value: "{{ feature_gates_string|join(',') }}"
---
apiVersion: kubelet.config.k8s.io/v1beta1
cgroupDriver: systemd
featureGates:
Expand Down
1 change: 1 addition & 0 deletions kvirt/cluster/kubeadm/kcli_default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,4 @@ feature_gates: []
coredns: true
kube_proxy: true
ignore_hosts: false
runtime_config: []

0 comments on commit 398e614

Please sign in to comment.