Compare commits

...

4 Commits

Author SHA1 Message Date
Morten Olsen
b8c7930650 cleanup 2025-09-05 21:15:02 +02:00
Morten Olsen
eae83bf0dd update 2025-09-05 14:43:24 +02:00
Morten Olsen
42cc50948d remove argo 2025-09-05 13:51:33 +02:00
Morten Olsen
ff06613e99 updates 2025-09-05 11:22:58 +02:00
331 changed files with 795 additions and 362 deletions

View File

@@ -55,10 +55,12 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: pnpm install run: pnpm install
working-directory: operator
env: env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Run tests - name: Run tests
working-directory: operator
run: pnpm test run: pnpm test
update-release-draft: update-release-draft:

View File

@@ -3,7 +3,7 @@ name: Publish tag
on: on:
push: push:
branches: branches:
- 'main' - "main"
tags: tags:
- "v*" - "v*"
@@ -52,7 +52,7 @@ jobs:
id: push id: push
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with: with:
context: . context: ./operator
push: true push: true
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}

39
.gitignore vendored
View File

@@ -1,39 +1,2 @@
# dependencies (bun install)
node_modules
# output
out
dist
*.tgz
# code coverage
coverage
*.lcov
# logs
logs
_.log
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local
# caches
.eslintcache
.cache
*.tsbuildinfo
# IntelliJ based IDEs
.idea
# Finder (MacOS) folder config
.DS_Store
/data/
/cloudflare.yaml
/secret.*.yaml /secret.*.yaml
/data/

View File

@@ -1 +0,0 @@
3.13

View File

@@ -1,3 +1,3 @@
apiVersion: v2 apiVersion: v2
version: 1.0.0 version: 1.0.0
name: root name: monitoring

View File

@@ -0,0 +1,38 @@
apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
metadata:
name: '{{ .Release.Name }}'
spec:
interval: 1h
url: https://helm.goharbor.io
---
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: '{{ .Release.Name }}'
spec:
chart:
spec:
chart: harbor
reconcileStrategy: ChartVersion
sourceRef:
apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
name: '{{ .Release.Name }}'
namespace: '{{ .Release.Namespace }}'
interval: 1h
values:
persistence:
persistentVolumeClaim:
registry:
storageClass: '{{ .Values.globals.environment }}'
jobservice:
jobLog:
storageClass: '{{ .Values.globals.environment }}'
database:
storageClass: '{{ .Values.globals.environment }}'
redis:
storageClass: '{{ .Values.globals.environment }}'
trivy:
storageClass: '{{ .Values.globals.environment }}'

View File

@@ -0,0 +1,11 @@
apiVersion: homelab.mortenolsen.pro/v1
kind: HttpService
metadata:
name: '{{ .Release.Name }}'
spec:
environment: '{{ .Values.globals.environment }}'
subdomain: '{{ .Values.subdomain }}'
destination:
host: '{{ .Release.Name }}.{{ .Release.Namespace }}.svc.cluster.local'
port:
number: 80

View File

@@ -0,0 +1,3 @@
globals:
environment: prod
subdomain: harbor

View File

@@ -1,33 +0,0 @@
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: homelab-apps
namespace: '{{ .Values.env }}-argo'
spec:
generators:
- git:
repoURL: '{{ .Values.repo }}'
revision: '{{ .Values.ref }}'
directories:
- path: charts/apps/*
include: '.*'
exclude: '.*.disabled'
template:
metadata:
name: '{{`{{path.basename}}`}}'
spec:
project: default
source:
repoURL: '{{ .Values.repo }}'
targetRevision: '{{ .Values.ref }}'
path: charts/apps/{{`{{path.basename}}`}}
helm:
values: |
globals: {{ .Values.globals | toYaml | nindent 14 }}
destination:
server: https://kubernetes.default.svc
namespace: '{{ .Values.globals.env }}'
syncPolicy:
automated:
prune: true
selfHeal: true

View File

@@ -1,21 +0,0 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: homelab-root
namespace: '{{ .Values.globals.env }}-argo'
spec:
project: default
source:
repoURL: '{{ .Values.repo }}'
targetRevision: '{{ .Values.ref }}'
path: charts/root
helm:
valueFiles:
- values.yaml
destination:
server: https://kubernetes.default.svc
namespace: '{{ .Values.globals.env }}-argo'
syncPolicy:
automated:
prune: true
selfHeal: true

View File

@@ -1,4 +0,0 @@
globals:
env: prod
repo: https://github.com/morten-olsen/homelab-operator.git
ref: HEAD

Some files were not shown because too many files have changed in this diff Show More