workignn on getting cert manager up to snuff
This commit is contained in:
23
kubernetes/Readme.md
Normal file
23
kubernetes/Readme.md
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# sources
|
||||||
|
|
||||||
|
|
||||||
|
nix instructions: <https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/networking/cluster/k3s/README.md>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## tailscale operator
|
||||||
|
|
||||||
|
```
|
||||||
|
helm repo add tailscale https://pkgs.tailscale.com/helmcharts
|
||||||
|
helm repo update
|
||||||
|
helm upgrade \
|
||||||
|
--install \
|
||||||
|
tailscale-operator \
|
||||||
|
tailscale/tailscale-operator \
|
||||||
|
--namespace=tailscale \
|
||||||
|
--create-namespace \
|
||||||
|
--set-string oauth.clientId="<OAauth client ID>" \
|
||||||
|
--set-string oauth.clientSecret="<OAuth client secret>" \
|
||||||
|
--wait
|
||||||
|
```
|
||||||
|
|
||||||
22
kubernetes/cloudflare-issuer/Readme.md
Normal file
22
kubernetes/cloudflare-issuer/Readme.md
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
## Cloudflare cert manager
|
||||||
|
|
||||||
|
<https://cert-manager.io/docs/installation/helm/>
|
||||||
|
```bash
|
||||||
|
helm repo add jetstack https://charts.jetstack.io --force-update
|
||||||
|
helm install \
|
||||||
|
cert-manager jetstack/cert-manager \
|
||||||
|
--namespace cert-manager \
|
||||||
|
--create-namespace \
|
||||||
|
--version v1.16.2 \
|
||||||
|
--set crds.enabled=true
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
<https://medium.com/@kevinlutzer9/managed-ssl-certs-for-a-private-kubernetes-cluster-with-cloudflare-cert-manager-and-lets-encrypt-7987ba19044f>
|
||||||
|
|
||||||
|
```bash
|
||||||
|
kubectl create secret generic cloudflare-api-key-secret --from-literal=api-key=<TOKEN>
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
then apply `issuer.yml`1
|
||||||
18
kubernetes/cloudflare-issuer/issuer.yml
Normal file
18
kubernetes/cloudflare-issuer/issuer.yml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# issuer.yml
|
||||||
|
apiVersion: cert-manager.io/v1
|
||||||
|
kind: Issuer
|
||||||
|
metadata:
|
||||||
|
name: ca-issuer
|
||||||
|
spec:
|
||||||
|
acme:
|
||||||
|
email: alexmickelson96@gmail.com
|
||||||
|
server: https://acme-v02.api.letsencrypt.org/directory
|
||||||
|
privateKeySecretRef:
|
||||||
|
name: issuer-key
|
||||||
|
solvers:
|
||||||
|
- dns01:
|
||||||
|
cloudflare:
|
||||||
|
email: alexmickelson96@gmail.com
|
||||||
|
apiTokenSecretRef:
|
||||||
|
name: cloudflare-api-key-secret
|
||||||
|
key: api-key
|
||||||
@@ -2,16 +2,16 @@ apiVersion: apps/v1
|
|||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
namespace: projects
|
namespace: projects
|
||||||
name: gitea_db
|
name: gitea-db
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: gitea_db
|
app: gitea-db
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: gitea_db
|
app: gitea-db
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: postgres
|
- name: postgres
|
||||||
@@ -22,7 +22,7 @@ spec:
|
|||||||
- name: POSTGRES_USER
|
- name: POSTGRES_USER
|
||||||
value: "gitea"
|
value: "gitea"
|
||||||
- name: POSTGRES_PASSWORD
|
- name: POSTGRES_PASSWORD
|
||||||
value: "${POSTGRES_PASSWORD}"
|
value: wauiofnasufnweaiufbsdklfjb23456
|
||||||
- name: POSTGRES_DB
|
- name: POSTGRES_DB
|
||||||
value: "gitea"
|
value: "gitea"
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
@@ -37,15 +37,15 @@ spec:
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: gitea_db
|
name: gitea-db-svc
|
||||||
namespace: projects
|
namespace: projects
|
||||||
labels:
|
labels:
|
||||||
app: gitea_db
|
app: gitea-db
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
- protocol: TCP
|
- protocol: TCP
|
||||||
port: 5432
|
port: 5432
|
||||||
targetPort: 5432
|
targetPort: 5432
|
||||||
selector:
|
selector:
|
||||||
app: gitea_db
|
app: gitea-db
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: gitea_web
|
name: gitea-web
|
||||||
namespace: projects
|
namespace: projects
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: gitea_web
|
app: gitea-web
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: gitea_web
|
app: gitea-web
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: gitea
|
- name: gitea
|
||||||
@@ -27,16 +27,13 @@ spec:
|
|||||||
- name: GITEA__database__DB_TYPE
|
- name: GITEA__database__DB_TYPE
|
||||||
value: "postgres"
|
value: "postgres"
|
||||||
- name: GITEA__database__HOST
|
- name: GITEA__database__HOST
|
||||||
value: "postgres:5432"
|
value: "gitea-db-svc:5432"
|
||||||
- name: GITEA__database__NAME
|
- name: GITEA__database__NAME
|
||||||
value: "gitea"
|
value: "gitea"
|
||||||
- name: GITEA__database__USER
|
- name: GITEA__database__USER
|
||||||
value: "gitea"
|
value: "gitea"
|
||||||
- name: GITEA__database__PASSWD
|
- name: GITEA__database__PASSWD
|
||||||
valueFrom:
|
value: wauiofnasufnweaiufbsdklfjb23456
|
||||||
secretKeyRef:
|
|
||||||
name: gitea-db-secret
|
|
||||||
key: postgres-password
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: gitea-data
|
- name: gitea-data
|
||||||
mountPath: /data
|
mountPath: /data
|
||||||
@@ -62,7 +59,7 @@ spec:
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: gitea_web
|
name: gitea-web-svc
|
||||||
namespace: projects
|
namespace: projects
|
||||||
spec:
|
spec:
|
||||||
type: NodePort
|
type: NodePort
|
||||||
@@ -74,4 +71,25 @@ spec:
|
|||||||
port: 22
|
port: 22
|
||||||
targetPort: 22
|
targetPort: 22
|
||||||
selector:
|
selector:
|
||||||
app: gitea_web
|
app: gitea-web
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: gitea
|
||||||
|
namespace: projects
|
||||||
|
spec:
|
||||||
|
ingressClassName: tailscale
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- gitea
|
||||||
|
rules:
|
||||||
|
- http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: gitea-web-svc
|
||||||
|
port:
|
||||||
|
number: 3000
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
# sources
|
|
||||||
|
|
||||||
|
|
||||||
nix instructions <https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/networking/cluster/k3s/README.md>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
# nerd-fonts.droid-sans-mono
|
# nerd-fonts.droid-sans-mono
|
||||||
# fira-code
|
# fira-code
|
||||||
(nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" ]; })
|
(nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" ]; })
|
||||||
|
kubernetes-helm
|
||||||
];
|
];
|
||||||
fonts.fontconfig.enable = true;
|
fonts.fontconfig.enable = true;
|
||||||
dconf.enable = true;
|
dconf.enable = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user