try adidoks

This commit is contained in:
WrenIX 2024-11-07 20:34:34 +01:00
parent 37813805fe
commit 53efa2c0c4
Signed by: wrenix
GPG key ID: 7AFDB012974B1BB5
28 changed files with 389 additions and 71 deletions

6
.gitmodules vendored
View file

@ -1,3 +1,3 @@
[submodule "themes/terminimal"]
path = themes/terminimal
url = https://github.com/pawroman/zola-theme-terminimal.git
[submodule "themes/adidoks"]
path = themes/adidoks
url = https://github.com/aaranxu/adidoks.git

View file

@ -2,22 +2,35 @@ base_url = "https://wrenix.eu"
title = "WrenIX"
description = "Der Zaunkönig im Netzwerk"
# generate_feed = true
compile_sass = true
minify_html = true
# BROKEN: trimmer.de
build_search_index = false
# theme = "anatole-zola"
# theme = "tabi"
theme = "terminimal"
# theme = "terminimal"
theme = "adidoks"
taxonomies = [
{name = "tags"}
# {name = "tags"}
{name = "authors" }
]
# feed_filename = "rss.xml"
generate_feeds = true
feed_filenames = [ "rss.xml" ]
default_language = "de"
[languages.en]
title = "WrenIX"
description = "The wren in the network"
[search]
include_title = true
# Whether to include the description of the page/section in the index
include_description = false
include_content = true
index_format = "elasticlunr_javascript"
[markdown]
external_links_target_blank = true
@ -33,42 +46,58 @@ background_color = "blue"
logo_text="WrenIX"
author="WrenIX"
copyright_html="© WrenIX"
use_full_hack_font = true
page_titles = "main_only"
timeformat = "%Y-%m-%d"
favicon = "/images/avatar.png"
favicon_mimetype = "image/png"
[[extra.menu_items]]
name="home"
url="$BASE_URL"
[extra.open]
enable = false
image = "/images/avatar.png"
[[extra.menu_items]]
name="archive"
url="$BASE_URL/archive"
[extra.schema]
type = "Person"
github = "https://github.com/wrenix"
section = "blog"
site_links_search_box = true
[[extra.menu_items]]
name="about me"
url="$BASE_URL/about"
[[extra.menu.main]]
name="Blog"
section="blog"
url="/"
[[extra.menu_items]]
name="rss"
url="$BASE_URL/rss.xml"
newtab=true
[[extra.menu.main]]
name="About Me"
section="about"
url="about"
[[extra.menu_items]]
name="docs"
url="https://docs.wrenix.eu"
newtab=true
[[extra.menu_items]]
name="mastodon"
[[extra.menu.main]]
name="Docs"
section="docs"
url="docs"
[[extra.menu.social]]
name="RSS"
pre='''<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-rss"><path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle></svg>'''
url="/rss.xml"
[[extra.menu.social]]
name="Mastodon"
pre='''<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-activity"><polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline></svg>'''
url="https://social.chaos.fyi/@wrenix"
newtab=true
[[extra.menu_items]]
[[extra.menu.social]]
name="git"
pre='''<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-git-branch"><line x1="6" y1="3" x2="6" y2="15"></line><circle cx="18" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><path d="M18 9a9 9 0 0 1-9 9"></path></svg>'''
url="https://codeberg.org/wrenix"
newtab=true
[extra.footer]
info = "© WrenIX"
[[extra.footer.nav]]
name = "Privacy"
url = "/privacy-policy/"
weight = 10

View file

@ -1,12 +1,14 @@
+++
title = "eToken und GPG-Key"
date = "2023-05-17"
template = "blog/page.html"
[taxonomies]
tags = [
"gpg",
"desktop"
]
authors = ["me"]
# tags = [
# "gpg",
# "desktop"
# ]
+++
Ich nutze den GPG-Key für folgende Funktionen:
@ -550,4 +552,4 @@ ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGONGPQ79A9WZ7EwM6vMfBKBkgPD2dsjExFoo2UXyd79
```bash
gpg2 --no-armour -o .well-known/openpgpkey/hu/gudx35f8m3ns6jx87gkuda1nmtsb53nd --export B9C35FDD7362F063A8706A2E7AFDB012974B1BB5
```
```

View file

@ -1,12 +1,14 @@
+++
title = "Passwordmanager mit GPG-Key"
date = "2023-05-18"
template = "blog/page.html"
[taxonomies]
tags = [
"gpg",
"desktop"
]
authors = ["me"]
#tags = [
# "gpg",
# "desktop"
#]
+++
```
@ -14,4 +16,4 @@ pass init 0x7AFDB012974B1BB5
pass edit dev/codeberg.org
git remote add origin git@codeberg.org:wrenix/password-store.git
git push -u origin main
```
```

View file

