Skip to content

Commit dddf49f

Browse files
Merge branch 'main' into feature/capo_0.12.2
2 parents 0e55942 + 4a62afe commit dddf49f

File tree

8 files changed

+50
-98
lines changed

8 files changed

+50
-98
lines changed

roles/cluster_api/defaults/main.yml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
1-
# Copyright (c) 2023 VEXXHOST, Inc.
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License"); you may
4-
# not use this file except in compliance with the License. You may obtain
5-
# a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11-
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12-
# License for the specific language governing permissions and limitations
13-
# under the License.
14-
15-
# clusterctl depends heavily on the GitHub API and gets very quickly rate
16-
# limited so you should set this to your own token.
17-
#
1+
# Copyright (c) 2025 VEXXHOST, Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
184
# See: https://github.com/kubernetes-sigs/cluster-api/issues/3982
195
cluster_api_github_token: ""
206

@@ -38,3 +24,6 @@ cluster_api_openstack_controller_image: quay.io/orc/openstack-resource-controlle
3824
cluster_api_openstack_controller_version: 2.0.3
3925

4026
cluster_api_node_selector: {}
27+
28+
# https://cluster-api-openstack.sigs.k8s.io/clusteropenstack/configuration.html#timeout-settings
29+
cluster_api_capo_instance_create_timeout: 10

roles/cluster_api/meta/main.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
1-
# Copyright (c) 2023 VEXXHOST, Inc.
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License"); you may
4-
# not use this file except in compliance with the License. You may obtain
5-
# a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11-
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12-
# License for the specific language governing permissions and limitations
13-
# under the License.
1+
# Copyright (c) 2025 VEXXHOST, Inc.
2+
# SPDX-License-Identifier: Apache-2.0
143

154
galaxy_info:
165
author: VEXXHOST, Inc.

roles/cluster_api/tasks/init.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
1-
# Copyright (c) 2023 VEXXHOST, Inc.
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License"); you may
4-
# not use this file except in compliance with the License. You may obtain
5-
# a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11-
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12-
# License for the specific language governing permissions and limitations
13-
# under the License.
1+
# Copyright (c) 2025 VEXXHOST, Inc.
2+
# SPDX-License-Identifier: Apache-2.0
143

154
- name: Initialize the management cluster
165
run_once: true

roles/cluster_api/tasks/main.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
1-
# Copyright (c) 2023 VEXXHOST, Inc.
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License"); you may
4-
# not use this file except in compliance with the License. You may obtain
5-
# a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11-
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12-
# License for the specific language governing permissions and limitations
13-
# under the License.
1+
# Copyright (c) 2025 VEXXHOST, Inc.
2+
# SPDX-License-Identifier: Apache-2.0
143

154
- name: Create a folder for the Cluster API providers
165
ansible.builtin.file:

roles/cluster_api/tasks/patch.yml

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
1-
# Copyright (c) 2023 VEXXHOST, Inc.
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License"); you may
4-
# not use this file except in compliance with the License. You may obtain
5-
# a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11-
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12-
# License for the specific language governing permissions and limitations
13-
# under the License.
1+
# Copyright (c) 2025 VEXXHOST, Inc.
2+
# SPDX-License-Identifier: Apache-2.0
143

