From 4d34860e60c5d4ab0908b15fe25628f647aa25a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 17:52:56 +0000 Subject: [PATCH 1/3] Bump sigs.k8s.io/cluster-api from 1.9.1 to 1.9.3 Bumps [sigs.k8s.io/cluster-api](https://github.com/kubernetes-sigs/cluster-api) from 1.9.1 to 1.9.3. - [Release notes](https://github.com/kubernetes-sigs/cluster-api/releases) - [Commits](https://github.com/kubernetes-sigs/cluster-api/compare/v1.9.1...v1.9.3) --- updated-dependencies: - dependency-name: sigs.k8s.io/cluster-api dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 8f9768d16..6e7275134 100644 --- a/go.mod +++ b/go.mod @@ -27,7 +27,7 @@ require ( k8s.io/apimachinery v0.31.3 k8s.io/client-go v0.31.3 k8s.io/utils v0.0.0-20241104163129-6fe5fd82f078 - sigs.k8s.io/cluster-api v1.9.1 + sigs.k8s.io/cluster-api v1.9.3 sigs.k8s.io/cluster-api-operator v0.14.0 sigs.k8s.io/cluster-api-provider-azure v1.17.2 sigs.k8s.io/cluster-api-provider-vsphere v1.12.0 @@ -173,7 +173,7 @@ require ( golang.org/x/crypto v0.31.0 // indirect golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6 // indirect golang.org/x/mod v0.22.0 // indirect - golang.org/x/net v0.32.0 // indirect + golang.org/x/net v0.33.0 // indirect golang.org/x/oauth2 v0.24.0 // indirect golang.org/x/sync v0.10.0 // indirect golang.org/x/sys v0.28.0 // indirect diff --git a/go.sum b/go.sum index a37a76c16..8f118618b 100644 --- a/go.sum +++ b/go.sum @@ -555,8 +555,8 @@ golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= -golang.org/x/net v0.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI= -golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs= +golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= +golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE= golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -678,8 +678,8 @@ oras.land/oras-go v1.2.6 h1:z8cmxQXBU8yZ4mkytWqXfo6tZcamPwjsuxYU81xJ8Lk= oras.land/oras-go v1.2.6/go.mod h1:OVPc1PegSEe/K8YiLfosrlqlqTN9PUyFvOw5Y9gwrT8= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3 h1:2770sDpzrjjsAtVhSeUFseziht227YAWYHLGNM8QPwY= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= -sigs.k8s.io/cluster-api v1.9.1 h1:s2YUB66XceK+EQ3Uq8Mq/N9TgqRU4TQUMsaQYXOIWlU= -sigs.k8s.io/cluster-api v1.9.1/go.mod h1:pkFqVPq0ELlJgyDjgqpb4MU1XnWEi98B2q3DbEjC4ww= +sigs.k8s.io/cluster-api v1.9.3 h1:lKWbrXzyNmJh++IcX54ZbAmnO7tZ2wKgds7WvskpiXY= +sigs.k8s.io/cluster-api v1.9.3/go.mod h1:5iojv38PSvOd4cxqu08Un5TQmy2yBkd3+0U7R/e+msk= sigs.k8s.io/cluster-api-operator v0.14.0 h1:0QgO6+XGrNNJnNHKBwvQD5v6w+EaH3Z0RL1nL3wpjA4= sigs.k8s.io/cluster-api-operator v0.14.0/go.mod h1:euShpVN6HyxXas28HkrYxhCPVDW1UV6ljbRBAeCxp8Y= sigs.k8s.io/cluster-api-provider-azure v1.17.2 h1:uS9ggE/bryI0hiOWHBa56nYHkWmsPZW3bzYeAddL4vM= From a9235e9d9da3905a06a3908cdac7254019f6305f Mon Sep 17 00:00:00 2001 From: Dina Belova Date: Mon, 23 Dec 2024 08:33:40 -0800 Subject: [PATCH 2/3] Add zerospiel to CODEOWNERS Signed-off-by: Dina Belova --- CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODEOWNERS b/CODEOWNERS index 6eeaaa235..6c3c5f18e 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1 +1 @@ -* @Kshatrix @eromanova @a13x5 +* @Kshatrix @eromanova @a13x5 @zerospiel From 6209d28a0c5cca3af334fdd9a7eaf8b6d53cae56 Mon Sep 17 00:00:00 2001 From: Bharath Nallapeta Date: Tue, 24 Dec 2024 15:49:57 +0530 Subject: [PATCH 3/3] Add OpenStack provider support with configuration and templates (#695) Signed-off-by: Bharath Nallapeta --- api/v1alpha1/common.go | 2 + api/v1alpha1/management_types.go | 1 + .../.helmignore | 23 +++++++++++ .../cluster-api-provider-openstack/Chart.yaml | 24 ++++++++++++ .../templates/provider.yaml | 11 ++++++ .../templates/secret.yaml | 9 +++++ .../values.schema.json | 38 +++++++++++++++++++ .../values.yaml | 6 +++ .../provider/hmc-templates/files/release.yaml | 2 + .../cluster-api-provider-openstack.yaml | 15 ++++++++ 10 files changed, 131 insertions(+) create mode 100644 templates/provider/cluster-api-provider-openstack/.helmignore create mode 100644 templates/provider/cluster-api-provider-openstack/Chart.yaml create mode 100644 templates/provider/cluster-api-provider-openstack/templates/provider.yaml create mode 100644 templates/provider/cluster-api-provider-openstack/templates/secret.yaml create mode 100644 templates/provider/cluster-api-provider-openstack/values.schema.json create mode 100644 templates/provider/cluster-api-provider-openstack/values.yaml create mode 100644 templates/provider/hmc-templates/files/templates/cluster-api-provider-openstack.yaml diff --git a/api/v1alpha1/common.go b/api/v1alpha1/common.go index fdcfef653..a8e1b31d2 100644 --- a/api/v1alpha1/common.go +++ b/api/v1alpha1/common.go @@ -48,6 +48,8 @@ const ( ProviderAzureName = "cluster-api-provider-azure" // Provider vSphere ProviderVSphereName = "cluster-api-provider-vsphere" + // Provider OpenStack + ProviderOpenStackName = "cluster-api-provider-openstack" // Provider K0smotron ProviderK0smotronName = "k0smotron" // Provider Sveltos diff --git a/api/v1alpha1/management_types.go b/api/v1alpha1/management_types.go index 542a0def5..645bf3a65 100644 --- a/api/v1alpha1/management_types.go +++ b/api/v1alpha1/management_types.go @@ -103,6 +103,7 @@ func GetDefaultProviders() []Provider { {Name: ProviderAWSName}, {Name: ProviderAzureName}, {Name: ProviderVSphereName}, + {Name: ProviderOpenStackName}, {Name: ProviderSveltosName}, } } diff --git a/templates/provider/cluster-api-provider-openstack/.helmignore b/templates/provider/cluster-api-provider-openstack/.helmignore new file mode 100644 index 000000000..0e8a0eb36 --- /dev/null +++ b/templates/provider/cluster-api-provider-openstack/.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/templates/provider/cluster-api-provider-openstack/Chart.yaml b/templates/provider/cluster-api-provider-openstack/Chart.yaml new file mode 100644 index 000000000..b3d55a7b1 --- /dev/null +++ b/templates/provider/cluster-api-provider-openstack/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: cluster-api-provider-openstack +description: A Helm chart for Cluster API provider OpenStack +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.0.1 +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "v0.11.3" +annotations: + cluster.x-k8s.io/provider: infrastructure-openstack + cluster.x-k8s.io/v1beta1: v1beta1 diff --git a/templates/provider/cluster-api-provider-openstack/templates/provider.yaml b/templates/provider/cluster-api-provider-openstack/templates/provider.yaml new file mode 100644 index 000000000..26bc3d296 --- /dev/null +++ b/templates/provider/cluster-api-provider-openstack/templates/provider.yaml @@ -0,0 +1,11 @@ +apiVersion: operator.cluster.x-k8s.io/v1alpha2 +kind: InfrastructureProvider +metadata: + name: openstack +spec: + version: v0.11.3 + {{- if .Values.configSecret.name }} + configSecret: + name: {{ .Values.configSecret.name }} + namespace: {{ .Values.configSecret.namespace | default .Release.Namespace | trunc 63 }} + {{- end }} diff --git a/templates/provider/cluster-api-provider-openstack/templates/secret.yaml b/templates/provider/cluster-api-provider-openstack/templates/secret.yaml new file mode 100644 index 000000000..f5780d57b --- /dev/null +++ b/templates/provider/cluster-api-provider-openstack/templates/secret.yaml @@ -0,0 +1,9 @@ +{{- if and .Values.configSecret.create .Values.configSecret.name }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ .Values.configSecret.name }} + namespace: {{ .Values.configSecret.namespace | default .Release.Namespace | trunc 63 }} +stringData: +{{ toYaml .Values.config | indent 2 }} +{{- end }} diff --git a/templates/provider/cluster-api-provider-openstack/values.schema.json b/templates/provider/cluster-api-provider-openstack/values.schema.json new file mode 100644 index 000000000..2c1df9f1a --- /dev/null +++ b/templates/provider/cluster-api-provider-openstack/values.schema.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "Schema for configuration secret settings used in the OpenStack deployment.", + "type": "object", + "required": [ + "configSecret" + ], + "properties": { + "configSecret": { + "type": "object", + "description": "Settings for the OpenStack configuration secret.", + "required": [ + "create", + "name" + ], + "properties": { + "create": { + "type": "boolean", + "description": "Indicates whether a new secret should be created." + }, + "name": { + "type": "string", + "description": "The name of the OpenStack configuration secret." + }, + "namespace": { + "type": "string", + "description": "The namespace where the OpenStack configuration secret will be created or referenced." + } + } + }, + "config": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } +} diff --git a/templates/provider/cluster-api-provider-openstack/values.yaml b/templates/provider/cluster-api-provider-openstack/values.yaml new file mode 100644 index 000000000..dac04d5b0 --- /dev/null +++ b/templates/provider/cluster-api-provider-openstack/values.yaml @@ -0,0 +1,6 @@ +configSecret: + create: false + name: "" + namespace: "" + +config: {} diff --git a/templates/provider/hmc-templates/files/release.yaml b/templates/provider/hmc-templates/files/release.yaml index c882afc7d..64a0e4465 100644 --- a/templates/provider/hmc-templates/files/release.yaml +++ b/templates/provider/hmc-templates/files/release.yaml @@ -19,5 +19,7 @@ spec: template: cluster-api-provider-vsphere-0-0-4 - name: cluster-api-provider-aws template: cluster-api-provider-aws-0-0-4 + - name: cluster-api-provider-openstack + template: cluster-api-provider-openstack-0-0-1 - name: projectsveltos template: projectsveltos-0-44-0 diff --git a/templates/provider/hmc-templates/files/templates/cluster-api-provider-openstack.yaml b/templates/provider/hmc-templates/files/templates/cluster-api-provider-openstack.yaml new file mode 100644 index 000000000..d4fc2366c --- /dev/null +++ b/templates/provider/hmc-templates/files/templates/cluster-api-provider-openstack.yaml @@ -0,0 +1,15 @@ +apiVersion: hmc.mirantis.com/v1alpha1 +kind: ProviderTemplate +metadata: + name: cluster-api-provider-openstack-0-0-1 + annotations: + helm.sh/resource-policy: keep +spec: + helm: + chartSpec: + chart: cluster-api-provider-openstack + version: 0.0.1 + interval: 10m0s + sourceRef: + kind: HelmRepository + name: hmc-templates