Skip to content

Commit

Permalink
add/renamed the references and links to kubeaid
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitamax committed Oct 8, 2024
1 parent a482f3a commit 9d18cb8
Show file tree
Hide file tree
Showing 33 changed files with 126 additions and 125 deletions.
46 changes: 23 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ An operations team, typicly has 2 hugely important tasks:
Even with Kubernetes, there is a lot of work to be done, to pick the right solutions for each feature you need - and it
is our experience that 95% of what one team needs, is the EXACT same most of the other teams need.

**K8id** aims to be a constantly evolving solution for 1. - enabling the collaboration of operations teams across the
**KubeAid** aims to be a constantly evolving solution for 1. - enabling the collaboration of operations teams across the
world, to increase the velocity of every operations team, so they can focus on 2. - while everyone gets to enjoy a
highly available and secure operations setup.

Quite often its very difficult to find enough who can to do this work, and especially since EVERY other company, is
building a replica of what you are building to solve 1. This is even WHY Kubernetes was started, to help enable
collaboration between companies on a shared goal.

**K8id** is being developed by [Obmondo.com](https://obmondo.com) - where we build the solutions our customers need, and
**KubeAid** is being developed by [Obmondo.com](https://obmondo.com) - where we build the solutions our customers need, and
share the work with everyone, via this project. We feel this is the only way, We ever have a chance of actually
delivering the features that every operations team should have - without needing to have a subject matter expert at hand
for everything.
Expand All @@ -55,14 +55,14 @@ they need it.

## Setup of Kubernetes clusters

Mirror this repo and the [k8id-config](https://github.com/Obmondo/k8id-config) repo into a Git platform of your choice,
and follow the `README` file in the `k8id-config` repository on how to write the config for your Kubernetes cluster.
Mirror this repo and the [kubeaid-config](https://github.com/Obmondo/kubeaid-config) repo into a Git platform of your choice,
and follow the `README` file in the `kubeaid-config` repository on how to write the config for your Kubernetes cluster.

You must NEVER make any changes on the master/main branch of you mirror of the k8id repository, as we use this to
You must NEVER make any changes on the master/main branch of you mirror of the kubeaid repository, as we use this to
deliver updates to you. This means that your cluster can be updated simply by running `git pull` on your copy of
this repository.

All customizations happens in your `k8id-config` repo.
All customizations happens in your `kubeaid-config` repo.

## support

Expand All @@ -74,18 +74,18 @@ There are ZERO vendor lockin - so any subscription you sign - can be cancelled a
a time.

With a subscription we will be there, to ensure your smooth operations, in times of sickness and employee shortages -
and able to scale your development efforts on k8id if needed.
and able to scale your development efforts on kubeaid if needed.

## Secrets

We use [sealed-secrets](https://github.com/bitnami-labs/sealed-secrets/) which means secrets are encrypted locally (by
the developer who knows them) and committed to your K8id config repo under the path
the developer who knows them) and committed to your kubeaid config repo under the path
`k8s/<cluster-name>/sealed-secrets/<namespace>/<name-of-secret>.json`. See documentation in
[./argocd-helm-charts/sealed-secrets/README.md](./argocd-helm-charts/sealed-secrets/README.md)

## License

**K8id** is licensed under the Affero GPLv3 license, as we believe this is the best way to protect against the patent
**KubeAid** is licensed under the Affero GPLv3 license, as we believe this is the best way to protect against the patent
attacks we see hurting the industry; where companies submit code that uses technology they have patented, and then turn
and litigate companies that use the software.

Expand All @@ -95,11 +95,11 @@ project, namely to allow everyone to work on a level playing ground.

## Technical details on the features

Read here for current status on all features of k8id
Read here for current status on all features of kubeaid

### Setup of k8s clusters on physical servers and in cloud providers

K8id support both physical server (on-premise or at e.g. [Hetzner.com](https://hetzner.com)) and cloud providers like
KubeAid support both physical server (on-premise or at e.g. [Hetzner.com](https://hetzner.com)) and cloud providers like
Azure AKS, Amazon AWS or Google GCE.

We currently integrate Terraform, for setting up AKS cluster in Azure, and use kOPS for k8s in AWS and GCP
Expand Down Expand Up @@ -241,15 +241,15 @@ To get all the available locations run
az account list-locations -o table
```

The config file is present in your respective `k8id-config` repo. So, you must clone and provide that file. If I am
standing in the `k8id` repo then my commands will be
The config file is present in your respective `kubeaid-config` repo. So, you must clone and provide that file. If I am
standing in the `kubeaid` repo then my commands will be

```sh
terraform -chdir=cluster-setup-files/terraform/gitlab-ci-server plan -var-file=../k8id-config/vms/gitlab.tfvars
terraform -chdir=cluster-setup-files/terraform/gitlab-ci-server plan -var-file=../kubeaid-config/vms/gitlab.tfvars
```

```sh
terraform -chdir=cluster-setup-files/terraform/gitlab-ci-server apply -var-file=../k8id-config/vms/gitlab.tfvars -auto-approve
terraform -chdir=cluster-setup-files/terraform/gitlab-ci-server apply -var-file=../kubeaid-config/vms/gitlab.tfvars -auto-approve
```

## Create an Azure AKS (Kubernetes) cluster
Expand Down Expand Up @@ -279,18 +279,18 @@ az aks get-versions --location $location
```

```sh
terraform -chdir=cluster-setup-files/terraform/aks plan -var-file=../k8id-config/k8s/kube.tfvars
terraform -chdir=cluster-setup-files/terraform/aks plan -var-file=../kubeaid-config/k8s/kube.tfvars
```

```sh
terraform -chdir=cluster-setup-files/terraform/aks apply -var-file=../k8id-config/k8s/kube.tfvars -auto-approve
terraform -chdir=cluster-setup-files/terraform/aks apply -var-file=../kubeaid-config/k8s/kube.tfvars -auto-approve
```

## CI build and automatic pull requests

**TODO:** Add documentation describing what is actually going on here

To automatically build K8id in CI and create a pull request against your own config repository additional configuration
To automatically build kubeaid in CI and create a pull request against your own config repository additional configuration
may be required.

### Secrets Required
Expand All @@ -308,12 +308,12 @@ The `kube-prometheus` needs two secrets thats needs to be present

**TODO:** Start by documenting what these pull requests are actually all about....

K8id implements a GitHub Action that is used to automatically create pull requests. For this to work the following
kubeaid implements a GitHub Action that is used to automatically create pull requests. For this to work the following
variables should be set:

- `API_TOKEN_GITHUB`: GitHub PAT with permission `repo` (Full control of private repositories).
- `OBMONDO_DEPLOY_REPO_TARGET`: Target repository short name, e.g. `awesomecorp/k8id-config-awesomecorp`
- `OBMONDO_DEPLOY_REPO_TARGET_BRANCH`: Branch name of k8id-config against which you want to build, often `main` or `master`
- `OBMONDO_DEPLOY_REPO_TARGET`: Target repository short name, e.g. `awesomecorp/kubeaid-config-awesomecorp`
- `OBMONDO_DEPLOY_REPO_TARGET_BRANCH`: Branch name of kubeaid-config against which you want to build, often `main` or `master`
- `OBMONDO_DEPLOY_PULL_REQUEST_REVIEWERS` (optional): A comma-separated list of usernames of the users that are added as
reviewers for PRs

Expand All @@ -329,9 +329,9 @@ result in the CI job not creating new PRs as long as a branch named `obmondo-dep

**TODO:** Start by documenting what these pull requests are actually all about....

K8id requires two CI/CD secrets to be configured in order for GitLab CI to be able to create merge requests against a
kubeaid requires two CI/CD secrets to be configured in order for GitLab CI to be able to create merge requests against a
config repository:

- `KUBERNETES_CONFIG_REPO_TOKEN`: GitLab access token with permissions `api` and `read_repository`
- `KUBERNETES_CONFIG_REPO_URL`: Complete URL to target git repo, e.g.
`https://gitlab.example.org/it/k8id-config-awesomecorp.git`
`https://gitlab.example.org/it/kubeaid-config-awesomecorp.git`
16 changes: 8 additions & 8 deletions argocd-helm-charts/argo-cd/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Setup root argocd application

* After your kube cluster is created - you will need to deploy the root application
Assuming you have already created the `k8s/<clustername>/argocd-apps` in your k8id-config repo
Assuming you have already created the `k8s/<clustername>/argocd-apps` in your kubeaid-config repo

```sh
helm template k8s/<clustername>/argocd-apps --show-only templates/root.yaml | kubectl apply -f -
Expand Down Expand Up @@ -205,7 +205,7 @@ kubectl apply -f argocdrepo-myreponame.yaml -n argocd
-> Users
-> Select User
-> Under `groups` tab
-> Select the required group (See values for argocd https://<k8id-config-repo-url>/-/blob/main/k8s/<clustername>/argocd-apps/values-argo-cd.yaml under policy.csv)
-> Select the required group (See values for argocd https://<kubeaid-config-repo-url>/-/blob/main/k8s/<clustername>/argocd-apps/values-argo-cd.yaml under policy.csv)
-> done
```
Expand All @@ -215,20 +215,20 @@ kubectl apply -f argocdrepo-myreponame.yaml -n argocd
* The `argocd-secret` should have a key `oidc.keycloak.clientSecret`.
* Verify your keycloak user roles and group memberships for your username by logging into the keycloak server from UI.
* The URL for keycloak server would be https://keycloak.your.domain.com. Refer [Keycloak readme](../keycloak/README.md).
* Check the `values-argo-cd.yaml` in the k8id-config repo for the k8s cluster. Match policy.csv with the roles in Keycloak
* Check the `values-argo-cd.yaml` in the kubeaid-config repo for the k8s cluster. Match policy.csv with the roles in Keycloak
## Development with ArgoCD and Helm chart
To create a new application in ArgoCD using a Helm chart, we need to go through the following
* Checkout a new feature branch from main branch of k8id repo
* Create a folder inside `argocd-helm-charts` folder in the k8id repo (or the kubernetes-config-enableit repo)
* Checkout a new feature branch from main branch of kubeaid repo
* Create a folder inside `argocd-helm-charts` folder in the kubeaid repo (or the kubernetes-config-enableit repo)
* Add your helm chart files inside the folder - e.g. Chart.yaml, values.yaml, etc
* Using `helm template` command, verify the objects that would be created in the cluster
* Execute `bin/helm-repo-update.sh` from the k8id repo to update the dependencies for the Helm chart.
* Execute `bin/helm-repo-update.sh` from the kubeaid repo to update the dependencies for the Helm chart.
* If the objects are being generated correctly, then push the changes to the feature branch and create a Merge Request
* To create a new application in ArgoCD (till v2.3), create a values-appName.yaml and templates/appName.yaml
in the respective customer's k8id-config repo.
in the respective customer's kubeaid-config repo.
* Add the above config related changes to a new branch and do an MR on the config repo.
* Sync the root app in ArgoCD. AgroCD will create the application and it would show up as `Out of Sync`.
* Sync the app so that ArgoCD fetches the files from the Helm chart and runs `helm template`. The yaml output of
Expand All @@ -237,7 +237,7 @@ the command is sent to the k8s api to create the objects accordingly in the clus
* To make and test further changes, change the values in the Helm chart. Test using `helm template` as mentioned
earlier and push the changes to feature branch. Sync the app again from ArgoCD to apply the changes.
Link to detailed workflow : https://gitlab.enableit.dk/kubernetes/k8id/-/blob/master/argocd-helm-charts/readme.md
Link to detailed workflow : https://gitlab.enableit.dk/kubernetes/kubeaid/-/blob/master/argocd-helm-charts/readme.md
## Links
Expand Down
10 changes: 5 additions & 5 deletions argocd-helm-charts/argo-cd/examples/basic_values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,20 @@ argo-cd:
requestedScopes: ["openid", "profile", "email", "groups"]
repositories:
- type: git
url: https://gitlab.com/kubernetes/k8id.git
url: https://gitlab.com/kubernetes/kubeaid.git
usernameSecret:
name: k8id-argocd
name: kubeaid-argocd
key: username
passwordSecret:
name: k8id-argocd
name: kubeaid-argocd
key: password
- type: git
url: https://gitlab.com/kubernetes/kubernetes-config-enableit.git
usernameSecret:
name: k8id-config-argocd
name: kubeaid-config-argocd
key: username
passwordSecret:
name: k8id-config-argocd
name: kubeaid-config-argocd
key: password
ingress:
enabled: true
Expand Down
2 changes: 1 addition & 1 deletion argocd-helm-charts/cert-manager/bin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ https://github.com/richstokes/k8s-scripts/
* You will sometimes encounter error messages such as these in the logs for cert-manager's `cainjector` pod:

```text
E1124 08:09:45.831036 1 indexers.go:61] "cert-manager: unable to fetch certificate that owns the secret" err="Certificate.cert-manager.io \"k8id-obmondo-web-app-317-tls\" not found" kind="customresourcedefinition" type="customresourcedefinition" secret="obmondo-ci/k8id-obmondo-web-app-317-tls" certificate="obmondo-ci/k8id-obmondo-web-app-317-tls"
E1124 08:09:45.831036 1 indexers.go:61] "cert-manager: unable to fetch certificate that owns the secret" err="Certificate.cert-manager.io \"kubeaid-obmondo-web-app-317-tls\" not found" kind="customresourcedefinition" type="customresourcedefinition" secret="obmondo-ci/kubeaid-obmondo-web-app-317-tls" certificate="obmondo-ci/kubeaid-obmondo-web-app-317-tls"
```

## Why it happens
Expand Down
2 changes: 1 addition & 1 deletion argocd-helm-charts/cert-manager/examples/cert-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
source:
# for e.g. argocd-helm-charts/cert-manager
path: <relative path to cert-manager helm chart>
# for e.g. https://gitlab.enableit.dk/kubernetes/k8id.git
# for e.g. https://gitlab.enableit.dk/kubernetes/kubeaid.git
repoURL: <repo url>
targetRevision: HEAD # repo branch or commit SHA or HEAD
helm:
Expand Down
6 changes: 3 additions & 3 deletions argocd-helm-charts/cert-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Look at `values-multiple-solvers.yaml` for example.
NB. Depending on cloud provider (for dns solvers), values might differ,
currently only `route53` & `cloudflare` are supported by chart.
[Full list of DNS](https://cert-manager.io/docs/configuration/acme/dns01/)
2. Place values file in your `k8id-config` repository under 'k8s/{clustername}/argocd-apps/values-cert-manager.yaml'
2. Place values file in your `kubeaid-config` repository under 'k8s/{clustername}/argocd-apps/values-cert-manager.yaml'
3. Place [examples/cert-manager.yaml](examples/cert-manager.yaml)
in your `k8id-config` repository under 'k8s/{clustername}/argocd-apps/templates' -
be sure to adjust paths to match your k8id and k8id-config repositories.
in your `kubeaid-config` repository under 'k8s/{clustername}/argocd-apps/templates' -
be sure to adjust paths to match your kubeaid and kubeaid-config repositories.

## Details to help fill out values file correctly

Expand Down
2 changes: 1 addition & 1 deletion argocd-helm-charts/k8id-custom-azure/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
apiVersion: v2
name: k8id-custom-azure
name: kubeaid-custom-azure
version: 0.0.1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: k8id-azurefile-ext4
name: kubeaid-azurefile-ext4
provisioner: file.csi.azure.com
reclaimPolicy: Delete
volumeBindingMode: Immediate
Expand Down
16 changes: 8 additions & 8 deletions argocd-helm-charts/keda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
**NOTE: Do not combine KEDA Project's autoscaling (described in this guide) with Kubernetes HPA + Prom Adapter
for the same pod deployment. They will compete with each other and break things.**

**NOTE2: This assumes your cluster is setup with K8id because it provides sane defaults, although its possible to setup
this on non K8id clusters too.**
**NOTE2: This assumes your cluster is setup with KubeAid because it provides sane defaults, although its possible to setup
this on non KubeAid clusters too.**

For new setups, we recommend using KEDA Project for Pod Autoscaling instead of Prometheus Adapter because
it is much easier to wrap your head around it compared to Prometheus Adapter where you have to define
Expand All @@ -19,15 +19,15 @@ rules, metric to resource association, etc.

## Setup Prerequisites

Set `connect_keda: true` in your k8id managed cluster's prometheus build jsonnet vars file
`(k8id-config/k8s/<clustername>/<clustername>-vars.jsonnet)`.
Set `connect_keda: true` in your kubeaid managed cluster's prometheus build jsonnet vars file
`(kubeaid-config/k8s/<clustername>/<clustername>-vars.jsonnet)`.

Regenerate kube prometheus YAML with
`k8id/build/kube-prometheus/build.sh /path/to/k8id-config/k8s/<clustername>/<clustername>-vars.jsonnet`
`kubeaid/build/kube-prometheus/build.sh /path/to/kubeaid-config/k8s/<clustername>/<clustername>-vars.jsonnet`

This will generate a few YAML files which define the network policy which allows Keda to connect to prometheus.

Create `k8id-config/k8s/<clustername>/argocd-apps/templates/keda.yaml`.
Create `kubeaid-config/k8s/<clustername>/argocd-apps/templates/keda.yaml`.
Replace the repo URLs with your own.

```yaml
Expand All @@ -42,7 +42,7 @@ spec:
namespace: monitoring
project: default
sources:
- repoURL: https://gitlab.enableit.dk/kubernetes/k8id.git
- repoURL: https://gitlab.enableit.dk/kubernetes/kubeaid.git
path: argocd-helm-charts/keda
targetRevision: HEAD
helm:
Expand All @@ -58,7 +58,7 @@ spec:
- ApplyOutOfSyncOnly=true
```
Create a values file `k8id-config/k8s/<clustername>/argocd-apps/values-keda.yaml`. Leave it empty for now.
Create a values file `kubeaid-config/k8s/<clustername>/argocd-apps/values-keda.yaml`. Leave it empty for now.

Commit the changes to your cluster config repo and sync.

Expand Down
2 changes: 1 addition & 1 deletion argocd-helm-charts/keycloakx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Details about setup if you are interested:
* Set the `Authorization Url` as `https://keycloakx.kam.obmondo.com/auth/realms/Obmondo/protocol/openid-account/auth`
* Set the `Token Url` as `https://keycloakx.kam.obmondo.com/auth/realms/Obmondo/protocol/openid-account/token`
* Set the `Client Authentication` as `Client secret sent as basic auth`
* Set the `Client ID` as `k8id-employee`
* Set the `Client ID` as `kubeaid-employee`
* Set the `Client Secret` as `secret-from-obmondo`
* Toggle the `pass login hint`
* Save
Expand Down
2 changes: 1 addition & 1 deletion argocd-helm-charts/kube2iam/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ which pods has role defined in annotation for AWS services. If so, then kube2iam
generate an temporary credential and assign to the pod. Therefore, pod able to access S3
bucket.

## How kube2iam is used in k8id ?
## How kube2iam is used in kubeaid?

Basically we use PostgreSQL to create logical backups for an application. And Cronjobs
are scheduled to run everyday at particular time to upload those backups in S3 bucket
Expand Down
2 changes: 1 addition & 1 deletion argocd-helm-charts/obmondo-k8s-agent/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ spec:
project: default
source:
path: argocd-helm-charts/obmondo-k8s-agent
repoURL: https://gitlab.enableit.dk/kubernetes/k8id.git
repoURL: https://gitlab.enableit.dk/kubernetes/kubeaid.git
targetRevision: HEAD
helm:
valueFiles:
Expand Down
4 changes: 2 additions & 2 deletions argocd-helm-charts/opensearch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ vi /usr/share/opensearch/config/opensearch-security/internal_users.yml

Create a secret with template functionality

* Copy the example files into a k8id-config/k8s/$cluster-name/sealed-secret/graylog/s3-backup.yaml
* Copy the example files into a kubeaid-config/k8s/$cluster-name/sealed-secret/graylog/s3-backup.yaml

* Create the secret

```bash
# kubectl create secret generic s3-backup -n graylog --dry-run=client --from-literal=username=admin --from-literal=password=xxxx -o yaml | kubeseal --controller-namespace system --controller-name sealed-secrets -o yaml --merge-into k8id-config/k8s/$cluster-name/sealed-secret/graylog/s3-backup.yaml
# kubectl create secret generic s3-backup -n graylog --dry-run=client --from-literal=username=admin --from-literal=password=xxxx -o yaml | kubeseal --controller-namespace system --controller-name sealed-secrets -o yaml --merge-into kubeaid-config/k8s/$cluster-name/sealed-secret/graylog/s3-backup.yaml
```

## Down sizing the cluster
Expand Down
2 changes: 1 addition & 1 deletion argocd-helm-charts/sealed-secrets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ spec:
access-token: AgDE==
template:
data:
k8id-pushupdate.yaml: |
kubeaid-pushupdate.yaml: |
repo-url: https://gitlab.com/example/repo.git
username: smart_user
password: "{{ index . "password" }}"
Expand Down
Loading

0 comments on commit 9d18cb8

Please sign in to comment.