Start refactoring

This commit is contained in:
Nikolai Rodionov
2023-10-23 22:16:51 +02:00
committed by Nikolai Rodionov
parent e54ea10a13
commit 8953975205
69 changed files with 3028 additions and 0 deletions

View File

@ -0,0 +1,20 @@
---
certificate:
templates:
- |
{{ range .Values.certificate }}
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: {{ .name }}
spec:
dnsNames:
{{- range .dnsNames }}
- {{ . | quote }}
{{- end }}
issuerRef:
kind: {{ .issuer.kind }}
name: {{ .issuer.name }}
secretName: {{ .secretName }}
{{ end }}

View File

@ -0,0 +1,16 @@
---
ext-database:
templates:
- |
---
apiVersion: kinda.rocks/v1beta1
kind: Database
metadata:
name: "{{ .Values.name }}"
spec:
secretName: "{{ .Values.name }}-creds"
instance: "{{ .Values.instance }}"
deletionProtected: false
backup:
enable: false
cron: 0 0 * * *

View File

@ -0,0 +1,16 @@
---
istio-gateway:
templates:
- |
{{ range .Values.gateways }}
---
apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:
name: {{ .name }}
spec:
selector:
istio: ingressgateway
servers:
{{ toYaml .servers | indent 4 }}
{{ end }}

View File

@ -0,0 +1,36 @@
---
istio:
templates:
- |
{{ range .Values.istio }}
---
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: {{ .name }}
spec:
gateways:
- "{{ .gateway }}"
hosts:
- {{ .hostname | quote }}
{{- if eq .kind "http" }}
http:
- match:
- uri:
prefix: /
route:
- destination:
host: {{ .service }}
port:
number: {{ .port }}
{{- else if eq .kind "tcp" }}
tcp:
- match:
- port: {{ .port_match }}
route:
- destination:
host: {{ .service }}
port:
number: {{ .port }}
{{ end }}
{{ end }}

View File

@ -0,0 +1,4 @@
apiService:
insecureSkipTLSVerify: true
args:
- --kubelet-insecure-tls

View File

@ -0,0 +1,8 @@
ns:
templates:
- |
apiVersion: v1
kind: Namespace
metadata:
name: {{ .Values.name }}

View File

@ -0,0 +1,16 @@
---
service-monitor:
templates:
- |
{{ range .Values.service-monitor.resources }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ .name }}
spec:
selector:
matchLabels:
app: {{ .label.app }}
endpoints:
- port: {{ .endpoints.port }}
{{ end }}