Skip to content

ldynia/codespace-minikube

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Decription

This repository is a playground for working with minikube and GitHub actions. All actions are executed inside codespace that runs self-hosted agent that is launched on codespaces startup together with minikube.

Setup

  1. In Settings > Developer settings
    • create personal access token (classic) with repo scope
  2. In Settings > Codespaces
    • create Codespaces secrets named PAT
    • bind it to this repository
  3. In repository Settings > Actions > Runners
    • Verify that self-hosted runner is in Active or Idle state

Minikube

kubectl apply -f devops/k8s/manifests
kubectl port-forward service/nginx 8080:80

Troubleshoot Self Hosted Runner

  1. Test Connectivity

    GH_ACTION_DIR=/usr/src/actions-runner
    
    SELF_HOSTED_RUNNER_PAT_TOKEN=$(curl -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer $PAT_TOKEN" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/$GITHUB_REPOSITORY/actions/runners/registration-token | jq --raw-output .token)
    
    $GH_ACTION_DIR/run.sh --check --url https://github.com/$GITHUB_REPOSITORY --pat $SELF_HOSTED_RUNNER_PAT_TOKEN
  2. Remove Runner

    $GH_ACTION_DIR/config.sh remove --token $SELF_HOSTED_RUNNER_PAT_TOKEN

TODO

start a background server process in a job github self hosted runner

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages