Skip to content
Merged
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
62 changes: 62 additions & 0 deletions .github/workflows/crossplane-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Deploy Crossplane to Kind

on:
push:

jobs:
deploy-crossplane:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Kind Cluster
run: |
# For AMD64 / x86_64
[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.30.0/kind-linux-amd64
# For ARM64
[ $(uname -m) = aarch64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.30.0/kind-linux-arm64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind

# Create Kind cluster
kind create cluster --name crossplane-kind

- name: Install kubectl
uses: azure/setup-kubectl@v3

- name: Install Helm
uses: azure/setup-helm@v3

- name: Install Crossplane
run: |
helm repo add crossplane-stable https://charts.crossplane.io/stable
helm repo update
helm install crossplane crossplane-stable/crossplane --namespace crossplane-system --create-namespace --wait

# - name: Install Crossplane CLI
# run: |
# curl -sL https://raw.githubusercontent.com/crossplane/crossplane/master/install.sh | sh
# sudo mv kubectl-crossplane /usr/local/bin

# - name: Install Provider Kubernetes
# run: |
# kubectl crossplane install provider crossplane/provider-kubernetes:v0.12.0
# kubectl wait provider.pkg crossplane-provider-kubernetes --for condition=Healthy --timeout=5m

- name: Deploy Crossplane Configuration
run: |
kubectl apply -f xrd.yaml
kubectl apply -f function.yaml
kubectl apply -f composition.yaml
kubectl apply -f app.yaml

# - name: Wait for App Deployment
# run: |
# kubectl wait composite.apiextensions.crossplane.io/portal-app --for condition=Ready --timeout=5m

- name: Verify Crossplane Deployment
run: |
kubectl get apps
kubectl get deployment -n default
kubectl get service -n default
Loading