Skip to content

Use Cluster Addon Stages #211

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

Merged
merged 3 commits into from
Mar 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 26 additions & 27 deletions docs/providers/openstack/configuration.md

Large diffs are not rendered by default.

13 changes: 8 additions & 5 deletions hack/generate_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,10 @@ def create_output_dir(version: str) -> PosixPath:
# Copy whole tree from src dir and remove "versions.yaml" file
shutil.copytree(SOURCE_PATH, out_dir)
out_dir.joinpath("versions.yaml").unlink()
out_dir.joinpath("cluster-addon", "Chart.lock").unlink()
shutil.rmtree(str(out_dir.joinpath("cluster-addon", "charts")))
for file in out_dir.joinpath("cluster-addon").rglob("Chart.lock"):
file.unlink()
for folder in out_dir.joinpath("cluster-addon").rglob("charts"):
shutil.rmtree(folder)

return out_dir

Expand Down Expand Up @@ -286,12 +288,13 @@ def update_node_images(target: PosixPath, **kwargs):

for tv in target_versions:
output_dir = create_output_dir(tv["kubernetes"])
update_cluster_addon(
output_dir.joinpath("cluster-addon", "Chart.yaml"),
for chart_yaml in output_dir.joinpath("cluster-addon").rglob("Chart.yaml"):
update_cluster_addon(
chart_yaml,
args.build,
args.build_verbose,
**tv,
)
)
update_csctl_conf(output_dir.joinpath("csctl.yaml"), **tv)
update_cluster_class(output_dir.joinpath("cluster-class"), **tv)
update_node_images(output_dir.joinpath("node-images", "config.yaml"), **tv)
23 changes: 0 additions & 23 deletions providers/openstack/scs/cluster-addon-values.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions providers/openstack/scs/cluster-addon/Chart.lock

This file was deleted.

21 changes: 0 additions & 21 deletions providers/openstack/scs/cluster-addon/Chart.yaml

This file was deleted.

