Skip to content

Demander un sandbox Kubernetes #1

Demander un sandbox Kubernetes

Demander un sandbox Kubernetes #1

name: Demander un sandbox Kubernetes
on:
workflow_dispatch:
jobs:
create_pr:
runs-on: ubuntu-latest
env:
j2_vars: |
requester=${{github.event.sender.login}}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create folders
run: mkdir -p sandboxes/${{github.event.sender.login}}
- name: Create kustomize
uses: cuchi/[email protected]
with:
template: bases/sandbox/kustomization.yaml.jinja2
output_file: sandboxes/${{github.event.sender.login}}/kustomization.yaml
strict: true
variables: ${{ env.j2_vars }}
- name: Update kustomize files
run: |
cd $GITHUB_WORKSPACE/sandboxes
kustomize edit add resource ${{github.event.sender.login}}/kustomization.yaml
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
title: Create sandbox for ${{github.event.sender.login}}
body: |
@${{github.event.sender.login}}. Once this PR is merged, you will be able to login
to your sandbox by following these steps:
1. Go to https://cedille.omni.siderolabs.io/cluster/cedille-cluster/overview, click "Download kubeconfig" and put that file as ~/.kube/config
2. Install vcluster on your computer: https://www.vcluster.com/docs/getting-started/setup
3. run `vcluster connect vcluster-sandbox -n ${{github.event.sender.login}}-vcluster-sandbox`
4. Start using kubectl to play around!