add yonote-onprem-service
This commit is contained in:
10
yonote-chart-service/templates/configmap.yaml
Normal file
10
yonote-chart-service/templates/configmap.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: yonote-configs
|
||||
labels:
|
||||
{{- include "common.labels.standard" $ | nindent 4 }}
|
||||
{{- with .Values.global.yonote.config.plain.data }}
|
||||
data:
|
||||
{{- include "common.tplvalues.render" (dict "value" . "context" $) | nindent 2 }}
|
||||
{{- end }}
|
||||
69
yonote-chart-service/templates/cronjob.yaml
Normal file
69
yonote-chart-service/templates/cronjob.yaml
Normal file
@@ -0,0 +1,69 @@
|
||||
{{- if eq ($.Values.global.yonote_cron_calendar_events.cron_enabled | toString) "true" }}
|
||||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: cron-calendar-events
|
||||
spec:
|
||||
schedule: "*/1 * * * *"
|
||||
jobTemplate:
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: cron-calendar-events
|
||||
image: curlimages/curl
|
||||
imagePullPolicy: IfNotPresent
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: yonote-secrets
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- >-
|
||||
date;
|
||||
curl
|
||||
-X POST
|
||||
{{ .Values.global.yonote_cron_calendar_events.url }}
|
||||
-H "Content-Type: application/json"
|
||||
-d '
|
||||
{
|
||||
"token": "$(UTILS_SECRET)"
|
||||
}
|
||||
'
|
||||
restartPolicy: OnFailure
|
||||
{{- end }}
|
||||
---
|
||||
{{- if eq ($.Values.global.yonote_cron_task_scheduler.cron_enabled | toString) "true" }}
|
||||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: cron-task-scheduler
|
||||
spec:
|
||||
schedule: "0 */1 * * *"
|
||||
jobTemplate:
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: cron-task-scheduler
|
||||
image: curlimages/curl
|
||||
imagePullPolicy: IfNotPresent
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: yonote-secrets
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- >-
|
||||
date;
|
||||
curl
|
||||
-X POST
|
||||
{{ .Values.global.yonote_cron_task_scheduler.url }}
|
||||
-H "Content-Type: application/json"
|
||||
-d '
|
||||
{
|
||||
"token":"$(UTILS_SECRET)", "limit":"200"
|
||||
}
|
||||
'
|
||||
restartPolicy: OnFailure
|
||||
{{- end }}
|
||||
34
yonote-chart-service/templates/ingress.yaml
Normal file
34
yonote-chart-service/templates/ingress.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
{{- if .Values.ingress.enabled }}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ .Values.ingress.name }}
|
||||
namespace: {{ .Values.ingress.namespace }}
|
||||
annotations:
|
||||
{{- range $key, $value := .Values.ingress.annotations }}
|
||||
{{ $key }}: "{{ $value }}"
|
||||
{{- end }}
|
||||
spec:
|
||||
ingressClassName: {{ .Values.ingress.ingressClassName }}
|
||||
tls:
|
||||
- secretName: "{{ .Values.ingress.tls.secretName }}"
|
||||
hosts:
|
||||
{{- range .Values.ingress.tls.hosts }}
|
||||
- "{{ . }}"
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range .Values.ingress.rules }}
|
||||
- host: "{{ .host }}"
|
||||
http:
|
||||
paths:
|
||||
{{- range .paths }}
|
||||
- path: {{ .path }}
|
||||
pathType: {{ .pathType }}
|
||||
backend:
|
||||
service:
|
||||
name: {{ .service.name }}
|
||||
port:
|
||||
number: {{ .service.port | int }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
14
yonote-chart-service/templates/secret.yaml
Normal file
14
yonote-chart-service/templates/secret.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: yonote-secrets
|
||||
labels:
|
||||
{{- include "common.labels.standard" $ | nindent 4 }}
|
||||
type: Opaque
|
||||
{{- with .Values.global.yonote.config.secret.data }}
|
||||
data:
|
||||
{{- toYaml . | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- with .Values.global.yonote.config.secret.stringData }}
|
||||
stringData: {{- include "common.tplvalues.render" (dict "value" . "context" $) | nindent 2 }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user