-
Notifications
You must be signed in to change notification settings - Fork 7
feat: add byo-git documentation #140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
CasLubbers
wants to merge
6
commits into
main
Choose a base branch
from
APL-1513
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
475f8a1
feat: add byo-git documentation
CasLubbers 27e8c7e
feat: add byo-git documentation
CasLubbers 9f6f677
fix: review comments
CasLubbers 7241421
fix: update recovery values
CasLubbers 936816c
docs: disaster recovery
j-zimnowoda 0c9e2e8
docs: disaster recovery
j-zimnowoda File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
| --- | ||
| slug: byo-git | ||
| title: BYO Git | ||
| sidebar_label: BYO Git | ||
| --- | ||
|
|
||
| By default, the App Platform installs Gitea as the built-in Git repository to store platform configuration (the `values` repository). If you prefer to use your own external Git repository, you can disable Gitea and configure the platform to use an external Git provider such as GitHub or GitLab. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - An empty git repository accessible from kubernetes cluster via the HTTPS protocol. | ||
| - A personal access token with read/write access to the repository. | ||
| - The repository should be empty or initialized with a default branch. | ||
|
|
||
| ## Advantages of BYO Git | ||
|
|
||
| - Use your existing Git workflows and access controls. | ||
| - Simplified disaster recovery: the platform configuration is stored externally, so you only need to back up your age keys to restore the platform. | ||
| - No need to manage and back up the built-in Gitea instance. | ||
|
|
||
| ## Configure the values | ||
|
|
||
| To install with BYO Git, disable Gitea and add the Git configuration to your `values.yaml`: | ||
|
|
||
| ```yaml | ||
| apps: | ||
| gitea: | ||
| enabled: false | ||
| cert-manager: | ||
| issuer: letsencrypt | ||
| email: admin@example.com | ||
| cluster: | ||
| domainSuffix: example.com | ||
| name: my-cluster | ||
| provider: linode | ||
| dns: | ||
| domainFilters: | ||
| - example.com | ||
| provider: | ||
| linode: | ||
| apiToken: '<your-linode-api-token>' | ||
| kms: | ||
| sops: | ||
| provider: age | ||
| otomi: | ||
| hasExternalDNS: true | ||
| git: | ||
| repoUrl: https://github.com/<owner>/<repo> | ||
| username: <git-username> | ||
| password: <personal-access-token> | ||
| email: <git-email> | ||
| branch: main | ||
| ``` | ||
|
|
||
| ### Git configuration options | ||
|
|
||
| | Parameter | Description | | ||
| | -------------------- | ---------------------------------------------- | | ||
| | `otomi.git.repoUrl` | The HTTPS URL of the external Git repository | | ||
| | `otomi.git.username` | The Git username for authentication | | ||
| | `otomi.git.password` | A personal access token with read/write access | | ||
| | `otomi.git.email` | The email address used for Git commits | | ||
| | `otomi.git.branch` | The branch to use (e.g. `main`) | | ||
|
|
||
| ## Disaster recovery with BYO Git | ||
|
|
||
| Since the configuration parameters (the values repository) is stored outside the cluster the disaster recover process is straightforward. In the recovery mode the `values.yaml` file must contian the following parameters: | ||
|
|
||
| - `kms.sops.age` with `privateKey` and `publicKey` | ||
| - `otomi.git` configuration options | ||
| - `installation.mode` set to `recovery` | ||
|
|
||
| For example: | ||
|
|
||
| ```yaml | ||
| cluster: | ||
| name: your-cluster-name | ||
| provider: linode | ||
| otomi: | ||
| git: | ||
| repoUrl: https://github.com/<owner>/<repo> | ||
| username: <git-username> | ||
| password: <personal-access-token> | ||
| email: <git-email> | ||
| branch: main | ||
| kms: | ||
|
j-zimnowoda marked this conversation as resolved.
|
||
| sops: | ||
| age: | ||
| privateKey: '<your-age-private-key>' | ||
| publicKey: '<your-age-public-key>' | ||
| provider: age | ||
| installation: | ||
| mode: recovery | ||
| ``` | ||
|
|
||
| The following command can be used to re-install the App Platform: | ||
|
|
||
| ```bash | ||
| helm install -f values.yaml apl apl/apl | ||
| ``` | ||
|
|
||
| > Make sure to store your age keys securely outside of the cluster (e.g. in a password manager or secrets vault). Without them you won't be able to decrypt the secrets stored in the git repository. | ||
|
|
||
| > This procedure works out of the box for App Platform instancies that manage their own DNS records (via external-dns and cert manager). | ||
|
|
||
| > This procedure does not cover the recovery of databases used by Gitea and/or Harbor. | ||
|
|
||
| See the [disaster recovery documentation](../../for-ops/disaster-recovery/overview.md) for the full procedure. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.