@ -1,14 +1,16 @@
+++
title = "Modernes Logging Konzept"
date= "2023-06-22"
template = "blog/page.html"
[taxonomies]
tags = [
"k8s",
"kubernetes",
"server",
"logging"
]
authors = ["me"]
#tags = [
# "k8s",
# "kubernetes",
# "server",
# "logging"
#]
+++
- Logging Schema / Format
@ -95,4 +97,4 @@ Es gibt viele Logging Backends, sowohl OpenSource, als auch proritär. In den me
TODO:
- elasticsearch
- loki von grafana
- loki von grafana

View file

@ -1,12 +1,15 @@
+++
title = "Die Zukunft von Matrix"
date = "2024-08-28"
draft = true
template = "blog/page.html"
[taxonomies]
tags = [
"matrix",
"element"
]
authors = ["me"]
# tags = [
# "matrix",
# "element"
# ]
+++
Zunächst, ich bin eine private Person und stehe nicht in Verbindung zu Element oder der Matrix Foundation.

6
content/_index.en.md Normal file
View file

@ -0,0 +1,6 @@
+++
title = "Blog"
sort_by = "date"
paginate_by = 3
template = "blog/section.html"
+++

View file

@ -1,5 +1,6 @@
+++
title = "Home"
title = "Blog"
sort_by = "date"
paginate_by = 3
paginate_by = 4
template = "blog/section.html"
+++

10
content/authors/_index.md Normal file
View file

@ -0,0 +1,10 @@
+++
title = "Authors"
description = "The authurs of the blog articles."
# Note: We use quoted keys here.
[extra.author_pages]
"me" = "authors/wrenix.md"
+++
The authors of the blog articles.

11
content/docs/_index.md Normal file
View file

@ -0,0 +1,11 @@
+++
title = "Docs"
description = "All the documentations from WrenIX projects"
sort_by = "weight"
weight = 1
template = "docs/section.html"
+++
Kubernetes:
* [Helm Charts](helm-charts)
* [FluxCD (Charts)](flux-charts)

View file

@ -0,0 +1 @@
../../../../flux-charts/README.md

View file

@ -0,0 +1,6 @@
+++
title = "FluxCD (Charts)"
template = "docs/section.html"
sort_by = "weight"
weight = 2
+++

View file

