attempt to add airflow ini 3

This commit is contained in:
2025-09-13 10:14:48 -04:00
parent b3f58e6e4a
commit abd4ee798b
12 changed files with 153 additions and 56 deletions
+16 -5
View File
@@ -1,6 +1,8 @@
apiVersion: argoproj.io/v1alpha1
kind: AppProject
metadata: { name: ai-stack, namespace: argocd }
metadata:
name: ai-stack
namespace: argocd
spec:
destinations:
- server: https://kubernetes.default.svc
@@ -13,14 +15,23 @@ spec:
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata: { name: ai-stack, namespace: argocd }
metadata:
name: ai-stack
namespace: argocd
spec:
project: ai-stack
destination: { server: https://kubernetes.default.svc, namespace: ai }
destination:
server: https://kubernetes.default.svc
namespace: ai
source:
repoURL: https://git.ion606.com/ion606/ollama-plus
targetRevision: argo
path: apps/children
directory: { recurse: true }
directory:
recurse: true
syncPolicy:
automated: { prune: true, selfHeal: true }
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
+12 -3
View File
@@ -1,9 +1,15 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata: { name: airflow, namespace: ai }
metadata:
name: airflow
namespace: ai
annotations:
argocd.argoproj.io/sync-wave: "0"
spec:
project: ai-stack
destination: { server: https://kubernetes.default.svc, namespace: ai }
destination:
server: https://kubernetes.default.svc
namespace: ai
sources:
- repoURL: https://airflow.apache.org
chart: airflow
@@ -15,4 +21,7 @@ spec:
- repoURL: https://git.ion606.com/ion606/ollama-plus
targetRevision: argo
ref: values
syncPolicy: { automated: { prune: true, selfHeal: true } }
syncPolicy:
automated:
prune: true
selfHeal: true
+10 -3
View File
@@ -1,11 +1,18 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata: { name: browser, namespace: ai }
metadata:
name: browser
namespace: ai
spec:
project: ai-stack
destination: { server: https://kubernetes.default.svc, namespace: ai }
destination:
server: https://kubernetes.default.svc
namespace: ai
source:
repoURL: https://your.git/repo.git
targetRevision: main
path: manifests/browser
syncPolicy: { automated: { prune: true, selfHeal: true } }
syncPolicy:
automated:
prune: true
selfHeal: true
+10 -3
View File
@@ -1,11 +1,18 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata: { name: coderunner, namespace: ai }
metadata:
name: coderunner
namespace: ai
spec:
project: ai-stack
destination: { server: https://kubernetes.default.svc, namespace: ai }
destination:
server: https://kubernetes.default.svc
namespace: ai
source:
repoURL: https://git.ion606.com/ion606/ollama-plus
targetRevision: main
path: manifests/coderunner
syncPolicy: { automated: { prune: true, selfHeal: true } }
syncPolicy:
automated:
prune: true
selfHeal: true
+12 -3
View File
@@ -1,9 +1,15 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata: { name: openwebui, namespace: ai }
metadata:
name: openwebui
namespace: ai
annotations:
argocd.argoproj.io/sync-wave: "0"
spec:
project: ai-stack
destination: { server: https://kubernetes.default.svc, namespace: ai }
destination:
server: https://kubernetes.default.svc
namespace: ai
source:
repoURL: https://helm.openwebui.com
chart: open-webui
@@ -11,4 +17,7 @@ spec:
helm:
valueFiles:
- apps/values/openwebui.yaml
syncPolicy: { automated: { prune: true, selfHeal: true } }
syncPolicy:
automated:
prune: true
selfHeal: true
+5 -1
View File
@@ -1,6 +1,10 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata: { name: postgresql, namespace: ai }
metadata:
name: postgresql
namespace: ai
annotations:
argocd.argoproj.io/sync-wave: "-10"
spec:
project: ai-stack
destination:
+10 -3
View File
@@ -1,11 +1,18 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata: { name: rag-server, namespace: ai }
metadata:
name: rag-server
namespace: ai
spec:
project: ai-stack
destination: { server: https://kubernetes.default.svc, namespace: ai }
destination:
server: https://kubernetes.default.svc
namespace: ai
source:
repoURL: https://git.ion606.com/ion606/ollama-plus
targetRevision: main
path: manifests/rag-server
syncPolicy: { automated: { prune: true, selfHeal: true } }
syncPolicy:
automated:
prune: true
selfHeal: true
+10 -3
View File
@@ -1,9 +1,13 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata: { name: searxng, namespace: ai }
metadata:
name: searxng
namespace: ai
spec:
project: ai-stack
destination: { server: https://kubernetes.default.svc, namespace: ai }
destination:
server: https://kubernetes.default.svc
namespace: ai
source:
repoURL: https://charts.kubito.dev
chart: searxng
@@ -11,4 +15,7 @@ spec:
helm:
valueFiles:
- apps/values/searxng.yaml
syncPolicy: { automated: { prune: true, selfHeal: true } }
syncPolicy:
automated:
prune: true
selfHeal: true
+10 -3
View File
@@ -1,11 +1,18 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata: { name: tools, namespace: ai }
metadata:
name: tools
namespace: ai
spec:
project: ai-stack
destination: { server: https://kubernetes.default.svc, namespace: ai }
destination:
server: https://kubernetes.default.svc
namespace: ai
source:
repoURL: https://git.ion606.com/ion606/ollama-plus
targetRevision: main
path: manifests/tools
syncPolicy: { automated: { prune: true, selfHeal: true } }
syncPolicy:
automated:
prune: true
selfHeal: true
+32 -20
View File
@@ -11,26 +11,26 @@ env:
# using external postgres and not the subchart
postgresql:
enabled: false;
enabled: false
data:
metadataConnection:
user: postgres;
pass: mypassword;
protocol: postgresql;
host: postgresql-primary.ai.svc.cluster.local;
port: 5432;
db: airflow; # better to keep airflow separate from other apps
sslmode: disable;
user: postgres
pass: mypassword
protocol: postgresql
host: postgresql-primary.ai.svc.cluster.local
port: 5432
db: airflow # better to keep airflow separate from other apps
sslmode: disable
# enable pgbouncer and sync with extraIni
pgbouncer:
enabled: true;
enabled: true
# official default is scram-sha-256, but bitnami uses md5 so...
auth_type: md5;
maxClientConn: 200;
metadataPoolSize: 20; # server connections to metadata db
resultBackendPoolSize: 5;
auth_type: md5
maxClientConn: 200
metadataPoolSize: 20 # server connections to metadata db
resultBackendPoolSize: 5
# general pgbouncer section stuffs
extraIni: |
pool_mode = transaction
@@ -39,7 +39,7 @@ pgbouncer:
ignore_startup_parameters = extra_float_digits
server_tls_sslmode = prefer
metricsExporterSidecar:
enabled: true;
enabled: true
logs:
persistence:
@@ -50,8 +50,12 @@ allowPodLaunching: true
scheduler:
resources:
requests: { cpu: "200m", memory: "512Mi" }
limits: { cpu: "1", memory: "1Gi" }
requests:
cpu: "200m"
memory: "512Mi"
limits:
cpu: "1"
memory: "1Gi"
webserver:
webserverSecretKeySecretName: airflow-webserver-secret
@@ -59,13 +63,21 @@ webserver:
type: NodePort
nodePort: 30082 # 3000032767
resources:
requests: { cpu: "100m", memory: "256Mi" }
limits: { cpu: "500m", memory: "512Mi" }
requests:
cpu: "100m"
memory: "256Mi"
limits:
cpu: "500m"
memory: "512Mi"
triggerer:
resources:
requests: { cpu: "50m", memory: "128Mi" }
limits: { cpu: "200m", memory: "256Mi" }
requests:
cpu: "50m"
memory: "128Mi"
limits:
cpu: "200m"
memory: "256Mi"
# bc using nodeport
ingress:
+9 -9
View File
@@ -32,18 +32,18 @@ kubectl apply -n argocd -f apps/0-project-and-root.yaml;
# kubectl -n ai create secret generic airflow-webserver-secret --from-literal="webserver-secret-key=$(python3 -c 'import secrets;print(secrets.token_hex(16))')";
# airflow stuffs
kubectl -n ai exec -it svc/postgresql-primary -- bash -lc "psql -U postgres -c 'CREATE DATABASE airflow;'";
set -l PGBOUNCER_SVC (kubectl -n ai get svc -l tier=airflow,component=pgbouncer -o jsonpath='{.items[0].metadata.name}');
echo $PGBOUNCER_SVC;
# kubectl -n ai exec -it svc/postgresql-primary -- bash -lc "psql -U postgres -c 'CREATE DATABASE airflow;'";
# set -l PGBOUNCER_SVC (kubectl -n ai get svc -l tier=airflow,component=pgbouncer -o jsonpath='{.items[0].metadata.name}');
# echo $PGBOUNCER_SVC;
# stats (used by the metrics sidecar and also points to pgbouncer itself on 127.0.0.1:6543)
kubectl -n ai create secret generic airflow-pgbouncer-stats \
--from-literal=connection="postgresql://postgres:mypassword@127.0.0.1:6543/pgbouncer?sslmode=disable";
# # stats (used by the metrics sidecar and also points to pgbouncer itself on 127.0.0.1:6543)
# kubectl -n ai create secret generic airflow-pgbouncer-stats \
# --from-literal=connection="postgresql://postgres:mypassword@127.0.0.1:6543/pgbouncer?sslmode=disable";
kubectl -n ai create secret generic airflow-metadata \
--from-literal=connection="postgresql+psycopg2://postgres:mypassword@$PGBOUNCER_SVC:6543/airflow";
# kubectl -n ai create secret generic airflow-metadata \
# --from-literal=connection="postgresql+psycopg2://postgres:mypassword@$PGBOUNCER_SVC:6543/airflow";
minikube service -n ai airflow-webserver --url || echo "FAILED TO FIND SERVICE"
# minikube service -n ai airflow-webserver --url || echo "FAILED TO FIND SERVICE"
# port-forward argocd ui
echo "";
+17
View File
@@ -0,0 +1,17 @@
|---------------|-----------------------------------------|--------------|---------------------------|
| NAMESPACE | NAME | TARGET PORT | URL |
|---------------|-----------------------------------------|--------------|---------------------------|
| argocd | argocd-applicationset-controller | No node port | |
| argocd | argocd-dex-server | No node port | |
| argocd | argocd-metrics | No node port | |
| argocd | argocd-notifications-controller-metrics | No node port | |
| argocd | argocd-redis | No node port | |
| argocd | argocd-repo-server | No node port | |
| argocd | argocd-server | No node port | |
| argocd | argocd-server-metrics | No node port | |
| default | kubernetes | No node port | |
| ingress-nginx | ingress-nginx-controller | http/80 | http://192.168.49.2:31684 |
| | | https/443 | http://192.168.49.2:31486 |
| ingress-nginx | ingress-nginx-controller-admission | No node port | |
| kube-system | kube-dns | No node port | |
|---------------|-----------------------------------------|--------------|---------------------------|