-
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
a198bc7
commit d20f702
Showing
10 changed files
with
131 additions
and
0 deletions.
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
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
15 changes: 15 additions & 0 deletions
15
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,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 |