Compare commits

...

2 Commits

Author SHA1 Message Date
cd1cd7884c
Added redis 2023-02-24 21:19:40 +01:00
d21f2d0b87
Basic argo deployment 2023-02-24 21:14:12 +01:00
5 changed files with 142 additions and 0 deletions

24
.argo/application.yaml Normal file
View File

@ -0,0 +1,24 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
annotations:
argocd-image-updater.argoproj.io/image-list: dashboard=registry.odit.services/library/npm-cache-proxy:latest
argocd-image-updater.argoproj.io/write-back-method: argocd
argocd-image-updater.argoproj.io/update-strategy: digest
name: npm-cache
namespace: argocd
spec:
project: default
source:
repoURL: "git@git.odit.services:odit/npm-cache-proxy.git"
path: .argo
targetRevision: dev
destination:
server: "https://kubernetes.default.svc"
namespace: drone
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- PruneLast=true

69
.argo/deployment.yaml Normal file
View File

@ -0,0 +1,69 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: npm-cache
namespace: drone
labels:
app: npm-cache
spec:
replicas: 1
selector:
matchLabels:
app: npm-cache
template:
metadata:
labels:
app: npm-cache
spec:
containers:
- name: npm-cache
image: registry.odit.services/library/npm-cache-proxy:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
name: web
env:
- name: CACHE_TTL
value: "43200"
- name: LISTEN_ADDRESS
value: "0.0.0.0:8080"
- name: UPSTREAM_ADDRESS
value: "https://registry.npmjs.org"
restartPolicy: Always
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: npm-cache-redis
namespace: drone
labels:
app: npm-cache-redis
spec:
replicas: 1
selector:
matchLabels:
app: npm-cache-redis
template:
metadata:
labels:
app: npm-cache-redis
spec:
containers:
- name: npm-cache-redis
image: registry.odit.services/hub/redis/redis-stack:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8001
name: web
- containerPort: 6379
name: redis
volumeMounts:
- name: data
mountPath: /data
restartPolicy: Always
volumes:
- name: data
persistentVolumeClaim:
claimName: "npm-cache-redis"

5
.argo/kustomization.yaml Normal file
View File

@ -0,0 +1,5 @@
commonLabels:
app: npm-cache
resources:
- deployment.yaml
- service.yaml

15
.argo/pvc.yaml Normal file
View File

@ -0,0 +1,15 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: npm-cache-redis
namespace: drone
labels:
app: npm-cache-redis
spec:
accessModes:
- ReadWriteOnce
storageClassName: "longhorn"
resources:
requests:
storage: 20Gi

29
.argo/service.yaml Normal file
View File

@ -0,0 +1,29 @@
---
apiVersion: v1
kind: Service
metadata:
name: npm-cache
namespace: drone
labels:
app: npm-cache
spec:
ports:
- port: 8080
selector:
app: npm-cache
clusterIP: None
---
apiVersion: v1
kind: Service
metadata:
name: npm-cache-redis
namespace: drone
labels:
app: npm-cache-redis
spec:
ports:
- port: 8080
- port: 6379
selector:
app: npm-cache-redis
clusterIP: None