-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add OpenStack provider support with configuration and templates
Signed-off-by: Bharath Nallapeta <[email protected]>
- Loading branch information
1 parent
e38f582
commit 0493422
Showing
11 changed files
with
151 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
apiVersion: hmc.mirantis.com/v1alpha1 | ||
kind: ManagedCluster | ||
metadata: | ||
name: openstack-dev | ||
namespace: ${NAMESPACE} | ||
spec: | ||
template: openstack-standalone-cp-0-0-1 | ||
credential: openstack-cluster-identity-cred | ||
config: | ||
controlPlaneNumber: 1 | ||
workersNumber: 1 | ||
region: RegionOne | ||
controlPlane: | ||
flavor: m1.medium | ||
image: | ||
filter: | ||
name: "ubuntu-2204-kube-v1.31.1" | ||
worker: | ||
flavor: m1.medium | ||
image: | ||
filter: | ||
name: "ubuntu-2204-kube-v1.31.1" | ||
authURL: ${OS_AUTH_URL} |
23 changes: 23 additions & 0 deletions
23
templates/provider/cluster-api-provider-openstack/.helmignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/ |
24 changes: 24 additions & 0 deletions
24
templates/provider/cluster-api-provider-openstack/Chart.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
11 changes: 11 additions & 0 deletions
11
templates/provider/cluster-api-provider-openstack/templates/provider.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }} |
9 changes: 9 additions & 0 deletions
9
templates/provider/cluster-api-provider-openstack/templates/secret.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }} |
38 changes: 38 additions & 0 deletions
38
templates/provider/cluster-api-provider-openstack/values.schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} | ||
} | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
templates/provider/cluster-api-provider-openstack/values.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
configSecret: | ||
create: false | ||
name: "" | ||
namespace: "" | ||
|
||
config: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
templates/provider/hmc-templates/files/templates/cluster-api-provider-openstack.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: hmc.mirantis.com/v1alpha1 | ||
kind: ProviderTemplate | ||
metadata: | ||
name: cluster-api-provider-openstack-0-0-1 | ||
annotations: | ||
helm.sh/resource-policy: keep | ||
spec: | ||
helm: | ||
chartName: cluster-api-provider-openstack | ||
chartVersion: 0.0.1 |