foo
This commit is contained in:
parent
74253c0fde
commit
d886b659ce
3 changed files with 26 additions and 5 deletions
23
apps.nix
23
apps.nix
|
|
@ -2,8 +2,29 @@
|
|||
|
||||
let
|
||||
mkApp = {};
|
||||
ETCD_ENDPOINTS = "https://[fd00:23:42:1000::1]:2379,https://[fd00:23:42:1000::2]:2379,https://[fd00:23:42:1000::3]:2379";
|
||||
ETCD_ROOT_CRT = "/run/agenix/etcd-root-crt";
|
||||
ETCD_CLIENT_CRT = "/run/agenix/etcd-client-crt";
|
||||
ETCD_CLIENT_KEY = "/run/agenix/etcd-client-key";
|
||||
in
|
||||
{
|
||||
|
||||
etcd-endpoint-health = {
|
||||
type = "app";
|
||||
program = "${pkgs.writeShellScript "etcd-health-check" ''
|
||||
ssh fd00:23:42:1000::1 'etcdctl --endpoints=${ETCD_ENDPOINTS} --cacert=${ETCD_ROOT_CRT} --cert=${ETCD_CLIENT_CRT} --key=${ETCD_CLIENT_KEY} endpoint health'
|
||||
''}";
|
||||
};
|
||||
etcd-members = {
|
||||
type = "app";
|
||||
program = "${pkgs.writeShellScript "etcd-members" ''
|
||||
ssh fd00:23:42:1000::1 'etcdctl --endpoints=${ETCD_ENDPOINTS} --cacert=${ETCD_ROOT_CRT} --cert=${ETCD_CLIENT_CRT} --key=${ETCD_CLIENT_KEY} member list'
|
||||
''}";
|
||||
};
|
||||
etcd-endpoint-status = {
|
||||
type = "app";
|
||||
program = "${pkgs.writeShellScript "etcd-status" ''
|
||||
ssh fd00:23:42:1000::1 'etcdctl --endpoints=${ETCD_ENDPOINTS} --cacert=${ETCD_ROOT_CRT} --cert=${ETCD_CLIENT_CRT} --key=${ETCD_CLIENT_KEY} endpoint status --write-out=table'
|
||||
''}";
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
description = "flake to deploy and manage cccb k8s cluster";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
||||
nixpkgs-k8s.url = "github:NixOS/nixpkgs/771c08bfa8c7da5ab251a1d0d56fb01948f45473"; # kubernetes 1.34.3
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
|
||||
nixpkgs-k8s.url = "github:NixOS/nixpkgs/b691719c74533048a7482453206ac13bf050e57d"; # kubernetes 1.36.3
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
agenix = {
|
||||
url = "github:ryantm/agenix";
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
in
|
||||
{
|
||||
formatter = pkgs.nixfmt-tree;
|
||||
#apps = (import ./apps.nix pkgs pkgs-k8s);
|
||||
apps = (import ./apps.nix pkgs pkgs-k8s);
|
||||
devShells.default = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
agenix.packages.${system}.default
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ let
|
|||
++ extraModules);
|
||||
in
|
||||
{
|
||||
"kaede" = nixpkgs.lib.nixosSystem {
|
||||
"k8s" = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [
|
||||
NixVirt.nixosModules.default
|
||||
|
|
|
|||
Loading…
Reference in a new issue