Skip to content

Commit

Permalink
feat: starting rke2
Browse files Browse the repository at this point in the history
  • Loading branch information
loic-roux-404 committed Sep 23, 2024
1 parent 97d9870 commit 5d334bb
Show file tree
Hide file tree
Showing 25 changed files with 205 additions and 189 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ SHELL:=/usr/bin/env bash
MAKEFLAGS += --no-builtin-rules --no-builtin-variables
TF_CMD:=apply -auto-approve
VARIANT=builder
TESTING_X86_URL=https://github.com/loic-roux-404/k3s-paas/releases/download/nixos-testing/nixos.qcow2
TESTING_X86_URL=https://github.com/loic-roux-404/kube-paas/releases/download/nixos-testing/nixos.qcow2
TARGET?=initial

#### Nix
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# K3s PaaS

- [Documentation](https://loic-roux-404.github.io/k3s-paas/)
- [Documentation](https://loic-roux-404.github.io/kube-paas/)
- [Original tutorial (FR)](https://github.com/esgi-lyon/paas-tutorial/blob/main/docs/index.md)

Compatibility Matrix :
Expand Down Expand Up @@ -184,7 +184,7 @@ nix-store --verify --check-contents --repair
Undefine pool :

```bash
virsh -c qemu:///system pool-undefine libvirt-pool-k3s-paas
virsh -c qemu:///system pool-undefine libvirt-pool-kube-paas
```

Undefine vm to avoid conflicts :
Expand Down Expand Up @@ -216,7 +216,7 @@ openssl passwd -salt zizou -6 zizou420!
Set context :

```bash
kubectl config set-cluster default --server=http://k3s-paas-master-0:6443
kubectl config set-cluster default --server=http://localhost-0:6443
kubectl config default test-cluster
```

Expand Down
2 changes: 1 addition & 1 deletion docs/1-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ sudo security add-trusted-cert -d -r trustAsRoot -k /Library/Keychains/System.ke
Setup waypoint inside cluster before getting token :

```bash
Run KUBECONFIG=/etc/rancher/k3s/k3s.yaml waypoint login -from-kubernetes
Run KUBECONFIG=/etc/rancher/rke2/rke2.yaml waypoint login -from-kubernetes
```

Setup waypoint login context outside cluster :
Expand Down
2 changes: 1 addition & 1 deletion docs/2-help.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ We will fetch the kubeconfig in our container that embeds K3s and the cluster.
Copy the kube config k3s with :

```sh
docker cp node-0:/etc/rancher/k3s/k3s.yaml ~/.kube/config
docker cp node-0:/etc/rancher/rke2/rke2.yaml ~/.kube/config
```

If you don't have kubectl locally:
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
## Applying

Follow the steps in [README.md](https://github.com/loic-roux-404/k3s-paas/blob/main/README.md) to apply the infrastructure.
Follow the steps in [README.md](https://github.com/loic-roux-404/kube-paas/blob/main/README.md) to apply the infrastructure.

## Index

Expand Down
70 changes: 43 additions & 27 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
darwin.url = "github:LnL7/nix-darwin";
darwin.inputs.nixpkgs.follows = "nixpkgs-stable-darwin";

nixpkgs-rke-patched.url = "github:loic-roux-404/nixpkgs";

home-manager = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "srvos/nixpkgs";
Expand Down Expand Up @@ -122,7 +124,7 @@
};

# Config with small modifications needed/desired for CI with GitHub workflow
githubCI = self.darwinConfigurations.k3s-paas-host.override {
githubCI = self.darwinConfigurations.default.override {
system = "x86_64-darwin";
username = "runner";
nixConfigDirectory = "/Users/runner/work/nixpkgs/nixpkgs";
Expand All @@ -141,6 +143,7 @@
oldLegacyPackages = import inputs.nixpkgs-legacy (nixpkgsDefaults // { inherit system; });
specialArgs = {
inherit oldLegacyPackages;
nixpkgsRkePatched = import inputs.nixpkgs-rke-patched { inherit system; };
};

in {
Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins:
enumerate_headings: false
add_to_navigation: true

repo_url: https://github.com/loic-roux-404/k3s-paas
repo_url: https://github.com/loic-roux-404/kube-paas
markdown_extensions:
- markdown.extensions.extra
- toc:
Expand Down
2 changes: 1 addition & 1 deletion nixos-darwin/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
...
}:

with config.k3s-paas;
with config.paas;

{
programs.fish.enable = true;
Expand Down
Loading

0 comments on commit 5d334bb

Please sign in to comment.