feat: removal of all addons (#1247)
* feat: removal of all addons Signed-off-by: Devin Buhl <devin@buhl.casa> * fix: update the mj script Signed-off-by: Devin Buhl <devin@buhl.casa> * fix: remove the default namespace Signed-off-by: Devin Buhl <devin@buhl.casa> * fix: remove descheduler and move reloader into flux-system Signed-off-by: Devin Buhl <devin@buhl.casa> --------- Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
1 parent
a5cb9b8d39
commit
e321b148a6
91 files changed
+13
-2019
No files matched your search
@@ -1,53 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
addon_homepage:
|
|
||||||
enabled: true
|
|
||||||
|
|
||||||
addon_grafana:
|
|
||||||
enabled: true
|
|
||||||
password: fake
|
|
||||||
|
|
||||||
addon_kube_prometheus_stack:
|
|
||||||
enabled: true
|
|
||||||
|
|
||||||
addon_kubernetes_dashboard:
|
|
||||||
enabled: true
|
|
||||||
|
|
||||||
addon_weave_gitops:
|
|
||||||
enabled: true
|
|
||||||
password: fake
|
|
||||||
|
|
||||||
addon_csi_driver_nfs:
|
|
||||||
enabled: true
|
|
||||||
storage_class:
|
|
||||||
- name: fake
|
|
||||||
server: fake
|
|
||||||
share: /fake
|
|
||||||
|
|
||||||
addon_csi_driver_smb:
|
|
||||||
enabled: true
|
|
||||||
create_secrets: true
|
|
||||||
storage_class:
|
|
||||||
- name: fake
|
|
||||||
source: //localhost/fake
|
|
||||||
username: fake
|
|
||||||
password: fake
|
|
||||||
file_mode: 0755
|
|
||||||
dir_mode: 0644
|
|
||||||
uid: 100
|
|
||||||
gid: 100
|
|
||||||
secret_name: fake
|
|
||||||
secret_namespace: fake
|
|
||||||
|
|
||||||
addon_system_upgrade_controller:
|
|
||||||
enabled: true
|
|
||||||
|
|
||||||
addon_discord_template_notifier:
|
|
||||||
enabled: true
|
|
||||||
webhook_url: https://discord.com/api/webhooks/fake/fake
|
|
||||||
|
|
||||||
addon_volsync:
|
|
||||||
enabled: true
|
|
||||||
|
|
||||||
addon_longhorn:
|
|
||||||
enabled: true
|
|
||||||
@@ -22,7 +22,6 @@ jobs:
|
|||||||
- k3s-ipv4
|
- k3s-ipv4
|
||||||
- k3s-ipv6
|
- k3s-ipv6
|
||||||
- talos
|
- talos
|
||||||
addon-files: ["addons"]
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -79,7 +78,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
task init
|
task init
|
||||||
cp ./.github/tests/config-${{ matrix.config-files }}.yaml ./bootstrap/vars/config.yaml
|
cp ./.github/tests/config-${{ matrix.config-files }}.yaml ./bootstrap/vars/config.yaml
|
||||||
cp ./.github/tests/${{ matrix.addon-files }}.yaml ./bootstrap/vars/addons.yaml
|
|
||||||
export BOOTSTRAP_AGE_PUBLIC_KEY=$(sed -n 's/# public key: //gp' age.key)
|
export BOOTSTRAP_AGE_PUBLIC_KEY=$(sed -n 's/# public key: //gp' age.key)
|
||||||
envsubst < ./bootstrap/vars/config.yaml | sponge ./bootstrap/vars/config.yaml
|
envsubst < ./bootstrap/vars/config.yaml | sponge ./bootstrap/vars/config.yaml
|
||||||
|
|
||||||
|
|||||||
@@ -213,9 +213,9 @@ You have two different options for setting up your local workstation. First one
|
|||||||
|
|
||||||
### 🔧 Stage 3: Do bootstrap configuration
|
### 🔧 Stage 3: Do bootstrap configuration
|
||||||
|
|
||||||
📍 _Both `bootstrap/vars/config.yaml` and `bootstrap/vars/addons.yaml` files contain necessary information that is **vital** to the bootstrap process._
|
📍 _The_ `bootstrap/vars/config.yaml` contain necessary information that is **vital** to the bootstrap process._
|
||||||
|
|
||||||
1. Generate the `bootstrap/vars/config.yaml` and `bootstrap/vars/addons.yaml` configuration files.
|
1. Generate the `bootstrap/vars/config.yaml` configuration file.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
task init
|
task init
|
||||||
@@ -282,8 +282,6 @@ You have two different options for setting up your local workstation. First one
|
|||||||
|
|
||||||
6a. Ensure `bootstrap_acme_production_enabled` is set to `false`.
|
6a. Ensure `bootstrap_acme_production_enabled` is set to `false`.
|
||||||
|
|
||||||
6b. [Optional] Update `bootstrap/vars/addons.yaml` and enable applications you would like included.
|
|
||||||
|
|
||||||
7. Once done run the following command which will verify and generate all the files needed to continue.
|
7. Once done run the following command which will verify and generate all the files needed to continue.
|
||||||
|
|
||||||
📍 _The following configure task will create a `./ansible` directory for k3s or k0s and the following directories under `./kubernetes` for all distributions_
|
📍 _The following configure task will create a `./ansible` directory for k3s or k0s and the following directories under `./kubernetes` for all distributions_
|
||||||
|
|||||||
+1
-7
@@ -9,7 +9,6 @@ vars:
|
|||||||
KUBERNETES_DIR: "{{.ROOT_DIR}}/kubernetes"
|
KUBERNETES_DIR: "{{.ROOT_DIR}}/kubernetes"
|
||||||
PRIVATE_DIR: "{{.ROOT_DIR}}/.private"
|
PRIVATE_DIR: "{{.ROOT_DIR}}/.private"
|
||||||
# Files
|
# Files
|
||||||
BOOTSTRAP_ADDONS_FILE: "{{.BOOTSTRAP_DIR}}/vars/addons.yaml"
|
|
||||||
BOOTSTRAP_CONFIG_FILE: "{{.BOOTSTRAP_DIR}}/vars/config.yaml"
|
BOOTSTRAP_CONFIG_FILE: "{{.BOOTSTRAP_DIR}}/vars/config.yaml"
|
||||||
KUBECONFIG_FILE: "{{.ROOT_DIR}}/kubeconfig"
|
KUBECONFIG_FILE: "{{.ROOT_DIR}}/kubeconfig"
|
||||||
MAKEJINJA_CONFIG_FILE: "{{.ROOT_DIR}}/makejinja.toml"
|
MAKEJINJA_CONFIG_FILE: "{{.ROOT_DIR}}/makejinja.toml"
|
||||||
@@ -42,18 +41,14 @@ tasks:
|
|||||||
desc: Initialize configuration files
|
desc: Initialize configuration files
|
||||||
cmds:
|
cmds:
|
||||||
- mkdir -p {{.PRIVATE_DIR}}
|
- mkdir -p {{.PRIVATE_DIR}}
|
||||||
- cp -n {{.BOOTSTRAP_ADDONS_FILE | replace ".yaml" ".sample.yaml"}} {{.BOOTSTRAP_ADDONS_FILE}}
|
|
||||||
- cp -n {{.BOOTSTRAP_CONFIG_FILE | replace ".yaml" ".sample.yaml"}} {{.BOOTSTRAP_CONFIG_FILE}}
|
- cp -n {{.BOOTSTRAP_CONFIG_FILE | replace ".yaml" ".sample.yaml"}} {{.BOOTSTRAP_CONFIG_FILE}}
|
||||||
- cmd: echo === Configuration files copied ===
|
- cmd: echo === Configuration file copied ===
|
||||||
silent: true
|
silent: true
|
||||||
- cmd: echo Proceed with updating the configuration files...
|
- cmd: echo Proceed with updating the configuration files...
|
||||||
silent: true
|
silent: true
|
||||||
- cmd: echo {{.BOOTSTRAP_CONFIG_FILE}}
|
- cmd: echo {{.BOOTSTRAP_CONFIG_FILE}}
|
||||||
silent: true
|
silent: true
|
||||||
- cmd: echo {{.BOOTSTRAP_ADDONS_FILE}}
|
|
||||||
silent: true
|
|
||||||
status:
|
status:
|
||||||
- test -f "{{.BOOTSTRAP_ADDONS_FILE}}"
|
|
||||||
- test -f "{{.BOOTSTRAP_CONFIG_FILE}}"
|
- test -f "{{.BOOTSTRAP_CONFIG_FILE}}"
|
||||||
|
|
||||||
configure:
|
configure:
|
||||||
@@ -72,7 +67,6 @@ tasks:
|
|||||||
- { msg: "Missing virtual environment", sh: "test -d {{.ROOT_DIR}}/.venv" }
|
- { msg: "Missing virtual environment", sh: "test -d {{.ROOT_DIR}}/.venv" }
|
||||||
- { msg: "Missing Makejinja config file", sh: "test -f {{.MAKEJINJA_CONFIG_FILE}}" }
|
- { msg: "Missing Makejinja config file", sh: "test -f {{.MAKEJINJA_CONFIG_FILE}}" }
|
||||||
- { msg: "Missing Makejinja plugin file", sh: "test -f {{.BOOTSTRAP_DIR}}/scripts/plugin.py" }
|
- { msg: "Missing Makejinja plugin file", sh: "test -f {{.BOOTSTRAP_DIR}}/scripts/plugin.py" }
|
||||||
- { msg: "Missing bootstrap addons file", sh: "test -f {{.BOOTSTRAP_ADDONS_FILE}}" }
|
|
||||||
- { msg: "Missing bootstrap config file", sh: "test -f {{.BOOTSTRAP_CONFIG_FILE}}" }
|
- { msg: "Missing bootstrap config file", sh: "test -f {{.BOOTSTRAP_CONFIG_FILE}}" }
|
||||||
|
|
||||||
.validate:
|
.validate:
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ from pathlib import Path
|
|||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from bcrypt import hashpw, gensalt
|
|
||||||
from netaddr import IPNetwork
|
from netaddr import IPNetwork
|
||||||
|
|
||||||
import makejinja
|
import makejinja
|
||||||
@@ -21,9 +20,6 @@ def nthhost(value: str, query: int) -> str:
|
|||||||
return False
|
return False
|
||||||
return value
|
return value
|
||||||
|
|
||||||
def encrypt(value: str) -> str:
|
|
||||||
return hashpw(value.encode(), gensalt(rounds=10)).decode("ascii")
|
|
||||||
|
|
||||||
def import_filter(file: Path) -> Callable[[dict[str, Any]], bool]:
|
def import_filter(file: Path) -> Callable[[dict[str, Any]], bool]:
|
||||||
module_path = file.relative_to(Path.cwd()).with_suffix("")
|
module_path = file.relative_to(Path.cwd()).with_suffix("")
|
||||||
module_name = str(module_path).replace("/", ".")
|
module_name = str(module_path).replace("/", ".")
|
||||||
@@ -50,7 +46,7 @@ class Plugin(makejinja.plugin.Plugin):
|
|||||||
validation.validate(data)
|
validation.validate(data)
|
||||||
|
|
||||||
def filters(self) -> makejinja.plugin.Filters:
|
def filters(self) -> makejinja.plugin.Filters:
|
||||||
return [nthhost, encrypt]
|
return [nthhost]
|
||||||
|
|
||||||
def path_filters(self):
|
def path_filters(self):
|
||||||
return [self._mjfilter_func]
|
return [self._mjfilter_func]
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
main = lambda data: data.get("addon_discord_template_notifier", {}).get("enabled", False) == True
|
|
||||||
-62
@@ -1,62 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2beta2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: discord-template-notifier
|
|
||||||
spec:
|
|
||||||
interval: 15m
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: app-template
|
|
||||||
version: 2.5.0
|
|
||||||
interval: 30m
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: bjw-s
|
|
||||||
namespace: flux-system
|
|
||||||
install:
|
|
||||||
createNamespace: true
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
upgrade:
|
|
||||||
cleanupOnFail: true
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
uninstall:
|
|
||||||
keepHistory: false
|
|
||||||
values:
|
|
||||||
controllers:
|
|
||||||
main:
|
|
||||||
annotations:
|
|
||||||
reloader.stakater.com/auto: "true"
|
|
||||||
containers:
|
|
||||||
main:
|
|
||||||
image:
|
|
||||||
repository: ghcr.io/morphy2k/rss-forwarder
|
|
||||||
tag: 0.6.1
|
|
||||||
env:
|
|
||||||
TZ: "${TIMEZONE}"
|
|
||||||
probes:
|
|
||||||
liveness: &disabled
|
|
||||||
enabled: false
|
|
||||||
readiness: *disabled
|
|
||||||
startup: *disabled
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 5m
|
|
||||||
memory: 10M
|
|
||||||
limits:
|
|
||||||
memory: 64M
|
|
||||||
service:
|
|
||||||
main: *disabled
|
|
||||||
ingress:
|
|
||||||
main: *disabled
|
|
||||||
persistence:
|
|
||||||
config:
|
|
||||||
enabled: true
|
|
||||||
type: secret
|
|
||||||
name: discord-template-notifier-secret
|
|
||||||
globalMounts:
|
|
||||||
- path: /data/config.toml
|
|
||||||
subPath: config.toml
|
|
||||||
readOnly: true
|
|
||||||
-6
@@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ./secret.sops.yaml
|
|
||||||
- ./helmrelease.yaml
|
|
||||||
-14
@@ -1,14 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Secret
|
|
||||||
metadata:
|
|
||||||
name: discord-template-notifier-secret
|
|
||||||
type: Opaque
|
|
||||||
stringData:
|
|
||||||
config.toml: |-
|
|
||||||
[feeds.github-template]
|
|
||||||
url = "https://github.com/onedr0p/flux-cluster-template/commits/main/.atom"
|
|
||||||
interval = "10m"
|
|
||||||
retry_limit = 5
|
|
||||||
sink.type = "discord"
|
|
||||||
sink.url = "#{ discord_template_notifier.webhook_url }#"
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
|
||||||
kind: Kustomization
|
|
||||||
metadata:
|
|
||||||
name: &app discord-template-notifier
|
|
||||||
namespace: flux-system
|
|
||||||
spec:
|
|
||||||
targetNamespace: default
|
|
||||||
commonMetadata:
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/name: *app
|
|
||||||
path: ./kubernetes/apps/default/discord-template-notifier/app
|
|
||||||
prune: true
|
|
||||||
sourceRef:
|
|
||||||
kind: GitRepository
|
|
||||||
name: home-kubernetes
|
|
||||||
wait: false
|
|
||||||
interval: 30m
|
|
||||||
retryInterval: 1m
|
|
||||||
timeout: 5m
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
main = lambda data: data.get("addon_homepage", {}).get("enabled", False) == True
|
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ConfigMap
|
|
||||||
metadata:
|
|
||||||
name: homepage-config
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/name: homepage
|
|
||||||
data:
|
|
||||||
bookmarks.yaml: |
|
|
||||||
- Communitcate:
|
|
||||||
- Discord:
|
|
||||||
- icon: discord.png
|
|
||||||
href: https://discord.com/app
|
|
||||||
- Media:
|
|
||||||
- YouTube:
|
|
||||||
- icon: youtube.png
|
|
||||||
href: https://youtube.com/feed/subscriptions
|
|
||||||
- Reading:
|
|
||||||
- Reddit:
|
|
||||||
- icon: reddit.png
|
|
||||||
href: https://reddit.com
|
|
||||||
- Git:
|
|
||||||
- kubesearch:
|
|
||||||
- icon: kubernetes-dashboard.png
|
|
||||||
href: https://kubesearch.dev
|
|
||||||
- flux-cluster-template:
|
|
||||||
- icon: github.png
|
|
||||||
href: https://github.com/onedr0p/flux-cluster-template
|
|
||||||
docker.yaml: ""
|
|
||||||
kubernetes.yaml: |
|
|
||||||
mode: cluster
|
|
||||||
services.yaml: |
|
|
||||||
- Network:
|
|
||||||
- Cloudflared:
|
|
||||||
href: https://dash.cloudflare.com
|
|
||||||
icon: cloudflare-zero-trust.png
|
|
||||||
description: Cloudflared Tunnel
|
|
||||||
widget:
|
|
||||||
type: cloudflared
|
|
||||||
accountid: "{{HOMEPAGE_VAR_CLOUDFLARED_ACCOUNTID}}"
|
|
||||||
tunnelid: "{{HOMEPAGE_VAR_CLOUDFLARED_TUNNELID}}"
|
|
||||||
key: "{{HOMEPAGE_VAR_CLOUDFLARED_API_TOKEN}}"
|
|
||||||
settings.yaml: |
|
|
||||||
title: Dashboard
|
|
||||||
theme: dark
|
|
||||||
color: slate
|
|
||||||
headerStyle: clean
|
|
||||||
layout:
|
|
||||||
Home:
|
|
||||||
style: column
|
|
||||||
icon: mdi-home-analytics
|
|
||||||
Network:
|
|
||||||
style: row
|
|
||||||
columns: 3
|
|
||||||
icon: mdi-server
|
|
||||||
Observability:
|
|
||||||
style: column
|
|
||||||
icon: mdi-chart-line
|
|
||||||
widgets.yaml: |
|
|
||||||
- resources:
|
|
||||||
backend: kubernetes
|
|
||||||
cpu: true
|
|
||||||
expanded: true
|
|
||||||
memory: true
|
|
||||||
- search:
|
|
||||||
provider: ["duckduckgo"]
|
|
||||||
focus: false
|
|
||||||
target: _blank
|
|
||||||
- greeting:
|
|
||||||
text_size: xl
|
|
||||||
text: "Welcome!"
|
|
||||||
- datetime:
|
|
||||||
text_size: l
|
|
||||||
format:
|
|
||||||
dateStyle: long
|
|
||||||
timeStyle: short
|
|
||||||
hourCycle: h23
|
|
||||||
@@ -1,87 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2beta2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: homepage
|
|
||||||
spec:
|
|
||||||
interval: 30m
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: app-template
|
|
||||||
version: 2.5.0
|
|
||||||
interval: 30m
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: bjw-s
|
|
||||||
namespace: flux-system
|
|
||||||
install:
|
|
||||||
createNamespace: true
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
upgrade:
|
|
||||||
cleanupOnFail: true
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
uninstall:
|
|
||||||
keepHistory: false
|
|
||||||
values:
|
|
||||||
controllers:
|
|
||||||
main:
|
|
||||||
annotations:
|
|
||||||
reloader.stakater.com/auto: "true"
|
|
||||||
containers:
|
|
||||||
main:
|
|
||||||
image:
|
|
||||||
repository: ghcr.io/gethomepage/homepage
|
|
||||||
tag: v0.8.6
|
|
||||||
env:
|
|
||||||
TZ: "${TIMEZONE}"
|
|
||||||
envFrom:
|
|
||||||
- secretRef:
|
|
||||||
name: homepage-secret
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 15m
|
|
||||||
memory: 250M
|
|
||||||
limits:
|
|
||||||
memory: 1G
|
|
||||||
service:
|
|
||||||
main:
|
|
||||||
ports:
|
|
||||||
http:
|
|
||||||
port: 3000
|
|
||||||
ingress:
|
|
||||||
main:
|
|
||||||
enabled: true
|
|
||||||
className: internal
|
|
||||||
hosts:
|
|
||||||
- host: &host home.${SECRET_DOMAIN}
|
|
||||||
paths:
|
|
||||||
- path: /
|
|
||||||
pathType: Prefix
|
|
||||||
service:
|
|
||||||
name: main
|
|
||||||
port: http
|
|
||||||
tls:
|
|
||||||
- hosts:
|
|
||||||
- *host
|
|
||||||
persistence:
|
|
||||||
config:
|
|
||||||
enabled: true
|
|
||||||
type: configMap
|
|
||||||
name: homepage-config
|
|
||||||
globalMounts:
|
|
||||||
- subPath: bookmarks.yaml
|
|
||||||
path: /app/config/bookmarks.yaml
|
|
||||||
- subPath: docker.yaml
|
|
||||||
path: /app/config/docker.yaml
|
|
||||||
- subPath: kubernetes.yaml
|
|
||||||
path: /app/config/kubernetes.yaml
|
|
||||||
- subPath: services.yaml
|
|
||||||
path: /app/config/services.yaml
|
|
||||||
- subPath: settings.yaml
|
|
||||||
path: /app/config/settings.yaml
|
|
||||||
- subPath: widgets.yaml
|
|
||||||
path: /app/config/widgets.yaml
|
|
||||||
serviceAccount:
|
|
||||||
create: true
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ./configmap.yaml
|
|
||||||
- ./helmrelease.yaml
|
|
||||||
- ./secret.sops.yaml
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Secret
|
|
||||||
metadata:
|
|
||||||
name: homepage-secret
|
|
||||||
stringData:
|
|
||||||
HOMEPAGE_VAR_CLOUDFLARED_ACCOUNTID: "#{ bootstrap_cloudflare_account_tag }#"
|
|
||||||
HOMEPAGE_VAR_CLOUDFLARED_TUNNELID: "#{ bootstrap_cloudflare_tunnel_id }#"
|
|
||||||
HOMEPAGE_VAR_CLOUDFLARED_API_TOKEN: "#{ bootstrap_cloudflare_token }#"
|
|
||||||
HOMEPAGE_VAR_GRAFANA_USERNAME: admin
|
|
||||||
HOMEPAGE_VAR_GRAFANA_PASSWORD: "#{ grafana.password }#"
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
|
||||||
kind: Kustomization
|
|
||||||
metadata:
|
|
||||||
name: &app homepage
|
|
||||||
namespace: flux-system
|
|
||||||
spec:
|
|
||||||
targetNamespace: default
|
|
||||||
commonMetadata:
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/name: *app
|
|
||||||
path: ./kubernetes/apps/default/homepage/app
|
|
||||||
prune: true
|
|
||||||
sourceRef:
|
|
||||||
kind: GitRepository
|
|
||||||
name: home-kubernetes
|
|
||||||
wait: false
|
|
||||||
interval: 30m
|
|
||||||
retryInterval: 1m
|
|
||||||
timeout: 5m
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ./namespace.yaml
|
|
||||||
#% if addon_homepage.enabled %#
|
|
||||||
- ./homepage/ks.yaml
|
|
||||||
#% endif %#
|
|
||||||
#% if addon_discord_template_notifier.enabled %#
|
|
||||||
- ./discord-template-notifier/ks.yaml
|
|
||||||
#% endif %#
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Namespace
|
|
||||||
metadata:
|
|
||||||
name: default
|
|
||||||
labels:
|
|
||||||
kustomize.toolkit.fluxcd.io/prune: disabled
|
|
||||||
@@ -4,6 +4,3 @@ kind: Kustomization
|
|||||||
resources:
|
resources:
|
||||||
- ./namespace.yaml
|
- ./namespace.yaml
|
||||||
- ./addons/ks.yaml
|
- ./addons/ks.yaml
|
||||||
#% if addon_weave_gitops.enabled %#
|
|
||||||
- ./weave-gitops/ks.yaml
|
|
||||||
#% endif %#
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
main = lambda data: data.get("addon_weave_gitops", {}).get("enabled", False) == True
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2beta2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: weave-gitops
|
|
||||||
spec:
|
|
||||||
interval: 30m
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: weave-gitops
|
|
||||||
version: 4.0.36
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: weave-gitops
|
|
||||||
namespace: flux-system
|
|
||||||
install:
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
upgrade:
|
|
||||||
cleanupOnFail: true
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
uninstall:
|
|
||||||
keepHistory: false
|
|
||||||
values:
|
|
||||||
adminUser:
|
|
||||||
create: true
|
|
||||||
createSecret: false
|
|
||||||
username: admin
|
|
||||||
ingress:
|
|
||||||
enabled: true
|
|
||||||
className: internal
|
|
||||||
#% if addon_homepage.enabled %#
|
|
||||||
annotations:
|
|
||||||
gethomepage.dev/enabled: "true"
|
|
||||||
gethomepage.dev/group: Home
|
|
||||||
gethomepage.dev/name: Weave-gitops
|
|
||||||
gethomepage.dev/icon: flux-cd.png
|
|
||||||
#% endif %#
|
|
||||||
hosts:
|
|
||||||
- host: &host "gitops.${SECRET_DOMAIN}"
|
|
||||||
paths:
|
|
||||||
- path: /
|
|
||||||
pathType: Prefix
|
|
||||||
tls:
|
|
||||||
- hosts:
|
|
||||||
- *host
|
|
||||||
networkPolicy:
|
|
||||||
create: false
|
|
||||||
metrics:
|
|
||||||
enabled: true
|
|
||||||
rbac:
|
|
||||||
create: true
|
|
||||||
impersonationResourceNames: ["admin"]
|
|
||||||
podAnnotations:
|
|
||||||
secret.reloader.stakater.com/reload: cluster-user-auth
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ./secret.sops.yaml
|
|
||||||
- ./helmrelease.yaml
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Secret
|
|
||||||
metadata:
|
|
||||||
name: cluster-user-auth
|
|
||||||
type: Opaque
|
|
||||||
stringData:
|
|
||||||
username: admin
|
|
||||||
password: "#{ addon_weave_gitops.password | encrypt }#"
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
|
||||||
kind: Kustomization
|
|
||||||
metadata:
|
|
||||||
name: &app weave-gitops
|
|
||||||
namespace: flux-system
|
|
||||||
spec:
|
|
||||||
targetNamespace: flux-system
|
|
||||||
commonMetadata:
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/name: *app
|
|
||||||
path: ./kubernetes/apps/flux-system/weave-gitops/app
|
|
||||||
prune: true
|
|
||||||
sourceRef:
|
|
||||||
kind: GitRepository
|
|
||||||
name: home-kubernetes
|
|
||||||
wait: false
|
|
||||||
interval: 30m
|
|
||||||
retryInterval: 1m
|
|
||||||
timeout: 5m
|
|
||||||
File renamed without changes.
File renamed without changes.
+2
-2
@@ -5,11 +5,11 @@ metadata:
|
|||||||
name: &app reloader
|
name: &app reloader
|
||||||
namespace: flux-system
|
namespace: flux-system
|
||||||
spec:
|
spec:
|
||||||
targetNamespace: tools
|
targetNamespace: kube-system
|
||||||
commonMetadata:
|
commonMetadata:
|
||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/name: *app
|
app.kubernetes.io/name: *app
|
||||||
path: ./kubernetes/apps/tools/reloader/app
|
path: ./kubernetes/apps/kube-system/reloader/app
|
||||||
prune: true
|
prune: true
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: GitRepository
|
kind: GitRepository
|
||||||
@@ -1 +0,0 @@
|
|||||||
main = lambda data: data.get("bootstrap_distribution") in ['k0s', 'k3s'] and data.get("addon_longhorn", {}).get("enabled", False) == True
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2beta2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: longhorn
|
|
||||||
spec:
|
|
||||||
interval: 30m
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: longhorn
|
|
||||||
version: 1.5.3
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: longhorn
|
|
||||||
namespace: flux-system
|
|
||||||
install:
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
upgrade:
|
|
||||||
cleanupOnFail: true
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
uninstall:
|
|
||||||
keepHistory: false
|
|
||||||
values:
|
|
||||||
monitoring:
|
|
||||||
enabled: true
|
|
||||||
createPrometheusRules: true
|
|
||||||
defaultSettings:
|
|
||||||
defaultReplicaCount: 3
|
|
||||||
backupstorePollInterval: 0
|
|
||||||
createDefaultDiskLabeledNodes: true
|
|
||||||
restoreVolumeRecurringJobs: true
|
|
||||||
storageOverProvisioningPercentage: 100
|
|
||||||
storageMinimalAvailablePercentage: 1
|
|
||||||
guaranteedEngineManagerCPU: 20
|
|
||||||
guaranteedReplicaManagerCPU: 20
|
|
||||||
orphanAutoDeletion: true
|
|
||||||
concurrentAutomaticEngineUpgradePerNodeLimit: 3
|
|
||||||
defaultLonghornStaticStorageClass: longhorn
|
|
||||||
nodeDownPodDeletionPolicy: delete-both-statefulset-and-deployment-pod
|
|
||||||
ingress:
|
|
||||||
enabled: true
|
|
||||||
ingressClassName: internal
|
|
||||||
host: longhorn.${SECRET_DOMAIN}
|
|
||||||
tls: true
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ./helmrelease.yaml
|
|
||||||
- ./snapshot.yaml
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: storage.k8s.io/v1
|
|
||||||
kind: StorageClass
|
|
||||||
reclaimPolicy: Delete
|
|
||||||
provisioner: driver.longhorn.io
|
|
||||||
parameters:
|
|
||||||
dataLocality: disabled
|
|
||||||
numberOfReplicas: "1" # Faster restores from the snapshotclass
|
|
||||||
replicaAutoBalance: best-effort
|
|
||||||
staleReplicaTimeout: "30"
|
|
||||||
allowVolumeExpansion: true
|
|
||||||
volumeBindingMode: Immediate
|
|
||||||
metadata:
|
|
||||||
name: longhorn-snapshot
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
|
||||||
kind: Kustomization
|
|
||||||
metadata:
|
|
||||||
name: &app longhorn
|
|
||||||
namespace: flux-system
|
|
||||||
spec:
|
|
||||||
targetNamespace: longhorn-system
|
|
||||||
commonMetadata:
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/name: *app
|
|
||||||
path: ./kubernetes/apps/longhorn-system/longhorn/app
|
|
||||||
prune: true
|
|
||||||
sourceRef:
|
|
||||||
kind: GitRepository
|
|
||||||
name: home-kubernetes
|
|
||||||
wait: false
|
|
||||||
interval: 30m
|
|
||||||
retryInterval: 1m
|
|
||||||
timeout: 5m
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Namespace
|
|
||||||
metadata:
|
|
||||||
name: longhorn-system
|
|
||||||
labels:
|
|
||||||
kustomize.toolkit.fluxcd.io/prune: disabled
|
|
||||||
@@ -70,12 +70,6 @@ spec:
|
|||||||
className: external
|
className: external
|
||||||
annotations:
|
annotations:
|
||||||
external-dns.alpha.kubernetes.io/target: "external.${SECRET_DOMAIN}"
|
external-dns.alpha.kubernetes.io/target: "external.${SECRET_DOMAIN}"
|
||||||
#% if addon_homepage.enabled %#
|
|
||||||
gethomepage.dev/enabled: "true"
|
|
||||||
gethomepage.dev/group: Network
|
|
||||||
gethomepage.dev/name: Echo Server
|
|
||||||
gethomepage.dev/icon: mdi-video-input-antenna
|
|
||||||
#% endif %#
|
|
||||||
hosts:
|
hosts:
|
||||||
- host: &host "{{ .Release.Name }}.${SECRET_DOMAIN}"
|
- host: &host "{{ .Release.Name }}.${SECRET_DOMAIN}"
|
||||||
paths:
|
paths:
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
main = lambda data: data.get("addon_grafana", {}).get("enabled", False) == True
|
|
||||||
@@ -1,181 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2beta2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: grafana
|
|
||||||
spec:
|
|
||||||
interval: 30m
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: grafana
|
|
||||||
version: 7.2.4
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: grafana
|
|
||||||
namespace: flux-system
|
|
||||||
install:
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
upgrade:
|
|
||||||
cleanupOnFail: true
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
uninstall:
|
|
||||||
keepHistory: false
|
|
||||||
dependsOn:
|
|
||||||
- name: openebs
|
|
||||||
namespace: storage
|
|
||||||
values:
|
|
||||||
deploymentStrategy:
|
|
||||||
type: Recreate
|
|
||||||
admin:
|
|
||||||
existingSecret: grafana-admin-secret
|
|
||||||
env:
|
|
||||||
GF_EXPLORE_ENABLED: true
|
|
||||||
GF_SERVER_ROOT_URL: "https://grafana.${SECRET_DOMAIN}"
|
|
||||||
grafana.ini:
|
|
||||||
analytics:
|
|
||||||
check_for_updates: false
|
|
||||||
check_for_plugin_updates: false
|
|
||||||
reporting_enabled: false
|
|
||||||
dashboardProviders:
|
|
||||||
dashboardproviders.yaml:
|
|
||||||
apiVersion: 1
|
|
||||||
providers:
|
|
||||||
- name: default
|
|
||||||
orgId: 1
|
|
||||||
folder: ""
|
|
||||||
type: file
|
|
||||||
disableDeletion: false
|
|
||||||
editable: true
|
|
||||||
options:
|
|
||||||
path: /var/lib/grafana/dashboards/default
|
|
||||||
- name: flux
|
|
||||||
orgId: 1
|
|
||||||
folder: Flux
|
|
||||||
type: file
|
|
||||||
disableDeletion: false
|
|
||||||
editable: true
|
|
||||||
options:
|
|
||||||
path: /var/lib/grafana/dashboards/flux
|
|
||||||
- name: kubernetes
|
|
||||||
orgId: 1
|
|
||||||
folder: Kubernetes
|
|
||||||
type: file
|
|
||||||
disableDeletion: false
|
|
||||||
editable: true
|
|
||||||
options:
|
|
||||||
path: /var/lib/grafana/dashboards/kubernetes
|
|
||||||
- name: nginx
|
|
||||||
orgId: 1
|
|
||||||
folder: Nginx
|
|
||||||
type: file
|
|
||||||
disableDeletion: false
|
|
||||||
editable: true
|
|
||||||
options:
|
|
||||||
path: /var/lib/grafana/dashboards/nginx
|
|
||||||
datasources:
|
|
||||||
datasources.yaml:
|
|
||||||
apiVersion: 1
|
|
||||||
deleteDatasources:
|
|
||||||
- { name: Prometheus, orgId: 1 }
|
|
||||||
datasources:
|
|
||||||
- name: Prometheus
|
|
||||||
type: prometheus
|
|
||||||
uid: prometheus
|
|
||||||
access: proxy
|
|
||||||
url: http://kube-prometheus-stack-prometheus.observability.svc.cluster.local:9090
|
|
||||||
jsonData:
|
|
||||||
prometheusType: Prometheus
|
|
||||||
isDefault: true
|
|
||||||
dashboards:
|
|
||||||
default:
|
|
||||||
cloudflared:
|
|
||||||
gnetId: 17457 # https://grafana.com/grafana/dashboards/17457?tab=revisions
|
|
||||||
revision: 6
|
|
||||||
datasource:
|
|
||||||
- { name: DS_PROMETHEUS, value: Prometheus }
|
|
||||||
external-dns:
|
|
||||||
gnetId: 15038 # https://grafana.com/grafana/dashboards/15038?tab=revisions
|
|
||||||
revision: 1
|
|
||||||
datasource: Prometheus
|
|
||||||
cert-manager:
|
|
||||||
url: https://raw.githubusercontent.com/monitoring-mixins/website/master/assets/cert-manager/dashboards/cert-manager.json
|
|
||||||
datasource: Prometheus
|
|
||||||
node-exporter-full:
|
|
||||||
gnetId: 1860 # https://grafana.com/grafana/dashboards/1860?tab=revisions
|
|
||||||
revision: 31
|
|
||||||
datasource: Prometheus
|
|
||||||
flux:
|
|
||||||
flux-cluster:
|
|
||||||
url: https://raw.githubusercontent.com/fluxcd/flux2-monitoring-example/main/monitoring/configs/dashboards/cluster.json
|
|
||||||
datasource: Prometheus
|
|
||||||
flux-control-plane:
|
|
||||||
url: https://raw.githubusercontent.com/fluxcd/flux2-monitoring-example/main/monitoring/configs/dashboards/control-plane.json
|
|
||||||
datasource: Prometheus
|
|
||||||
kubernetes:
|
|
||||||
kubernetes-api-server:
|
|
||||||
url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-system-api-server.json
|
|
||||||
datasource: Prometheus
|
|
||||||
kubernetes-coredns:
|
|
||||||
url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-system-coredns.json
|
|
||||||
datasource: Prometheus
|
|
||||||
kubernetes-global:
|
|
||||||
url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-views-global.json
|
|
||||||
datasource: Prometheus
|
|
||||||
kubernetes-namespaces:
|
|
||||||
url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-views-namespaces.json
|
|
||||||
datasource: Prometheus
|
|
||||||
kubernetes-nodes:
|
|
||||||
url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-views-nodes.json
|
|
||||||
datasource: Prometheus
|
|
||||||
kubernetes-pods:
|
|
||||||
url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-views-pods.json
|
|
||||||
datasource: Prometheus
|
|
||||||
nginx:
|
|
||||||
nginx:
|
|
||||||
url: https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/grafana/dashboards/nginx.json
|
|
||||||
datasource: Prometheus
|
|
||||||
nginx-request-handling-performance:
|
|
||||||
url: https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/grafana/dashboards/request-handling-performance.json
|
|
||||||
datasource: Prometheus
|
|
||||||
sidecar:
|
|
||||||
dashboards:
|
|
||||||
enabled: true
|
|
||||||
searchNamespace: ALL
|
|
||||||
labelValue: ""
|
|
||||||
label: grafana_dashboard
|
|
||||||
folderAnnotation: grafana_folder
|
|
||||||
provider:
|
|
||||||
disableDelete: true
|
|
||||||
foldersFromFilesStructure: true
|
|
||||||
datasources:
|
|
||||||
enabled: true
|
|
||||||
searchNamespace: ALL
|
|
||||||
labelValue: ""
|
|
||||||
serviceMonitor:
|
|
||||||
enabled: true
|
|
||||||
ingress:
|
|
||||||
enabled: true
|
|
||||||
ingressClassName: internal
|
|
||||||
#% if addon_homepage.enabled %#
|
|
||||||
annotations:
|
|
||||||
gethomepage.dev/enabled: "true"
|
|
||||||
gethomepage.dev/icon: grafana.png
|
|
||||||
gethomepage.dev/name: Grafana
|
|
||||||
gethomepage.dev/group: Observability
|
|
||||||
gethomepage.dev/widget.type: grafana
|
|
||||||
gethomepage.dev/widget.url: http://grafana.observability
|
|
||||||
gethomepage.dev/widget.username: "{{`{{HOMEPAGE_VAR_GRAFANA_USERNAME}}`}}"
|
|
||||||
gethomepage.dev/widget.password: "{{`{{HOMEPAGE_VAR_GRAFANA_PASSWORD}}`}}"
|
|
||||||
#% endif %#
|
|
||||||
hosts:
|
|
||||||
- &host "grafana.${SECRET_DOMAIN}"
|
|
||||||
tls:
|
|
||||||
- hosts:
|
|
||||||
- *host
|
|
||||||
persistence:
|
|
||||||
enabled: true
|
|
||||||
storageClassName: openebs-hostpath
|
|
||||||
testFramework:
|
|
||||||
enabled: false
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ./secret.sops.yaml
|
|
||||||
- ./helmrelease.yaml
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Secret
|
|
||||||
metadata:
|
|
||||||
name: grafana-admin-secret
|
|
||||||
stringData:
|
|
||||||
admin-user: admin
|
|
||||||
admin-password: "#{ grafana.password }#"
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
|
||||||
kind: Kustomization
|
|
||||||
metadata:
|
|
||||||
name: &app grafana
|
|
||||||
namespace: flux-system
|
|
||||||
spec:
|
|
||||||
targetNamespace: observability
|
|
||||||
commonMetadata:
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/name: *app
|
|
||||||
path: ./kubernetes/apps/observability/grafana/app
|
|
||||||
prune: true
|
|
||||||
sourceRef:
|
|
||||||
kind: GitRepository
|
|
||||||
name: home-kubernetes
|
|
||||||
wait: false
|
|
||||||
interval: 30m
|
|
||||||
retryInterval: 1m
|
|
||||||
timeout: 5m
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
main = lambda data: data.get("addon_kube_prometheus_stack", {}).get("enabled", False) == True
|
|
||||||
-160
@@ -1,160 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2beta2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: kube-prometheus-stack
|
|
||||||
spec:
|
|
||||||
interval: 30m
|
|
||||||
timeout: 15m
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: kube-prometheus-stack
|
|
||||||
version: 56.0.3
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: prometheus-community
|
|
||||||
namespace: flux-system
|
|
||||||
install:
|
|
||||||
crds: CreateReplace
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
upgrade:
|
|
||||||
cleanupOnFail: true
|
|
||||||
crds: CreateReplace
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
uninstall:
|
|
||||||
keepHistory: false
|
|
||||||
dependsOn:
|
|
||||||
- name: openebs
|
|
||||||
namespace: storage
|
|
||||||
values:
|
|
||||||
crds:
|
|
||||||
enabled: true
|
|
||||||
cleanPrometheusOperatorObjectNames: true
|
|
||||||
alertmanager:
|
|
||||||
enabled: false
|
|
||||||
kube-state-metrics:
|
|
||||||
metricLabelsAllowlist:
|
|
||||||
- "deployments=[*]"
|
|
||||||
- "persistentvolumeclaims=[*]"
|
|
||||||
- "pods=[*]"
|
|
||||||
prometheus:
|
|
||||||
monitor:
|
|
||||||
enabled: true
|
|
||||||
relabelings:
|
|
||||||
- action: replace
|
|
||||||
sourceLabels: ["__meta_kubernetes_pod_node_name"]
|
|
||||||
regex: ^(.*)$
|
|
||||||
replacement: $1
|
|
||||||
targetLabel: kubernetes_node
|
|
||||||
kubelet:
|
|
||||||
enabled: true
|
|
||||||
serviceMonitor:
|
|
||||||
metricRelabelings:
|
|
||||||
#% if bootstrap_distribution in ['k3s'] %#
|
|
||||||
# Remove duplicate labels provided by k3s
|
|
||||||
- action: keep
|
|
||||||
sourceLabels: ["__name__"]
|
|
||||||
regex: (apiserver_audit|apiserver_client|apiserver_delegated|apiserver_envelope|apiserver_storage|apiserver_webhooks|authentication_token|cadvisor_version|container_blkio|container_cpu|container_fs|container_last|container_memory|container_network|container_oom|container_processes|container|csi_operations|disabled_metric|get_token|go|hidden_metric|kubelet_certificate|kubelet_cgroup|kubelet_container|kubelet_containers|kubelet_cpu|kubelet_device|kubelet_graceful|kubelet_http|kubelet_lifecycle|kubelet_managed|kubelet_node|kubelet_pleg|kubelet_pod|kubelet_run|kubelet_running|kubelet_runtime|kubelet_server|kubelet_started|kubelet_volume|kubernetes_build|kubernetes_feature|machine_cpu|machine_memory|machine_nvm|machine_scrape|node_namespace|plugin_manager|prober_probe|process_cpu|process_max|process_open|process_resident|process_start|process_virtual|registered_metric|rest_client|scrape_duration|scrape_samples|scrape_series|storage_operation|volume_manager|volume_operation|workqueue)_(.+)
|
|
||||||
- action: replace
|
|
||||||
sourceLabels: ["node"]
|
|
||||||
targetLabel: instance
|
|
||||||
#% endif %#
|
|
||||||
# Drop high cardinality labels
|
|
||||||
- action: labeldrop
|
|
||||||
regex: (uid)
|
|
||||||
- action: labeldrop
|
|
||||||
regex: (id|name)
|
|
||||||
- action: drop
|
|
||||||
sourceLabels: ["__name__"]
|
|
||||||
regex: (rest_client_request_duration_seconds_bucket|rest_client_request_duration_seconds_sum|rest_client_request_duration_seconds_count)
|
|
||||||
kubeApiServer:
|
|
||||||
enabled: true
|
|
||||||
serviceMonitor:
|
|
||||||
metricRelabelings:
|
|
||||||
#% if bootstrap_distribution in ['k3s'] %#
|
|
||||||
# Remove duplicate labels provided by k3s
|
|
||||||
- action: keep
|
|
||||||
sourceLabels: ["__name__"]
|
|
||||||
regex: (aggregator_openapi|aggregator_unavailable|apiextensions_openapi|apiserver_admission|apiserver_audit|apiserver_cache|apiserver_cel|apiserver_client|apiserver_crd|apiserver_current|apiserver_envelope|apiserver_flowcontrol|apiserver_init|apiserver_kube|apiserver_longrunning|apiserver_request|apiserver_requested|apiserver_response|apiserver_selfrequest|apiserver_storage|apiserver_terminated|apiserver_tls|apiserver_watch|apiserver_webhooks|authenticated_user|authentication|disabled_metric|etcd_bookmark|etcd_lease|etcd_request|field_validation|get_token|go|grpc_client|hidden_metric|kube_apiserver|kubernetes_build|kubernetes_feature|node_authorizer|pod_security|process_cpu|process_max|process_open|process_resident|process_start|process_virtual|registered_metric|rest_client|scrape_duration|scrape_samples|scrape_series|serviceaccount_legacy|serviceaccount_stale|serviceaccount_valid|watch_cache|workqueue)_(.+)
|
|
||||||
#% endif %#
|
|
||||||
# Drop high cardinality labels
|
|
||||||
- action: drop
|
|
||||||
sourceLabels: ["__name__"]
|
|
||||||
regex: (apiserver|etcd|rest_client)_request(|_sli|_slo)_duration_seconds_bucket
|
|
||||||
- action: drop
|
|
||||||
sourceLabels: ["__name__"]
|
|
||||||
regex: (apiserver_response_sizes_bucket|apiserver_watch_events_sizes_bucket)
|
|
||||||
kubeControllerManager:
|
|
||||||
enabled: true
|
|
||||||
endpoints: &endpoints
|
|
||||||
#% for item in bootstrap_nodes.master %#
|
|
||||||
- "#{ item.address }#"
|
|
||||||
#% endfor %#
|
|
||||||
#% if bootstrap_distribution in ['k3s'] %#
|
|
||||||
serviceMonitor:
|
|
||||||
metricRelabelings:
|
|
||||||
# Remove duplicate labels provided by k3s
|
|
||||||
- action: keep
|
|
||||||
sourceLabels: ["__name__"]
|
|
||||||
regex: "(apiserver_audit|apiserver_client|apiserver_delegated|apiserver_envelope|apiserver_storage|apiserver_webhooks|attachdetach_controller|authenticated_user|authentication|cronjob_controller|disabled_metric|endpoint_slice|ephemeral_volume|garbagecollector_controller|get_token|go|hidden_metric|job_controller|kubernetes_build|kubernetes_feature|leader_election|node_collector|node_ipam|process_cpu|process_max|process_open|process_resident|process_start|process_virtual|pv_collector|registered_metric|replicaset_controller|rest_client|retroactive_storageclass|root_ca|running_managed|scrape_duration|scrape_samples|scrape_series|service_controller|storage_count|storage_operation|ttl_after|volume_operation|workqueue)_(.+)"
|
|
||||||
#% endif %#
|
|
||||||
kubeEtcd:
|
|
||||||
enabled: true
|
|
||||||
endpoints: *endpoints
|
|
||||||
kubeScheduler:
|
|
||||||
enabled: true
|
|
||||||
endpoints: *endpoints
|
|
||||||
#% if bootstrap_distribution in ['k3s'] %#
|
|
||||||
serviceMonitor:
|
|
||||||
metricRelabelings:
|
|
||||||
# Remove duplicate labels provided by k3s
|
|
||||||
- action: keep
|
|
||||||
sourceLabels: ["__name__"]
|
|
||||||
regex: "(apiserver_audit|apiserver_client|apiserver_delegated|apiserver_envelope|apiserver_storage|apiserver_webhooks|authenticated_user|authentication|disabled_metric|go|hidden_metric|kubernetes_build|kubernetes_feature|leader_election|process_cpu|process_max|process_open|process_resident|process_start|process_virtual|registered_metric|rest_client|scheduler|scrape_duration|scrape_samples|scrape_series|workqueue)_(.+)"
|
|
||||||
#% endif %#
|
|
||||||
kubeProxy:
|
|
||||||
enabled: false # Disabled due to eBPF
|
|
||||||
prometheus:
|
|
||||||
ingress:
|
|
||||||
enabled: true
|
|
||||||
ingressClassName: internal
|
|
||||||
#% if addon_homepage.enabled %#
|
|
||||||
annotations:
|
|
||||||
gethomepage.dev/enabled: "true"
|
|
||||||
gethomepage.dev/icon: prometheus.png
|
|
||||||
gethomepage.dev/name: Prometheus
|
|
||||||
gethomepage.dev/group: Observability
|
|
||||||
gethomepage.dev/widget.type: prometheus
|
|
||||||
#% endif %#
|
|
||||||
pathType: Prefix
|
|
||||||
hosts:
|
|
||||||
- "prometheus.${SECRET_DOMAIN}"
|
|
||||||
tls:
|
|
||||||
- hosts:
|
|
||||||
- "prometheus.${SECRET_DOMAIN}"
|
|
||||||
prometheusSpec:
|
|
||||||
ruleSelectorNilUsesHelmValues: false
|
|
||||||
serviceMonitorSelectorNilUsesHelmValues: false
|
|
||||||
podMonitorSelectorNilUsesHelmValues: false
|
|
||||||
probeSelectorNilUsesHelmValues: false
|
|
||||||
scrapeConfigSelectorNilUsesHelmValues: false
|
|
||||||
enableAdminAPI: true
|
|
||||||
walCompression: true
|
|
||||||
retentionSize: 8GB
|
|
||||||
storageSpec:
|
|
||||||
volumeClaimTemplate:
|
|
||||||
spec:
|
|
||||||
storageClassName: openebs-hostpath
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 10Gi
|
|
||||||
grafana:
|
|
||||||
enabled: false
|
|
||||||
forceDeployDashboards: true
|
|
||||||
sidecar:
|
|
||||||
dashboards:
|
|
||||||
multicluster:
|
|
||||||
etcd:
|
|
||||||
enabled: true
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
|
||||||
kind: Kustomization
|
|
||||||
metadata:
|
|
||||||
name: &app kube-prometheus-stack
|
|
||||||
namespace: flux-system
|
|
||||||
spec:
|
|
||||||
targetNamespace: observability
|
|
||||||
commonMetadata:
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/name: *app
|
|
||||||
path: ./kubernetes/apps/observability/kube-prometheus-stack/app
|
|
||||||
prune: true
|
|
||||||
sourceRef:
|
|
||||||
kind: GitRepository
|
|
||||||
name: home-kubernetes
|
|
||||||
wait: false
|
|
||||||
interval: 30m
|
|
||||||
retryInterval: 1m
|
|
||||||
timeout: 5m
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
main = lambda data: data.get("addon_kubernetes_dashboard", {}).get("enabled", False) == True
|
|
||||||
-46
@@ -1,46 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2beta2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: kubernetes-dashboard
|
|
||||||
spec:
|
|
||||||
interval: 30m
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: kubernetes-dashboard
|
|
||||||
version: 6.0.8
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: kubernetes-dashboard
|
|
||||||
namespace: flux-system
|
|
||||||
install:
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
upgrade:
|
|
||||||
cleanupOnFail: true
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
uninstall:
|
|
||||||
keepHistory: false
|
|
||||||
values:
|
|
||||||
extraArgs:
|
|
||||||
- --enable-insecure-login
|
|
||||||
- --enable-skip-login
|
|
||||||
- --disable-settings-authorizer
|
|
||||||
ingress:
|
|
||||||
enabled: true
|
|
||||||
className: internal
|
|
||||||
#% if addon_homepage.enabled %#
|
|
||||||
annotations:
|
|
||||||
gethomepage.dev/enabled: "true"
|
|
||||||
gethomepage.dev/icon: kubernetes-dashboard.png
|
|
||||||
gethomepage.dev/name: Kubernetes Dashboard
|
|
||||||
gethomepage.dev/group: Observability
|
|
||||||
#% endif %#
|
|
||||||
hosts:
|
|
||||||
- &host "kubernetes.${SECRET_DOMAIN}"
|
|
||||||
tls:
|
|
||||||
- hosts:
|
|
||||||
- *host
|
|
||||||
metricsScraper:
|
|
||||||
enabled: true
|
|
||||||
-6
@@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ./rbac.yaml
|
|
||||||
- ./helmrelease.yaml
|
|
||||||
-39
@@ -1,39 +0,0 @@
|
|||||||
# For dashboard sign in token:
|
|
||||||
# kubectl -n observability get secret kubernetes-dashboard -o jsonpath='{.data.token}' | base64 -d
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: kubernetes-dashboard
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/managed-by: Helm
|
|
||||||
annotations:
|
|
||||||
meta.helm.sh/release-name: kubernetes-dashboard
|
|
||||||
meta.helm.sh/release-namespace: observability
|
|
||||||
secrets:
|
|
||||||
- name: kubernetes-dashboard
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Secret
|
|
||||||
type: kubernetes.io/service-account-token
|
|
||||||
metadata:
|
|
||||||
name: kubernetes-dashboard
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/managed-by: Helm
|
|
||||||
annotations:
|
|
||||||
meta.helm.sh/release-name: kubernetes-dashboard
|
|
||||||
meta.helm.sh/release-namespace: observability
|
|
||||||
kubernetes.io/service-account.name: kubernetes-dashboard
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRoleBinding
|
|
||||||
metadata:
|
|
||||||
name: system:kubernetes-dashboard
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: ClusterRole
|
|
||||||
name: cluster-admin
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: kubernetes-dashboard
|
|
||||||
namespace: observability
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
|
||||||
kind: Kustomization
|
|
||||||
metadata:
|
|
||||||
name: &app kubernetes-dashboard
|
|
||||||
namespace: flux-system
|
|
||||||
spec:
|
|
||||||
targetNamespace: observability
|
|
||||||
commonMetadata:
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/name: *app
|
|
||||||
dependsOn:
|
|
||||||
- name: cert-manager
|
|
||||||
- name: metrics-server
|
|
||||||
path: ./kubernetes/apps/observability/kubernetes-dashboard/app
|
|
||||||
prune: true
|
|
||||||
sourceRef:
|
|
||||||
kind: GitRepository
|
|
||||||
name: home-kubernetes
|
|
||||||
wait: false
|
|
||||||
interval: 30m
|
|
||||||
retryInterval: 1m
|
|
||||||
timeout: 5m
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ./namespace.yaml
|
|
||||||
#% if addon_grafana.enabled %#
|
|
||||||
- ./grafana/ks.yaml
|
|
||||||
#% endif %#
|
|
||||||
#% if addon_kube_prometheus_stack.enabled %#
|
|
||||||
- ./kube-prometheus-stack/ks.yaml
|
|
||||||
#% endif %#
|
|
||||||
#% if addon_kubernetes_dashboard.enabled %#
|
|
||||||
- ./kubernetes-dashboard/ks.yaml
|
|
||||||
#% endif %#
|
|
||||||
+1
-1
@@ -3,4 +3,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
|||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
resources:
|
resources:
|
||||||
- ./namespace.yaml
|
- ./namespace.yaml
|
||||||
- ./longhorn/ks.yaml
|
- ./openebs/ks.yaml
|
||||||
+1
-1
@@ -2,6 +2,6 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Namespace
|
kind: Namespace
|
||||||
metadata:
|
metadata:
|
||||||
name: observability
|
name: openebs-system
|
||||||
labels:
|
labels:
|
||||||
kustomize.toolkit.fluxcd.io/prune: disabled
|
kustomize.toolkit.fluxcd.io/prune: disabled
|
||||||
File renamed without changes.
File renamed without changes.
+2
-2
@@ -5,11 +5,11 @@ metadata:
|
|||||||
name: &app openebs
|
name: &app openebs
|
||||||
namespace: flux-system
|
namespace: flux-system
|
||||||
spec:
|
spec:
|
||||||
targetNamespace: storage
|
targetNamespace: openebs-system
|
||||||
commonMetadata:
|
commonMetadata:
|
||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/name: *app
|
app.kubernetes.io/name: *app
|
||||||
path: ./kubernetes/apps/storage/openebs/app
|
path: ./kubernetes/apps/openebs-system/openebs/app
|
||||||
prune: true
|
prune: true
|
||||||
sourceRef:
|
sourceRef:
|
||||||
kind: GitRepository
|
kind: GitRepository
|
||||||
@@ -1 +0,0 @@
|
|||||||
main = lambda data: data.get("addon_csi_driver_nfs", {}).get("enabled", False) == True
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2beta2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: csi-driver-nfs
|
|
||||||
spec:
|
|
||||||
interval: 30m
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: csi-driver-nfs
|
|
||||||
version: v4.6.0
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: csi-driver-nfs
|
|
||||||
namespace: flux-system
|
|
||||||
install:
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
upgrade:
|
|
||||||
cleanupOnFail: true
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
uninstall:
|
|
||||||
keepHistory: false
|
|
||||||
values:
|
|
||||||
externalSnapshotter:
|
|
||||||
enabled: false
|
|
||||||
#% if bootstrap_distribution in ['k0s'] %#
|
|
||||||
kubeletDir: /var/lib/k0s/kubelet
|
|
||||||
#% endif %#
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ./helmrelease.yaml
|
|
||||||
#% if addon_csi_driver_nfs.storage_class|length > 0 %#
|
|
||||||
- ./storageclass.yaml
|
|
||||||
#% endif %#
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
#% for item in addon_csi_driver_nfs.storage_class %#
|
|
||||||
---
|
|
||||||
apiVersion: storage.k8s.io/v1
|
|
||||||
kind: StorageClass
|
|
||||||
metadata:
|
|
||||||
name: "#{ item.name }#"
|
|
||||||
provisioner: nfs.csi.k8s.io
|
|
||||||
parameters:
|
|
||||||
server: "#{ item.server }#"
|
|
||||||
share: "#{ item.share }#"
|
|
||||||
reclaimPolicy: Delete
|
|
||||||
volumeBindingMode: Immediate
|
|
||||||
mountOptions: ["hard", "noatime"]
|
|
||||||
#% endfor %#
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
|
||||||
kind: Kustomization
|
|
||||||
metadata:
|
|
||||||
name: &app csi-driver-nfs
|
|
||||||
namespace: flux-system
|
|
||||||
spec:
|
|
||||||
targetNamespace: storage
|
|
||||||
commonMetadata:
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/name: *app
|
|
||||||
path: ./kubernetes/apps/storage/csi-driver-nfs/app
|
|
||||||
prune: true
|
|
||||||
sourceRef:
|
|
||||||
kind: GitRepository
|
|
||||||
name: home-kubernetes
|
|
||||||
wait: true
|
|
||||||
interval: 30m
|
|
||||||
retryInterval: 1m
|
|
||||||
timeout: 5m
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
main = lambda data: data.get("addon_csi_driver_smb", {}).get("enabled", False) == True
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2beta2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: csi-driver-smb
|
|
||||||
spec:
|
|
||||||
interval: 30m
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: csi-driver-smb
|
|
||||||
version: v1.13.0
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: csi-driver-smb
|
|
||||||
namespace: flux-system
|
|
||||||
install:
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
upgrade:
|
|
||||||
cleanupOnFail: true
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
uninstall:
|
|
||||||
keepHistory: false
|
|
||||||
values:
|
|
||||||
linux:
|
|
||||||
#% if bootstrap_distribution in ['k0s'] %#
|
|
||||||
kubelet: /var/lib/k0s/kubelet
|
|
||||||
#% else %#
|
|
||||||
kubelet: /var/lib/kubelet
|
|
||||||
#% endif %#
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ./helmrelease.yaml
|
|
||||||
#% if addon_csi_driver_smb.storage_class|length > 0 %#
|
|
||||||
- ./storageclass.yaml
|
|
||||||
#% endif %#
|
|
||||||
#% if addon_csi_driver_smb.create_secrets|default(true) %#
|
|
||||||
- ./secrets.sops.yaml
|
|
||||||
#% endif %#
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
#% if addon_csi_driver_smb.create_secrets|default(true) %#
|
|
||||||
#% for item in addon_csi_driver_smb.storage_class %#
|
|
||||||
#% if not item.existing_secret_name %#
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Secret
|
|
||||||
metadata:
|
|
||||||
name: "#{ item.name }#-secret"
|
|
||||||
stringData:
|
|
||||||
username: "#{ item.username }#"
|
|
||||||
password: "#{ item.password }#"
|
|
||||||
#% endif %#
|
|
||||||
#% endfor %#
|
|
||||||
#% endif %#
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
#% for item in addon_csi_driver_smb.storage_class %#
|
|
||||||
---
|
|
||||||
apiVersion: storage.k8s.io/v1
|
|
||||||
kind: StorageClass
|
|
||||||
metadata:
|
|
||||||
name: "#{ item.name }#"
|
|
||||||
provisioner: smb.csi.k8s.io
|
|
||||||
parameters:
|
|
||||||
source: "#{ item.source }#"
|
|
||||||
csi.storage.k8s.io/node-stage-secret-name: "#{ item.secret_name|default(item.name + '-secret') }#"
|
|
||||||
csi.storage.k8s.io/node-stage-secret-namespace: "#{ item.secret_namespace|default('storage') }#"
|
|
||||||
reclaimPolicy: Delete
|
|
||||||
volumeBindingMode: Immediate
|
|
||||||
mountOptions:
|
|
||||||
- "dir_mode=#{ item.dir_mode|default('0777') }#"
|
|
||||||
- "file_mode=#{ item.file_mode|default('0666') }#"
|
|
||||||
- "uid=#{ item.uid|default('1000') }#"
|
|
||||||
- "gid=#{ item.gid|default('1000') }#"
|
|
||||||
- noperm
|
|
||||||
- mfsymlinks
|
|
||||||
- cache=strict
|
|
||||||
- noserverino # required to prevent data corruption
|
|
||||||
#% endfor %#
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
|
||||||
kind: Kustomization
|
|
||||||
metadata:
|
|
||||||
name: &app csi-driver-smb
|
|
||||||
namespace: flux-system
|
|
||||||
spec:
|
|
||||||
targetNamespace: storage
|
|
||||||
commonMetadata:
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/name: *app
|
|
||||||
path: ./kubernetes/apps/storage/csi-driver-smb/app
|
|
||||||
prune: true
|
|
||||||
sourceRef:
|
|
||||||
kind: GitRepository
|
|
||||||
name: home-kubernetes
|
|
||||||
wait: true
|
|
||||||
interval: 30m
|
|
||||||
retryInterval: 1m
|
|
||||||
timeout: 5m
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ./namespace.yaml
|
|
||||||
#% if addon_csi_driver_nfs.enabled %#
|
|
||||||
- ./csi-driver-nfs/ks.yaml
|
|
||||||
#% endif %#
|
|
||||||
#% if addon_csi_driver_smb.enabled %#
|
|
||||||
- ./csi-driver-smb/ks.yaml
|
|
||||||
#% endif %#
|
|
||||||
- ./openebs/ks.yaml
|
|
||||||
#% if addon_volsync.enabled %#
|
|
||||||
- ./volsync/ks.yaml
|
|
||||||
#% endif %#
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Namespace
|
|
||||||
metadata:
|
|
||||||
name: storage
|
|
||||||
labels:
|
|
||||||
kustomize.toolkit.fluxcd.io/prune: disabled
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
main = lambda data: data.get("addon_volsync", {}).get("enabled", False) == True
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2beta2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: volsync
|
|
||||||
spec:
|
|
||||||
interval: 30m
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: volsync
|
|
||||||
version: 0.8.0
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: backube
|
|
||||||
namespace: flux-system
|
|
||||||
install:
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
upgrade:
|
|
||||||
cleanupOnFail: true
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
uninstall:
|
|
||||||
keepHistory: false
|
|
||||||
dependsOn:
|
|
||||||
- name: snapshot-controller
|
|
||||||
namespace: storage
|
|
||||||
values:
|
|
||||||
manageCRDs: true
|
|
||||||
image:
|
|
||||||
# https://github.com/backube/volsync/issues/828
|
|
||||||
repository: &image ghcr.io/onedr0p/volsync
|
|
||||||
tag: &tag 0.8.0
|
|
||||||
rclone:
|
|
||||||
repository: *image
|
|
||||||
tag: *tag
|
|
||||||
restic:
|
|
||||||
repository: *image
|
|
||||||
tag: *tag
|
|
||||||
metrics:
|
|
||||||
disableAuth: true
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ./helmrelease.yaml
|
|
||||||
- ./prometheusrule.yaml
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: monitoring.coreos.com/v1
|
|
||||||
kind: PrometheusRule
|
|
||||||
metadata:
|
|
||||||
name: volsync
|
|
||||||
spec:
|
|
||||||
groups:
|
|
||||||
- name: volsync.rules
|
|
||||||
rules:
|
|
||||||
- alert: VolSyncComponentAbsent
|
|
||||||
annotations:
|
|
||||||
summary: VolSync component has disappeared from Prometheus target discovery.
|
|
||||||
expr: absent(up{job="volsync-metrics"})
|
|
||||||
for: 15m
|
|
||||||
labels:
|
|
||||||
severity: critical
|
|
||||||
- alert: VolSyncVolumeOutOfSync
|
|
||||||
annotations:
|
|
||||||
summary: "{{ $labels.obj_namespace }}/{{ $labels.obj_name }} volume is out of sync."
|
|
||||||
expr: volsync_volume_out_of_sync == 1
|
|
||||||
for: 15m
|
|
||||||
labels:
|
|
||||||
severity: critical
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
|
||||||
kind: Kustomization
|
|
||||||
metadata:
|
|
||||||
name: &app snapshot-controller
|
|
||||||
namespace: flux-system
|
|
||||||
spec:
|
|
||||||
targetNamespace: storage
|
|
||||||
commonMetadata:
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/name: *app
|
|
||||||
path: ./kubernetes/apps/storage/volsync/snapshot-controller
|
|
||||||
prune: true
|
|
||||||
sourceRef:
|
|
||||||
kind: GitRepository
|
|
||||||
name: home-kubernetes
|
|
||||||
wait: false
|
|
||||||
interval: 30m
|
|
||||||
retryInterval: 1m
|
|
||||||
timeout: 5m
|
|
||||||
---
|
|
||||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
|
||||||
kind: Kustomization
|
|
||||||
metadata:
|
|
||||||
name: &app volsync
|
|
||||||
namespace: flux-system
|
|
||||||
spec:
|
|
||||||
targetNamespace: storage
|
|
||||||
commonMetadata:
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/name: *app
|
|
||||||
path: ./kubernetes/apps/storage/volsync/app
|
|
||||||
prune: true
|
|
||||||
sourceRef:
|
|
||||||
kind: GitRepository
|
|
||||||
name: home-kubernetes
|
|
||||||
wait: false
|
|
||||||
interval: 30m
|
|
||||||
retryInterval: 1m
|
|
||||||
timeout: 5m
|
|
||||||
-50
@@ -1,50 +0,0 @@
|
|||||||
#% if addon_volsync.enabled %#
|
|
||||||
---
|
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2beta2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: snapshot-controller
|
|
||||||
spec:
|
|
||||||
interval: 30m
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: snapshot-controller
|
|
||||||
version: 2.0.4
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: piraeus
|
|
||||||
namespace: flux-system
|
|
||||||
install:
|
|
||||||
crds: CreateReplace
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
upgrade:
|
|
||||||
cleanupOnFail: true
|
|
||||||
crds: CreateReplace
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
uninstall:
|
|
||||||
keepHistory: false
|
|
||||||
#% if bootstrap_distribution in ['k0s', 'k3s'] and addon_longhorn.enabled %#
|
|
||||||
dependsOn:
|
|
||||||
- name: longhorn
|
|
||||||
namespace: longhorn-system
|
|
||||||
#% endif %#
|
|
||||||
values:
|
|
||||||
controller:
|
|
||||||
#% if bootstrap_distribution in ['k0s', 'k3s'] and addon_longhorn.enabled %#
|
|
||||||
volumeSnapshotClasses:
|
|
||||||
- name: longhorn-snapclass
|
|
||||||
annotations:
|
|
||||||
snapshot.storage.kubernetes.io/is-default-class: "true"
|
|
||||||
driver: driver.longhorn.io
|
|
||||||
deletionPolicy: Delete
|
|
||||||
# Ref: https://github.com/longhorn/longhorn/issues/2534#issuecomment-1010508714
|
|
||||||
parameters:
|
|
||||||
type: snap
|
|
||||||
#% endif %#
|
|
||||||
serviceMonitor:
|
|
||||||
create: true
|
|
||||||
webhook:
|
|
||||||
enabled: false
|
|
||||||
#% endif %#
|
|
||||||
-5
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ./helmrelease.yaml
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2beta2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: descheduler
|
|
||||||
spec:
|
|
||||||
interval: 30m
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: descheduler
|
|
||||||
version: 0.29.0
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: descheduler
|
|
||||||
namespace: flux-system
|
|
||||||
install:
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
upgrade:
|
|
||||||
cleanupOnFail: true
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
uninstall:
|
|
||||||
keepHistory: false
|
|
||||||
values:
|
|
||||||
kind: Deployment
|
|
||||||
deschedulerPolicyAPIVersion: descheduler/v1alpha2
|
|
||||||
deschedulerPolicy:
|
|
||||||
profiles:
|
|
||||||
- name: Default
|
|
||||||
pluginConfig:
|
|
||||||
- name: DefaultEvictor
|
|
||||||
args:
|
|
||||||
evictFailedBarePods: true
|
|
||||||
evictLocalStoragePods: true
|
|
||||||
evictSystemCriticalPods: true
|
|
||||||
nodeFit: true
|
|
||||||
- name: RemovePodsViolatingInterPodAntiAffinity
|
|
||||||
- name: RemovePodsViolatingNodeAffinity
|
|
||||||
args:
|
|
||||||
nodeAffinityType:
|
|
||||||
- requiredDuringSchedulingIgnoredDuringExecution
|
|
||||||
- name: RemovePodsViolatingNodeTaints
|
|
||||||
- name: RemovePodsViolatingTopologySpreadConstraint
|
|
||||||
args:
|
|
||||||
constraints:
|
|
||||||
- DoNotSchedule
|
|
||||||
- ScheduleAnyway
|
|
||||||
plugins:
|
|
||||||
balance:
|
|
||||||
enabled:
|
|
||||||
- RemovePodsViolatingTopologySpreadConstraint
|
|
||||||
deschedule:
|
|
||||||
enabled:
|
|
||||||
- RemovePodsViolatingInterPodAntiAffinity
|
|
||||||
- RemovePodsViolatingNodeAffinity
|
|
||||||
- RemovePodsViolatingNodeTaints
|
|
||||||
service:
|
|
||||||
enabled: true
|
|
||||||
serviceMonitor:
|
|
||||||
enabled: true
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ./helmrelease.yaml
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
|
||||||
kind: Kustomization
|
|
||||||
metadata:
|
|
||||||
name: &app descheduler
|
|
||||||
namespace: flux-system
|
|
||||||
spec:
|
|
||||||
targetNamespace: tools
|
|
||||||
commonMetadata:
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/name: *app
|
|
||||||
path: ./kubernetes/apps/tools/descheduler/app
|
|
||||||
prune: true
|
|
||||||
sourceRef:
|
|
||||||
kind: GitRepository
|
|
||||||
name: home-kubernetes
|
|
||||||
wait: false
|
|
||||||
interval: 30m
|
|
||||||
retryInterval: 1m
|
|
||||||
timeout: 5m
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ./namespace.yaml
|
|
||||||
- ./descheduler/ks.yaml
|
|
||||||
- ./reloader/ks.yaml
|
|
||||||
#% if bootstrap_distribution in ['k3s', 'talos'] and addon_system_upgrade_controller.enabled %#
|
|
||||||
- ./system-upgrade-controller/ks.yaml
|
|
||||||
#% endif %#
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Namespace
|
|
||||||
metadata:
|
|
||||||
name: tools
|
|
||||||
labels:
|
|
||||||
kustomize.toolkit.fluxcd.io/prune: disabled
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
- ./helmrelease.yaml
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
main = lambda data: data.get("bootstrap_distribution") in ['k3s', 'talos'] and data.get("addon_system_upgrade_controller", {}).get("enabled", False) == True
|
|
||||||
-103
@@ -1,103 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2beta2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: &app system-upgrade-controller
|
|
||||||
spec:
|
|
||||||
interval: 30m
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: app-template
|
|
||||||
version: 2.5.0
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: bjw-s
|
|
||||||
namespace: flux-system
|
|
||||||
install:
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
upgrade:
|
|
||||||
cleanupOnFail: true
|
|
||||||
remediation:
|
|
||||||
retries: 3
|
|
||||||
uninstall:
|
|
||||||
keepHistory: false
|
|
||||||
values:
|
|
||||||
controllers:
|
|
||||||
main:
|
|
||||||
strategy: RollingUpdate
|
|
||||||
containers:
|
|
||||||
main:
|
|
||||||
image:
|
|
||||||
repository: docker.io/rancher/system-upgrade-controller
|
|
||||||
tag: v0.13.2
|
|
||||||
env:
|
|
||||||
SYSTEM_UPGRADE_CONTROLLER_DEBUG: false
|
|
||||||
SYSTEM_UPGRADE_CONTROLLER_THREADS: 2
|
|
||||||
SYSTEM_UPGRADE_JOB_ACTIVE_DEADLINE_SECONDS: 900
|
|
||||||
SYSTEM_UPGRADE_JOB_BACKOFF_LIMIT: 99
|
|
||||||
SYSTEM_UPGRADE_JOB_IMAGE_PULL_POLICY: IfNotPresent
|
|
||||||
SYSTEM_UPGRADE_JOB_KUBECTL_IMAGE: docker.io/rancher/kubectl:v1.29.0
|
|
||||||
SYSTEM_UPGRADE_JOB_PRIVILEGED: true
|
|
||||||
SYSTEM_UPGRADE_JOB_TTL_SECONDS_AFTER_FINISH: 900
|
|
||||||
SYSTEM_UPGRADE_PLAN_POLLING_INTERVAL: 15m
|
|
||||||
SYSTEM_UPGRADE_CONTROLLER_NAME: *app
|
|
||||||
SYSTEM_UPGRADE_CONTROLLER_NAMESPACE:
|
|
||||||
valueFrom:
|
|
||||||
fieldRef:
|
|
||||||
fieldPath: metadata.namespace
|
|
||||||
pod:
|
|
||||||
securityContext:
|
|
||||||
runAsNonRoot: true
|
|
||||||
runAsUser: 65534
|
|
||||||
runAsGroup: 65534
|
|
||||||
allowPrivilegeEscalation: false
|
|
||||||
seccompProfile:
|
|
||||||
type: RuntimeDefault
|
|
||||||
capabilities:
|
|
||||||
drop: ["ALL"]
|
|
||||||
affinity:
|
|
||||||
nodeAffinity:
|
|
||||||
requiredDuringSchedulingIgnoredDuringExecution:
|
|
||||||
nodeSelectorTerms:
|
|
||||||
- matchExpressions:
|
|
||||||
- key: node-role.kubernetes.io/control-plane
|
|
||||||
operator: Exists
|
|
||||||
tolerations:
|
|
||||||
- {key: CriticalAddonsOnly, operator: Exists}
|
|
||||||
- {key: node-role.kubernetes.io/master, operator: Exists, effect: NoSchedule}
|
|
||||||
- {key: node-role.kubernetes.io/controlplane, operator: Exists, effect: NoSchedule}
|
|
||||||
- {key: node-role.kubernetes.io/control-plane, operator: Exists, effect: NoSchedule}
|
|
||||||
- {key: node-role.kubernetes.io/etcd, operator: Exists, effect: NoExecute}
|
|
||||||
serviceAccount:
|
|
||||||
create: true
|
|
||||||
name: system-upgrade
|
|
||||||
service:
|
|
||||||
main:
|
|
||||||
enabled: false
|
|
||||||
persistence:
|
|
||||||
tmp:
|
|
||||||
type: emptyDir
|
|
||||||
globalMounts:
|
|
||||||
- path: /tmp
|
|
||||||
etc-ssl:
|
|
||||||
type: hostPath
|
|
||||||
hostPath: /etc/ssl
|
|
||||||
hostPathType: DirectoryOrCreate
|
|
||||||
globalMounts:
|
|
||||||
- path: /etc/ssl
|
|
||||||
readOnly: true
|
|
||||||
etc-pki:
|
|
||||||
type: hostPath
|
|
||||||
hostPath: /etc/pki
|
|
||||||
hostPathType: DirectoryOrCreate
|
|
||||||
globalMounts:
|
|
||||||
- path: /etc/pki
|
|
||||||
readOnly: true
|
|
||||||
etc-ca-certificates:
|
|
||||||
type: hostPath
|
|
||||||
hostPath: /etc/ca-certificates
|
|
||||||
hostPathType: DirectoryOrCreate
|
|
||||||
globalMounts:
|
|
||||||
- path: /etc/ca-certificates
|
|
||||||
readOnly: true
|
|
||||||
-8
@@ -1,8 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
# renovate: datasource=github-releases depName=rancher/system-upgrade-controller
|
|
||||||
- https://github.com/rancher/system-upgrade-controller/releases/download/v0.13.2/crd.yaml
|
|
||||||
- helmrelease.yaml
|
|
||||||
- rbac.yaml
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRoleBinding
|
|
||||||
metadata:
|
|
||||||
name: system-upgrade
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: ClusterRole
|
|
||||||
name: cluster-admin
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: system-upgrade
|
|
||||||
namespace: tools
|
|
||||||
#% if bootstrap_distribution in ['talos'] %#
|
|
||||||
---
|
|
||||||
apiVersion: talos.dev/v1alpha1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: talos
|
|
||||||
spec:
|
|
||||||
roles:
|
|
||||||
- os:admin
|
|
||||||
#% endif %#
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
|
||||||
kind: Kustomization
|
|
||||||
metadata:
|
|
||||||
name: &app system-upgrade-controller
|
|
||||||
namespace: flux-system
|
|
||||||
spec:
|
|
||||||
targetNamespace: tools
|
|
||||||
commonMetadata:
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/name: *app
|
|
||||||
path: ./kubernetes/apps/tools/system-upgrade-controller/app
|
|
||||||
prune: true
|
|
||||||
sourceRef:
|
|
||||||
kind: GitRepository
|
|
||||||
name: home-kubernetes
|
|
||||||
wait: true
|
|
||||||
interval: 30m
|
|
||||||
retryInterval: 1m
|
|
||||||
timeout: 5m
|
|
||||||
---
|
|
||||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
|
||||||
kind: Kustomization
|
|
||||||
metadata:
|
|
||||||
name: &app system-upgrade-controller-plans
|
|
||||||
namespace: flux-system
|
|
||||||
spec:
|
|
||||||
targetNamespace: tools
|
|
||||||
commonMetadata:
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/name: *app
|
|
||||||
dependsOn:
|
|
||||||
- name: system-upgrade-controller
|
|
||||||
path: ./kubernetes/apps/tools/system-upgrade-controller/plans
|
|
||||||
prune: true
|
|
||||||
sourceRef:
|
|
||||||
kind: GitRepository
|
|
||||||
name: home-kubernetes
|
|
||||||
wait: false
|
|
||||||
interval: 30m
|
|
||||||
retryInterval: 1m
|
|
||||||
timeout: 5m
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
#% if bootstrap_distribution in ['k3s'] %#
|
|
||||||
---
|
|
||||||
apiVersion: upgrade.cattle.io/v1
|
|
||||||
kind: Plan
|
|
||||||
metadata:
|
|
||||||
name: controllers
|
|
||||||
spec:
|
|
||||||
# renovate: datasource=github-releases depName=k3s-io/k3s
|
|
||||||
version: "v1.29.0+k3s1"
|
|
||||||
upgrade:
|
|
||||||
image: rancher/k3s-upgrade
|
|
||||||
serviceAccountName: system-upgrade
|
|
||||||
concurrency: 1
|
|
||||||
cordon: true
|
|
||||||
nodeSelector:
|
|
||||||
matchExpressions:
|
|
||||||
- key: node-role.kubernetes.io/control-plane
|
|
||||||
operator: Exists
|
|
||||||
tolerations:
|
|
||||||
- effect: NoSchedule
|
|
||||||
operator: Exists
|
|
||||||
- effect: NoExecute
|
|
||||||
operator: Exists
|
|
||||||
- key: node-role.kubernetes.io/control-plane
|
|
||||||
effect: NoSchedule
|
|
||||||
operator: Exists
|
|
||||||
- key: node-role.kubernetes.io/master
|
|
||||||
effect: NoSchedule
|
|
||||||
operator: Exists
|
|
||||||
- key: node-role.kubernetes.io/etcd
|
|
||||||
effect: NoExecute
|
|
||||||
operator: Exists
|
|
||||||
- key: CriticalAddonsOnly
|
|
||||||
operator: Exists
|
|
||||||
---
|
|
||||||
apiVersion: upgrade.cattle.io/v1
|
|
||||||
kind: Plan
|
|
||||||
metadata:
|
|
||||||
name: workers
|
|
||||||
spec:
|
|
||||||
# renovate: datasource=github-releases depName=k3s-io/k3s
|
|
||||||
version: "v1.29.0+k3s1"
|
|
||||||
serviceAccountName: system-upgrade
|
|
||||||
concurrency: 1
|
|
||||||
nodeSelector:
|
|
||||||
matchExpressions:
|
|
||||||
- key: node-role.kubernetes.io/control-plane
|
|
||||||
operator: DoesNotExist
|
|
||||||
prepare:
|
|
||||||
image: rancher/k3s-upgrade
|
|
||||||
args: ["prepare", "server"]
|
|
||||||
upgrade:
|
|
||||||
image: rancher/k3s-upgrade
|
|
||||||
#% endif %#
|
|
||||||
-9
@@ -1,9 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
resources:
|
|
||||||
#% if bootstrap_distribution in ['k3s'] %#
|
|
||||||
- ./k3s.yaml
|
|
||||||
#% elif bootstrap_distribution in ['talos'] %#
|
|
||||||
- ./talos.yaml
|
|
||||||
#% endif %#
|
|
||||||
-93
@@ -1,93 +0,0 @@
|
|||||||
#% if bootstrap_distribution in ['talos'] %#
|
|
||||||
---
|
|
||||||
apiVersion: upgrade.cattle.io/v1
|
|
||||||
kind: Plan
|
|
||||||
metadata:
|
|
||||||
name: kubernetes
|
|
||||||
spec:
|
|
||||||
# renovate: datasource=docker depName=ghcr.io/siderolabs/kubelet
|
|
||||||
version: v1.29.1
|
|
||||||
serviceAccountName: system-upgrade
|
|
||||||
secrets:
|
|
||||||
- name: talos
|
|
||||||
path: /var/run/secrets/talos.dev
|
|
||||||
ignoreUpdates: true
|
|
||||||
concurrency: 1
|
|
||||||
exclusive: true
|
|
||||||
nodeSelector:
|
|
||||||
matchExpressions:
|
|
||||||
- key: node-role.kubernetes.io/control-plane
|
|
||||||
operator: Exists
|
|
||||||
prepare: &prepare
|
|
||||||
image: ghcr.io/siderolabs/talosctl:v1.6.3
|
|
||||||
envs:
|
|
||||||
- name: NODE_IP
|
|
||||||
valueFrom:
|
|
||||||
fieldRef:
|
|
||||||
fieldPath: status.hostIP
|
|
||||||
args:
|
|
||||||
- --nodes=$(NODE_IP)
|
|
||||||
- health
|
|
||||||
- --server=false
|
|
||||||
upgrade:
|
|
||||||
<<: *prepare
|
|
||||||
args:
|
|
||||||
- --nodes=$(NODE_IP)
|
|
||||||
- upgrade-k8s
|
|
||||||
- --to=$(SYSTEM_UPGRADE_PLAN_LATEST_VERSION)
|
|
||||||
---
|
|
||||||
apiVersion: upgrade.cattle.io/v1
|
|
||||||
kind: Plan
|
|
||||||
metadata:
|
|
||||||
name: talos
|
|
||||||
spec:
|
|
||||||
# renovate: datasource=docker depName=ghcr.io/siderolabs/installer
|
|
||||||
version: v1.6.3
|
|
||||||
serviceAccountName: system-upgrade
|
|
||||||
secrets:
|
|
||||||
- name: talos
|
|
||||||
path: /var/run/secrets/talos.dev
|
|
||||||
ignoreUpdates: true
|
|
||||||
concurrency: 1
|
|
||||||
exclusive: true
|
|
||||||
nodeSelector:
|
|
||||||
matchExpressions:
|
|
||||||
- key: kubernetes.io/os
|
|
||||||
operator: In
|
|
||||||
values:
|
|
||||||
- linux
|
|
||||||
tolerations:
|
|
||||||
- key: CriticalAddonsOnly
|
|
||||||
operator: Exists
|
|
||||||
- key: node-role.kubernetes.io/master
|
|
||||||
operator: Exists
|
|
||||||
effect: NoSchedule
|
|
||||||
- key: node-role.kubernetes.io/controlplane
|
|
||||||
operator: Exists
|
|
||||||
effect: NoSchedule
|
|
||||||
- key: node-role.kubernetes.io/control-plane
|
|
||||||
operator: Exists
|
|
||||||
effect: NoSchedule
|
|
||||||
- key: node-role.kubernetes.io/etcd
|
|
||||||
operator: Exists
|
|
||||||
effect: NoSchedule
|
|
||||||
prepare: &prepare
|
|
||||||
image: ghcr.io/siderolabs/talosctl
|
|
||||||
envs:
|
|
||||||
- name: NODE_IP
|
|
||||||
valueFrom:
|
|
||||||
fieldRef:
|
|
||||||
fieldPath: status.hostIP
|
|
||||||
args:
|
|
||||||
- --nodes=$(NODE_IP)
|
|
||||||
- health
|
|
||||||
- --server=false
|
|
||||||
upgrade:
|
|
||||||
<<: *prepare
|
|
||||||
args:
|
|
||||||
- --nodes=$(NODE_IP)
|
|
||||||
- upgrade
|
|
||||||
- --image=factory.talos.dev/installer/#{ addon_system_upgrade_controller.talos_schematic_id|default('df491c50a5acc05b977ef00c32050e1ceb0df746e40b33c643ac8a9bfb7c7263', true) }#:$(SYSTEM_UPGRADE_PLAN_LATEST_VERSION)
|
|
||||||
- --preserve=true
|
|
||||||
- --wait=false
|
|
||||||
#% endif %#
|
|
||||||
@@ -44,13 +44,6 @@ hubble:
|
|||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
className: internal
|
className: internal
|
||||||
#% if addon_homepage.enabled %#
|
|
||||||
annotations:
|
|
||||||
gethomepage.dev/enabled: "true"
|
|
||||||
gethomepage.dev/group: Network
|
|
||||||
gethomepage.dev/name: Cilium
|
|
||||||
gethomepage.dev/icon: cilium.png
|
|
||||||
#% endif %#
|
|
||||||
hosts:
|
hosts:
|
||||||
- "hubble.${SECRET_DOMAIN}"
|
- "hubble.${SECRET_DOMAIN}"
|
||||||
tls:
|
tls:
|
||||||
@@ -71,7 +64,7 @@ k8sServicePort: 6444
|
|||||||
k8sServiceHost: localhost
|
k8sServiceHost: localhost
|
||||||
k8sServicePort: 7443
|
k8sServicePort: 7443
|
||||||
#% elif bootstrap_distribution in ['talos'] %#
|
#% elif bootstrap_distribution in ['talos'] %#
|
||||||
k8sServiceHost: localhost
|
k8sServiceHost: 127.0.0.1
|
||||||
k8sServicePort: 7445
|
k8sServicePort: 7445
|
||||||
#% endif %#
|
#% endif %#
|
||||||
kubeProxyReplacement: true
|
kubeProxyReplacement: true
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ k8sServicePort: 6444
|
|||||||
k8sServiceHost: localhost
|
k8sServiceHost: localhost
|
||||||
k8sServicePort: 7443
|
k8sServicePort: 7443
|
||||||
#% elif bootstrap_distribution in ['talos'] %#
|
#% elif bootstrap_distribution in ['talos'] %#
|
||||||
k8sServiceHost: localhost
|
k8sServiceHost: 127.0.0.1
|
||||||
k8sServicePort: 7445
|
k8sServicePort: 7445
|
||||||
#% endif %#
|
#% endif %#
|
||||||
kubeProxyReplacement: true
|
kubeProxyReplacement: true
|
||||||
|
|||||||
@@ -1,85 +0,0 @@
|
|||||||
---
|
|
||||||
#
|
|
||||||
# Addons configuration - addons.yaml is gitignored
|
|
||||||
#
|
|
||||||
|
|
||||||
# https://gethomepage.dev
|
|
||||||
addon_homepage:
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
# https://github.com/grafana/grafana
|
|
||||||
addon_grafana:
|
|
||||||
enabled: false
|
|
||||||
# password: # Required: password for `admin` user
|
|
||||||
|
|
||||||
# https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack
|
|
||||||
addon_kube_prometheus_stack:
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
# https://github.com/kubernetes/dashboard
|
|
||||||
addon_kubernetes_dashboard:
|
|
||||||
enabled: false
|
|
||||||
# NOTE: Password can be obtained by running the following command once it is deployed:
|
|
||||||
# kubectl -n observability get secret kubernetes-dashboard -o jsonpath='{.data.token}' | base64 -d
|
|
||||||
|
|
||||||
# https://github.com/weaveworks/weave-gitops
|
|
||||||
addon_weave_gitops:
|
|
||||||
enabled: false
|
|
||||||
# password: # Required: password for `admin` user
|
|
||||||
|
|
||||||
# https://github.com/rancher/system-upgrade-controller
|
|
||||||
addon_system_upgrade_controller:
|
|
||||||
# NOTE: If bootstrap_distribution is set to k0s this will be ignored.
|
|
||||||
enabled: false
|
|
||||||
# IMPORTANT: For talos, head over to https://factory.talos.dev/ and
|
|
||||||
# generate a schematic ID based on your System Extension requirements
|
|
||||||
# talos_schematic_id: df491c50a5acc05b977ef00c32050e1ceb0df746e40b33c643ac8a9bfb7c7263
|
|
||||||
|
|
||||||
# https://github.com/morphy2k/rss-forwarder
|
|
||||||
addon_discord_template_notifier:
|
|
||||||
# Will post commits from the template repository to the specified discord channel
|
|
||||||
# so it's easier to keep track of changes.
|
|
||||||
enabled: false
|
|
||||||
# webhook_url: # Required: Discord webhook url
|
|
||||||
|
|
||||||
# https://github.com/backube/volsync
|
|
||||||
addon_volsync:
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
# https://github.com/longhorn/longhorn
|
|
||||||
addon_longhorn:
|
|
||||||
# IMPORTANT: Only enable this if you have 3 or more nodes in your cluster
|
|
||||||
# and you have enough IOPS on disk to support the number of replicas.
|
|
||||||
# NOTE: Longhorn is currently unsupported in Talos, this will be ignored
|
|
||||||
# if you are using Talos.
|
|
||||||
# NOTE: Consider enabling volsync if you would like to configure snapshots
|
|
||||||
# and backups to durable storage.
|
|
||||||
# NOTE: You must label any node that you want to allocate storage to longhorn
|
|
||||||
# e.g. kubectl label --overwrite node <node name> node.longhorn.io/create-default-disk="true"
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
# https://github.com/kubernetes-csi/csi-driver-nfs
|
|
||||||
addon_csi_driver_nfs:
|
|
||||||
enabled: false
|
|
||||||
storage_class:
|
|
||||||
# - name: # name of the storage class (must match [a-z0-9-]+)
|
|
||||||
# server: # dns name or ip address of nfs server
|
|
||||||
# share: # exported share (path)
|
|
||||||
# ...
|
|
||||||
|
|
||||||
# https://github.com/kubernetes-csi/csi-driver-smb
|
|
||||||
addon_csi_driver_smb:
|
|
||||||
enabled: false
|
|
||||||
create_secrets: true # set to false to disable secret template rendering
|
|
||||||
storage_class:
|
|
||||||
# - name: # name of the storage class (must match [a-z0-9-]+)
|
|
||||||
# source: # network path of the smb share e.g. //192.168.0.5/downloads
|
|
||||||
# username: # share credentials
|
|
||||||
# password: # share credentials
|
|
||||||
# dir_mode: # default 0777
|
|
||||||
# file_mode: # default 0666
|
|
||||||
# uid: # default 1000
|
|
||||||
# gid: # default 1000
|
|
||||||
# secret_name: # default "{name}-secret"
|
|
||||||
# secret_namespace: # default "storage"
|
|
||||||
# ...
|
|
||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
inputs = ["./bootstrap/templates"]
|
inputs = ["./bootstrap/templates"]
|
||||||
output = "./"
|
output = "./"
|
||||||
exclude_patterns = [".mjfilter.py", "*.partial.yaml.j2"]
|
exclude_patterns = [".mjfilter.py", "*.partial.yaml.j2"]
|
||||||
data = ["./bootstrap/vars/addons.yaml", "./bootstrap/vars/config.yaml"]
|
data = ["./bootstrap/vars/config.yaml"]
|
||||||
import_paths = ["./bootstrap/scripts"]
|
import_paths = ["./bootstrap/scripts"]
|
||||||
loaders = ["plugin:Plugin"]
|
loaders = ["plugin:Plugin"]
|
||||||
jinja_suffix = ".j2"
|
jinja_suffix = ".j2"
|
||||||
|
|||||||
Reference in new issue
Block a user