-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(bootstrap): add capz chart (#825)
Signed-off-by: David van der Spek <[email protected]>
- Loading branch information
Showing
24 changed files
with
5,649 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
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/ |
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 @@ | ||
dependencies: | ||
- name: cluster-api-provider-azure | ||
repository: https://pluralsh.github.io/capi-helm-charts | ||
version: 0.1.8 | ||
digest: sha256:a121b432405288d78644e268fab20ac4369a2bfd13084094b9de9e0f65c05ad1 | ||
generated: "2023-08-24T17:11:19.117169+02:00" |
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: v2 | ||
name: cluster-api-provider-azure | ||
description: A Helm chart for Kubernetes | ||
type: application | ||
version: 0.1.11 | ||
appVersion: v1.10.2 | ||
dependencies: | ||
- name: cluster-api-provider-azure | ||
version: 0.1.8 | ||
repository: https://pluralsh.github.io/capi-helm-charts |
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,3 @@ | ||
# Cluster API Provider Azure | ||
|
||
A helm chart that deploys the Cluster API Provider for Azure |
Binary file added
BIN
+56.6 KB
bootstrap/helm/cluster-api-provider-azure/charts/cluster-api-provider-azure-0.1.8.tgz
Binary file not shown.
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,7 @@ | ||
apiVersion: plural.sh/v1alpha1 | ||
kind: Dependencies | ||
metadata: | ||
application: true | ||
description: installs the cluster api provider azure | ||
spec: | ||
dependencies: [] |
24 changes: 24 additions & 0 deletions
24
bootstrap/helm/cluster-api-provider-azure/scripts/Makefile
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 @@ | ||
AZURE_VERSION=v1.9.14 | ||
|
||
azure: | ||
# Clean current CRDs | ||
rm -rf ../templates/*-crd.yaml | ||
mkdir tmp | ||
wget https://github.com/pluralsh/cluster-api-provider-azure/releases/download/${AZURE_VERSION}/infrastructure-components.yaml | ||
# This rewrites the data to stringData in the secret | ||
yq 'select(.kind == "Secret") | .stringData += .data | del(.data)' infrastructure-components.yaml > tmp.yaml | ||
# This removes the Secret from the yaml | ||
yq 'del( select(.kind == "Secret"))' infrastructure-components.yaml > tmp2.yaml | ||
|
||
# This combines the yaml files back together | ||
yq eval-all tmp.yaml tmp2.yaml > infrastructure-components.yaml | ||
|
||
cat infrastructure-components.yaml | helmify -generate-defaults -image-pull-secrets tmp/cluster-api-provider-azure | ||
rm infrastructure-components.yaml tmp.yaml tmp2.yaml | ||
yq -i ".appVersion=\"${AZURE_VERSION}\"" ../Chart.yaml | ||
|
||
# This removes the Azure credentials from the values.yaml since it is being set by managerBootstrapCredentials.credentials instead | ||
yq -i "del(.configVariables.azureClientIdB64) | del(.configVariables.azureClientSecretB64) | del(.configVariables.azureSubscriptionIdB64) | del(.configVariables.azureTenantIdB64)" tmp/cluster-api-provider-azure/values.yaml | ||
|
||
mv tmp/cluster-api-provider-azure/templates/*-crd.yaml ../templates/ | ||
rm -rf tmp/ |
62 changes: 62 additions & 0 deletions
62
bootstrap/helm/cluster-api-provider-azure/templates/_helpers.tpl
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,62 @@ | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "cluster-api-provider-azure-plural.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
If release name contains chart name it will be used as a full name. | ||
*/}} | ||
{{- define "cluster-api-provider-azure-plural.fullname" -}} | ||
{{- if .Values.fullnameOverride }} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- $name := default .Chart.Name .Values.nameOverride }} | ||
{{- if contains $name .Release.Name }} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "cluster-api-provider-azure-plural.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "cluster-api-provider-azure-plural.labels" -}} | ||
helm.sh/chart: {{ include "cluster-api-provider-azure-plural.chart" . }} | ||
{{ include "cluster-api-provider-azure-plural.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "cluster-api-provider-azure-plural.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "cluster-api-provider-azure-plural.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "cluster-api-provider-azure-plural.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create }} | ||
{{- default (include "cluster-api-provider-azure-plural.fullname" .) .Values.serviceAccount.name }} | ||
{{- else }} | ||
{{- default "default" .Values.serviceAccount.name }} | ||
{{- end }} | ||
{{- end }} |
Oops, something went wrong.