refactor: rename central-storage to centralStorage and update payment configuration files
Signed-off-by: zhenyus <zhenyus@mathmast.com>
This commit is contained in:
parent
380e92e973
commit
a1b6760fff
@ -32,7 +32,7 @@ executeFreeleapsPipeline {
|
||||
semanticReleaseEnabled: true
|
||||
],
|
||||
[
|
||||
name: 'central-storage',
|
||||
name: 'centralStorage',
|
||||
root: 'apps/central_storage',
|
||||
language: 'python',
|
||||
dependenciesManager: 'pip',
|
||||
|
||||
@ -1,17 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: central-storage-config
|
||||
namespace: {{ .Release.Namespace }}
|
||||
type: Opaque
|
||||
data:
|
||||
TZ: {{ .Values.central-storage.configs.tz | b64enc | quote }}
|
||||
APP_NAME: {{ .Values.central-storage.configs.appName | b64enc | quote }}
|
||||
SERVICE_API_ACCESS_HOST: {{ .Values.central-storage.configs.serviceApiAccessHost | b64enc | quote }}
|
||||
SERVICE_API_ACCESS_PORT: {{ .Values.central-storage.configs.serviceApiAccessPort | toString | b64enc }}
|
||||
MONGODB_NAME: {{ .Values.central-storage.configs.mongodbName | b64enc | quote }}
|
||||
MONGODB_PORT: {{ .Values.central-storage.configs.mongodbPort | toString | b64enc }}
|
||||
MONGODB_URI: {{ .Values.central-storage.configs.mongodbUri | b64enc | quote }}
|
||||
AZURE_STORAGE_DOCUMENT_API_KEY: {{ .Values.central-storage.configs.azureStorageDocumentApiKey | b64enc | quote }}
|
||||
AZURE_STORAGE_DOCUMENT_API_ENDPOINT: {{ .Values.central-storage.configs.azureStorageDocumentApiEndpoint | b64enc | quote }}
|
||||
|
||||
@ -1,98 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
app.kubernetes.io/name: "central-storage"
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
name: "central-storage"
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: "central-storage"
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
replicas: {{ .Values.central-storage.replicas }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
app.kubernetes.io/name: "central-storage"
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
spec:
|
||||
containers:
|
||||
- name: "central-storage"
|
||||
image: "{{ coalesce .Values.central-storage.image.registry .Values.global.registry "docker.io"}}/{{ coalesce .Values.central-storage.image.repository .Values.global.repository }}/{{ .Values.central-storage.image.name }}:{{ .Values.central-storage.image.tag | default "latest" }}"
|
||||
imagePullPolicy: {{ .Values.central-storage.image.imagePullPolicy | default "IfNotPresent" }}
|
||||
ports:
|
||||
{{- range $port := .Values.central-storage.ports }}
|
||||
- containerPort: {{ $port.containerPort }}
|
||||
name: {{ $port.name }}
|
||||
protocol: {{ $port.protocol }}
|
||||
{{- end }}
|
||||
{{- if .Values.central-storage.resources }}
|
||||
resources:
|
||||
{{- toYaml .Values.central-storage.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.central-storage.probes }}
|
||||
{{- if and (.Values.central-storage.probes.liveness) (eq .Values.central-storage.probes.liveness.type "httpGet") }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: {{ .Values.central-storage.probes.liveness.config.path }}
|
||||
port: {{ .Values.central-storage.probes.liveness.config.port }}
|
||||
{{- if .Values.central-storage.probes.liveness.config.initialDelaySeconds }}
|
||||
initialDelaySeconds: {{ .Values.central-storage.probes.liveness.config.initialDelaySeconds }}
|
||||
{{- end }}
|
||||
{{- if .Values.central-storage.probes.liveness.config.periodSeconds }}
|
||||
periodSeconds: {{ .Values.central-storage.probes.liveness.config.periodSeconds }}
|
||||
{{- end }}
|
||||
{{- if .Values.central-storage.probes.liveness.config.timeoutSeconds }}
|
||||
timeoutSeconds: {{ .Values.central-storage.probes.liveness.config.timeoutSeconds }}
|
||||
{{- end }}
|
||||
{{- if .Values.central-storage.probes.liveness.config.successThreshold }}
|
||||
successThreshold: {{ .Values.central-storage.probes.liveness.config.successThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.central-storage.probes.liveness.config.failureThreshold }}
|
||||
failureThreshold: {{ .Values.central-storage.probes.liveness.config.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.central-storage.probes.liveness.config.terminationGracePeriodSeconds }}
|
||||
terminationGracePeriodSeconds: {{ .Values.central-storage.probes.liveness.config.terminationGracePeriodSeconds }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if and (.Values.central-storage.probes.readiness) (eq .Values.central-storage.probes.readiness.type "httpGet") }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: {{ .Values.central-storage.probes.readiness.config.path }}
|
||||
port: {{ .Values.central-storage.probes.readiness.config.port }}
|
||||
{{- if .Values.central-storage.probes.readiness.config.initialDelaySeconds }}
|
||||
initialDelaySeconds: {{ .Values.central-storage.probes.readiness.config.initialDelaySeconds }}
|
||||
{{- end }}
|
||||
{{- if .Values.central-storage.probes.readiness.config.periodSeconds }}
|
||||
periodSeconds: {{ .Values.central-storage.probes.readiness.config.periodSeconds }}
|
||||
{{- end }}
|
||||
{{- if .Values.central-storage.probes.readiness.config.timeoutSeconds }}
|
||||
timeoutSeconds: {{ .Values.central-storage.probes.readiness.config.timeoutSeconds }}
|
||||
{{- end }}
|
||||
{{- if .Values.central-storage.probes.readiness.config.successThreshold }}
|
||||
successThreshold: {{ .Values.central-storage.probes.readiness.config.successThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.central-storage.probes.readiness.config.failureThreshold }}
|
||||
failureThreshold: {{ .Values.central-storage.probes.readiness.config.failureThreshold }}
|
||||
{{- end }}:%
|
||||
{{- if .Values.central-storage.probes.readiness.config.terminationGracePeriodSeconds }}
|
||||
terminationGracePeriodSeconds: {{ .Values.central-storage.probes.readiness.config.terminationGracePeriodSeconds }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end}}
|
||||
env:
|
||||
{{- range $key, $value := .Values.central-storage.configs }}
|
||||
- name: {{ $key | snakecase | upper }}
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: central-storage-config
|
||||
key: {{ $key | snakecase | upper }}
|
||||
{{- end }}
|
||||
@ -0,0 +1,17 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: central-storage-config
|
||||
namespace: {{ .Release.Namespace }}
|
||||
type: Opaque
|
||||
data:
|
||||
TZ: {{ .Values.centralStorage.configs.tz | b64enc | quote }}
|
||||
APP_NAME: {{ .Values.centralStorage.configs.appName | b64enc | quote }}
|
||||
SERVICE_API_ACCESS_HOST: {{ .Values.centralStorage.configs.serviceApiAccessHost | b64enc | quote }}
|
||||
SERVICE_API_ACCESS_PORT: {{ .Values.centralStorage.configs.serviceApiAccessPort | toString | b64enc }}
|
||||
MONGODB_NAME: {{ .Values.centralStorage.configs.mongodbName | b64enc | quote }}
|
||||
MONGODB_PORT: {{ .Values.centralStorage.configs.mongodbPort | toString | b64enc }}
|
||||
MONGODB_URI: {{ .Values.centralStorage.configs.mongodbUri | b64enc | quote }}
|
||||
AZURE_STORAGE_DOCUMENT_API_KEY: {{ .Values.centralStorage.configs.azureStorageDocumentApiKey | b64enc | quote }}
|
||||
AZURE_STORAGE_DOCUMENT_API_ENDPOINT: {{ .Values.centralStorage.configs.azureStorageDocumentApiEndpoint | b64enc | quote }}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
{{ $appVersion := .Chart.AppVersion | quote }}
|
||||
{{ $releaseCertificate := .Release.Service }}
|
||||
{{ $releaseName := .Release.Name }}
|
||||
{{- range $ingress := .Values.central-storage.ingresses }}
|
||||
{{- range $ingress := .Values.centralStorage.ingresses }}
|
||||
{{- if not $ingress.tls.exists }}
|
||||
---
|
||||
apiVersion: cert-manager.io/v1
|
||||
@ -0,0 +1,98 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
app.kubernetes.io/name: "central-storage"
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
name: "central-storage"
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: "central-storage"
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
replicas: {{ .Values.centralStorage.replicas }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
app.kubernetes.io/name: "central-storage"
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
spec:
|
||||
containers:
|
||||
- name: "central-storage"
|
||||
image: "{{ coalesce .Values.centralStorage.image.registry .Values.global.registry "docker.io"}}/{{ coalesce .Values.centralStorage.image.repository .Values.global.repository }}/{{ .Values.centralStorage.image.name }}:{{ .Values.centralStorage.image.tag | default "latest" }}"
|
||||
imagePullPolicy: {{ .Values.centralStorage.image.imagePullPolicy | default "IfNotPresent" }}
|
||||
ports:
|
||||
{{- range $port := .Values.centralStorage.ports }}
|
||||
- containerPort: {{ $port.containerPort }}
|
||||
name: {{ $port.name }}
|
||||
protocol: {{ $port.protocol }}
|
||||
{{- end }}
|
||||
{{- if .Values.centralStorage.resources }}
|
||||
resources:
|
||||
{{- toYaml .Values.centralStorage.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.centralStorage.probes }}
|
||||
{{- if and (.Values.centralStorage.probes.liveness) (eq .Values.centralStorage.probes.liveness.type "httpGet") }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: {{ .Values.centralStorage.probes.liveness.config.path }}
|
||||
port: {{ .Values.centralStorage.probes.liveness.config.port }}
|
||||
{{- if .Values.centralStorage.probes.liveness.config.initialDelaySeconds }}
|
||||
initialDelaySeconds: {{ .Values.centralStorage.probes.liveness.config.initialDelaySeconds }}
|
||||
{{- end }}
|
||||
{{- if .Values.centralStorage.probes.liveness.config.periodSeconds }}
|
||||
periodSeconds: {{ .Values.centralStorage.probes.liveness.config.periodSeconds }}
|
||||
{{- end }}
|
||||
{{- if .Values.centralStorage.probes.liveness.config.timeoutSeconds }}
|
||||
timeoutSeconds: {{ .Values.centralStorage.probes.liveness.config.timeoutSeconds }}
|
||||
{{- end }}
|
||||
{{- if .Values.centralStorage.probes.liveness.config.successThreshold }}
|
||||
successThreshold: {{ .Values.centralStorage.probes.liveness.config.successThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.centralStorage.probes.liveness.config.failureThreshold }}
|
||||
failureThreshold: {{ .Values.centralStorage.probes.liveness.config.failureThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.centralStorage.probes.liveness.config.terminationGracePeriodSeconds }}
|
||||
terminationGracePeriodSeconds: {{ .Values.centralStorage.probes.liveness.config.terminationGracePeriodSeconds }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if and (.Values.centralStorage.probes.readiness) (eq .Values.centralStorage.probes.readiness.type "httpGet") }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: {{ .Values.centralStorage.probes.readiness.config.path }}
|
||||
port: {{ .Values.centralStorage.probes.readiness.config.port }}
|
||||
{{- if .Values.centralStorage.probes.readiness.config.initialDelaySeconds }}
|
||||
initialDelaySeconds: {{ .Values.centralStorage.probes.readiness.config.initialDelaySeconds }}
|
||||
{{- end }}
|
||||
{{- if .Values.centralStorage.probes.readiness.config.periodSeconds }}
|
||||
periodSeconds: {{ .Values.centralStorage.probes.readiness.config.periodSeconds }}
|
||||
{{- end }}
|
||||
{{- if .Values.centralStorage.probes.readiness.config.timeoutSeconds }}
|
||||
timeoutSeconds: {{ .Values.centralStorage.probes.readiness.config.timeoutSeconds }}
|
||||
{{- end }}
|
||||
{{- if .Values.centralStorage.probes.readiness.config.successThreshold }}
|
||||
successThreshold: {{ .Values.centralStorage.probes.readiness.config.successThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.centralStorage.probes.readiness.config.failureThreshold }}
|
||||
failureThreshold: {{ .Values.centralStorage.probes.readiness.config.failureThreshold }}
|
||||
{{- end }}:%
|
||||
{{- if .Values.centralStorage.probes.readiness.config.terminationGracePeriodSeconds }}
|
||||
terminationGracePeriodSeconds: {{ .Values.centralStorage.probes.readiness.config.terminationGracePeriodSeconds }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end}}
|
||||
env:
|
||||
{{- range $key, $value := .Values.centralStorage.configs }}
|
||||
- name: {{ $key | snakecase | upper }}
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: central-storage-config
|
||||
key: {{ $key | snakecase | upper }}
|
||||
{{- end }}
|
||||
@ -2,7 +2,7 @@
|
||||
{{ $appVersion := .Chart.AppVersion | quote }}
|
||||
{{ $releaseIngress := .Release.Service }}
|
||||
{{ $releaseName := .Release.Name }}
|
||||
{{- range $ingress := .Values.central-storage.ingresses }}
|
||||
{{- range $ingress := .Values.centralStorage.ingresses }}
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
@ -2,7 +2,7 @@
|
||||
{{ $appVersion := .Chart.AppVersion | quote }}
|
||||
{{ $releaseService := .Release.Service }}
|
||||
{{ $releaseName := .Release.Name }}
|
||||
{{- range $service := .Values.central-storage.services }}
|
||||
{{- range $service := .Values.centralStorage.services }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
@ -2,7 +2,7 @@ global:
|
||||
registry: docker.io
|
||||
repository: freeleaps
|
||||
nodeSelector: {}
|
||||
central-storage:
|
||||
centralStorage:
|
||||
replicas: 1
|
||||
image:
|
||||
registry: docker.io
|
||||
|
||||
Loading…
Reference in New Issue
Block a user