crossplane configurations, apis and examples
CREATE KIND CLUSTER
export TASK_X_REMOTE_TASKFILES=1
task --taskfile https://raw.githubusercontent.com/stuttgart-things/tasks/refs/heads/main/kubernetes/kind.yaml create-kind-cluster
task --taskfile https://raw.githubusercontent.com/stuttgart-things/tasks/refs/heads/main/kubernetes/crds.yaml kubectl-kustomize #apply+cilium
task --taskfile https://raw.githubusercontent.com/stuttgart-things/tasks/refs/heads/main/kubernetes/helm.yaml helmfile-operation #apply+ciliumCROSSPLANE DEPLOYMENT w/ DAGGER/HELMFILE
# BY TASKFILE
export TASK_X_REMOTE_TASKFILES=1
task --taskfile https://raw.githubusercontent.com/stuttgart-things/tasks/refs/heads/main/kubernetes/helm.yaml helmfile-operation #capply+crossplane# OR BY DIRECT DAGGER CALL
dagger call -m github.com/stuttgart-things/dagger/[email protected] helmfile-operation \
--helmfile-ref "git::https://github.com/stuttgart-things/helm.git@cicd/crossplane.yaml.gotmpl" \
--operation apply \
--state-values "version=2.1.3" \
--kube-config file:///home/sthings/.kube/config \
--progress plain -vvADD LOCAL CLUSTER AS KUBERNETES PROVIDER (FILEBASED)
NAMESPACE="crossplane-system"
KUBECONFIG_DIR="$HOME/.kube"
# Select kubeconfig file
KUBECONFIG_FILE=$(ls -1 "$KUBECONFIG_DIR" \
| gum choose --header "Select kubeconfig file")
KUBECONFIG_PATH="$KUBECONFIG_DIR/$KUBECONFIG_FILE"
# Secret name
SECRET_NAME=$(gum input \
--prompt "Secret name: " \
--value "dev")
# Create or update secret (idempotent)
kubectl -n "$NAMESPACE" create secret generic "$SECRET_NAME" \
--from-file=config="$KUBECONFIG_PATH" \
--dry-run=client -o yaml \
| kubectl apply -f -NAMESPACE="crossplane-system"
CONFIG_NAME=$(gum input \
--prompt "ClusterProviderConfig name: " \
--value "dev")
SECRET_NAME=$(kubectl get secret -n "$NAMESPACE" \
-o jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}' \
| gum choose --header "Select secret")
SECRET_KEY=$(kubectl get secret "$SECRET_NAME" -n "$NAMESPACE" \
-o json \
| jq -r '.data | keys[]' \
| gum choose --header "Select key from secret '$SECRET_NAME'")
if ! gum confirm "Apply ClusterProviderConfig '$CONFIG_NAME' using $SECRET_NAME:$SECRET_KEY?"; then
echo "Aborted."
exit 0
fi
kubectl apply -f - <<EOF
apiVersion: kubernetes.m.crossplane.io/v1alpha1
kind: ClusterProviderConfig
metadata:
name: $CONFIG_NAME
spec:
credentials:
source: Secret
secretRef:
namespace: $NAMESPACE
name: $SECRET_NAME
key: $SECRET_KEY
EOFAPPLY CROSSPLANE PACKAGES
# BY TASKFILE
export TASK_X_REMOTE_TASKFILES=1
task --taskfile https://raw.githubusercontent.com/stuttgart-things/crossplane/refs/heads/main/Taskfile.yaml apply-crossplane-packagesAPPLY CROSSPLANE PACKAGES
# BY TASKFILE
export TASK_X_REMOTE_TASKFILES=1
task --taskfile https://raw.githubusercontent.com/stuttgart-things/crossplane/refs/heads/main/Taskfile.yaml apply-crossplane-packagesANSIBLE-RUN
-
INSTALL
cat <<EOF | kubectl apply -f -
apiVersion: pkg.crossplane.io/v1
kind: Configuration
metadata:
name: ansible-run
spec:
package: ghcr.io/stuttgart-things/crossplane/ansible-run:11.0.0
EOF# Setup standardized development environment
source .container-use/container-use.sh
cu-setup
# Access development environment
container-use checkout crossplane-development
# Test existing configurations
cu-test-vcluster
cu-test-ansible-run
cu-test-allThis repository follows structured development specifications:
- 📋 Development Specification - Complete development workflow
- 🛠️ Configuration Template - Standardized template for new configurations
- � Container-Use Workflow - Environment merge and workflow automation
- �📚 Specifications Index - Overview of all specifications
Standardized tasks for environment management:
# Interactive environment merge
task merge-environment
# Direct environment merge
task merge-environment-auto ENV_ID=your-env-id
# Pull request workflow
task merge-environment-pr
# View all available tasks
task do- 🚀 Container-Use Setup - Standardized development environment
# Load helper functions
source .container-use/container-use.sh
# View specifications
cu-spec # Show available specs
cu-new my-config apps # Create new config with guidancetask: Available tasks for this project:
* branch: Create branch from main
* check: Run pre-commit hooks
* commit: Commit + push code into branch
* do: Select a task to run
* pr: Create pull request into main
* run-pre-commit-hook: Run the pre-commit hook script to replace .example.com with .example.com
* xplane-push: Push crossplane package