Compare commits

..

3 Commits

Author SHA1 Message Date
dependabot[bot]
5d1dd83b07 build(deps): bump stefanbuck/github-issue-parser from 3.2.1 to 3.2.2 (#12773)
Bumps [stefanbuck/github-issue-parser](https://github.com/stefanbuck/github-issue-parser) from 3.2.1 to 3.2.2.
- [Release notes](https://github.com/stefanbuck/github-issue-parser/releases)
- [Commits](2ea9b35a8c...25f1485edf)

---
updated-dependencies:
- dependency-name: stefanbuck/github-issue-parser
  dependency-version: 3.2.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-07 21:37:27 -08:00
dependabot[bot]
b203586d6b build(deps): bump actions/checkout from 6.0.0 to 6.0.1 (#12772)
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.0 to 6.0.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](1af3b93b68...8e8c483db8)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-07 21:25:28 -08:00
Max Gautier
88df61357b Use run_once for kubeadm init phase upload-certs (#12759)
Before "5ca23e3bf (Changed to use first_kube_control_plane to parse
kubeadm_certificate_key (#11875), 2025-01-14)", kubespray would have
problem adding new control planes when the order of the nodes in kubectl
output and the ansible inventory were not the same.

But the underlying problem is that the operation is fundamentally
something that should be done only once, and recorded for all host in
play.

Since `register` and `sef_fact` when used with `run_once` set the
variable for all the hosts, use it. Also allows to use the variable
directly instead of relying on hostvars to make the task more readable.
2025-12-07 21:07:27 -08:00
3 changed files with 17 additions and 18 deletions

View File

@@ -13,10 +13,10 @@ jobs:
issues: write issues: write
steps: steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
- name: Parse issue form - name: Parse issue form
uses: stefanbuck/github-issue-parser@2ea9b35a8c584529ed00891a8f7e41dc46d0441e uses: stefanbuck/github-issue-parser@25f1485edffc1fee3ea68eb9f59a72e58720ffc4
id: issue-parser id: issue-parser
with: with:
template-path: .github/ISSUE_TEMPLATE/bug-report.yaml template-path: .github/ISSUE_TEMPLATE/bug-report.yaml

View File

@@ -11,7 +11,7 @@ jobs:
update-patch-versions: update-patch-versions:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
with: with:
ref: ${{ inputs.branch }} ref: ${{ inputs.branch }}
- uses: actions/setup-python@v6 - uses: actions/setup-python@v6

View File

@@ -11,24 +11,23 @@
tags: tags:
- facts - facts
- name: Upload certificates so they are fresh and not expired - name: Obtain kubeadm certificate key for joining control planes nodes
command: >-
{{ bin_dir }}/kubeadm init phase
--config {{ kube_config_dir }}/kubeadm-config.yaml
upload-certs
--upload-certs
register: kubeadm_upload_cert
when: when:
- inventory_hostname == first_kube_control_plane
- not kube_external_ca_mode - not kube_external_ca_mode
- name: Parse certificate key if not set
set_fact:
kubeadm_certificate_key: "{{ hostvars[first_kube_control_plane]['kubeadm_upload_cert'].stdout_lines[-1] | trim }}"
run_once: true run_once: true
when: block:
- hostvars[first_kube_control_plane]['kubeadm_upload_cert'] is defined - name: Upload certificates so they are fresh and not expired
- hostvars[first_kube_control_plane]['kubeadm_upload_cert'] is not skipped command: >-
{{ bin_dir }}/kubeadm init phase
--config {{ kube_config_dir }}/kubeadm-config.yaml
upload-certs
--upload-certs
register: kubeadm_upload_cert
delegate_to: "{{ first_kube_control_plane }}"
- name: Parse certificate key if not set
set_fact:
kubeadm_certificate_key: "{{ kubeadm_upload_cert.stdout_lines[-1] | trim }}"
- name: Wait for k8s apiserver - name: Wait for k8s apiserver
wait_for: wait_for: