OneLab Kubernetes GitOps (Argo CD)
- Helm charts: onelab app + observability (Loki/Promtail/Grafana) - Values under gitops/values/ with public-safe placeholders - Argo CD Application (spec.sources, 2.6+) Made-with: Cursor
This commit is contained in:
73
gitops/charts/onelab/templates/deployment-revproxy.yaml
Normal file
73
gitops/charts/onelab/templates/deployment-revproxy.yaml
Normal file
@@ -0,0 +1,73 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: revproxy
|
||||
labels:
|
||||
{{- include "onelab.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-wave: {{ .Values.syncWaves.apps | quote }}
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: revproxy
|
||||
app.kubernetes.io/name: {{ include "onelab.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: revproxy
|
||||
app.kubernetes.io/name: {{ include "onelab.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: nginx
|
||||
image: {{ printf "%s/%s:%s" .Values.images.registry .Values.images.nginx .Values.images.nginxTag | quote }}
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: http
|
||||
volumeMounts:
|
||||
- name: nginx
|
||||
mountPath: /etc/nginx/nginx.conf
|
||||
subPath: nginx.conf
|
||||
- name: nginx
|
||||
mountPath: /data/error-404.html
|
||||
subPath: error-404.html
|
||||
- name: data
|
||||
mountPath: /data
|
||||
volumes:
|
||||
- name: nginx
|
||||
configMap:
|
||||
name: onelab-revproxy
|
||||
- name: data
|
||||
{{- if eq .Values.persistence.mode "hostPath" }}
|
||||
hostPath:
|
||||
path: {{ .Values.persistence.hostPath.data }}
|
||||
type: DirectoryOrCreate
|
||||
{{- else }}
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: revproxy
|
||||
labels:
|
||||
{{- include "onelab.labels" . | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.revproxy.serviceType }}
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: http
|
||||
name: http
|
||||
{{- if and (eq .Values.revproxy.serviceType "NodePort") .Values.revproxy.nodePort }}
|
||||
nodePort: {{ .Values.revproxy.nodePort }}
|
||||
{{- end }}
|
||||
selector:
|
||||
app.kubernetes.io/component: revproxy
|
||||
app.kubernetes.io/name: {{ include "onelab.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
Reference in New Issue
Block a user