Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add crossplane helm chart and fix WSL run #6

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ This repo contains the scripts and configurations to deploy the Red Dog Demo alo
* Use either `loganalytics` or `prometheus` for `monitoring`
* Use either `cosmos` or `redislocal` for `state_store`
* Set `use_virtual_customer` to `true` or `false`
* Ensure `jq` https://stedolan.github.io/jq/download
* Ensure [`jq`](https://stedolan.github.io/jq/download), [Helm](https://helm.sh/docs/intro/install/), and [Kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl) are installed
* Execute the `start.sh` deployment script.

> Note: The `cleanup.sh` script will remove local log files and certs, but it does not delete the Resource Group.
> Note: When running on WSL, you may need to run `dos2unix *.sh` to ensure the scripts execute properly.
> Note: The `cleanup.sh` script will remove local log files and certs, but it does not delete the Resource Group.

## Architecture

Expand Down
1 change: 1 addition & 0 deletions cleanup.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
rm ./outputs/*
rm *.pfx

Expand Down
6 changes: 6 additions & 0 deletions manifests/dependencies/crossplane/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: crossplane
resources:
- namespace.yaml
- release.yaml
4 changes: 4 additions & 0 deletions manifests/dependencies/crossplane/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: crossplane
20 changes: 20 additions & 0 deletions manifests/dependencies/crossplane/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: crossplane
spec:
releaseName: crossplane
chart:
spec:
chart: crossplane
reconcileStrategy: ChartVersion
sourceRef:
kind: HelmRepository
name: crossplane
namespace: flux-system
install:
createNamespace: true
remediation:
retries: 3
interval: 0h20m0s

3 changes: 2 additions & 1 deletion manifests/dependencies/sources/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ kind: Kustomization
namespace: flux-system
resources:
- repository-dapr.yaml
- repository-traefik.yaml
- repository-traefik.yaml
- repository-crossplane.yaml
9 changes: 9 additions & 0 deletions manifests/dependencies/sources/repository-crossplane.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
name: crossplane
spec:
interval: 30m
url: https://charts.crossplane.io/master

1 change: 1 addition & 0 deletions start.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
mkdir -p outputs

# get params from config.json file
Expand Down
10 changes: 9 additions & 1 deletion walk-the-dog.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
mkdir -p outputs
export RG_NAME=$1
export LOCATION=$2
Expand Down Expand Up @@ -120,6 +121,7 @@ echo 'Helm repo updates'
helm repo add dapr https://dapr.github.io/helm-charts
helm repo add azure-marketplace https://marketplace.azurecr.io/helm/v1/repo
helm repo add traefik https://helm.traefik.io/traefik
helm repo add crossplane https://charts.crossplane.io/master/
helm repo update

echo ''
Expand All @@ -132,6 +134,12 @@ helm install traefik traefik/traefik \
--namespace traefik \
--set service.annotations."service\.beta\.kubernetes\.io/azure-dns-label-name"=reddog$SUFFIX

echo ''
echo 'Deploying Crossplane Helm chart' # https://crossplane.io/docs/v1.3/getting-started/install-configure.html
helm install crossplane crossplane/crossplane \
--namespace crossplane \
--version 1.11.0-rc.0.99.g9850b98e

if [ "$STATE_STORE" = "redislocal" ]
then
echo ''
Expand Down Expand Up @@ -336,7 +344,7 @@ az k8s-configuration flux create \
--namespace flux-system \
--url https://github.com/Azure/reddog-aks.git \
--branch main \
--kustomization name=kustomize path=./manifests/base/components-main prune=true
--kustomization name=kustomize path=./manifests/base/components-main prune=true --interval 10

if [ "$STATE_STORE" = "redislocal" ]
then
Expand Down