Deployed atuin
This commit is contained in:
parent
1c19bd81e4
commit
7632acdd7f
3 changed files with 145 additions and 0 deletions
92
namespaces/apps/atuin/kustomization.yaml
Normal file
92
namespaces/apps/atuin/kustomization.yaml
Normal file
|
@ -0,0 +1,92 @@
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
transformers:
|
||||||
|
- |-
|
||||||
|
apiVersion: builtin
|
||||||
|
kind: NamespaceTransformer
|
||||||
|
metadata:
|
||||||
|
name: notImportantHere
|
||||||
|
namespace: apps
|
||||||
|
unsetOnly: true
|
||||||
|
|
||||||
|
namePrefix: atuin-
|
||||||
|
resources:
|
||||||
|
- ../../../kustomize/deployment/
|
||||||
|
|
||||||
|
replacements:
|
||||||
|
- source:
|
||||||
|
kind: Service
|
||||||
|
name: svc
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HTTPRoute
|
||||||
|
options:
|
||||||
|
create: true
|
||||||
|
fieldPaths:
|
||||||
|
- spec.rules.0.backendRefs.0.name
|
||||||
|
- source:
|
||||||
|
kind: Deployment
|
||||||
|
name: app
|
||||||
|
fieldPath: metadata.labels.[app.kubernetes.io/appName]
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: HTTPRoute
|
||||||
|
options:
|
||||||
|
create: true
|
||||||
|
delimiter: "."
|
||||||
|
index: 0
|
||||||
|
fieldPaths:
|
||||||
|
- spec.hostnames.0
|
||||||
|
- select:
|
||||||
|
kind: InfisicalSecret
|
||||||
|
options:
|
||||||
|
delimiter: "-"
|
||||||
|
index: 0
|
||||||
|
fieldPaths:
|
||||||
|
- spec.managedSecretReference.secretName
|
||||||
|
- select:
|
||||||
|
kind: InfisicalSecret
|
||||||
|
options:
|
||||||
|
delimiter: "/"
|
||||||
|
index: 2
|
||||||
|
fieldPaths:
|
||||||
|
- spec.authentication.universalAuth.secretsScope.secretsPath
|
||||||
|
- select:
|
||||||
|
kind: Service
|
||||||
|
fieldPaths:
|
||||||
|
- spec.ports.0.name
|
||||||
|
- spec.ports.0.targetPort
|
||||||
|
- source:
|
||||||
|
kind: Deployment
|
||||||
|
name: app
|
||||||
|
fieldPath: metadata.labels.[app.kubernetes.io/appNamespace]
|
||||||
|
targets:
|
||||||
|
- select:
|
||||||
|
kind: InfisicalSecret
|
||||||
|
fieldPaths:
|
||||||
|
- spec.managedSecretReference.secretNamespace
|
||||||
|
|
||||||
|
patches:
|
||||||
|
- path: patches/deployment.yaml
|
||||||
|
target:
|
||||||
|
kind: Deployment
|
||||||
|
name: app
|
||||||
|
- target:
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
name: pvc
|
||||||
|
path: patches/delete-pvc.yaml
|
||||||
|
|
||||||
|
labels:
|
||||||
|
- includeSelectors: true
|
||||||
|
pairs:
|
||||||
|
app.kubernetes.io/appName: atuin
|
||||||
|
- pairs:
|
||||||
|
app.kubernetes.io/appNamespace: apps
|
||||||
|
|
||||||
|
configMapGenerator:
|
||||||
|
- name: config
|
||||||
|
literals:
|
||||||
|
- ATUIN_HOST="0.0.0.0"
|
||||||
|
- ATUIN_PORT="8888"
|
||||||
|
- ATUIN_OPEN_REGISTRATION="true"
|
5
namespaces/apps/atuin/patches/delete-pvc.yaml
Normal file
5
namespaces/apps/atuin/patches/delete-pvc.yaml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
$patch: delete
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: pvc
|
48
namespaces/apps/atuin/patches/deployment.yaml
Normal file
48
namespaces/apps/atuin/patches/deployment.yaml
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: app
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- args:
|
||||||
|
- server
|
||||||
|
- start
|
||||||
|
env:
|
||||||
|
- name: ATUIN_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: atuin-secrets
|
||||||
|
key: ATUIN_PASSWORD
|
||||||
|
optional: false
|
||||||
|
- name: ATUIN_DB_URI
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: atuin-secrets
|
||||||
|
key: ATUIN_DB_URI
|
||||||
|
optional: false
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: atuin-config
|
||||||
|
image: ghcr.io/atuinsh/atuin:latest
|
||||||
|
name: atuin
|
||||||
|
ports:
|
||||||
|
- containerPort: 8888
|
||||||
|
name: atuin
|
||||||
|
protocol: TCP
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /
|
||||||
|
port: atuin
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /
|
||||||
|
port: atuin
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 250m
|
||||||
|
memory: 1Gi
|
||||||
|
requests:
|
||||||
|
cpu: 250m
|
||||||
|
memory: 1Gi
|
Loading…
Add table
Reference in a new issue