First part of migrating to openebs
This commit is contained in:
parent
fdca02ab23
commit
f6186e7484
|
|
@ -27,23 +27,18 @@ kubectl patch deployment $DEPLOYMENT -n $NAMESPACE -p "{\"spec\": {\"template\":
|
||||||
## namespaces
|
## namespaces
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
namespaces="flux cert-manager nginx-ingress infrapuzzle kuard auth nextcloud datalab web development longhorn-system tt-rss backup"
|
namespaces="flux cert-manager nginx-ingress infrapuzzle kuard auth nextcloud datalab web development tt-rss backup monitoring"
|
||||||
for i in $( echo $NAMESPACES ) ; do
|
for i in $( echo $NAMESPACES ) ; do
|
||||||
k create ns $i
|
k create ns $i
|
||||||
done
|
done
|
||||||
```
|
```
|
||||||
|
|
||||||
## [helm-operator](https://github.com/fluxcd/helm-operator/blob/master/chart/helm-operator/README.md)
|
## helm repositories
|
||||||
|
|
||||||
As I use helm extensively, using the helm-operator was a logical step. [See documentation for installation.](https://github.com/fluxcd/helm-operator/blob/master/chart/helm-operator/README.md)
|
```sh
|
||||||
|
helm repo add stable https://kubernetes-charts.storage.googleapis.com
|
||||||
```bash
|
helm repo add jetstack https://charts.jetstack.io
|
||||||
$ helm repo add fluxcd https://charts.fluxcd.io
|
helm repo update
|
||||||
$ helm repo update
|
|
||||||
$ kubectl apply -f https://raw.githubusercontent.com/fluxcd/helm-operator/master/deploy/crds.yaml
|
|
||||||
$ helm upgrade -i helm-operator fluxcd/helm-operator \
|
|
||||||
--namespace flux \
|
|
||||||
--set helm.versions=v3
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## [ingress-controller](https://github.com/helm/charts/tree/master/stable/nginx-ingress)
|
## [ingress-controller](https://github.com/helm/charts/tree/master/stable/nginx-ingress)
|
||||||
|
|
@ -51,7 +46,7 @@ $ helm upgrade -i helm-operator fluxcd/helm-operator \
|
||||||
Apply with helm-operator:
|
Apply with helm-operator:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ kubectl apply -f nginx-ingress/ingress.yaml
|
helm upgrade nginx-ingress stable/nginx-ingress -n nginx-ingress -f nginx-ingress/nginx-ingress.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
## [cert-manager](https://cert-manager.io/docs/tutorials/acme/ingress/)
|
## [cert-manager](https://cert-manager.io/docs/tutorials/acme/ingress/)
|
||||||
|
|
@ -59,8 +54,10 @@ $ kubectl apply -f nginx-ingress/ingress.yaml
|
||||||
Apply with helm-operator:
|
Apply with helm-operator:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
helm upgrade cert-manager jetstack/cert-manager -n cert-manager -f cert-manager/cert-manager.yaml
|
||||||
|
# probably not even needed:
|
||||||
$ kubectl apply -f https://raw.githubusercontent.com/jetstack/cert-manager/master/deploy/manifests/00-crds.yaml
|
$ kubectl apply -f https://raw.githubusercontent.com/jetstack/cert-manager/master/deploy/manifests/00-crds.yaml
|
||||||
$ kubectl apply -f cert-manager/cert-manager.yaml
|
# this is required:
|
||||||
$ kubectl apply -f cert-manager/staging-issuer.yaml
|
$ kubectl apply -f cert-manager/staging-issuer.yaml
|
||||||
$ kubectl apply -f cert-manager/production-issuer.yaml
|
$ kubectl apply -f cert-manager/production-issuer.yaml
|
||||||
```
|
```
|
||||||
|
|
@ -73,13 +70,16 @@ $ kubectl apply -f kuard
|
||||||
$ kubectl delete -f kuard
|
$ kubectl delete -f kuard
|
||||||
```
|
```
|
||||||
|
|
||||||
## longhorn-system
|
## Add private docker registry
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# on node:
|
# create secret base64 encoded and put it in htpasswd helm chart
|
||||||
sudo yum install -y iscsi-initiator-utils
|
USER='moritz'
|
||||||
# locally
|
PASSWORD='xxx'
|
||||||
kubectl apply -f longhorn-system/longhorn.yaml
|
docker run --entrypoint htpasswd --rm registry:2 -Bbn $USER $PASSWORD
|
||||||
|
# #
|
||||||
|
helm upgrade --install docker-registry stable/docker-registry -n development -f development/registry.secret.yaml
|
||||||
|
##kubectl apply -f development/registry.secret.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
## rstudio
|
## rstudio
|
||||||
|
|
@ -91,16 +91,7 @@ kubectl apply -f datalab/rstudio.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Add private docker registry
|
|
||||||
|
|
||||||
```sh
|
|
||||||
# create secret base64 encoded and put it in htpasswd helm chart
|
|
||||||
USER='moritz'
|
|
||||||
PASSWORD='xxx'
|
|
||||||
docker run --entrypoint htpasswd --rm registry:2 -Bbn $USER $PASSWORD
|
|
||||||
#
|
|
||||||
kubectl apply -f development/registry.secret.yaml
|
|
||||||
```
|
|
||||||
|
|
||||||
### creating docker-pull-secret
|
### creating docker-pull-secret
|
||||||
|
|
||||||
|
|
@ -137,6 +128,12 @@ kubectl apply -f tt-rss/
|
||||||
kubectl apply -f minio
|
kubectl apply -f minio
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## monitoring
|
||||||
|
|
||||||
|
```sh
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
## auth
|
## auth
|
||||||
|
|
||||||
Including:
|
Including:
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,9 @@
|
||||||
# status: implemented
|
# status: implemented
|
||||||
|
|
||||||
apiVersion: helm.fluxcd.io/v1
|
replicaCount: 1
|
||||||
kind: HelmRelease
|
webhook:
|
||||||
metadata:
|
|
||||||
name: helm-cert-manager
|
|
||||||
namespace: flux
|
|
||||||
spec:
|
|
||||||
releaseName: cert-manager
|
|
||||||
targetNamespace: cert-manager
|
|
||||||
chart:
|
|
||||||
repository: https://charts.jetstack.io
|
|
||||||
version: v0.14.1
|
|
||||||
name: cert-manager
|
|
||||||
values:
|
|
||||||
replicaCount: 1
|
replicaCount: 1
|
||||||
webhook:
|
podLabels:
|
||||||
replicaCount: 1
|
|
||||||
podLabels:
|
|
||||||
app: cert-manager
|
app: cert-manager
|
||||||
prometheus:
|
prometheus:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ spec:
|
||||||
- name: "hub-moritzgraf-de"
|
- name: "hub-moritzgraf-de"
|
||||||
containers:
|
containers:
|
||||||
- name: redeploy-corona
|
- name: redeploy-corona
|
||||||
image: hub.moritzgraf.de:5000/redeploy:latest
|
image: registry.haumdaucher.de/redeploy:latest
|
||||||
env:
|
env:
|
||||||
- name: DEPLOYMENT
|
- name: DEPLOYMENT
|
||||||
value: "corona"
|
value: "corona"
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- ReadWriteOnce
|
||||||
storageClassName: longhorn
|
storageClassName: openebs-hostpath
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 10Gi
|
storage: 10Gi
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,19 +1,6 @@
|
||||||
# status: implemented
|
# status: implemented
|
||||||
|
|
||||||
apiVersion: helm.fluxcd.io/v1
|
controller:
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: helm-nginx-ingress
|
|
||||||
namespace: flux
|
|
||||||
spec:
|
|
||||||
releaseName: nginx-ingress
|
|
||||||
targetNamespace: nginx-ingress
|
|
||||||
chart:
|
|
||||||
repository: https://kubernetes-charts.storage.googleapis.com
|
|
||||||
version: 1.35.0
|
|
||||||
name: nginx-ingress
|
|
||||||
values:
|
|
||||||
controller:
|
|
||||||
hostNetwork: true
|
hostNetwork: true
|
||||||
kind: DaemonSet
|
kind: DaemonSet
|
||||||
daemonset:
|
daemonset:
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
# # status: implemented
|
||||||
|
|
||||||
|
apiVersion: helm.fluxcd.io/v1
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: helm-openebs
|
||||||
|
namespace: flux
|
||||||
|
spec:
|
||||||
|
releaseName: openebs
|
||||||
|
targetNamespace: openebs
|
||||||
|
chart:
|
||||||
|
repository: https://kubernetes-charts.storage.googleapis.com
|
||||||
|
version: 1.9.0
|
||||||
|
name: openebs
|
||||||
|
values:
|
||||||
|
analytics:
|
||||||
|
enabled: false
|
||||||
Loading…
Reference in New Issue