Skip to content

Commit 9ca7b3c

Browse files
author
Workshop User
committed
add crossplane helm charts
Signed-off-by: Workshop User <[email protected]>
1 parent bd17499 commit 9ca7b3c

31 files changed

+1177
-0
lines changed
Lines changed: 23 additions & 0 deletions
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/
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
apiVersion: v2
2+
name: crossplane-aws-upbound
3+
description: A Helm chart for Kubernetes
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: "1.0.0"
Lines changed: 53 additions & 0 deletions
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+
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{{- if and .Values.global.enabled_aws_upbound .Values.providerConfig.enabled }}
2+
{{- with .Values.providerConfig }}
3+
apiVersion: aws.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+
{{- range $key, $value := .metadata.annotations }}
11+
{{ $key }}: {{ $value | quote }}
12+
{{- end }}
13+
14+
{{- if .metadata.labels }}
15+
labels:
16+
{{- range $key, $value := .metadata.labels }}
17+
{{ $key }}: {{ $value | quote }}
18+
{{- end }}
19+
{{- end }}
20+
spec:
21+
{{- .spec | toYaml | nindent 2 }}
22+
{{- end }}
23+
24+
---
25+
{{- with .Values.providerConfig }}
26+
apiVersion: aws.upbound.io/v1beta1
27+
kind: ProviderConfig
28+
metadata:
29+
name: default
30+
annotations:
31+
argocd.argoproj.io/sync-wave: "4"
32+
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
33+
{{- range $key, $value := .metadata.annotations }}
34+
{{ $key }}: {{ $value | quote }}
35+
{{- end }}
36+
37+
{{- if .metadata.labels }}
38+
labels:
39+
{{- range $key, $value := .metadata.labels }}
40+
{{ $key }}: {{ $value | quote }}
41+
{{- end }}
42+
{{- end }}
43+
spec:
44+
{{- .spec | toYaml | nindent 2 }}
45+
{{- end }}
46+
47+
{{- end }}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{{- if .Values.global.enabled_aws_upbound }}
2+
3+
apiVersion: pkg.crossplane.io/v1
4+
kind: Provider
5+
metadata:
6+
name: upbound-provider-family-aws
7+
annotations:
8+
argocd.argoproj.io/sync-wave: "2"
9+
spec:
10+
package: {{ $.Values.global.aws_upbound_registry }}/provider-family-aws:{{ $.Values.global.aws_upbound_version }}
11+
12+
{{- end }}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{{- if .Values.global.enabled_aws_upbound }}
2+
3+
{{- range .Values.providers }}
4+
5+
apiVersion: pkg.crossplane.io/v1
6+
kind: Provider
7+
metadata:
8+
name: provider-aws-{{ . }}
9+
annotations:
10+
argocd.argoproj.io/sync-wave: "3"
11+
spec:
12+
package: {{ $.Values.global.aws_upbound_registry }}/provider-aws-{{ . }}:{{ $.Values.global.aws_upbound_version }}
13+
runtimeConfigRef:
14+
apiVersion: pkg.crossplane.io/v1beta1
15+
kind: DeploymentRuntimeConfig
16+
name: {{ $.Values.deploymentRuntimeConfig.metadata.name }}
17+
---
18+
{{- end }}
19+
20+
{{- end }}
21+
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{{- if and .Values.global.enabled_aws_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+
eks.amazonaws.com/role-arn: {{ default $.Values.global.iam_role_arn_aws_upbound .metadata.role_arn }}
30+
{{- range $key, $value := .spec.serviceAccountTemplate.metadata.annotations }}
31+
{{ $key }}: {{ $value | quote }}
32+
{{- end }}
33+
name: {{ .spec.serviceAccountTemplate.metadata.name }}
34+
deploymentTemplate:
35+
{{- .spec.deploymentTemplate | toYaml | nindent 4 }}
36+
{{- end }}
37+
{{- end }}

0 commit comments

Comments
 (0)