-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: added base flux config for dev cluster
Signed-off-by: Mateusz Urbanek <mateusz.urbanek.98@gmail.com>
- Loading branch information
Showing
25 changed files
with
325 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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,13 @@ | ||
name: Component Request | ||
description: You want some new application added for every dev environment? | ||
title: "[COMPONENT]: <title>" | ||
labels: | ||
- kind/component-request | ||
body: | ||
- type: textarea | ||
id: description | ||
attributes: | ||
label: Is your request related to a problem? Please describe. | ||
description: A clear and concise description of what the problem is. | ||
validations: | ||
required: true |
This file contains 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,30 @@ | ||
name: deprecations | ||
|
||
on: | ||
schedule: | ||
- cron: "0 3 * * 1" | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
deprecations: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: fluxcd/flux2/action@main | ||
- uses: FairwindsOps/pluto/github-action@master | ||
- uses: medyagh/setup-minikube@latest | ||
- env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
flux bootstrap github \ | ||
--token-auth \ | ||
--owner=registry-operator \ | ||
--repository=dev-infra \ | ||
--branch=main \ | ||
--path='clusters/dev' | ||
- run: sleep 60 # give some time to the cluster to start up | ||
- id: pluto | ||
run: | | ||
pluto detect-files-all-in-cluster |
This file contains 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,5 @@ | ||
# Brew bundle lock | ||
Brewfile.lock.json | ||
|
||
# MacOS attributes files | ||
.DS_Store |
This file contains 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 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,5 @@ | ||
{ | ||
"recommendations": [ | ||
"weaveworks.vscode-gitops-tools", | ||
] | ||
} |
This file contains 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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
tap "fluxcd/tap" | ||
|
||
brew "minikube" | ||
brew "flux" | ||
brew "pluto" | ||
brew "pre-commit" |
This file contains 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,68 @@ | ||
# Development infrastructure | ||
|
||
This repository serves as the central hub for managing the development infrastructure using Flux and Renovate. Flux is a | ||
GitOps tool that ensures the Git repository is the single source of truth for the desired state of the cluster, while | ||
Renovate automates dependency updates across various files in the repository. By leveraging these tools, developers can | ||
maintain a consistent and up-to-date development environment with minimal manual intervention. The repository contains | ||
configuration files, manifests, and scripts necessary to orchestrate the deployment and management of services within | ||
the Kubernetes cluster. Additionally, it provides a structured approach for version control and collaboration, enabling | ||
seamless integration of new features and updates into the development workflow. | ||
|
||
## Getting Started | ||
|
||
### Installing all components | ||
|
||
To install all components, follow these steps: | ||
|
||
1. Set up your GitHub token by exporting it as an environment variable: | ||
```sh | ||
export GITHUB_TOKEN='<my-token>' | ||
``` | ||
1. Run the following command to bootstrap Flux on your Kubernetes cluster: | ||
```sh | ||
flux bootstrap github \ | ||
--token-auth \ | ||
--owner=registry-operator \ | ||
--repository=dev-infra \ | ||
--branch=main \ | ||
--path='clusters/dev' | ||
``` | ||
|
||
### Customizing deployments | ||
|
||
If you want to customize deployments, you'll need to fork the repository first. Follow these steps: | ||
|
||
1. Fork the repository to your GitHub account. | ||
1. Set up your GitHub token by exporting it as an environment variable: | ||
```sh | ||
export GITHUB_TOKEN='<my-token>' | ||
``` | ||
1. Run the following command to bootstrap Flux using your forked repository: | ||
```sh | ||
flux bootstrap github \ | ||
--token-auth \ | ||
--owner='<your-username>' \ | ||
--repository=dev-infra \ | ||
--branch='<dev-branch>' \ | ||
--path='clusters/dev' \ | ||
--personal | ||
``` | ||
|
||
Now you're ready to customize and manage your deployments according to your needs. | ||
|
||
## Accessing services | ||
|
||
| Service | Command | Access | | ||
|------------|----------------------------------------------------------------------------|------------------------------------------------| | ||
| S3GW | `kubectl port-forward -n=kube-system svc/s3gw-kube-system-ui-s3gw 8000:80` | [http://localhost:8000](http://localhost:8000) | | ||
| Prometheus | `kubectl port-forward -n=prometheus-system svc/prometheus-server 8080:80` | [http://localhost:8080](http://localhost:8080) | | ||
| Parca | `kubectl port-forward -n=parca-system svc/parca-server 7070:7070` | [http://localhost:7070](http://localhost:7070) | | ||
|
||
## FAQ | ||
|
||
1. **Why no Grafana?** | ||
The main disadvantage is time. Managing Grafana and making sure the updates are not breaking the cluster, dashboards and data sources requires too much effort for our liking. | ||
2. **Why no tracing agnet?** | ||
We are not settled on the tracing (yet). If we do decide to implement it into `registry-operator` (or any of the auxiliary apps), we will add Jaeger. | ||
3. **Why no logs collection?** | ||
Like with the Grafana - this would turn the dev clusters from cattle to pets, especially if we consider _Loki_ and _Promtail_ setup. Ain't nobody got time for this. |
This file contains 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,4 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: cert-manager |
This file contains 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,19 @@ | ||
apiVersion: helm.toolkit.fluxcd.io/v2beta2 | ||
kind: HelmRelease | ||
metadata: | ||
name: cert-manager | ||
namespace: cert-manager | ||
spec: | ||
chart: | ||
spec: | ||
chart: cert-manager | ||
reconcileStrategy: ChartVersion | ||
sourceRef: | ||
kind: HelmRepository | ||
name: jetstack | ||
version: "v1.14.4" | ||
interval: 1m0s | ||
releaseName: cert-manager | ||
targetNamespace: cert-manager | ||
values: | ||
installCRDs: true |
This file contains 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,8 @@ | ||
apiVersion: source.toolkit.fluxcd.io/v1beta2 | ||
kind: HelmRepository | ||
metadata: | ||
name: jetstack | ||
namespace: cert-manager | ||
spec: | ||
interval: 5m0s | ||
url: https://charts.jetstack.io |
10 changes: 10 additions & 0 deletions
10
clusters/dev/kube-system/cosi-controller.GitRepository.yaml
This file contains 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,10 @@ | ||
apiVersion: source.toolkit.fluxcd.io/v1 | ||
kind: GitRepository | ||
metadata: | ||
name: cosi-controller | ||
namespace: kube-system | ||
spec: | ||
interval: 5m0s | ||
url: https://github.com/kubernetes-sigs/container-object-storage-interface-controller.git | ||
ref: | ||
tag: v0.1.1 |
15 changes: 15 additions & 0 deletions
15
clusters/dev/kube-system/cosi-controller.Kustomization.yaml
This file contains 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,15 @@ | ||
apiVersion: kustomize.toolkit.fluxcd.io/v1 | ||
kind: Kustomization | ||
metadata: | ||
name: cosi-controller | ||
namespace: kube-system | ||
spec: | ||
interval: 10m0s | ||
targetNamespace: kube-system | ||
sourceRef: | ||
kind: GitRepository | ||
name: cosi-controller | ||
namespace: kube-system | ||
path: "." | ||
prune: true | ||
timeout: 1m |
This file contains 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,10 @@ | ||
apiVersion: source.toolkit.fluxcd.io/v1 | ||
kind: GitRepository | ||
metadata: | ||
name: cosi-crd | ||
namespace: kube-system | ||
spec: | ||
interval: 5m0s | ||
url: https://github.com/kubernetes-sigs/container-object-storage-interface-api.git | ||
ref: | ||
tag: v0.1.0 |
This file contains 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,15 @@ | ||
apiVersion: kustomize.toolkit.fluxcd.io/v1 | ||
kind: Kustomization | ||
metadata: | ||
name: cosi-crd | ||
namespace: kube-system | ||
spec: | ||
interval: 10m0s | ||
targetNamespace: kube-system | ||
sourceRef: | ||
kind: GitRepository | ||
name: cosi-crd | ||
namespace: kube-system | ||
path: "." | ||
prune: true | ||
timeout: 1m |
10 changes: 10 additions & 0 deletions
10
clusters/dev/kube-system/local-path-provisioner.GitRepository.yaml
This file contains 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,10 @@ | ||
apiVersion: source.toolkit.fluxcd.io/v1 | ||
kind: GitRepository | ||
metadata: | ||
name: local-path-provisioner | ||
namespace: kube-system | ||
spec: | ||
interval: 5m0s | ||
url: https://github.com/rancher/local-path-provisioner.git | ||
ref: | ||
tag: v0.0.26 |
15 changes: 15 additions & 0 deletions
15
clusters/dev/kube-system/local-path-provisioner.Kustomization.yaml
This file contains 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,15 @@ | ||
apiVersion: kustomize.toolkit.fluxcd.io/v1 | ||
kind: Kustomization | ||
metadata: | ||
name: local-path-provisioner | ||
namespace: kube-system | ||
spec: | ||
interval: 10m0s | ||
targetNamespace: kube-system | ||
sourceRef: | ||
kind: GitRepository | ||
name: local-path-provisioner | ||
namespace: kube-system | ||
path: "./deploy" | ||
prune: true | ||
timeout: 1m |
This file contains 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,8 @@ | ||
apiVersion: source.toolkit.fluxcd.io/v1beta2 | ||
kind: HelmRepository | ||
metadata: | ||
name: s3gw-charts | ||
namespace: kube-system | ||
spec: | ||
interval: 5m0s | ||
url: https://s3gw-tech.github.io/s3gw-charts |
This file contains 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,26 @@ | ||
apiVersion: helm.toolkit.fluxcd.io/v2beta2 | ||
kind: HelmRelease | ||
metadata: | ||
name: s3gw | ||
namespace: kube-system | ||
spec: | ||
chart: | ||
spec: | ||
chart: s3gw | ||
reconcileStrategy: ChartVersion | ||
sourceRef: | ||
kind: HelmRepository | ||
name: s3gw-charts | ||
version: "0.23.0" | ||
interval: 1m0s | ||
releaseName: s3gw | ||
targetNamespace: kube-system | ||
values: | ||
ingress: | ||
enabled: false | ||
cosi: | ||
enabled: true | ||
publicDomain: kube-system.svc.cluster.local | ||
accessKey: admin | ||
secretKey: admin | ||
logLevel: "high" |
This file contains 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,4 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: parca-system |
This file contains 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,8 @@ | ||
apiVersion: source.toolkit.fluxcd.io/v1beta2 | ||
kind: HelmRepository | ||
metadata: | ||
name: parca-dev | ||
namespace: parca-system | ||
spec: | ||
interval: 5m0s | ||
url: https://parca-dev.github.io/helm-charts/ |
This file contains 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,17 @@ | ||
apiVersion: helm.toolkit.fluxcd.io/v2beta2 | ||
kind: HelmRelease | ||
metadata: | ||
name: parca | ||
namespace: parca-system | ||
spec: | ||
chart: | ||
spec: | ||
chart: parca | ||
reconcileStrategy: ChartVersion | ||
sourceRef: | ||
kind: HelmRepository | ||
name: parca-dev | ||
version: "4.19.0" | ||
interval: 1m0s | ||
releaseName: parca | ||
targetNamespace: parca-system |
This file contains 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,4 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: prometheus-system |
8 changes: 8 additions & 0 deletions
8
clusters/dev/prometheus-system/prometheus-community.HelmRepository.yaml
This file contains 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,8 @@ | ||
apiVersion: source.toolkit.fluxcd.io/v1beta2 | ||
kind: HelmRepository | ||
metadata: | ||
name: prometheus-community | ||
namespace: prometheus-system | ||
spec: | ||
interval: 5m0s | ||
url: https://prometheus-community.github.io/helm-charts |
17 changes: 17 additions & 0 deletions
17
clusters/dev/prometheus-system/prometheus.HelmRelease.yaml
This file contains 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,17 @@ | ||
apiVersion: helm.toolkit.fluxcd.io/v2beta2 | ||
kind: HelmRelease | ||
metadata: | ||
name: prometheus | ||
namespace: prometheus-system | ||
spec: | ||
chart: | ||
spec: | ||
chart: prometheus | ||
reconcileStrategy: ChartVersion | ||
sourceRef: | ||
kind: HelmRepository | ||
name: prometheus-community | ||
version: "25.19.0" | ||
interval: 1m0s | ||
releaseName: prometheus | ||
targetNamespace: prometheus-system |
This file was deleted.
Oops, something went wrong.