Merge pull request 'Adding Atuin server.' (#427) from add-atuin into main
Reviewed-on: jahanson/homelab#427
This commit is contained in:
commit
1a90a1c2cf
5 changed files with 169 additions and 0 deletions
20
kubernetes/apps/default/atuin/app/externalsecret.yaml
Normal file
20
kubernetes/apps/default/atuin/app/externalsecret.yaml
Normal file
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/external-secrets.io/externalsecret_v1beta1.json
|
||||
apiVersion: external-secrets.io/v1beta1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: atuin
|
||||
spec:
|
||||
secretStoreRef:
|
||||
kind: ClusterSecretStore
|
||||
name: onepassword-connect
|
||||
target:
|
||||
name: atuin-secret
|
||||
template:
|
||||
engineVersion: v2
|
||||
data:
|
||||
ATUIN_DB_URI: |-
|
||||
postgres://{{ .ATUIN_POSTGRES_USER }}:{{ .ATUIN_POSTGRES_PASSWORD }}@{{ .ATUIN_POSTGRES_HOST }}/atuin
|
||||
dataFrom:
|
||||
- extract:
|
||||
key: atuin
|
113
kubernetes/apps/default/atuin/app/helmrelease.yaml
Normal file
113
kubernetes/apps/default/atuin/app/helmrelease.yaml
Normal file
|
@ -0,0 +1,113 @@
|
|||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2.schema.json
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: &app atuin
|
||||
spec:
|
||||
interval: 30m
|
||||
chart:
|
||||
spec:
|
||||
chart: app-template
|
||||
version: 3.2.1
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: bjw-s
|
||||
namespace: flux-system
|
||||
install:
|
||||
remediation:
|
||||
retries: 3
|
||||
upgrade:
|
||||
cleanupOnFail: true
|
||||
remediation:
|
||||
strategy: rollback
|
||||
retries: 3
|
||||
values:
|
||||
controllers:
|
||||
atuin:
|
||||
strategy: RollingUpdate
|
||||
annotations:
|
||||
reloader.stakater.com/auto: "true"
|
||||
containers:
|
||||
app:
|
||||
image:
|
||||
repository: ghcr.io/atuinsh/atuin
|
||||
tag: 18.3.0@sha256:678def8e9d59652a502759ca431f9c5b54ebdd5e9361507c7fcf24705c9862e0
|
||||
env:
|
||||
ATUIN_HOST: 0.0.0.0
|
||||
ATUIN_PORT: &port 80
|
||||
ATUIN_OPEN_REGISTRATION: "true"
|
||||
ATUIN_METRICS__ENABLE: "true"
|
||||
ATUIN_METRICS__HOST: 0.0.0.0
|
||||
ATUIN_METRICS__PORT: &metricsPort 8080
|
||||
ATUIN_TLS__ENABLE: "false"
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: atuin-secret
|
||||
args: ["server", "start"]
|
||||
probes:
|
||||
liveness: &probes
|
||||
enabled: true
|
||||
custom: true
|
||||
spec:
|
||||
httpGet:
|
||||
path: /
|
||||
port: *port
|
||||
initialDelaySeconds: 0
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 1
|
||||
failureThreshold: 3
|
||||
readiness: *probes
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
readOnlyRootFilesystem: true
|
||||
capabilities: { drop: ["ALL"] }
|
||||
resources:
|
||||
requests:
|
||||
cpu: 10m
|
||||
limits:
|
||||
memory: 256Mi
|
||||
defaultPodOptions:
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 65534
|
||||
runAsGroup: 65534
|
||||
seccompProfile: { type: RuntimeDefault }
|
||||
service:
|
||||
app:
|
||||
controller: atuin
|
||||
ports:
|
||||
http:
|
||||
primary: true
|
||||
port: *port
|
||||
metrics:
|
||||
port: *metricsPort
|
||||
serviceMonitor:
|
||||
app:
|
||||
serviceName: atuin
|
||||
endpoints:
|
||||
- port: metrics
|
||||
scheme: http
|
||||
path: /metrics
|
||||
interval: 1m
|
||||
scrapeTimeout: 10s
|
||||
ingress:
|
||||
app:
|
||||
annotations:
|
||||
annotations:
|
||||
external-dns.alpha.kubernetes.io/cloudflare-proxied: "true"
|
||||
external-dns.alpha.kubernetes.io/target: external.hsn.dev
|
||||
className: internal
|
||||
hosts:
|
||||
- host: &host sh.hsn.dev
|
||||
paths:
|
||||
- path: /
|
||||
service:
|
||||
identifier: app
|
||||
port: http
|
||||
tls:
|
||||
- hosts:
|
||||
- *host
|
||||
persistence:
|
||||
config:
|
||||
type: emptyDir
|
7
kubernetes/apps/default/atuin/app/kustomization.yaml
Normal file
7
kubernetes/apps/default/atuin/app/kustomization.yaml
Normal file
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./externalsecret.yaml
|
||||
- ./helmrelease.yaml
|
28
kubernetes/apps/default/atuin/ks.yaml
Normal file
28
kubernetes/apps/default/atuin/ks.yaml
Normal file
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
# yaml-language-server: $schema=https://ks.hsn.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: &app atuin
|
||||
namespace: flux-system
|
||||
spec:
|
||||
targetNamespace: default
|
||||
commonMetadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: *app
|
||||
dependsOn:
|
||||
- name: crunchy-postgres-operator
|
||||
- name: external-secrets-stores
|
||||
path: ./kubernetes/apps/default/atuin/app
|
||||
prune: true
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: homelab
|
||||
wait: false
|
||||
interval: 30m
|
||||
retryInterval: 1m
|
||||
timeout: 5m
|
||||
postBuild:
|
||||
substitute:
|
||||
APP: *app
|
||||
GATUS_SUBDOMAIN: sh
|
|
@ -6,6 +6,7 @@ resources:
|
|||
# Pre Flux-Kustomizations
|
||||
- ./namespace.yaml
|
||||
# Flux-Kustomizations
|
||||
- ./atuin/ks.yaml
|
||||
- ./maintainerr/ks.yaml
|
||||
- ./overseerr/ks.yaml
|
||||
- ./prowlarr/ks.yaml
|
||||
|
|
Loading…
Reference in a new issue