mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 20:29:23 +00:00
Rename deploy to orchestration
Also updates README to note prior unnoted folders.
This commit is contained in:
5
orchestration/kubernetes/charts/bitcoin/Chart.yaml
Normal file
5
orchestration/kubernetes/charts/bitcoin/Chart.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
apiVersion: v2
|
||||
name: bitcoin
|
||||
description: A Helm chart for bitcoin-daemon
|
||||
type: application
|
||||
version: 0.1.0
|
||||
@@ -0,0 +1,42 @@
|
||||
{{- define "bitcoin.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 253 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "bitcoin.fullname" -}}
|
||||
{{- if .Values.fullnameOverride }}
|
||||
{{- .Values.fullnameOverride | trunc 253 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||
{{- if contains $name .Release.Name }}
|
||||
{{- .Release.Name | trunc 253 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 253 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "bitcoin.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 253 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "bitcoin.labels" -}}
|
||||
helm.sh/chart: {{ include "bitcoin.chart" . }}
|
||||
{{ include "bitcoin.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "bitcoin.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "bitcoin.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "bitcoin.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
{{- default (include "bitcoin.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.serviceAccount.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,7 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-configmap
|
||||
data:
|
||||
entry-dev.sh: |
|
||||
{{ .Values.configMapFile | b64dec | indent 4}}
|
||||
@@ -0,0 +1,88 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "bitcoin.fullname" . }}
|
||||
labels:
|
||||
{{- include "bitcoin.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- if not .Values.autoscaling.enabled }}
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "bitcoin.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
{{- with .Values.podAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "bitcoin.selectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "bitcoin.serviceAccountName" . }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if hasKey .Values.image "ports" }}
|
||||
ports:
|
||||
{{- range .Values.image.ports }}
|
||||
- name: {{ .name }}
|
||||
containerPort: {{ .containerPort }}
|
||||
{{- end }}
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
|
||||
{{- if hasKey .Values.image "command" }}
|
||||
command:
|
||||
{{- toYaml .Values.image.command | nindent 12 }}
|
||||
{{- end }}
|
||||
|
||||
{{- if hasKey .Values.image "args" }}
|
||||
args:
|
||||
{{- toYaml .Values.image.args | nindent 12 }}
|
||||
{{- end }}
|
||||
|
||||
{{- if hasKey .Values.image "envVariables" }}
|
||||
env:
|
||||
{{- toYaml .Values.image.envVariables | nindent 12 }}
|
||||
{{- end }}
|
||||
|
||||
{{- if hasKey .Values.image "volumeMounts" }}
|
||||
volumeMounts:
|
||||
{{- range .Values.image.volumeMounts }}
|
||||
- mountPath: {{ .mountPath }}
|
||||
name: {{ $.Release.Name}}-{{ .name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if hasKey .Values "volumes" }}
|
||||
volumes:
|
||||
{{- range .Values.volumes }}
|
||||
- configMap:
|
||||
defaultMode: {{ .configMap.defaultMode }}
|
||||
name: {{ $.Release.Name}}-{{ .configMap.name }}
|
||||
name: {{ $.Release.Name}}-{{ .name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,50 @@
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
{{- $fullName := include "bitcoin.fullname" . -}}
|
||||
{{- $svcPort := .Values.service.port -}}
|
||||
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
|
||||
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
|
||||
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ $fullName }}
|
||||
labels:
|
||||
{{- include "bitcoin.labels" . | nindent 4 }}
|
||||
{{- with .Values.ingress.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.ingress.className }}
|
||||
ingressClassName: {{ .Values.ingress.className }}
|
||||
{{- end }}
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
{{- range .Values.ingress.tls }}
|
||||
- hosts:
|
||||
{{- range .hosts }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
secretName: {{ .secretName }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- host: {{ .host | quote }}
|
||||
http:
|
||||
paths:
|
||||
{{- range .paths }}
|
||||
- path: {{ .path }}
|
||||
{{- if .pathType }}
|
||||
pathType: {{ .pathType }}
|
||||
{{- end }}
|
||||
backend:
|
||||
service:
|
||||
name: {{ $fullName }}
|
||||
port:
|
||||
number: {{ $svcPort }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,24 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "bitcoin.fullname" . }}
|
||||
labels:
|
||||
{{- include "bitcoin.labels" . | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
ports:
|
||||
{{- if hasKey .Values.service "ports" }}
|
||||
{{- range .Values.service.ports }}
|
||||
- port: {{ .port }}
|
||||
name: {{ .name }}
|
||||
targetPort: {{ .targetPort }}
|
||||
protocol: {{ .protocol }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
- port: {{ .Values.service.port }}
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
{{- end }}
|
||||
selector:
|
||||
{{- include "bitcoin.selectorLabels" . | nindent 4 }}
|
||||
74
orchestration/kubernetes/charts/bitcoin/values.yaml
Normal file
74
orchestration/kubernetes/charts/bitcoin/values.yaml
Normal file
@@ -0,0 +1,74 @@
|
||||
replicaCount: 1
|
||||
|
||||
net: mainnet
|
||||
|
||||
image:
|
||||
repository: serai-dev-bitcoin
|
||||
pullPolicy: IfNotPresent
|
||||
tag: "latest"
|
||||
ports:
|
||||
- name: p2p
|
||||
containerPort: 18444
|
||||
protocol: TCP
|
||||
- name: rpc
|
||||
containerPort: 18443
|
||||
protocol: TCP
|
||||
volumeMounts:
|
||||
- mountPath: /scripts
|
||||
name: configmap-volume
|
||||
args:
|
||||
- bash
|
||||
- /scripts/entry-dev.sh
|
||||
|
||||
volumes:
|
||||
- configMap:
|
||||
defaultMode: 420
|
||||
name: configmap
|
||||
name: configmap-volume
|
||||
|
||||
configMapFile: "entry-dev.sh"
|
||||
|
||||
imagePullSecrets: []
|
||||
|
||||
serviceAccount:
|
||||
create: false
|
||||
name: ""
|
||||
|
||||
podAnnotations: {}
|
||||
|
||||
podSecurityContext: {}
|
||||
|
||||
securityContext: {}
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- name: p2p
|
||||
port: 18444
|
||||
targetPort: p2p
|
||||
protocol: TCP
|
||||
- name: rpc
|
||||
port: 18443
|
||||
targetPort: rpc
|
||||
protocol: TCP
|
||||
|
||||
ingress:
|
||||
enabled: false
|
||||
className: ""
|
||||
annotations: {}
|
||||
hosts: []
|
||||
tls: []
|
||||
|
||||
resources: {}
|
||||
|
||||
autoscaling:
|
||||
enabled: false
|
||||
minReplicas: 1
|
||||
maxReplicas: 100
|
||||
targetCPUUtilizationPercentage: 80
|
||||
|
||||
nodeSelector: {}
|
||||
|
||||
tolerations: []
|
||||
|
||||
affinity: {}
|
||||
Reference in New Issue
Block a user