Skip to content

Commit a62e3b7

Browse files
authored
Merge pull request #12 from paolosalvatori/main
Added crossplane-azure-upbound Helm chart - New PR
2 parents 48a0ab3 + 3a5b7a3 commit a62e3b7

File tree

8 files changed

+287
-0
lines changed

8 files changed

+287
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
apiVersion: v2
2+
name: crossplane-azure-upbound
3+
description: A Helm chart for the Azure Provider for Crossplane
4+
5+
# A chart can be either an 'application' or a 'library' chart.
6+
#
7+
# Application charts are a collection of templates that can be packaged into versioned archives
8+
# to be deployed.
9+
#
10+
# Library charts provide useful utilities or functions for the chart developer. They're included as
11+
# a dependency of application charts to inject those utilities and functions into the rendering
12+
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
13+
type: application
14+
15+
# This is the chart version. This version number should be incremented each time you make changes
16+
# to the chart and its templates, including the app version.
17+
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18+
version: 1.0.0
19+
20+
# This is the version number of the application being deployed. This version number should be
21+
# incremented each time you make changes to the application. Versions are not expected to
22+
# follow Semantic Versioning. They should reflect the version the application is using.
23+
# It is recommended to use it with quotes.
24+
appVersion: "v1.0.0"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{{/*
2+
Expand the name of the chart.
3+
*/}}
4+
{{- define "resources.name" -}}
5+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
6+
{{- end }}
7+
8+
{{/*
9+
Create a default fully qualified app name.
10+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
11+
If release name contains chart name it will be used as a full name.
12+
*/}}
13+
{{- define "resources.fullname" -}}
14+
{{- if .Values.fullnameOverride }}
15+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
16+
{{- else }}
17+
{{- $name := default .Chart.Name .Values.nameOverride }}
18+
{{- if contains $name .Release.Name }}
19+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
20+
{{- else }}
21+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
22+
{{- end }}
23+
{{- end }}
24+
{{- end }}
25+
26+
{{/*
27+
Create chart name and version as used by the chart label.
28+
*/}}
29+
{{- define "resources.chart" -}}
30+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
31+
{{- end }}
32+
33+
{{/*
34+
Common labels
35+
*/}}
36+
{{- define "resources.labels" -}}
37+
helm.sh/chart: {{ include "resources.chart" . }}
38+
{{ include "resources.selectorLabels" . }}
39+
{{- if .Chart.AppVersion }}
40+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
41+
{{- end }}
42+
app.kubernetes.io/managed-by: {{ .Release.Service }}
43+
{{- end }}
44+
45+
{{/*
46+
Selector labels
47+
*/}}
48+
{{- define "resources.selectorLabels" -}}
49+
app.kubernetes.io/name: {{ include "resources.name" . }}
50+
app.kubernetes.io/instance: {{ .Release.Name }}
51+
{{- end }}
52+
53+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{{- if and .Values.global.enabled_azure_upbound .Values.providerConfig.enabled }}
2+
{{- with .Values.providerConfig }}
3+
apiVersion: azure.upbound.io/v1beta1
4+
kind: ProviderConfig
5+
metadata:
6+
name: {{ .metadata.name }}
7+
annotations:
8+
argocd.argoproj.io/sync-wave: "4"
9+
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
10+
helm.sh/hook: post-install
11+
{{- range $key, $value := .metadata.annotations }}
12+
{{ $key }}: {{ $value | quote }}
13+
{{- end }}
14+
{{- if .metadata.labels }}
15+
labels:
16+
{{- range $key, $value := .metadata.labels }}
17+
{{ $key }}: {{ $value | quote }}
18+
{{- end }}
19+
{{- end }}
20+
spec:
21+
{{- if and .spec.clientID .spec.tenantID .spec.subscriptionID }}
22+
credentials:
23+
source: UserAssignedManagedIdentity
24+
clientID: {{ .spec.clientID }}
25+
subscriptionID: {{ .spec.subscriptionID }}
26+
tenantID: {{ .spec.tenantID }}
27+
{{- else }}
28+
credentials:
29+
source: Secret
30+
secretRef:
31+
namespace: {{ .spec.credentials.secretRef.namespace }}
32+
name: {{ .spec.credentials.secretRef.name }}
33+
key: {{ .spec.credentials.secretRef.key }}
34+
{{- end }}
35+
{{- end }}
36+
{{- end }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{{- if and .Values.global.enabled_azure_upbound .Values.provider.enabled }}
2+
{{- with .Values.provider }}
3+
apiVersion: pkg.crossplane.io/v1
4+
kind: Provider
5+
metadata:
6+
name: upbound-provider-family-azure
7+
annotations:
8+
argocd.argoproj.io/sync-wave: "2"
9+
{{- range $key, $value := .metadata.annotations }}
10+
{{ $key }}: {{ $value | quote }}
11+
{{- end }}
12+
{{- if .metadata.labels }}
13+
labels:
14+
{{- range $key, $value := .metadata.labels }}
15+
{{ $key }}: {{ $value | quote }}
16+
{{- end }}
17+
{{- end }}
18+
spec:
19+
package: {{ .package.registry }}/provider-family-azure:{{ .package.version }}
20+
{{- end }}
21+
{{- end }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{{- if and .Values.global.enabled_azure_upbound .Values.provider.enabled }}
2+
{{- range .Values.providers }}
3+
apiVersion: pkg.crossplane.io/v1
4+
kind: Provider
5+
metadata:
6+
name: provider-azure-{{ . }}
7+
annotations:
8+
argocd.argoproj.io/sync-wave: "3"
9+
{{- range $key, $value := $.Values.provider.metadata.annotations }}
10+
{{ $key }}: {{ $value | quote }}
11+
{{- end }}
12+
{{- if $.Values.provider.metadata.labels }}
13+
labels:
14+
{{- range $key, $value := $.Values.provider.metadata.labels }}
15+
{{ $key }}: {{ $value | quote }}
16+
{{- end }}
17+
{{- end }}
18+
spec:
19+
package: {{ $.Values.provider.package.registry }}/provider-azure-{{ . }}:{{ $.Values.provider.package.version }}
20+
---
21+
{{- end }}
22+
23+
{{- end }}
24+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{{- if and .Values.global.enabled_azure_upbound .Values.deploymentRuntimeConfig.enabled }}
2+
{{- with .Values.deploymentRuntimeConfig }}
3+
apiVersion: pkg.crossplane.io/v1beta1
4+
kind: DeploymentRuntimeConfig
5+
metadata:
6+
name: {{ .metadata.name }}
7+
annotations:
8+
argocd.argoproj.io/sync-wave: "1"
9+
{{- range $key, $value := .metadata.annotations }}
10+
{{ $key }}: {{ $value | quote }}
11+
{{- end }}
12+
13+
{{- if .metadata.labels }}
14+
labels:
15+
{{- range $key, $value := .metadata.labels }}
16+
{{ $key }}: {{ $value | quote }}
17+
{{- end }}
18+
{{- end }}
19+
spec:
20+
serviceAccountTemplate:
21+
metadata:
22+
{{- if .spec.serviceAccountTemplate.metadata.labels }}
23+
labels:
24+
{{- range $key, $value := .spec.serviceAccountTemplate.metadata.labels }}
25+
{{ $key }}: {{ $value | quote }}
26+
{{- end }}
27+
{{- end }}
28+
annotations:
29+
{{- range $key, $value := .spec.serviceAccountTemplate.metadata.annotations }}
30+
{{ $key }}: {{ $value | quote }}
31+
{{- end }}
32+
name: {{ .spec.serviceAccountTemplate.metadata.name }}
33+
deploymentTemplate:
34+
{{- .spec.deploymentTemplate | toYaml | nindent 4 }}
35+
{{- end }}
36+
{{- end }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
global:
2+
enabled_azure_upbound: true
3+
4+
deploymentRuntimeConfig:
5+
enabled: false
6+
metadata:
7+
name: "upbound-azure-runtime-config"
8+
role_arn: ""
9+
annotations: {}
10+
labels:
11+
app.kubernetes.io/managed-by: Helm
12+
spec:
13+
deploymentTemplate:
14+
spec:
15+
selector: {}
16+
template:
17+
metadata:
18+
annotations: {}
19+
labels:
20+
azure.workload.identity/use: true
21+
spec:
22+
containers:
23+
- name: package-runtime
24+
args:
25+
- --debug
26+
securityContext:
27+
fsGroup: 2000
28+
serviceAccountTemplate:
29+
metadata:
30+
annotations: {}
31+
labels:
32+
name: azure-provider
33+
34+
provider:
35+
enabled: true
36+
metadata:
37+
annotations: {}
38+
labels:
39+
app.kubernetes.io/managed-by: Helm
40+
package:
41+
registry: xpkg.upbound.io/upbound
42+
version: v0.42.0
43+
44+
providerConfig:
45+
enabled: true
46+
metadata:
47+
name: default
48+
annotations: {}
49+
labels:
50+
app.kubernetes.io/managed-by: Helm
51+
spec:
52+
credentials:
53+
source: Secret
54+
secretRef:
55+
namespace: crossplane-system
56+
name: azure-secret
57+
key: creds
58+
59+
providers:
60+
- network
61+
- compute
62+
- storage
63+
- authorization
64+
- containerservice
65+
- containerregistry
66+
- keyvault
67+
- operationalinsights
68+
- insights
69+
- managedidentity
70+
- resources

0 commit comments

Comments
 (0)