Commit a81e56f6 authored by 徐泽意's avatar 徐泽意

create charts

parents
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
{
"recommendations": []
}
\ No newline at end of file
apiVersion: v2
name: usma
description: A Helm chart for Kubernetes
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 1.16.0
name: file-upload
version: v2.0.0
description: file-upload
appVersion: v2.0.0
apiVersion: v1
keywords:
- file-upload
- usma
maintainers:
- name: xuzeyi
email: xuzeyi@wodcloud.com
\ No newline at end of file
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "file-upload.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/* Helm required labels */}}
{{- define "file-upload.labels" -}}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
{{- end -}}
{{/* matchLabels */}}
{{- define "file-upload.matchLabels" -}}
release: {{ .Release.Name }}
app: "{{ template "file-upload.name" . }}"
{{- end -}}
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: file-upload
namespace: {{ .Release.Namespace }}
labels:
{{ include "file-upload.labels" . | indent 4 }}
app: file-upload
versoin: {{ .Values.tag }}
spec:
replicas: 1
selector:
matchLabels:
{{ include "file-upload.matchLabels" . | indent 6 }}
app: file-upload
version: {{ .Values.tag }}
template:
metadata:
labels:
{{ include "file-upload.labels" . | indent 8 }}
app: file-upload
version: {{ .Values.tag }}
spec:
nodeSelector:
{{ toYaml $.Values.nodeSelector | indent 8 }}
containers:
- name: file-upload
image: {{ .Values.global.hub }}/{{ .Values.image }}:{{ .Values.tag }}
imagePullPolicy: Always
resources:
{{- toYaml .Values.resources | nindent 12 }}
ports:
- name: http
containerPort: 80
protocol: TCP
livenessProbe:
tcpSocket:
port: 80
initialDelaySeconds: 50
periodSeconds: 10
timeoutSeconds: 1
successThreshold: 1
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- name: "localtime"
mountPath: "/etc/localtime"
- name: data
mountPath: "/app/static"
volumes:
- name: "localtime"
hostPath:
path: "/etc/localtime"
{{- if .Values.storageSpec.hostPath }}
- name: data
hostPath:
path: /data/{{ .Release.Namespace }}/file-upload
{{- else if .Values.storageSpec.emptyDir }}
- name: data
emptyDir: {}
{{- else if .Values.storageSpec.volumeClaimTemplate }}
volumeClaimTemplates:
- metadata:
name: "data"
labels:
{{ include "app.labels" . | indent 8 }}
app: file-upload
spec:
{{ toYaml $.Values.storageSpec.volumeClaimTemplate.spec | indent 6 }}
{{- end }}
\ No newline at end of file
apiVersion: v1
kind: Service
metadata:
name: file-upload
labels:
{{ include "file-upload.labels" . | indent 4 }}
app: file-upload
spec:
selector:
app: file-upload
ports:
- name: http
port: 80
targetPort: 80
protocol: TCP
name: sms-verify-api
version: v2.0.0
description: sms-verify-api
appVersion: v2.0.0
apiVersion: v1
keywords:
- sms-verify-api
- usma
maintainers:
- name: xuzeyi
email: xuzeyi@wodcloud.com
\ No newline at end of file
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "sms-verify-api.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/* Helm required labels */}}
{{- define "sms-verify-api.labels" -}}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
{{- end -}}
{{/* matchLabels */}}
{{- define "sms-verify-api.matchLabels" -}}
release: {{ .Release.Name }}
app: "{{ template "sms-verify-api.name" . }}"
{{- end -}}
apiVersion: v1
kind: Service
metadata:
name: sms-verify-api
labels:
{{ include "sms-verify-api.labels" . | indent 4 }}
app: sms-verify-api
spec:
selector:
app: sms-verify-api
ports:
- name: http
port: 80
targetPort: 8080
protocol: TCP
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: sms-verify-api
namespace: {{ .Release.Namespace }}
labels:
{{ include "sms-verify-api.labels" . | indent 4 }}
app: sms-verify-api
versoin: {{ .Values.tag }}
spec:
replicas: 1
selector:
matchLabels:
{{ include "sms-verify-api.matchLabels" . | indent 6 }}
app: sms-verify-api
template:
metadata:
labels:
{{ include "sms-verify-api.labels" . | indent 8 }}
app: sms-verify-api
version: {{ .Values.tag }}
spec:
volumes:
- name: localtime
hostPath:
path: /etc/localtime
containers:
- name: sms-verify-api
image: {{ .Values.global.hub }}/{{ .Values.image }}:{{ .Values.tag }}
ports:
- name: http
containerPort: 8080
protocol: TCP
livenessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 50
periodSeconds: 10
timeoutSeconds: 1
successThreshold: 1
resources:
{{- toYaml .Values.resources | nindent 12 }}
envFrom:
- configMapRef:
name: "sms"
volumeMounts:
- name: localtime
mountPath: /etc/localtime
imagePullPolicy: "Always"
restartPolicy: "Always"
name: usma-api
version: v1.0.0
description: usma-api
appVersion: v1.0.0
apiVersion: v1
keywords:
- usma-api
- usma
maintainers:
- name: xuzeyi
email: xuzeyi@wodcloud.com
\ No newline at end of file
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "usma-api.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/* Helm required labels */}}
{{- define "usma-api.labels" -}}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
{{- end -}}
{{/* matchLabels */}}
{{- define "usma-api.matchLabels" -}}
release: {{ .Release.Name }}
app: "{{ template "usma-api.name" . }}"
{{- end -}}
apiVersion: v1
kind: Service
metadata:
name: usma-api
labels:
{{ include "usma-api.labels" . | indent 4 }}
app: usma-api
spec:
selector:
app: usma-api
ports:
- name: http
port: 80
targetPort: 80
protocol: TCP
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: usma-api
namespace: {{ .Release.Namespace }}
labels:
{{ include "usma-api.labels" . | indent 4 }}
app: usma-api
versoin: {{ .Values.tag }}
spec:
replicas: 1
selector:
matchLabels:
{{ include "usma-api.matchLabels" . | indent 6 }}
app: usma-api
template:
metadata:
labels:
{{ include "usma-api.labels" . | indent 8 }}
app: usma-api
version: {{ .Values.tag }}
spec:
nodeSelector:
{{ toYaml $.Values.nodeSelector | indent 8 }}
containers:
- name: usma-api
image: {{ .Values.global.hub }}/{{ .Values.image }}:{{ .Values.tag }}
ports:
- name: http
containerPort: 8080
protocol: TCP
livenessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 50
periodSeconds: 10
timeoutSeconds: 1
successThreshold: 1
envFrom:
- configMapRef:
name: usma
volumeMounts:
- name: localtime
mountPath: /etc/localtime
- name: log
mountPath: "/app/log"
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumes:
- name: localtime
hostPath:
path: /etc/localtime
{{- if .Values.storageSpec.hostPath }}
- name: log
hostPath:
path: /data/{{ .Release.Namespace }}/usma-api/log
{{- else if .Values.storageSpec.emptyDir }}
- name: log
emptyDir: {}
{{- else if .Values.storageSpec.volumeClaimTemplate }}
volumeClaimTemplates:
- metadata:
name: "log"
labels:
{{ include "app.labels" . | indent 8 }}
app: usma-api
spec:
{{ toYaml $.Values.storageSpec.volumeClaimTemplate.spec | indent 6 }}
{{- end }}
name: usma-login-api
version: v1.0.0
description: usma-login-api
appVersion: v1.0.0
apiVersion: v1
keywords:
- usma-login-api
- usma
maintainers:
- name: xuzeyi
email: xuzeyi@wodcloud.com
\ No newline at end of file
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "usma-login-api.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/* Helm required labels */}}
{{- define "usma-login-api.labels" -}}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
{{- end -}}
{{/* matchLabels */}}
{{- define "usma-login-api.matchLabels" -}}
release: {{ .Release.Name }}
app: "{{ template "usma-login-api.name" . }}"
{{- end -}}
apiVersion: v1
kind: Service
metadata:
name: usma-login-api
labels:
{{ include "usma-login-api.labels" . | indent 4 }}
app: usma-login-api
spec:
selector:
app: usma-login-api
ports:
- name: usma-login-api
port: 80
targetPort: 80
protocol: TCP
\ No newline at end of file
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: usma-login-api
namespace: {{ .Release.Namespace }}
labels:
{{ include "usma-login-api.labels" . | indent 4 }}
app: usma-login-api
versoin: {{ .Values.tag }}
spec:
replicas: 1
selector:
matchLabels:
{{ include "usma-login-api.matchLabels" . | indent 6 }}
app: usma-login-api
template:
metadata:
labels:
{{ include "usma-login-api.labels" . | indent 8 }}
app: usma-login-api
spec:
volumes:
- name: "localtime"
hostPath:
path: "/etc/localtime"
containers:
- name: "usma-login-api"
image: {{ .Values.global.hub }}/{{ .Values.image }}:{{ .Values.tag }}
ports:
- name: "usma-login-api"
containerPort: 80
protocol: "TCP"
livenessProbe:
tcpSocket:
port: 80
initialDelaySeconds: 50
periodSeconds: 10
timeoutSeconds: 1
successThreshold: 1
resources:
{{- toYaml .Values.resources | nindent 12 }}
envFrom:
- configMapRef:
name: "usma"
volumeMounts:
- name: "localtime"
mountPath: "/etc/localtime"
name: usma-login
version: v2.0.0
description: usma-login
appVersion: v2.0.0
apiVersion: v1
keywords:
- usma-login
- usma
maintainers:
- name: xuzeyi
email: xuzeyi@wodcloud.com
\ No newline at end of file
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "usma-login.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/* Helm required labels */}}
{{- define "usma-login.labels" -}}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
{{- end -}}
{{/* matchLabels */}}
{{- define "usma-login.matchLabels" -}}
release: {{ .Release.Name }}
app: "{{ template "usma-login.name" . }}"
{{- end -}}
apiVersion: v1
kind: Service
metadata:
name: usma-login
labels:
{{ include "usma-login.labels" . | indent 4 }}
app: usma-login
spec:
selector:
app: usma-login
ports:
- name: http
port: 80
targetPort: 80
protocol: TCP
\ No newline at end of file
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: usma-login
namespace: {{ .Release.Namespace }}
labels:
{{ include "usma-login.labels" . | indent 4 }}
app: usma-login
versoin: {{ .Values.tag }}
spec:
replicas: 1
selector:
matchLabels:
{{ include "usma-login.matchLabels" . | indent 6 }}
app: usma-login
template:
metadata:
labels:
{{ include "usma-login.labels" . | indent 8 }}
app: usma-login
spec:
volumes:
- name: localtime
hostPath:
path: /etc/localtime
containers:
- name: usma-login
image: {{ .Values.global.hub }}/{{ .Values.image }}:{{ .Values.tag }}
imagePullPolicy: Always
resources:
{{- toYaml .Values.resources | nindent 12 }}
ports:
- name: http
containerPort: 80
livenessProbe:
httpGet:
path: /usma/login
port: 80
scheme: HTTP
volumeMounts:
- name: localtime
mountPath: "/etc/localtime"
\ No newline at end of file
name: usma-postgresql
version: 1.0.0
description: usma-postgresql
appVersion: 1.0.0
apiVersion: v1
keywords:
- usma-postgresql
- usma
maintainers:
- name: xuzeyi
email: xuzeyi@wodcloud.com
\ No newline at end of file
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "usma-postgresql.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/* Helm required labels */}}
{{- define "usma-postgresql.labels" -}}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
{{- end -}}
{{/* matchLabels */}}
{{- define "usma-postgresql.matchLabels" -}}
release: {{ .Release.Name }}
app: "{{ template "usma-postgresql.name" . }}"
{{- end -}}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: usma-postgresql-config
labels:
{{ include "usma-postgresql.labels" . | indent 4 }}
app: usma-postgresql
data:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: passwd123
\ No newline at end of file
apiVersion: v1
kind: Service
metadata:
name: usma-postgresql
labels:
{{ include "usma-postgresql.labels" . | indent 4 }}
app: usma-postgresql
spec:
selector:
app: usma-postgresql
ports:
- name: usma-postgresql
port: 5432
targetPort: 5432
protocol: TCP
\ No newline at end of file
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: usma-postgresql
namespace: {{ .Release.Namespace }}
labels:
{{ include "usma-postgresql.labels" . | indent 4 }}
app: usma-postgresql
spec:
replicas: 1
selector:
matchLabels:
{{ include "usma-postgresql.matchLabels" . | indent 6 }}
app: usma-postgresql
template:
metadata:
labels:
{{ include "usma-postgresql.labels" . | indent 8 }}
app: usma-postgresql
spec:
nodeSelector:
{{ toYaml $.Values.nodeSelector | indent 8 }}
containers:
- name: usma-postgresql
image: {{ .Values.global.hub }}/{{ .Values.image }}:{{ .Values.tag }}
imagePullPolicy: Always
ports:
- containerPort: 5432
livenessProbe:
tcpSocket:
port: 5432
initialDelaySeconds: 50
periodSeconds: 10
timeoutSeconds: 1
successThreshold: 1
envFrom:
- configMapRef:
name: usma-postgresql-config
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: data
- mountPath: /etc/localtime
name: localtime
volumes:
- name: localtime
hostPath:
path: /etc/localtime
{{- if .Values.storageSpec.hostPath }}
- name: data
hostPath:
path: /data/{{ .Release.Namespace }}/usma-postgresql
{{- else if .Values.storageSpec.emptyDir }}
- name: data
emptyDir: {}
{{- else if .Values.storageSpec.volumeClaimTemplate }}
volumeClaimTemplates:
- metadata:
name: data
labels:
{{ include "app.labels" . | indent 8 }}
app: usma-postgresql
spec:
{{ toYaml $.Values.storageSpec.volumeClaimTemplate.spec | indent 6 }}
{{- end }}
\ No newline at end of file
name: usma-redis
version: 5.0.3
description: usma-redis
appVersion: 5.0.3
apiVersion: v1
keywords:
- usma-redis
- usma
maintainers:
- name: xuzeyi
email: xuzeyi@wodcloud.com
\ No newline at end of file
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "usma-redis.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/* Helm required labels */}}
{{- define "usma-redis.labels" -}}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
{{- end -}}
{{/* matchLabels */}}
{{- define "usma-redis.matchLabels" -}}
release: {{ .Release.Name }}
app: "{{ template "usma-redis.name" . }}"
{{- end -}}
---
kind: ConfigMap
apiVersion: v1
metadata:
name: usma-redis
namespace: {{ .Release.Namespace }}
labels:
{{ include "usma-redis.labels" . | indent 4 }}
app: usma-redis
versoin: {{ .Values.tag }}
data:
redis.conf: "daemonize no\npidfile /var/run/redis.pid\nport 6379\ntimeout 0\nrequirepass passwd123\nloglevel verbose\nlogfile stdout\ndatabases 16\nmaxmemory 64mb\nappendonly no\n"
apiVersion: v1
kind: Service
metadata:
name: usma-redis
labels:
{{ include "usma-redis.labels" . | indent 4 }}
app: usma-redis
spec:
selector:
app: usma-redis
ports:
- name: usma-redis
port: 6379
targetPort: 6379
protocol: TCP
\ No newline at end of file
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: usma-redis
namespace: {{ .Release.Namespace }}
labels:
{{ include "usma-redis.labels" . | indent 4 }}
app: usma-redis
versoin: {{ .Values.tag }}
spec:
replicas: 1
selector:
matchLabels:
{{ include "usma-redis.matchLabels" . | indent 6 }}
app: usma-redis
template:
metadata:
labels:
{{ include "usma-redis.labels" . | indent 8 }}
app: usma-redis
spec:
containers:
- args:
- /usr/local/etc/redis/redis.conf
- --appendonly no
image: {{ .Values.global.hub }}/{{ .Values.image }}:{{ .Values.tag }}
imagePullPolicy: IfNotPresent
name: redis
ports:
- containerPort: 6379
protocol: TCP
livenessProbe:
tcpSocket:
port: 6379
initialDelaySeconds: 50
periodSeconds: 10
timeoutSeconds: 1
successThreshold: 1
volumeMounts:
- mountPath: /usr/local/etc/redis
name: conf
volumes:
- configMap:
defaultMode: 420
name: usma-redis
name: conf
\ No newline at end of file
name: usma-ui
version: v2.2.0
description: usma-ui
appVersion: v2.2.0
apiVersion: v1
keywords:
- usma-ui
- usma
maintainers:
- name: xuzeyi
email: xuzeyi@wodcloud.com
\ No newline at end of file
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "usma-ui.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/* Helm required labels */}}
{{- define "usma-ui.labels" -}}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
{{- end -}}
{{/* matchLabels */}}
{{- define "usma-ui.matchLabels" -}}
release: {{ .Release.Name }}
app: "{{ template "usma-ui.name" . }}"
{{- end -}}
apiVersion: v1
kind: Service
metadata:
name: usma-ui
labels:
{{ include "usma-ui.labels" . | indent 4 }}
app: usma-ui
spec:
selector:
app: usma-ui
ports:
- name: http
port: 80
targetPort: 80
protocol: TCP
\ No newline at end of file
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: usma-ui
namespace: {{ .Release.Namespace }}
labels:
{{ include "usma-ui.labels" . | indent 4 }}
app: usma-ui
versoin: {{ .Values.tag }}
spec:
replicas: 1
selector:
matchLabels:
{{ include "usma-ui.matchLabels" . | indent 6 }}
app: usma-ui
version: {{ .Values.tag }}
template:
metadata:
labels:
{{ include "usma-ui.labels" . | indent 8 }}
app: usma-ui
version: {{ .Values.tag }}
spec:
volumes:
- name: localtime
hostPath:
path: /etc/localtime
containers:
- name: usma-ui
image: {{ .Values.global.hub }}/{{ .Values.image }}:{{ .Values.tag }}
envFrom:
- configMapRef:
name: "usma"
resources:
{{- toYaml .Values.resources | nindent 12 }}
imagePullPolicy: Always
ports:
- name: http
containerPort: 80
livenessProbe:
httpGet:
path: /usma/ui
port: 80
scheme: HTTP
volumeMounts:
- name: localtime
mountPath: "/etc/localtime"
\ No newline at end of file
dependencies:
- name: file-upload
version: v2.0
condition: file-upload.enabled
- name: sms-verify-api
version: v2.0.0
condition: sms-verify-api.enabled
- name: usma-api
version: v2.2.2
condition: usma-api.enabled
- name: usma-login
version: v2.2.2
condition: usma-login.enabled
- name: usma-login-api
version: v2.2.2
condition: usma-login-api.enabled
- name: usma-postgresql
version: 10.6
condition: usma-postgresql.enabled
- name: usma-redis
version: 5.0.3
condition: usma-redis.enabled
- name: usma-ui
version: hbyjt-2.2.2
condition: usma-ui.enabled
\ No newline at end of file
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "usma.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "usma.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "usma.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "usma.labels" -}}
helm.sh/chart: {{ include "usma.chart" . }}
{{ include "usma.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "usma.selectorLabels" -}}
app.kubernetes.io/name: {{ include "usma.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "usma.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "usma.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
---
kind: ConfigMap
apiVersion: v1
metadata:
name: usma
labels:
{{ include "usma.labels" . | indent 4 }}
app: usma
data:
GIN_MODE: "debug"
# GIN_MODE: "release"
DB_URL: "host=usma-postgresql.{{ .Release.Namespace }} port=5432 user=postgres password=passwd123 dbname=usma sslmode=disable"
REDIS_URL: "redis://usma-redis.{{ .Release.Namespace }}:6379"
REDIS_PASSWORD: "passwd123"
LOG_DIR_PREFIX: "/app/log"
LOCATION_KEY: "QKFBZ-PGGWJ-VZQFF-FHPA7-QWT5H-YHF4T"
LOCATION_URL: "https://apis.map.qq.com/ws/location/v1/ip"
SMS_SERVICE: "http://sms-verify-api.{{ .Release.Namespace }}:80/sms/api"
USMA_HOST: "https://{{ .Values.global.host }}"
\ No newline at end of file
---
kind: ConfigMap
apiVersion: v1
metadata:
name: sms
labels:
{{ include "usma.labels" . | indent 4 }}
release: sms
app: sms
data:
GIN_MODE: "debug"
# GIN_MODE: "release"
REDIS_URL: "redis://usma-redis.{{ .Release.Namespace }}:6379"
REDIS_PASSWORD: "passwd123"
ACCESS_KEY_ID: "LTAI4GBcVubRjzX7ABPcHnhB"
ACCESS_SECRET: "dYE2dtABFOqYtK1ijcrits0yedHkw7"
TPL_CODE_LOGIN: "SMS_212925130"
TPL_CODE_PWD: "SMS_212925127"
TPL_CODE_REGISTRY: "SMS_212925128"
TPL_CODE_LOGIN_ABNORMAL: "SMS_212925129"
TPL_CODE_ID_CARD: "SMS_212925131"
TPL_CODE_MOBILE: "SMS_212925126"
TPL_CODE_SYSTEM: "SMS_229477217"
SIGN_NAME: "比格数据"
SMS_MODE: "aliYun"
#SMS_MODE: "mas"
#EC_NAME: "山西省科学技术厅"
#APP_ID: "kjptdx"
#SECRET_KEY: "kjptzdh0930"
#SIGN: "OIAhvyPXt"
#MAS_URL: "http://112.35.1.155:1992/sms/norsubmit"
apiVersion: bcc.bd-apaas.com/v1alpha1
kind: IngressRoute
metadata:
name: {{.Release.Name}}
namespace: {{ .Release.Namespace }}
spec:
entryPoints:
- websecure
routes:
- kind: Rule
match: Host(`{{ .Values.global.host }}`) && PathPrefix(`/sms/api`)
middlewares: []
priority: 0
services:
- kind: Service
name: sms-verify-api
port: 80
- kind: Rule
match: Host(`{{ .Values.global.host }}`) && PathPrefix(`/usma/ui`)
middlewares: []
priority: 0
services:
- kind: Service
name: usma-ui
port: 80
- kind: Rule
match: Host(`{{ .Values.global.host }}`) && PathPrefix(`/bgfile`)
middlewares: []
priority: 0
services:
- kind: Service
name: file-upload
port: 80
- kind: Rule
match: Host(`{{ .Values.global.host }}`) && PathPrefix(`/usma/api`)
middlewares: []
priority: 0
services:
- kind: Service
name: usma-api
port: 80
- kind: Rule
match: Host(`{{ .Values.global.host }}`) && PathPrefix(`/iam/api`)
middlewares: []
priority: 0
services:
- kind: Service
name: usma-login-api
port: 80
- kind: Rule
match: Host(`{{ .Values.global.host }}`) && PathPrefix(`/usma/login`)
middlewares: []
priority: 0
services:
- kind: Service
name: usma-login
port: 80
tls:
certResolver: "default"
---
apiVersion: bcc.bd-apaas.com/v1alpha1
kind: IngressHost
metadata:
name: {{.Release.Name}}
namespace: {{ .Release.Namespace }}
spec:
host: {{ .Values.global.host }}
# Default values for usma.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
global:
hub: hub.wodcloud.com/usma
host: usma.test.wodcloud.com
resources:
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
limits:
cpu: 200m
memory: 500Mi
requests:
cpu: 200m
memory: 500Mi
file-upload:
enabled: true
image: fileupload
tag: v2.0
storageSpec:
hostPath: "/data/usma/file-upload"
# volumeClaimTemplate:
# spec:
# storageClassName: "nfs-client"
# accessModes: ["ReadWriteOnce"]
# resources:
# requests:
# storage: 1Gi
# selector: {}
nodeSelector:
kubernetes.io/hostname: 10.128.33.48
sms-verify-api:
enabled: true
image: sms-verify-api
tag: v1.0.0-alpha
usma-api:
enabled: true
image: bg-usma-api
tag: v2.3.0-alpha
storageSpec:
hostPath: "/data/usma/usma-api/log"
# volumeClaimTemplate:
# spec:
# storageClassName: "nfs-client"
# accessModes: ["ReadWriteOnce"]
# resources:
# requests:
# storage: 1Gi
# selector: {}
nodeSelector:
kubernetes.io/hostname: 10.128.33.48
usma-login:
enabled: true
image: usma-login
tag: v2.2.1-alpha
usma-login-api:
enabled: true
image: bg-login-base
tag: v2.2.2
usma-postgresql:
enabled: true
image: postgres
tag: 10.6
storageSpec:
hostPath: "/data/usma/usma-postgresql"
# volumeClaimTemplate:
# spec:
# storageClassName: "nfs-client"
# accessModes: ["ReadWriteOnce"]
# resources:
# requests:
# storage: 1Gi
# selector: {}
nodeSelector:
kubernetes.io/hostname: 10.128.33.48
usma-redis:
enabled: true
image: redis
tag: 5.0.3
usma-ui:
enabled: true
image: usma-ui
tag: v2.2.2-alpha
# Default values for usma.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
global:
hub: hub.hbyjkffn.hb.cegn.cn:30443/wod
host: usma.hbyjkffn.hb.cegn.cn
resources:
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
limits:
cpu: 200m
memory: 500Mi
requests:
cpu: 200m
memory: 500Mi
file-upload:
enabled: true
image: fileupload
tag: v2.0
storageSpec:
hostPath: "/data/usma/file-upload"
# volumeClaimTemplate:
# spec:
# storageClassName: "nfs-client"
# accessModes: ["ReadWriteOnce"]
# resources:
# requests:
# storage: 1Gi
# selector: {}
nodeSelector:
kubernetes.io/hostname: 10.11.92.36
sms-verify-api:
enabled: true
image: sms-verify-api
tag: v2.0.0-hbyjt
usma-api:
enabled: true
image: bg-usma-api
tag: v2.2.2
storageSpec:
hostPath: "/data/usma/usma-api/log"
# volumeClaimTemplate:
# spec:
# storageClassName: "nfs-client"
# accessModes: ["ReadWriteOnce"]
# resources:
# requests:
# storage: 1Gi
# selector: {}
nodeSelector:
kubernetes.io/hostname: 10.11.92.36
usma-login:
enabled: true
image: usma-login
tag: hbyjt-2.2.2
usma-login-api:
enabled: true
image: bg-login-base
tag: v2.2.2
usma-postgresql:
enabled: true
image: postgres
tag: 10.6
storageSpec:
hostPath: "/data/usma/usma-postgresql"
# volumeClaimTemplate:
# spec:
# storageClassName: "nfs-client"
# accessModes: ["ReadWriteOnce"]
# resources:
# requests:
# storage: 1Gi
# selector: {}
nodeSelector:
kubernetes.io/hostname: 10.11.92.36
usma-redis:
enabled: true
image: redis
tag: 5.0.3
usma-ui:
enabled: true
image: usma-ui
tag: hbyjt-2.2.2
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment