-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
11 changed files
with
153 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,14 @@ | ||
apiVersion: v2 | ||
name: crossplane-provider | ||
version: 1.0.0 | ||
description: | | ||
A crossplane provider can be generated by using helm chart for multiple providers. Maintained by Obmondo | ||
dependencies: | ||
- name: aws | ||
version: 1.0.0 | ||
repository: 'file://charts/aws' | ||
condition: provider.aws | ||
- name: azure | ||
version: 1.0.0 | ||
repository: 'file://charts/azure' | ||
condition: provider.azure |
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,43 @@ | ||
# Crossplane Azure Integration | ||
|
||
## Overview | ||
|
||
This project provides a set of Helm templates for managing Azure and AWS resources using | ||
Crossplane. It enables the creation and management of Azure Virtual Networks (VNet) and | ||
associated resource groups through declarative configuration. | ||
|
||
## Prerequisites | ||
|
||
- **Crossplane**: You must have [Crossplane](https://crossplane.io/docs/) installed in your Kubernetes cluster. | ||
|
||
## Configuration | ||
|
||
### Values File | ||
|
||
Edit the `values.yaml` file to specify your Azure resources: | ||
|
||
- **location**: The Azure region where the resources will be created. | ||
- **defaultSubscription**: The default Azure subscription to use if no specific providerConfigRef is provided. | ||
- **defaultRgName**: The default resource group name. | ||
- **vnet**: Define your Virtual Networks here resource group associations. | ||
|
||
**Example `values.yaml`:** | ||
|
||
```yaml | ||
location: North Europe | ||
subscription: default | ||
defaultRgName: rgcrossplane | ||
resourceGroup: | ||
rgcrossplane: | ||
location: North Europe | ||
rgcrossplane1: | ||
location: North Europe | ||
vnet: | ||
vnet-crossplane1: | ||
cidrBlock: 10.0.0.0/16 | ||
rgName: rgcrossplane1 | ||
providerConfigRef: | ||
name: default | ||
vnet-crossplane2: | ||
cidrBlock: 10.0.0.0/16 | ||
``` |
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 @@ | ||
apiVersion: v2 | ||
name: aws | ||
version: 1.0.0 |
9 changes: 9 additions & 0 deletions
9
argocd-helm-charts/crossplane-provider/charts/aws/templates/provider.yaml
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,9 @@ | ||
apiVersion: pkg.crossplane.io/v1 | ||
kind: Provider | ||
metadata: | ||
name: upbound-provider-aws | ||
spec: | ||
package: xxpkg.upbound.io/crossplane-contrib/provider-aws:v0.48.1 | ||
packagePullPolicy: IfNotPresent | ||
revisionActivationPolicy: Automatic | ||
revisionHistoryLimit: 1 |
3 changes: 3 additions & 0 deletions
3
argocd-helm-charts/crossplane-provider/charts/azure/Chart.yaml
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 @@ | ||
apiVersion: v2 | ||
name: azure | ||
version: 1.0.0 |
17 changes: 17 additions & 0 deletions
17
argocd-helm-charts/crossplane-provider/charts/azure/templates/provider.yaml
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,17 @@ | ||
--- | ||
apiVersion: pkg.crossplane.io/v1 | ||
kind: Provider | ||
metadata: | ||
name: provider-azure | ||
spec: | ||
package: xpkg.upbound.io/upbound/provider-family-azure:v1.5.0 | ||
packagePullPolicy: IfNotPresent | ||
revisionActivationPolicy: Automatic | ||
revisionHistoryLimit: 1 | ||
--- | ||
apiVersion: pkg.crossplane.io/v1 | ||
kind: Provider | ||
metadata: | ||
name: provider-azure-network | ||
spec: | ||
package: xpkg.upbound.io/upbound/provider-azure-network:v1.6.1 |
12 changes: 12 additions & 0 deletions
12
argocd-helm-charts/crossplane-provider/charts/azure/templates/resourcegroup.yaml
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,12 @@ | ||
{{- range $rgname, $resourceGroup := .Values.resourceGroup }} | ||
--- | ||
apiVersion: azure.upbound.io/v1beta1 | ||
kind: ResourceGroup | ||
metadata: | ||
name: {{ $rgname }} | ||
spec: | ||
forProvider: | ||
location: {{ $resourceGroup.location | default $.Values.location }} | ||
providerConfigRef: | ||
name: {{ ($resourceGroup.providerConfigRef).name | default $.Values.subscription }} | ||
{{- end }} |
15 changes: 15 additions & 0 deletions
15
argocd-helm-charts/crossplane-provider/charts/azure/templates/virtualnetwork.yaml
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,15 @@ | ||
{{- range $vnetName, $vnet := .Values.vnet }} | ||
--- | ||
apiVersion: network.azure.upbound.io/v1beta1 | ||
kind: VirtualNetwork | ||
metadata: | ||
name: {{ $vnetName }} | ||
spec: | ||
forProvider: | ||
addressSpace: | ||
- {{ $vnet.cidrBlock }} | ||
location: {{ $vnet.location | default $.Values.location }} | ||
resourceGroupName: {{ $vnet.rgName | default $.Values.defaultRgName }} | ||
providerConfigRef: | ||
name: {{ ($vnet.providerConfigRef).name | default $.Values.subscription }} | ||
{{- end }} |
14 changes: 14 additions & 0 deletions
14
argocd-helm-charts/crossplane-provider/charts/azure/values.yaml
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,14 @@ | ||
# location: North Europe | ||
# defaultSubscription: default | ||
# defaultRgName: rgcrossplane1 | ||
# resourceGroup: | ||
# rgcrossplane1: | ||
# location: Central India | ||
# vnet: | ||
# vnet-crossplane1: | ||
# cidrBlock: 10.0.0.0/16 | ||
# rgName: rgcrossplane1 | ||
# providerConfigRef: | ||
# name: default | ||
# vnet-crossplane2: | ||
# cidrBlock: 10.0.2.1/16 |
13 changes: 13 additions & 0 deletions
13
argocd-helm-charts/crossplane-provider/templates/providerconfig-azure.yaml
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,13 @@ | ||
{{- if .Values.provider.azure }} | ||
apiVersion: azure.upbound.io/v1beta1 | ||
kind: ProviderConfig | ||
metadata: | ||
name: default | ||
spec: | ||
credentials: | ||
source: Secret | ||
secretRef: | ||
namespace: {{ .Values.azure.default_subscription.namespace }} | ||
name: {{ .Values.azure.default_subscription.secretName }} | ||
key: {{ .Values.azure.default_subscription.secretkey }} | ||
{{- end }} |
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 @@ | ||
provider: | ||
aws: false | ||
azure: false | ||
|
||
# Example of Azure provider configuration | ||
# azure: | ||
# default_subscription: | ||
# secretName: azure-secret | ||
# secretkey: creds | ||
# namespace: crossplane-system |