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

Feature/3190 expand k8s nodes capabilities with storage from rook #3217

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
- update is defined
fail_msg: Variable 'update' must be defined.

- debug:
var: update

- name: Collect kubeadm-config
command: |
kubectl get configmap kubeadm-config \
Expand All @@ -16,6 +19,11 @@
register: kubeadm_config
changed_when: false

- debug:
msg:
- "{{ kubeadm_config }}"


- name: Extend kubeadm config
set_fact:
kubeadm_config: >-
Expand All @@ -24,9 +32,23 @@
original: >-
{{ kubeadm_config.stdout | from_yaml }}

- debug:
msg:
- "{{ kubeadm_config }}"

#- name: Pause until you can verify updates to an application were successful
# ansible.builtin.pause:

- name: Render /etc/kubeadm/kubeadm-config.yml
copy:
dest: /etc/kubeadm/kubeadm-config.yml
mode: u=rw,go=
backup: yes
content: >-
{{ kubeadm_config | to_nice_yaml }}

- name: Merge /etc/kubeadm/kubeadm-config.yml with baseline (2 Kinds) file.
shell: >-
cd /etc/kubeadm &&
sed -n -e '/---/,$p' kubeadm-config.yml.* >> kubeadm-config.yml
register: result
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,4 @@ kind: KubeletConfiguration
apiVersion: kubelet.config.k8s.io/v1beta1
cgroupDriver: systemd
rotateCertificates: true
enableControllerAttachDetach: {{ specification.enable_controller_attach_detach }}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ discovery:
- sha256:{{ kubernetes_common.kubeadm_cert_hash }}
nodeRegistration:
kubeletExtraArgs:
enable-controller-attach-detach: "false"
node-labels: {{ specification.node_labels }}
1 change: 1 addition & 0 deletions schema/common/defaults/configuration/kubernetes-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ specification:
hostname: 127.0.0.1
# change if you want a custom port
port: 6443
enable_controller_attach_detach: false
# image_registry_secrets:
# - email: [email protected]
# name: secretname
Expand Down
2 changes: 2 additions & 0 deletions schema/common/validation/configuration/kubernetes-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ properties:
- certificates
- etcd_args
- kubeconfig
enable_controller_attach_detach:
type: boolean
required:
- version
- cni_version
Expand Down