Thanks to visit codestin.com
Credit goes to github.com

Skip to content

hyperspike/pivot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pivot

pivot from cluster-bootstraping to GitOps, Self-hosted, and self-managed, with a single command. Using Gitea and ArgoCD.

skip to the tutorial: here

Usage

$ pivot --help
Pivot is a tool for pivoting from bootstrap to GitOps

Usage:
  pivot [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  run         start pivoting

Flags:
  -h, --help   help for pivot

Use "pivot [command] --help" for more information about a command.
$ pivot run --help
start pivoting

Usage:
  pivot run [flags]

Flags:
  -c, --context string     use an explicit Kubernetes context [env PIVOT_CONTEXT]
  -d, --dry-run            dry run
  -h, --help               help for run
  -n, --namespace string   namespace (context default if not set) [env PIVOT_NAMESPACE]
  -p, --password string    remote password (generated if not set) [env PIVOT_PASSWD]
  -r, --remote string      remote repository [env PIVOT_REMOTE] (default "git.local.net")
  -u, --user string        remote user [env PIVOT_USER] (default "pivot")

How it works

Pivot builds a local `infra' repository with all the necessary files to bootstrap a Gitea Instance, and ArgoCD.

It then applies the manifests to the cluster, and pushes the infra repository to the remote repository.

Finally it wires up the now cluster local infra repository to ArgoCD for continuous deployment.

GitOps Repository

The infra repository is a GitOps repository that contains the manifests for bootstrapping bare Cluster to self-hosted, self-managed, GitOps.

$ tree infra/
infra/
├── argocd
│   ├── argocd.yaml
│   ├── kustomization.yaml
│   └── namespace.yaml
├── cert-manager
│   ├── cert-manager.yaml
│   └── kustomization.yaml
├── gitea
│   ├── gitea.yaml
│   └── kustomization.yaml
├── gitea-operator
│   ├── gitea-operator.yaml
│   └── kustomization.yaml
├── init
│   ├── init.yaml
│   └── kustomization.yaml
├── postgres-operator
│   ├── kustomization.yaml
│   └── postgres-operator.yaml
├── README.md
└── valkey-operator
    ├── kustomization.yaml
    └── valkey-operator.yaml

Making Changes

The infra directory generated by pivot is a fully functional Git repository. To make changes to your infrastructure (e.g., adding new applications, changing configurations):

  1. Edit Files: Make your desired changes within the infra/ directory.
  2. Commit: Commit your changes to the local git repository.
    cd infra
    git add .
    git commit -m "Update configuration"
  3. Proxy: Open a tunnel to the in-cluster Gitea instance.
    pivot proxy
    Note: This command runs in the foreground. Keep this terminal open and use a new terminal for the next steps.
  4. Password: Retrieve the generated Gitea password (if you didn't specify one).
    pivot password
  5. Push: Push your changes to the cluster.
    git push local main
    Use pivot (default) or your configured username, and the password from the previous step.

Installation

$ go install github.com/hyperspike/pivot/cmd@latest

About

Pivot from bootstrapping to GitOps

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 3

  •  
  •  
  •