diff --git a/providers/openstack/alpha/1-29/cluster-addon-values.yaml b/providers/openstack/alpha/1-29/cluster-addon-values.yaml new file mode 100644 index 00000000..e0033983 --- /dev/null +++ b/providers/openstack/alpha/1-29/cluster-addon-values.yaml @@ -0,0 +1,5 @@ +values: | + metrics-server: + commonLabels: + domain: "{{ .Cluster.spec.controlPlaneEndpoint.host }}" + clusterAddonVersion: "v2" diff --git a/providers/openstack/alpha/1-29/cluster-addon/.helmignore b/providers/openstack/alpha/1-29/cluster-addon/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/providers/openstack/alpha/1-29/cluster-addon/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/providers/openstack/alpha/1-29/cluster-addon/Chart.lock b/providers/openstack/alpha/1-29/cluster-addon/Chart.lock new file mode 100644 index 00000000..ab1eac22 --- /dev/null +++ b/providers/openstack/alpha/1-29/cluster-addon/Chart.lock @@ -0,0 +1,15 @@ +dependencies: +- name: metrics-server + repository: https://kubernetes-sigs.github.io/metrics-server/ + version: 3.12.0 +- name: cilium + repository: https://helm.cilium.io/ + version: 1.15.2 +- name: openstack-cloud-controller-manager + repository: https://kubernetes.github.io/cloud-provider-openstack + version: 2.29.1 +- name: openstack-cinder-csi + repository: https://kubernetes.github.io/cloud-provider-openstack + version: 2.29.0 +digest: sha256:d52da0e42639cbb03af1e3c4e6bba637e5c5adc255be277861ef4adb3639f5b6 +generated: "2024-03-18T17:49:00.867501298+01:00" diff --git a/providers/openstack/alpha/1-29/cluster-addon/Chart.yaml b/providers/openstack/alpha/1-29/cluster-addon/Chart.yaml new file mode 100644 index 00000000..a2f0de99 --- /dev/null +++ b/providers/openstack/alpha/1-29/cluster-addon/Chart.yaml @@ -0,0 +1,21 @@ +apiVersion: v2 +dependencies: +- alias: metrics-server + name: metrics-server + repository: https://kubernetes-sigs.github.io/metrics-server/ + version: 3.12.0 +- alias: cilium + name: cilium + repository: https://helm.cilium.io/ + version: 1.15.2 +- alias: openstack-cloud-controller-manager + name: openstack-cloud-controller-manager + repository: https://kubernetes.github.io/cloud-provider-openstack + version: 2.29.1 +- alias: openstack-cinder-csi + name: openstack-cinder-csi + repository: https://kubernetes.github.io/cloud-provider-openstack + version: 2.29.0 +name: openstack-alpha-1-29-cluster-addon +type: application +version: << .ClusterAddonVersion >> diff --git a/providers/openstack/alpha/1-29/cluster-addon/charts/cilium-1.15.2.tgz b/providers/openstack/alpha/1-29/cluster-addon/charts/cilium-1.15.2.tgz new file mode 100644 index 00000000..6bf08bd0 Binary files /dev/null and b/providers/openstack/alpha/1-29/cluster-addon/charts/cilium-1.15.2.tgz differ diff --git a/providers/openstack/alpha/1-29/cluster-addon/charts/metrics-server-3.12.0.tgz b/providers/openstack/alpha/1-29/cluster-addon/charts/metrics-server-3.12.0.tgz new file mode 100644 index 00000000..22f9f8dc Binary files /dev/null and b/providers/openstack/alpha/1-29/cluster-addon/charts/metrics-server-3.12.0.tgz differ diff --git a/providers/openstack/alpha/1-29/cluster-addon/charts/openstack-cinder-csi-2.29.0.tgz b/providers/openstack/alpha/1-29/cluster-addon/charts/openstack-cinder-csi-2.29.0.tgz new file mode 100644 index 00000000..e2c47397 Binary files /dev/null and b/providers/openstack/alpha/1-29/cluster-addon/charts/openstack-cinder-csi-2.29.0.tgz differ diff --git a/providers/openstack/alpha/1-29/cluster-addon/charts/openstack-cloud-controller-manager-2.29.1.tgz b/providers/openstack/alpha/1-29/cluster-addon/charts/openstack-cloud-controller-manager-2.29.1.tgz new file mode 100644 index 00000000..a00a7822 Binary files /dev/null and b/providers/openstack/alpha/1-29/cluster-addon/charts/openstack-cloud-controller-manager-2.29.1.tgz differ diff --git a/providers/openstack/alpha/1-29/cluster-addon/values.yaml b/providers/openstack/alpha/1-29/cluster-addon/values.yaml new file mode 100644 index 00000000..ff61adaf --- /dev/null +++ b/providers/openstack/alpha/1-29/cluster-addon/values.yaml @@ -0,0 +1,48 @@ +metrics-server: + fullnameOverride: metrics-server + replicas: 1 + updateStrategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 0 + maxUnavailable: 1 + + service: + labels: + kubernetes.io/cluster-service: "true" + kubernetes.io/name: "Metrics-server" + + defaultArgs: + - --cert-dir=/tmp + - --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname + - --kubelet-use-node-status-port + - --metric-resolution=15s + + args: + - --kubelet-insecure-tls +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 +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 diff --git a/providers/openstack/alpha/1-29/cluster-class/.helmignore b/providers/openstack/alpha/1-29/cluster-class/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/providers/openstack/alpha/1-29/cluster-class/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/providers/openstack/alpha/1-29/cluster-class/Chart.yaml b/providers/openstack/alpha/1-29/cluster-class/Chart.yaml new file mode 100644 index 00000000..bfe6e646 --- /dev/null +++ b/providers/openstack/alpha/1-29/cluster-class/Chart.yaml @@ -0,0 +1,7 @@ +apiVersion: v2 +description: | + This chart installs and configures: + * Openstack Alpha Cluster Class +name: openstack-alpha-1-29-cluster-class +type: application +version: << .ClusterClassVersion >> diff --git a/providers/openstack/alpha/1-29/cluster-class/templates/_helpers.tpl b/providers/openstack/alpha/1-29/cluster-class/templates/_helpers.tpl new file mode 100644 index 00000000..2339c125 --- /dev/null +++ b/providers/openstack/alpha/1-29/cluster-class/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "cluster-class.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "cluster-class.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "cluster-class.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "cluster-class.labels" -}} +helm.sh/chart: {{ include "cluster-class.chart" . }} +{{ include "cluster-class.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "cluster-class.selectorLabels" -}} +app.kubernetes.io/name: {{ include "cluster-class.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "cluster-class.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "cluster-class.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/providers/openstack/alpha/1-29/cluster-class/templates/cluster-class.yaml b/providers/openstack/alpha/1-29/cluster-class/templates/cluster-class.yaml new file mode 100644 index 00000000..bb5119ba --- /dev/null +++ b/providers/openstack/alpha/1-29/cluster-class/templates/cluster-class.yaml @@ -0,0 +1,400 @@ +apiVersion: cluster.x-k8s.io/v1beta1 +kind: ClusterClass +metadata: + name: {{ .Release.Name }}-{{ .Chart.Version }} +spec: + controlPlane: + ref: + apiVersion: controlplane.cluster.x-k8s.io/v1beta1 + kind: KubeadmControlPlaneTemplate + name: {{ .Release.Name }}-{{ .Chart.Version }}-control-plane + machineInfrastructure: + ref: + kind: OpenStackMachineTemplate + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7 + name: {{ .Release.Name }}-{{ .Chart.Version }}-control-plane + infrastructure: + ref: + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7 + kind: OpenStackClusterTemplate + name: {{ .Release.Name }}-{{ .Chart.Version }}-cluster + workers: + machineDeployments: + - class: {{ .Release.Name }}-{{ .Chart.Version }} + template: + bootstrap: + ref: + apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 + kind: KubeadmConfigTemplate + name: {{ .Release.Name }}-{{ .Chart.Version }} + infrastructure: + ref: + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7 + kind: OpenStackMachineTemplate + name: {{ .Release.Name }}-{{ .Chart.Version }} + variables: + - name: external_id + required: false + schema: + openAPIV3Schema: + type: string + default: "ebfe5546-f09f-4f42-ab54-094e457d42ec" + example: "ebfe5546-f09f-4f42-ab54-094e457d42ec" + format: "uuid4" + description: "ExternalNetworkID is the ID of an external OpenStack Network. This is necessary to get public internet to the VMs." + - name: dns_nameservers + required: false + schema: + openAPIV3Schema: + type: array + description: "DNSNameservers is the list of nameservers for the OpenStack Subnet being created. Set this value when you need to create a new network/subnet while the access through DNS is required." + default: ["5.1.66.255", "185.150.99.255"] + example: ["5.1.66.255", "185.150.99.255"] + items: + type: string + - name: controller_flavor + required: false + schema: + openAPIV3Schema: + type: string + default: "SCS-2V-4-20" + example: "SCS-2V-4-20" + description: "OpenStack instance flavor for control-plane nodes." + - name: worker_flavor + required: false + schema: + openAPIV3Schema: + type: string + default: "SCS-2V-4-20" + example: "SCS-2V-4-20" + description: "OpenStack instance flavor for worker nodes." + - name: controller_root_disk + required: false + schema: + openAPIV3Schema: + type: integer + minimum: 1 + example: 20 + description: "Root disk size in GiB for control-plane nodes. OpenStack volume will be created and used instead of an ephemeral disk defined in flavor. Should be used also for the diskless flavors." + - name: worker_root_disk + required: false + schema: + openAPIV3Schema: + type: integer + minimum: 1 + example: 20 + description: "Root disk size in GiB for worker nodes. OpenStack volume will be created and used instead of an ephemeral disk defined in flavor. Should be used also for the diskless flavors." + - name: node_cidr + required: false + schema: + openAPIV3Schema: + type: string + format: "cidr" + default: "10.8.0.0/20" + example: "10.8.0.0/20" + description: "NodeCIDR is the OpenStack Subnet to be created. Cluster actuator will create a network, a subnet with NodeCIDR, and a router connected to this subnet. If you leave this empty, no network will be created." + - name: openstack_security_groups + required: false + schema: + openAPIV3Schema: + type: array + default: [] + example: ["security-group-1"] + description: "The names of the security groups to assign to the instance" + items: + type: string + - name: openstack_loadbalancer_apiserver + required: false + schema: + openAPIV3Schema: + type: boolean + default: true + description: "Enables custom load balancer for OpenStack API server" + - name: cloud_name + required: false + schema: + openAPIV3Schema: + type: string + default: "openstack" + example: "openstack" + description: "The name of the cloud to use from the clouds secret" + - name: secret_name + required: false + schema: + openAPIV3Schema: + type: string + default: "openstack" + example: "openstack" + description: "The name of the clouds secret" + - name: controller_server_group_id + required: false + schema: + openAPIV3Schema: + type: string + default: "" + example: "3adf4e92-bb33-4e44-8ad3-afda9dfe8ec3" + description: "The server group to assign the control plane nodes to." + - name: worker_server_group_id + required: false + schema: + openAPIV3Schema: + type: string + default: "" + example: "869fe071-1e56-46a9-9166-47c9f228e297" + description: "The server group to assign the worker nodes to." + - name: ssh_key + required: false + schema: + openAPIV3Schema: + type: string + default: "" + example: "capi-keypair" + description: "The ssh key to inject in the nodes." + patches: + - name: controller_flavor + description: "Sets the openstack instance flavor for the KubeadmControlPlane." + enabledIf: {{ `'{{ ne .controller_flavor "" }}'` }} + definitions: + - selector: + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7 + kind: OpenStackMachineTemplate + matchResources: + controlPlane: true + jsonPatches: + - op: replace + path: "/spec/template/spec/flavor" + valueFrom: + variable: controller_flavor + - name: worker_flavor + description: "Sets the openstack instance flavor for the worker nodes." + enabledIf: {{ `'{{ ne .worker_flavor "" }}'` }} + definitions: + - selector: + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7 + kind: OpenStackMachineTemplate + matchResources: + controlPlane: false + machineDeploymentClass: + names: + - {{ .Release.Name }}-{{ .Chart.Version }} + jsonPatches: + - op: replace + path: "/spec/template/spec/flavor" + valueFrom: + variable: worker_flavor + - name: controller_root_disk + description: "Sets the root disk size in GiB for control-plane nodes." + enabledIf: {{ `"{{ if .controller_root_disk }}true{{end}}"` }} + definitions: + - selector: + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7 + kind: OpenStackMachineTemplate + matchResources: + controlPlane: true + jsonPatches: + - op: add + path: "/spec/template/spec/rootVolume" + valueFrom: + template: | + diskSize: {{"{{"}} .controller_root_disk {{"}}"}} + - name: worker_root_disk + description: "Sets the root disk size in GiB for worker nodes." + enabledIf: {{ `"{{ if .worker_root_disk }}true{{end}}"` }} + definitions: + - selector: + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7 + kind: OpenStackMachineTemplate + matchResources: + controlPlane: false + machineDeploymentClass: + names: + - {{ .Release.Name }}-{{ .Chart.Version }} + jsonPatches: + - op: add + path: "/spec/template/spec/rootVolume" + valueFrom: + template: | + diskSize: {{"{{"}} .worker_root_disk {{"}}"}} + - name: external_id + description: "Sets the ID of an external OpenStack Network. This is necessary to get public internet to the VMs." + enabledIf: {{ `'{{ ne .external_id "" }}'` }} + definitions: + - selector: + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7 + kind: OpenStackClusterTemplate + matchResources: + infrastructureCluster: true + jsonPatches: + - op: replace + path: "/spec/template/spec/externalNetworkId" + valueFrom: + variable: external_id + - name: node_cidr + description: "Sets the NodeCIDR for the OpenStack Subnet to be created. Cluster actuator will create a network, a subnet with NodeCIDR, and a router connected to this subnet." + enabledIf: {{ `'{{ ne .node_cidr "" }}'` }} + definitions: + - selector: + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7 + kind: OpenStackClusterTemplate + matchResources: + infrastructureCluster: true + jsonPatches: + - op: replace + path: "/spec/template/spec/nodeCidr" + valueFrom: + variable: node_cidr + - name: dns_nameservers + description: "Sets the list of nameservers for the OpenStack Subnet being created." + enabledIf: {{ `"{{ if .dns_nameservers }}true{{end}}"` }} + definitions: + - selector: + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7 + kind: OpenStackClusterTemplate + matchResources: + infrastructureCluster: true + jsonPatches: + - op: replace + path: "/spec/template/spec/dnsNameservers" + valueFrom: + variable: dns_nameservers + - name: openstack_security_groups + description: "Sets the list of the openstack security groups for the worker and the controlplane instances." + enabledIf: {{ `"{{ if .openstack_security_groups }}true{{end}}"` }} + definitions: + - selector: + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7 + kind: OpenStackMachineTemplate + matchResources: + controlPlane: true + machineDeploymentClass: + names: + - {{ .Release.Name }}-{{ .Chart.Version }} + jsonPatches: + - op: replace + path: "/spec/template/spec/securityGroups" + valueFrom: + template: {{ `"[ {{ range .openstack_security_groups }} { name: {{ . }}}, {{ end }} ]"` }} + - selector: + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7 + kind: OpenStackClusterTemplate + matchResources: + infrastructureCluster: true + jsonPatches: + - op: replace + path: "/spec/template/spec/allowAllInClusterTraffic" + value: false + - name: openstack_loadbalancer_apiserver + description: "Enables custom load balancer for OpenStack API server" + definitions: + - selector: + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7 + kind: OpenStackClusterTemplate + matchResources: + infrastructureCluster: true + jsonPatches: + - op: replace + path: "/spec/template/spec/apiServerLoadBalancer/enabled" + valueFrom: + variable: openstack_loadbalancer_apiserver + - name: cloud_name + description: "Sets the name of the cloud to use from the clouds secret." + enabledIf: {{ `'{{ ne .cloud_name "" }}'` }} + definitions: + - selector: + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7 + kind: OpenStackClusterTemplate + matchResources: + infrastructureCluster: true + jsonPatches: + - op: replace + path: "/spec/template/spec/cloudName" + valueFrom: + variable: cloud_name + - selector: + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7 + kind: OpenStackMachineTemplate + matchResources: + controlPlane: true + machineDeploymentClass: + names: + - {{ .Release.Name }}-{{ .Chart.Version }} + jsonPatches: + - op: replace + path: "/spec/template/spec/cloudName" + valueFrom: + variable: cloud_name + - name: secret_name + description: "Sets the name of the clouds secret." + enabledIf: {{ `'{{ ne .secret_name "" }}'` }} + definitions: + - selector: + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7 + kind: OpenStackClusterTemplate + matchResources: + infrastructureCluster: true + jsonPatches: + - op: replace + path: "/spec/template/spec/identityRef/name" + valueFrom: + variable: secret_name + - selector: + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7 + kind: OpenStackMachineTemplate + matchResources: + controlPlane: true + machineDeploymentClass: + names: + - {{ .Release.Name }}-{{ .Chart.Version }} + jsonPatches: + - op: replace + path: "/spec/template/spec/identityRef/name" + valueFrom: + variable: secret_name + - name: controller_server_group_id + description: "Sets the server group to assign the control plane nodes to." + enabledIf: {{ `'{{ ne .controller_server_group_id "" }}'` }} + definitions: + - selector: + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7 + kind: OpenStackMachineTemplate + matchResources: + controlPlane: true + jsonPatches: + - op: add + path: "/spec/template/spec/serverGroupID" + valueFrom: + variable: controller_server_group_id + - name: worker_server_group_id + description: "Sets the server group to assign the worker nodes to." + enabledIf: {{ `'{{ ne .worker_server_group_id "" }}'` }} + definitions: + - selector: + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7 + kind: OpenStackMachineTemplate + matchResources: + controlPlane: false + machineDeploymentClass: + names: + - {{ .Release.Name }}-{{ .Chart.Version }} + jsonPatches: + - op: add + path: "/spec/template/spec/serverGroupID" + valueFrom: + variable: worker_server_group_id + - name: ssh_key + description: "Sets the ssh key to inject in the nodes." + enabledIf: {{ `'{{ ne .ssh_key "" }}'` }} + definitions: + - selector: + apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7 + kind: OpenStackMachineTemplate + matchResources: + controlPlane: true + machineDeploymentClass: + names: + - {{ .Release.Name }}-{{ .Chart.Version }} + jsonPatches: + - op: add + path: "/spec/template/spec/sshKeyName" + valueFrom: + variable: ssh_key diff --git a/providers/openstack/alpha/1-29/cluster-class/templates/kubeadm-config-template-worker-openstack.yaml b/providers/openstack/alpha/1-29/cluster-class/templates/kubeadm-config-template-worker-openstack.yaml new file mode 100644 index 00000000..8f3b770a --- /dev/null +++ b/providers/openstack/alpha/1-29/cluster-class/templates/kubeadm-config-template-worker-openstack.yaml @@ -0,0 +1,13 @@ +apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 +kind: KubeadmConfigTemplate +metadata: + name: {{ .Release.Name }}-{{ .Chart.Version }} +spec: + template: + spec: + joinConfiguration: + nodeRegistration: + kubeletExtraArgs: + cloud-provider: external + provider-id: openstack:///'{{"{{"}} instance_id {{"}}"}}' + name: '{{"{{"}} local_hostname {{"}}"}}' diff --git a/providers/openstack/alpha/1-29/cluster-class/templates/kubeadm-control-plane-template.yaml b/providers/openstack/alpha/1-29/cluster-class/templates/kubeadm-control-plane-template.yaml new file mode 100644 index 00000000..ef3e127e --- /dev/null +++ b/providers/openstack/alpha/1-29/cluster-class/templates/kubeadm-control-plane-template.yaml @@ -0,0 +1,36 @@ +apiVersion: controlplane.cluster.x-k8s.io/v1beta1 +kind: KubeadmControlPlaneTemplate +metadata: + name: {{ .Release.Name }}-{{ .Chart.Version }}-control-plane +spec: + template: + spec: + kubeadmConfigSpec: + clusterConfiguration: + apiServer: + extraArgs: + cloud-provider: external + controllerManager: + extraArgs: + cloud-provider: external + etcd: + local: + dataDir: /var/lib/etcd + extraArgs: + auto-compaction-mode: periodic + auto-compaction-retention: 8h + election-timeout: "2500" + heartbeat-interval: "250" + snapshot-count: "6400" + initConfiguration: + nodeRegistration: + kubeletExtraArgs: + cloud-provider: external + provider-id: openstack:///'{{"{{"}} instance_id {{"}}"}}' + name: '{{"{{"}} local_hostname {{"}}"}}' + joinConfiguration: + nodeRegistration: + kubeletExtraArgs: + cloud-provider: external + provider-id: openstack:///'{{"{{"}} instance_id {{"}}"}}' + name: '{{"{{"}} local_hostname {{"}}"}}' diff --git a/providers/openstack/alpha/1-29/cluster-class/templates/openstack-cluster-template.yaml b/providers/openstack/alpha/1-29/cluster-class/templates/openstack-cluster-template.yaml new file mode 100644 index 00000000..4cb0caaf --- /dev/null +++ b/providers/openstack/alpha/1-29/cluster-class/templates/openstack-cluster-template.yaml @@ -0,0 +1,24 @@ +apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7 +kind: OpenStackClusterTemplate +metadata: + name: {{ .Release.Name }}-{{ .Chart.Version }}-cluster +spec: + template: + spec: + allowAllInClusterTraffic: true + cloudName: {{ default "openstack" .Values.cloud.name }} + identityRef: + name: {{ default "openstack" .Values.secrets.clouds_yaml }} + kind: Secret + apiServerLoadBalancer: + enabled: {{ .Values.openstack_loadbalancer_apiserver }} +{{- if .Values.restrict_kubeapi }} + allowedCidrs: {{ .Values.restrict_kubeapi }} +{{- end }} + managedSecurityGroups: true + nodeCidr: {{ .Values.node_cidr }} + dnsNameservers: + {{- range .Values.dns_nameservers }} + - {{ . }} + {{- end }} + externalNetworkId: {{ .Values.external_id }} diff --git a/providers/openstack/alpha/1-29/cluster-class/templates/openstack-machine-template-control-plane.yaml b/providers/openstack/alpha/1-29/cluster-class/templates/openstack-machine-template-control-plane.yaml new file mode 100644 index 00000000..5bbd7f2b --- /dev/null +++ b/providers/openstack/alpha/1-29/cluster-class/templates/openstack-machine-template-control-plane.yaml @@ -0,0 +1,23 @@ +apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7 +kind: OpenStackMachineTemplate +metadata: + name: {{ .Release.Name }}-{{ .Chart.Version }}-control-plane +spec: + template: + spec: + cloudName: {{ default "openstack" .Values.cloud.name }} + flavor: {{ .Values.controller_flavor }} + identityRef: + kind: Secret + name: {{ default "openstack" .Values.secrets.clouds_yaml }} + image: {{ .Values.images.controlPlane.name }} + securityGroups: +{{- if .Values.openstack_security_groups }} +{{- range $.Values.openstack_security_groups }} + - name: {{ . }} +{{- end }} +{{- else }} + - name: {{ .Values.prefix }}-allow-ssh + - name: {{ .Values.prefix }}-allow-icmp + - name: {{ .Values.prefix }}-{{ .Values.testcluster_name }}-cilium +{{- end }} diff --git a/providers/openstack/alpha/1-29/cluster-class/templates/openstack-machine-template-worker.yaml b/providers/openstack/alpha/1-29/cluster-class/templates/openstack-machine-template-worker.yaml new file mode 100644 index 00000000..9afbff60 --- /dev/null +++ b/providers/openstack/alpha/1-29/cluster-class/templates/openstack-machine-template-worker.yaml @@ -0,0 +1,23 @@ +apiVersion: infrastructure.cluster.x-k8s.io/v1alpha7 +kind: OpenStackMachineTemplate +metadata: + name: {{ .Release.Name }}-{{ .Chart.Version }} +spec: + template: + spec: + cloudName: {{ default "openstack" .Values.cloud.name }} + flavor: {{ .Values.worker_flavor }} + identityRef: + kind: Secret + name: {{ default "openstack" .Values.secrets.clouds_yaml }} + image: {{ .Values.images.worker.name }} + securityGroups: +{{- if .Values.openstack_security_groups }} +{{- range $.Values.openstack_security_groups }} + - name: {{ . }} +{{- end }} +{{- else }} + - name: {{ .Values.prefix }}-allow-ssh + - name: {{ .Values.prefix }}-allow-icmp + - name: {{ .Values.prefix }}-{{ .Values.testcluster_name }}-cilium +{{- end }} diff --git a/providers/openstack/alpha/1-29/cluster-class/values.yaml b/providers/openstack/alpha/1-29/cluster-class/values.yaml new file mode 100644 index 00000000..dacbbab8 --- /dev/null +++ b/providers/openstack/alpha/1-29/cluster-class/values.yaml @@ -0,0 +1,27 @@ +# mirrored from variables.tf +external_id: ebfe5546-f09f-4f42-ab54-094e457d42ec +dns_nameservers: + - 5.1.66.255 + - 185.150.99.255 +controller_flavor: SCS-2V-4-20 +worker_flavor: SCS-2V-4-20 +prefix: capi +testcluster_name: testcluster +node_cidr: 10.8.0.0/20 +restrict_kubeapi: [] + +# newly introduced: +openstack_security_groups: [] +openstack_loadbalancer_apiserver: true + +# TBD, currently needed: +images: + controlPlane: + name: ubuntu-capi-image-v1.29.3 + worker: + name: ubuntu-capi-image-v1.29.3 + +cloud: + name: "openstack" +secrets: + clouds_yaml: "openstack" diff --git a/providers/openstack/alpha/1-29/csctl.yaml b/providers/openstack/alpha/1-29/csctl.yaml new file mode 100644 index 00000000..ccd16739 --- /dev/null +++ b/providers/openstack/alpha/1-29/csctl.yaml @@ -0,0 +1,9 @@ +apiVersion: csctl.clusterstack.x-k8s.io/v1alpha1 +config: + kubernetesVersion: v1.29.3 + clusterStackName: alpha + provider: + type: openstack + apiVersion: openstack.csctl.clusterstack.x-k8s.io/v1alpha1 + config: + method: get diff --git a/providers/openstack/alpha/1-29/node-images/config.yaml b/providers/openstack/alpha/1-29/node-images/config.yaml new file mode 100644 index 00000000..735909f5 --- /dev/null +++ b/providers/openstack/alpha/1-29/node-images/config.yaml @@ -0,0 +1,8 @@ +apiVersion: openstack.infrastructure.clusterstack.x-k8s.io/v1alpha1 +openStackNodeImages: +- url: https://swift.services.a.regiocloud.tech/swift/v1/AUTH_b182637428444b9aa302bb8d5a5a418c/openstack-k8s-capi-images/ubuntu-2204-kube-v1.29/ubuntu-2204-kube-v1.29.3.qcow2 + createOpts: + name: ubuntu-capi-image-v1.29.3 + disk_format: qcow2 + container_format: bare + visibility: private