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 ff2f868
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
30 changes: 26 additions & 4 deletions kvirt/cluster/kubeadm/config_bootstrap.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{% 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 feature_gate in feature_gates %}
{% set feature_gate_string = '%s=true' % feature_gate %}
{{ feature_gates_string.append(feature_gate_string) or "" }}
{% endfor %}
{% endif %}
apiVersion: kubeadm.k8s.io/v1beta4
kind: InitConfiguration
bootstrapTokens:
Expand All @@ -20,9 +27,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 +38,26 @@ dns:
proxy:
disabled: true
{% endif %}
---
apiServer:
certSANs:
- {{ api_fqdn }}
{% if feature_gates %}
extraArgs:
{% if runtime_config %}
- name: "runtime-config"
value: "resource.k8s.io/v1beta1=true"
{% 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: false

0 comments on commit ff2f868

Please sign in to comment.