Skip to content

Commit

Permalink
Add Cluster API Provider Azure template
Browse files Browse the repository at this point in the history
  • Loading branch information
eromanova committed Aug 27, 2024
1 parent bd37c5c commit 3bc9590
Show file tree
Hide file tree
Showing 7 changed files with 129 additions and 0 deletions.
23 changes: 23 additions & 0 deletions templates/cluster-api-provider-azure/.helmignore
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 templates/cluster-api-provider-azure/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v2
name: cluster-api-provider-azure
description: A Helm chart for Cluster API provider Azure
# 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: "1.16.0"
annotations:
hmc.mirantis.com/type: provider
hmc.mirantis.com/infrastructure-providers: azure
33 changes: 33 additions & 0 deletions templates/cluster-api-provider-azure/templates/provider.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
apiVersion: operator.cluster.x-k8s.io/v1alpha2
kind: InfrastructureProvider
metadata:
name: azure
spec:
version: v1.16.0
{{- if .Values.configSecret.name }}
configSecret:
name: {{ .Values.configSecret.name }}
namespace: {{ .Values.configSecret.namespace | default .Release.Namespace | trunc 63 }}
{{- end }}
manifestPatches:
- |
apiVersion: v1
kind: Service
metadata:
name: azureserviceoperator-webhook-service
spec:
selector:
control-plane: aso-controller-manager
- |
apiVersion: apps/v1
kind: Deployment
metadata:
name: azureserviceoperator-controller-manager
spec:
selector:
matchLabels:
control-plane: aso-controller-manager
template:
metadata:
labels:
control-plane: aso-controller-manager
9 changes: 9 additions & 0 deletions templates/cluster-api-provider-azure/templates/secret.yaml
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 }}
26 changes: 26 additions & 0 deletions templates/cluster-api-provider-azure/values.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"type": "object",
"properties": {
"configSecret": {
"type": "object",
"properties": {
"create": {
"type": "boolean"
},
"name": {
"type": "string"
},
"namespace": {
"type": "string"
}
}
},
"config": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
6 changes: 6 additions & 0 deletions templates/cluster-api-provider-azure/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
configSecret:
create: false
name: ""
namespace: ""

config: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: hmc.mirantis.com/v1alpha1
kind: Template
metadata:
name: cluster-api-provider-azure
spec:
helm:
chartName: cluster-api-provider-azure
chartVersion: 0.0.1

0 comments on commit 3bc9590

Please sign in to comment.