SovereignCloudStack / cluster-stacks

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

:sparkles: Add openstack kamaji cluster stack #104

Closed chess-knight closed 1 week ago

chess-knight commented 1 month ago

What this PR does / why we need it:

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 #25

Special notes for your reviewer: You can use openstack-kamaji-1-30-v0-sha-11930ee release for the tests.

apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
  name: kamaji-cluster
  labels:
    managed-secret: cloud-config
spec:
  clusterNetwork:
    services:
      cidrBlocks: ["10.128.0.0/12"]
    pods:
      cidrBlocks: ["192.168.0.0/16"]
    serviceDomain: "cluster.local"
  topology:
    class: openstack-kamaji-1-30-v0-sha.11930ee
    controlPlane:
      replicas: 3
    variables:
    - name: data_store
      value: "default"
    - name: dns_service_ips
      value: ["10.128.0.10"]
    - name: worker_flavor
      value: "SCS-2V-4-50"
    - name: external_id
      value: "ebfe5546-f09f-4f42-ab54-094e457d42ec"
    version: v1.30.1
    workers:
      machineDeployments:
      - class: default-worker
        name: kamaji
        replicas: 3
        failureDomain: nova

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

TODOs:

chess-knight commented 3 weeks ago

After applying the cluster resource I got the following error:

message: 'cannot create or update TenantControlPlane: admission webhook vtenantcontrolplane.kb.io" denied the request: unable to parse the desired Kubernetes version: Invalid character(s) found in major number "v1"'

This is already fixed(but not released yet) in the upstream, see https://github.com/clastix/cluster-api-control-plane-provider-kamaji/pull/109. You can workaround that by editing the KamajiControlPlane resource and removing "v" prefix from .spec.version field.

mxmxchere commented 2 weeks ago

I have the feeling that we still lack KamajiControlPlaneTemplate. Is there a release newer than v0.9.0?

chess-knight commented 2 weeks ago

I have the feeling that we still lack KamajiControlPlaneTemplate. Is there a release newer than v0.9.0?

Yes, there is no upstream release yet, please see https://github.com/SovereignCloudStack/cluster-stacks/pull/104#discussion_r1642770311.

jschoone commented 2 weeks ago

v0.10.0 is now available :)

mxmxchere commented 1 week ago

I am testing with kamaji 1.0.0 and capk 0.10.0: tenantcontrolplane.spec.addons.konnectivity (kamaji-resource) has a required field proxyPort but kamajicontrolplane.spec.addons.konnectivity (capi-wrapper resource) does not know this field

chess-knight commented 1 week ago

I am testing with kamaji 1.0.0 and capk 0.10.0: tenantcontrolplane.spec.addons.konnectivity (kamaji-resource) has a required field proxyPort but kamajicontrolplane.spec.addons.konnectivity (capi-wrapper resource) does not know this field

This is strange. Does it work with KAmaji v0.6x?

mxmxchere commented 1 week ago

i think i messed something up with my CRDs...

mxmxchere commented 1 week ago

https://helm.sh/docs/topics/charts/#limitations-on-crds

CRDs are never reinstalled. If Helm determines that the CRDs in the crds/ directory are already present (regardless of version), Helm will not attempt to install or upgrade.

I think that has been the issue. I reinstalled them, all is fine now