154
- name: Set node selector for Cluster API components
165
kubernetes.core.k8s:
@@ -53,10 +42,15 @@
5342
# set the default value of imagePullPolicy in CRDs.
5443
# yamllint disable rule:line-length
5544
- name: Set default values for imagePullPolicy in kubeadmConfigSpec of CRDs
56-
changed_when: false
5745
when: cluster_api_control_plane_version | float >= 1.4
58-
ansible.builtin.command: |
59-
kubectl patch crd {{ item.crd }} --type=json -p='[{"op": "add", "path": "{{ item.path }}", "value": "IfNotPresent"}]'
46+
kubernetes.core.k8s_json_patch:
47+
kind: CustomResourceDefinition
48+
name: "{{ item.crd }}"
49+
patch:
50+
- op: add
51+
path: "{{ item.path }}"
52+
value: "IfNotPresent"
53+
wait: true
6054
loop:
6155
- {"crd": "kubeadmcontrolplanetemplates.controlplane.cluster.x-k8s.io", "path": "/spec/versions/1/schema/openAPIV3Schema/properties/spec/properties/template/properties/spec/properties/kubeadmConfigSpec/properties/initConfiguration/properties/nodeRegistration/properties/imagePullPolicy/default"}
6256
- {"crd": "kubeadmcontrolplanetemplates.controlplane.cluster.x-k8s.io", "path": "/spec/versions/1/schema/openAPIV3Schema/properties/spec/properties/template/properties/spec/properties/kubeadmConfigSpec/properties/joinConfiguration/properties/nodeRegistration/properties/imagePullPolicy/default"}
@@ -66,3 +60,20 @@
6660
- {"crd": "kubeadmconfigtemplates.bootstrap.cluster.x-k8s.io", "path": "/spec/versions/2/schema/openAPIV3Schema/properties/spec/properties/template/properties/spec/properties/joinConfiguration/properties/nodeRegistration/properties/imagePullPolicy/default"}
6761
- {"crd": "kubeadmcontrolplanes.controlplane.cluster.x-k8s.io", "path": "/spec/versions/2/schema/openAPIV3Schema/properties/spec/properties/kubeadmConfigSpec/properties/initConfiguration/properties/nodeRegistration/properties/imagePullPolicy/default"}
6862
- {"crd": "kubeadmcontrolplanes.controlplane.cluster.x-k8s.io", "path": "/spec/versions/2/schema/openAPIV3Schema/properties/spec/properties/kubeadmConfigSpec/properties/joinConfiguration/properties/nodeRegistration/properties/imagePullPolicy/default"}
63+
64+
- name: Set CAPO instance creation timeout
65+
when: cluster_api_infrastructure_provider == "openstack"
66+
kubernetes.core.k8s_json_patch:
67+
kind: Deployment
68+
namespace: capo-system
69+
name: capo-controller-manager
70+
patch:
71+
- op: add
72+
path: /spec/template/spec/containers/0/env
73+
value: []
74+
- op: add
75+
path: /spec/template/spec/containers/0/env/-
76+
value:
77+
name: CLUSTER_API_OPENSTACK_INSTANCE_CREATE_TIMEOUT
78+
value: "{{ cluster_api_capo_instance_create_timeout | quote }}"
79+
wait: true

roles/cluster_api/tasks/upgrade.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
1-
# Copyright (c) 2023 VEXXHOST, Inc.
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License"); you may
4-
# not use this file except in compliance with the License. You may obtain
5-
# a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11-
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12-
# License for the specific language governing permissions and limitations
13-
# under the License.
1+
# Copyright (c) 2025 VEXXHOST, Inc.
2+
# SPDX-License-Identifier: Apache-2.0
143

154
- name: Parse provider resources into version mapping
165
run_once: true

roles/cluster_api/vars/main.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
1-
# Copyright (c) 2023 VEXXHOST, Inc.
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License"); you may
4-
# not use this file except in compliance with the License. You may obtain
5-
# a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11-
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12-
# License for the specific language governing permissions and limitations
13-
# under the License.
1+
# Copyright (c) 2025 VEXXHOST, Inc.
2+
# SPDX-License-Identifier: Apache-2.0
143

154
_cluster_api_environment: |
165
{% set res = {'CLUSTER_TOPOLOGY': 'true', 'EXP_CLUSTER_RESOURCE_SET': 'true'} -%}

roles/kubelet/tasks/main.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,13 @@
125125
enabled: true
126126
state: started
127127

128+
- name: Ensure availability of dbus on Debian
129+
ansible.builtin.package:
130+
name: dbus
131+
state: present
132+
when:
133+
- ansible_facts['os_family'] == 'Debian'
134+
128135
- name: Configure short hostname
129136
ansible.builtin.hostname:
130137
name: "{{ kubelet_hostname }}"

0 commit comments

Comments
 (0)