Skip to content
Merged
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
57 changes: 3 additions & 54 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,61 +30,10 @@ jobs:
cluster_name: kind
- name: Install helm
uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4.3.1
- name: Install argocd
- name: Install crossplane
run: |
helm upgrade --install argocd argo-cd --repo https://argoproj.github.io/argo-helm \
--namespace argocd --create-namespace \
--wait \
--timeout 15m \
--atomic \
--values - <<EOF
global:
logging:
format: json

configs:
rbac:
create: true
scopes: '[email,groups]'
policy.default: role:readonly
policy.csv: |
p, role:readonly, applications, get, */*, allow
p, role:admin, applications, *, */*, allow

applicationSet:
replicas: 1

controller:
extraArgs:
- --app-resync=20
replicas: 1
enableStatefulSet: true
logFormat: json

redis-ha:
enabled: false

repoServer:
logFormat: json
logLevel: "warn"

server:
extraArgs:
- --insecure
service:
type: ClusterIP
logFormat: json

dex:
enabled: false

notifications:
enabled: false
EOF
- name: Bootstrap cluster
run: |
kubectl apply -f demo-cluster/apps/projects.yaml
kubectl apply -f demo-cluster/apps/bootstrap.yaml
set -e
make all
- name: Run platform tests
run: |
chainsaw test demo-cluster/test/platform
Expand Down
28 changes: 28 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

create-cluster:
@echo Creating cluster...
@kind create cluster --image kindest/node:v1.34.0 --wait 1m

crossplane:
@echo Deploying crossplane...
@helm upgrade --install crossplane crossplane --repo https://charts.crossplane.io/stable \
--version 2.0.2 \
--namespace crossplane --create-namespace \
--wait \
--timeout 15m \
--atomic

crossplane-helm: crossplane
@echo Deploying crossplane-helm...
@kubectl apply -n crossplane -f ./demo-cluster/manifests/platform/crossplane-helm/
@echo Waiting...
@kubectl wait -n crossplane --for=condition=Installed providers.v1.pkg.crossplane.io/provider-helm
@kubectl wait -n crossplane --for=condition=Healthy providers.v1.pkg.crossplane.io/provider-helm

crossplane-db: crossplane-helm
@echo Deploying crossplane-db...
@kubectl apply -n crossplane -f ./demo-cluster/manifests/platform/crossplane-db/

all: crossplane
all: crossplane-helm
all: crossplane-db
2 changes: 1 addition & 1 deletion demo-cluster/manifests/dev/drupal-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ drupalUsername: admin
drupalPassword: superPass123!

externalDatabase:
host: mariadb.dev.svc.cluster.local
host: mariadb
port: 3306
database: drupal
user: drupal
Expand Down
37 changes: 28 additions & 9 deletions demo-cluster/test/dev/app-ready/chainsaw-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,35 @@ spec:
concurrent: false
steps:
- try:
- create:
resource:
apiVersion: database.kubecon.io/v1alpha1
kind: MariaDBInstance
metadata:
name: drupal-db
spec:
parameters:
database: "drupal"
username: "drupal"
size: "4Gi"
- assert:
timeout: 5m
timeout: 2m
resource:
apiVersion: argoproj.io/v1alpha1
kind: Application
apiVersion: database.kubecon.io/v1alpha1
kind: MariaDBInstance
metadata:
name: app-dev
namespace: argocd
name: drupal-db
status:
health:
status: Healthy
sync:
status: Synced
(conditions[?type == 'Ready']):
- status: 'True'
- script:
timeout: 3m
content: |
helm install app-dev \
--namespace $NAMESPACE \
--wait \
--timeout 15m \
--atomic \
oci://registry-1.docker.io/bitnamicharts/drupal \
--version 23.0.0 \
--values ../../../../demo-cluster/manifests/dev/drupal-values.yaml
39 changes: 0 additions & 39 deletions demo-cluster/test/platform/mariadb-ready/chainsaw-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,45 +7,6 @@ spec:
concurrent: false
steps:
- try:
- assert:
timeout: 3m
resource:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: crossplane
namespace: argocd
status:
health:
status: Healthy
sync:
status: Synced
- assert:
timeout: 3m
resource:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: crossplane-helm
namespace: argocd
status:
health:
status: Healthy
sync:
status: Synced
- assert:
timeout: 3m
resource:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: crossplane-db
namespace: argocd
status:
health:
status: Healthy
sync:
status: Synced
- create:
resource:
apiVersion: database.kubecon.io/v1alpha1
Expand Down