Add configs for a new kubernetes cluster on NixOS.
This commit is contained in:
16
nix/kubernetes/keys/package/k8s-ca/files/ca-csr.json
Normal file
16
nix/kubernetes/keys/package/k8s-ca/files/ca-csr.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"CN": "Kubernetes",
|
||||
"key": {
|
||||
"algo": "rsa",
|
||||
"size": 2048
|
||||
},
|
||||
"names": [
|
||||
{
|
||||
"C": "US",
|
||||
"L": "Portland",
|
||||
"O": "Kubernetes",
|
||||
"OU": "CA",
|
||||
"ST": "Oregon"
|
||||
}
|
||||
]
|
||||
}
|
||||
28
nix/kubernetes/keys/package/k8s-ca/package.nix
Normal file
28
nix/kubernetes/keys/package/k8s-ca/package.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
# unpackPhase
|
||||
# patchPhase
|
||||
# configurePhase
|
||||
# buildPhase
|
||||
# checkPhase
|
||||
# installPhase
|
||||
# fixupPhase
|
||||
# installCheckPhase
|
||||
# distPhase
|
||||
{
|
||||
stdenv,
|
||||
sqlite,
|
||||
cfssl,
|
||||
...
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
name = "k8s-ca";
|
||||
nativeBuildInputs = [ cfssl ];
|
||||
buildInputs = [ ];
|
||||
|
||||
unpackPhase = "true";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out"
|
||||
cd "$out"
|
||||
cfssl gencert -initca ${./files/ca-csr.json} | cfssljson -bare ca
|
||||
'';
|
||||
})
|
||||
Reference in New Issue
Block a user