6 changes: 6 additions & 0 deletions providers/openstack/scs/cluster-addon/ccm/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: openstack-cloud-controller-manager
repository: https://kubernetes.github.io/cloud-provider-openstack
version: 2.31.1
digest: sha256:37581a55204e3d55a12413fec097c8f8ab2fa6e3c43f0c6b2a13ad5f94e366ab
generated: "2025-01-31T08:56:58.099398117+01:00"
10 changes: 10 additions & 0 deletions providers/openstack/scs/cluster-addon/ccm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v2
type: application
description: CCM
name: CCM
version: v1
dependencies:
- alias: openstack-cloud-controller-manager
name: openstack-cloud-controller-manager
repository: https://kubernetes.github.io/cloud-provider-openstack
version: 2.31.1
Binary file not shown.
4 changes: 4 additions & 0 deletions providers/openstack/scs/cluster-addon/ccm/overwrite.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
values: |
openstack-cloud-controller-manager:
cluster:
name: {{ .Cluster.metadata.name }}
13 changes: 13 additions & 0 deletions providers/openstack/scs/cluster-addon/ccm/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
openstack-cloud-controller-manager:
secret:
enabled: true
name: cloud-config
create: false
nodeSelector:
node-role.kubernetes.io/control-plane: ""
tolerations:
- key: node.cloudprovider.kubernetes.io/uninitialized
value: "true"
effect: NoSchedule
- key: node-role.kubernetes.io/control-plane
effect: NoSchedule
Binary file not shown.
Binary file not shown.
6 changes: 6 additions & 0 deletions providers/openstack/scs/cluster-addon/cni/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: cilium
repository: https://helm.cilium.io/
version: 1.17.1
digest: sha256:53c34069893b2a60b16c171d128e7cda9fd62ddb96210cde7c0d3c00d6d2f096
generated: "2025-02-26T12:54:16.166712915+01:00"
10 changes: 10 additions & 0 deletions providers/openstack/scs/cluster-addon/cni/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v2
type: application
description: CNI
name: CNI
version: v1
dependencies:
- alias: cilium
name: cilium
repository: https://helm.cilium.io/
version: 1.17.1
9 changes: 9 additions & 0 deletions providers/openstack/scs/cluster-addon/cni/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
cilium:
tls:
secretsNamespace:
name: kube-system
sessionAffinity: true
sctp:
enabled: true
ipam:
mode: "kubernetes"
6 changes: 6 additions & 0 deletions providers/openstack/scs/cluster-addon/csi/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: openstack-cinder-csi
repository: https://kubernetes.github.io/cloud-provider-openstack
version: 2.31.2
digest: sha256:c4dae4f651e1be8b82347d74df884fb5c7503e4b9e5d4db9424fa7fdf2e447d7
generated: "2025-01-31T08:58:29.735075689+01:00"
10 changes: 10 additions & 0 deletions providers/openstack/scs/cluster-addon/csi/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v2
type: application
description: CSI
name: CSI
version: v1
dependencies:
- alias: openstack-cinder-csi
name: openstack-cinder-csi
repository: https://kubernetes.github.io/cloud-provider-openstack
version: 2.31.2
Binary file not shown.
3 changes: 3 additions & 0 deletions providers/openstack/scs/cluster-addon/csi/overwrite.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
values: |
openstack-cinder-csi:
clusterID: "{{ .Cluster.metadata.name }}"
16 changes: 16 additions & 0 deletions providers/openstack/scs/cluster-addon/csi/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
openstack-cinder-csi:
secret:
enabled: true
name: cloud-config
create: false
nodeSelector:
node-role.kubernetes.io/control-plane: ""
tolerations:
- key: node.cloudprovider.kubernetes.io/uninitialized
value: "true"
effect: NoSchedule
- key: node-role.kubernetes.io/control-plane
effect: NoSchedule
storageClass:
delete:
isDefault: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: metrics-server
repository: https://kubernetes-sigs.github.io/metrics-server/
version: 3.12.2
digest: sha256:b79715342d7c10e97664b5f4d79199044f5da6ef40cca906218cff05ca891122
generated: "2025-01-10T10:10:00.37755764+01:00"
10 changes: 10 additions & 0 deletions providers/openstack/scs/cluster-addon/metrics-server/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v2
type: application
description: Metrics Server
name: metrics-server
version: v1
dependencies:
- name: "metrics-server"
version: "3.12.2"
repository: "https://kubernetes-sigs.github.io/metrics-server/"
alias: "metrics-server"
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
values: |
metrics-server:
commonLabels:
domain: "{{ .Cluster.spec.controlPlaneEndpoint.host }}"
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
metrics-server:
fullnameOverride: metrics-server
args:
- --kubelet-insecure-tls
43 changes: 0 additions & 43 deletions providers/openstack/scs/cluster-addon/values.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@ spec:
example: "none, octavia-amphora, octavia-ovn"
description: |
"In this cluster-stack we have two kind of loadbalancers. Each of them has its own configuration variable. This setting here is to configure the loadbalancer that is placed in front of the apiserver.
To configure the loadbalancer for the workloads, see variable workload_loadbalancer.
You can choose from 4 options:
You can choose from 2 options:

none:
No loadbalancer solution will be deployed
Expand All @@ -144,28 +143,6 @@ spec:

octavia-ovn:
Uses openstack's loadbalancer service (provider:ovn)

- name: workload_loadbalancer
required: false
schema:
openAPIV3Schema:
type: string
default: "octavia-amphora"
example: "none, octavia-amphora, octavia-ovn"
description: |
"This setting here is to configure the loadbalancer solution for your services inside your cluster.
If you want to configure the loadbalancer in front of your apiserver, see variable apiserver_loadbalancer instead.
You can choose from 4 options:

none:
No loadbalancer solution will be deployed

octavia-amphora:
(default) Uses openstack's loadbalancer service (provider:amphora)

octavia-ovn:
Uses openstack's loadbalancer service (provider:ovn)

- name: dns_nameservers
required: false
schema:
Expand Down
21 changes: 21 additions & 0 deletions providers/openstack/scs/clusteraddon.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: clusteraddonconfig.x-k8s.io/v1alpha1
clusterAddonVersion: clusteraddons.clusterstack.x-k8s.io/v1alpha1
addonStages:
AfterControlPlaneInitialized:
- name: cni
action: apply
- name: metrics-server
action: apply
- name: csi
action: apply
- name: ccm
action: apply
BeforeClusterUpgrade:
- name: cni
action: apply
- name: metrics-server
action: apply
- name: csi
action: apply
- name: ccm
action: apply