SovereignCloudStack / cluster-stacks

Definition of Cluster Stacks based on the ClusterAPI ClusterClass feature
https://scs.community/
Apache License 2.0
12 stars 6 forks source link

:sparkles: Add network MTU variable into cluster-class #151

Closed michal-gubricky closed 4 months ago

michal-gubricky commented 4 months ago

What this PR does / why we need it: This PR adds an option to specify network MTU via variable in your cluster resource

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged): Fixes #149

Special notes for your reviewer: Tested with cluster.yaml file, which looks like:

apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
  name: cs-cluster
  labels:
    managed-secret: cloud-config
spec:
  clusterNetwork:
    pods:
      cidrBlocks:
        - 192.168.0.0/16
    serviceDomain: cluster.local
    services:
      cidrBlocks:
        - 10.96.0.0/12
  topology:
    variables:
      - name: controller_flavor
        value: "SCS-2V-4-50"
      - name: worker_flavor
        value: "SCS-2V-4-50"
#      - name: external_id
#        value: ebfe5546-f09f-4f42-ab54-094e457d42ec # gx-scs
      - name: network_mtu
        value: 1420
    class: openstack-scs-1-28-v0-sha.wenvkai
    controlPlane:
      replicas: 1
    version: v1.28.11
    workers:
      machineDeployments:
        - class: default-worker
          failureDomain: nova
          name: default-worker
          replicas: 3

After the cluster was spawned successfully, in the gx-scs infrastructure, we are able to see changed MTU for the cluster network network_mtu

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

TODOs: