diff --git a/templates/cluster-api-provider-azure/.helmignore b/templates/cluster-api-provider-azure/.helmignore new file mode 100644 index 000000000..0e8a0eb36 --- /dev/null +++ b/templates/cluster-api-provider-azure/.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/cluster-api-provider-azure/Chart.yaml b/templates/cluster-api-provider-azure/Chart.yaml new file mode 100644 index 000000000..1d01e46c1 --- /dev/null +++ b/templates/cluster-api-provider-azure/Chart.yaml @@ -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 diff --git a/templates/cluster-api-provider-azure/templates/provider.yaml b/templates/cluster-api-provider-azure/templates/provider.yaml new file mode 100644 index 000000000..e9015b3cc --- /dev/null +++ b/templates/cluster-api-provider-azure/templates/provider.yaml @@ -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 diff --git a/templates/cluster-api-provider-azure/templates/secret.yaml b/templates/cluster-api-provider-azure/templates/secret.yaml new file mode 100644 index 000000000..f5780d57b --- /dev/null +++ b/templates/cluster-api-provider-azure/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/cluster-api-provider-azure/values.schema.json b/templates/cluster-api-provider-azure/values.schema.json new file mode 100644 index 000000000..e0e89204a --- /dev/null +++ b/templates/cluster-api-provider-azure/values.schema.json @@ -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" + } + } + } +} diff --git a/templates/cluster-api-provider-azure/values.yaml b/templates/cluster-api-provider-azure/values.yaml new file mode 100644 index 000000000..dac04d5b0 --- /dev/null +++ b/templates/cluster-api-provider-azure/values.yaml @@ -0,0 +1,6 @@ +configSecret: + create: false + name: "" + namespace: "" + +config: {} diff --git a/templates/hmc-templates/files/templates/cluster-api-provider-azure.yaml b/templates/hmc-templates/files/templates/cluster-api-provider-azure.yaml new file mode 100644 index 000000000..ebc64f6ec --- /dev/null +++ b/templates/hmc-templates/files/templates/cluster-api-provider-azure.yaml @@ -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