Managing the Git Configuration Repository
The Git Config Repository is where the cluster configuration is stored. It contains the cluster definition and your application manifests.
Flux is used to sync the Git Config Repository and the cluster so its important to have it configured correctly. WKP supports GitHub and GitLab (Cloud or self-hosted).
Initial configuration during
In order to create a cluster, we first need to define and configure its properties. To do that, we run
wk setup install which generates a set of files in the current directory, that will be used for the configuration of our new cluster. The directory also includes a new local git repository that tracks the newly generated files.
The generated files include:
eksctl: used when creating an EKS cluster
footloose: used when creating a Footloose cluster
hub: used to interact with GitHub
ignite: used to run a Footloose cluster with an ignite backend
jk: used to generate configuration
kubeseal: used to interact with sealed secrets
/manifests: manifests for user-defined workloads that need to run on the cluster will live here
/platform: additional WKP runtime configuration files
/doc: creation guides
config.yaml: main configuration file used when creating a cluster
wk setup install we configure WKP by editing
config.yaml. WKP needs to know a little bit about how and where you're hosting your git repository. The main parameter in
config.yaml is the
gitProvider and can be set either to
A detailed documentation for
config.yaml can be found in
config.yaml file itself.
When hosting your config repository on GitHub:.
- In config.yaml set
- In config.yaml set
gitProviderOrgto the Github organization or user WKP should create the repository under.
- Continue following the instructions in one of the Cluster Creation guides.
Note: For this document, replace:
gitlab.example.comwith your company's gitlab host address
my-example-repowith your desired repo name
my-userwith your GitLab username or groupname
When hosting the repository on GitLab:
- visit gitlab.example.com/projects/new and create a new repo,
my-example-repoNote: WKP does not support repo creation on Gitlab currently, so this is a required step.
gitUrlto your newly created repository. e.g.
- Continue following the instructions in one of the Cluster Creation guides until you are prompted to run
wk setup run. When you run
wk setup runa deploy key that gives the cluster read/write access to the git repository will be generated. This deploy key needs to be installed in the GitLab UI:
- visit gitlab.example.com/my-user/my-example-repo/settings/repository:
- navigate to the
Deploy Keyssection, and
- create a
Title, it can be anything
- Paste the deploy key provided in the command line output into the
- [IMPORTANT] ensure
Write access allowedis checked
- navigate to the
wk setup runagain and continue the Cluster Creation instructions.
WKP requires using SSH to sync the git config repo and the cluster. To provide additional security WKP enables
StrictHostKeyChecking and checks that the server providing the git config repo matches a public key that we have stored. For popular git providers like GitHub we include the public key with WKP and no further configuration is needed. For self hosted repositories like Gitlab we need to retrieve and store the server's public key. We save it in a file called
wk setup run your
gitUrl are checked. If we determine a custom domain is being used we will automatically connect to the server, retrieve the public keys and save them to
known_hosts file will then be loaded into the
gitops-repo-broker and any other pod that needs to talk to the git config repo.
If you change the keys on your ssh server you may need to regenerate
Test that the new
known_hosts file works
Commit and push to update the cluster