@ -0,0 +1,172 @@
+++
title = "Base"
template = "docs/page.html"
sort_by = "weight"
weight = 3
[extra]
toc = true
+++
This Helm-Chart called base is there to bundle multiple components (helm-charts which maybe deployes another flux-repository).
## Base-Values
On this way, it is possible to use one `values.yaml` to setup multiple-components together or multiple overlapping `values.yaml` (e.g. for staging, stacks and so on).
For example, take an look in my xref:infra:index.adoc[Infra] and xref:mycloud:index.adoc[myCloud] stack.
!!! warning
I will do a versioning of this Base Helmchart and every components chart (but not for my default values).
This is just for my setups.
As in Hint, it is possible to use `valuesFrom:` and deploy ConfigMap, see [fluxcd](https://fluxcd.io/flux/components/helm/helmreleases/#values-references).
### Shared Values
The values `global:` and `commons:` are down passed into every component values.
This values could be overwritten inside the setup of every component `components.<component-name>.global:` or `components.<component-name>.commons:`.
See also [Components - Values](#values)
## Components
The components are an helmchart in the `commons.helm.chart.sourceRef` root.
Everything else is components specific and could be set under:
``` yaml
commons:
namespace:
labels:
orgs: example
helm:
release:
install:
test:
upgrade:
driftDetection:
componentCommons:
helm:
release:
interval: 10m
components:
<component-release-name>:
enabled: true <1>
name: <2>
namespace: <3>
name:
labels:
team: my
skip_create: false
valuesFrom: <4>
values: <5>
```
* <1> install this components (or not)
* <2> if set use component by name otherwise component is used by component-release-name
* <3> setup namespace, where component is deployed (e.g. name, labels of namespace, skip-create) if not set use namespace of current Base
* <4> use `valuesFrom` an `Secret` or `ConfigMap`
* <5> use values direct
### Namespace
It is possible to deploy an components into a specific namespace (and create this).
#### Use existing Namespace
``` yaml
components:
<component-release-name>:
namespace:
name: "default"
skip_create: true
```
#### Same Namespace as Base
``` yaml
components:
<component-release-name>:
namespace:
name: nil <1>
```
* <1> or never set this part
#### New Namespace
``` yaml
commons:
namespace:
labels: <1>
orgs: example
components:
<component-release-name>:
namespace:
name: "my-namespace"
labels: <2>
team: my
```
* <1> optional with labels on every new namespace by this component-release
* <2> optional with labels on this component-release
### Values
There are multiple options to set values of an components.
Here in short the four options and order by overwrite priority.
``` yaml
global: <3>
commons: <3>
componentCommons:
helm:
release:
valuesFrom: <1>
components:
<component-release-name>:
valuesFrom: [] <2>
values: <4>
```
* <1> `valuesFrom` for every components (e.g one or multiple `ConfigMap` or `Secrets`)
* <2> `valuesFrom` of a specific component
* <3> `global:` or `commons` for every componets
* <4> values for a specific component
#### Adjust Component setup (fluxcd values)
``` yaml
commons: <1>
helm:
release:
install:
test:
upgrade:
driftDetection:
componentCommons:
helm:
release: <2>
interval: 10m
```
* <1> is part of commons, for maybe reuse inside of an component-chart.
* <2> is part of componentCommons for just use of component use level.
#### init-Version
!!! warning
Since FluxCD supports driftDetection (with version 2.2) we maybe drop that idea.
This is a small workaround to setup manifest in later step / rerun an component-chart, as e.g. CRD installation by an HelmRelease which is part of the used Component-Chart.
.Helper which should be put into the Component-Chart (with Capabilities if every is there to setup / to retries)
``` yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-init
namespace: "{{ .Values.init.namespace }}"
data:
{{- if and
(.Capabilities.APIVersions.Has "monitoring.coreos.com/v1/PrometheusRule")
(.Capabilities.APIVersions.Has "monitoring.coreos.com/v1/ServiceMonitor")
}}
init: "-1"
{{- else }}
init: "{{ add1 .Values.init.version }}"
{{- end }}
```

View file

@ -0,0 +1,64 @@
+++
title = "Flux: Get-Started"
template = "docs/page.html"
sort_by = "weight"
weight = 2
[extra]
toc = true
+++
## Install FluxCD into a cluster
Here i install it with connection to codeberg:
* the path is just for the cluster
* the url a repo where fluxcd (in given path) install itself and monitor
* i just install my needed components (i skip notification-controller, i prefer prometheus and alerting)
```bash
flux bootstrap git --components source-controller,kustomize-controller,helm-controller --path=<path> --url ssh://git@codeberg.org/wrenix/<repo>.git
```
### Secure with verify
Afterwards we need to setup a verification with GPG, so that nobody else could commit any workload in your cluster.
That is because i select an public git hosting (here codeberg), i trust them but maybe it get compromised one time.
in your repository the flux cli has created an `<path>/flux-system/kustomization.yaml`, we will edit them.
```patch
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- gotk-components.yaml
- gotk-sync.yaml
+patches:
+ - target:
+ kind: GitRepository
+ name: flux-system
+ patch: |-
+ apiVersion: source.toolkit.fluxcd.io/v1
+ kind: GitRepository
+ metadata:
+ name: flux-system
+ spec:
+ verify: <1>
+ mode: HEAD
+ secretRef:
+ name: gpg-publickey
+
+generatorOptions:
+ disableNameSuffixHash: true <2>
+
+secretGenerator:
+ - name: gpg-publickey <3>
+ namespace: flux-system
+ files:
+ - gpg-publickey/wrenix.gpg <4>
```
* <1> add verify, that only HEAD git commit with valide gpg signature is used
* <2> on the next generate, do not add hash
* <3> generate kubernetes Secret with the name `gpg-publickey` which is used in the patched GitRepository, see <1>
* <4> Add list of valide gpg key files

View file

@ -0,0 +1 @@
../../../../helm-charts/README.md

View file

@ -0,0 +1,6 @@
+++
title = "Helm Charts"
template = "docs/section.html"
sort_by = "weight"
weight = 1
+++

View file

@ -0,0 +1 @@
../../../../helm-charts/gotosocial/README.md

View file

@ -0,0 +1 @@
../../../../helm-charts/home-assistant/README.md

View file

@ -1,3 +0,0 @@
+++
render = false
+++

View file

@ -1,6 +0,0 @@
+++
title = "Archive"
template = "archive.html"
path = "en/archive"
+++
# Archive

View file

@ -1,6 +0,0 @@
+++
title = "Archiv"
template = "archive.html"
path = "archive"
+++
# Archiv

1
public Submodule

@ -0,0 +1 @@
Subproject commit a960c859c1a2e5e8ddbb81265ea08498fac1c39d

14
symlink.sh Executable file
View file

@ -0,0 +1,14 @@
#!/bin/sh
find content/docs/helm-charts -iname "*.md" -not -path "content/docs/helm-charts/_index*.md" -delete
for p in "../helm-charts/"* ; do
if [ ! -d $p ] ||[ ! -f $p/Chart.yaml ] ; then
continue;
fi
name=$(basename "${p}")
echo "== helm-charts/${name}:"
if [ ! -f $p/README.md ]; then
echo "not yet in markdown"
else
ln -s "../../../${p}/README.md" "content/docs/helm-charts/${name}.md"
fi
done

View file

@ -1 +1 @@
themes/terminimal/templates
themes/adidoks/templates

1
themes/adidoks Submodule

@ -0,0 +1 @@
Subproject commit 5c698271c460046034605b743a15196b12e32887

@ -1 +0,0 @@
Subproject commit 910e50b824c898fc9641ab7910ce4a984e97040f