Commit 6565f937 authored by 严国华's avatar 严国华

山西信息院云时代apaas统一用户charts(arm) init

parent a81e56f6
kind: pipeline
name: docker
trigger:
branch:
- v2.4.0
clone:
disable: true
steps:
- name: fetch
image: registry.cn-qingdao.aliyuncs.com/wod/devops-git:1.0
- name: charts
image: registry.cn-qingdao.aliyuncs.com/wod/helm:v3
commands:
- helm package .
- name: minio
image: registry.cn-qingdao.aliyuncs.com/wod/devops-minio:1.0
environment:
S3_ACCESS_KEY:
from_secret: ACCESS_KEY_MINIO
S3_SECRET_KEY:
from_secret: SECRET_KEY_MINIO
commands:
- mc alias set cache --api=S3v4 https://cache.wodcloud.com $S3_ACCESS_KEY $S3_SECRET_KEY
- mc cp ./usma-v2.4.0.tgz cache/kubernetes/market/charts/usma/v2.4.0/usma-v2.4.0.tgz
- mc cp ./values.yaml cache/kubernetes/market/charts/usma/v2.4.0/values.yaml
- mc cp ./README.md cache/kubernetes/market/charts/usma/v2.4.0/README.md
---
kind: secret
name: ACCESS_KEY_MINIO
get:
name: ACCESS_KEY_MINIO
path: devops-secrets
---
kind: secret
name: SECRET_KEY_MINIO
get:
name: SECRET_KEY_MINIO
path: devops-secrets
apiVersion: v2 apiVersion: v2
name: usma appVersion: v2.0
dependencies:
- condition: redis.enabled
name: redis
repository: ""
version: 6.2.6
- condition: postgresql.enabled
name: postgresql
repository: ""
version: "13.5"
description: A Helm chart for Kubernetes description: A Helm chart for Kubernetes
name: usma
# 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 type: application
version: v2.4.0
# 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
### 概要说明
```
统一用户v2.4.0版本
```
### 镜像
usma-api [黄智]
- registry.cn-qingdao.aliyuncs.com/wod/usma-api:v2.4.0-amd64
- registry.cn-qingdao.aliyuncs.com/wod/usma-api:v2.4.0-arm64
usma-login-api [黄智]
- registry.cn-qingdao.aliyuncs.com/wod/usma-login-api:2.4.0-amd64
- registry.cn-qingdao.aliyuncs.com/wod/usma-login-api:2.4.0-arm64
sms-verify-api [黄智]
- registry.cn-qingdao.aliyuncs.com/wod/sms-verify-api:v2.4.0-amd64
- registry.cn-qingdao.aliyuncs.com/wod/sms-verify-api:v2.4.0-arm64
fileupload [黄智]
- hub.wodcloud.com/devops/fileupload:v2.0
usma-ui [赵伟庚]
- hub.wodcloud.com/usma/usma-ui:v2.2.3-alpha
usma-login [赵伟庚]
- hub.wodcloud.com/usma/usma-login:v2.2.1-alpha
## 迁移对应数据库
1. postgresql (数据库) 内置数据库,包含自动导入sql job
2. redis (中间件) 内置redis
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
appVersion: "13.5"
description: postgresql
name: postgresql
type: application
version: v1.0
---
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
name: usma-postgresql-config name: postgresql-config
labels: namespace: {{ .Release.Namespace }}
{{ include "usma-postgresql.labels" . | indent 4 }}
app: usma-postgresql
data: data:
POSTGRES_DB: postgres POSTGRES_DB: postgres
POSTGRES_PASSWORD: {{ .Values.POSTGRES_PASSWORD }}
POSTGRES_USER: postgres POSTGRES_USER: postgres
POSTGRES_PASSWORD: passwd123
\ No newline at end of file
apiVersion: v1
kind: Service
metadata:
name: postgresql
namespace: {{ .Release.Namespace }}
spec:
ports:
- port: 5432
protocol: TCP
targetPort: 5432
selector:
app: postgresql
sessionAffinity: None
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: postgresql
namespace: {{ .Release.Namespace }}
spec:
replicas: 1
selector:
matchLabels:
app: postgresql
serviceName: ""
template:
metadata:
labels:
app: postgresql
spec:
initContainers:
- name: lost-found
{{- if contains "/" .Values.image.repository }}
image: "{{ .Values.initImage.repository }}:{{ .Values.initImage.tag }}"
{{- else }}
image: "{{ .Values.global.hub }}/{{ .Values.initImage.repository }}:{{ .Values.initImage.tag }}{{ template "beagle.imageArch" . }}"
{{- end }}
command:
- rm
- '-Rf'
- /var/lib/postgresql/data/lost+found
resources: {}
volumeMounts:
- name: data
mountPath: /var/lib/postgresql/data
- name: init-data
{{- if contains "/" .Values.image.repository }}
image: "{{ .Values.initImage.repository }}:{{ .Values.initImage.tag }}"
{{- else }}
image: "{{ .Values.global.hub }}/{{ .Values.initImage.repository }}:{{ .Values.initImage.tag }}{{ template "beagle.imageArch" . }}"
{{- end }}
command:
- chown
- '-R'
- '999:999'
- /var/lib/postgresql/data
resources: {}
volumeMounts:
- name: data
mountPath: /var/lib/postgresql/data
containers:
- envFrom:
- configMapRef:
name: postgresql-config
{{- if contains "/" .Values.image.repository }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
{{- else }}
image: "{{ .Values.global.hub }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}{{ template "beagle.imageArch" . }}"
{{- end }}
imagePullPolicy: "{{ .Values.global.imagePullPolicy }}"
name: data
ports:
- containerPort: 5432
protocol: TCP
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: data
- mountPath: /etc/localtime
name: localtime
restartPolicy: Always
volumes:
- hostPath:
path: /etc/localtime
type: ""
name: localtime
volumeClaimTemplates:
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
app: postgresql
name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: {{ .Values.storageClassName }}
volumeMode: Filesystem
apiVersion: v1
appVersion: 6.2.6
description: redis
name: redis
type: application
version: v1.0
{{- $redisConf := .Values.conf }}
apiVersion: v1
kind: ConfigMap
metadata:
name: redis
namespace: {{ .Release.Namespace }}
data:
redis.conf: |
daemonize no
pidfile /var/run/redis.pid
timeout 0
loglevel verbose
logfile stdout
{{ .Values.conf.port }}
{{ .Values.conf.db }}
{{ .Values.conf.maxmem }}
{{ .Values.conf.apl }}
{{ .Values.conf.passwd }}
apiVersion: v1
kind: Service
metadata:
name: redis
namespace: {{ .Release.Namespace }}
spec:
ports:
- port: 6379
protocol: TCP
targetPort: 6379
selector:
app: redis
sessionAffinity: None
---
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: StatefulSet
metadata: metadata:
name: usma-redis name: redis
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels:
{{ include "usma-redis.labels" . | indent 4 }}
app: usma-redis
versoin: {{ .Values.tag }}
spec: spec:
podManagementPolicy: OrderedReady
replicas: 1 replicas: 1
revisionHistoryLimit: 10
selector: selector:
matchLabels: matchLabels:
{{ include "usma-redis.matchLabels" . | indent 6 }} app: redis
app: usma-redis serviceName: ""
template: template:
metadata: metadata:
labels: labels:
{{ include "usma-redis.labels" . | indent 8 }} app: redis
app: usma-redis
spec: spec:
containers: containers:
- args: - args:
- /usr/local/etc/redis/redis.conf - /usr/local/etc/redis/redis.conf
- --appendonly no {{- if contains "/" .Values.image.repository }}
image: {{ .Values.global.hub }}/{{ .Values.image }}:{{ .Values.tag }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: IfNotPresent {{- else }}
image: "{{ .Values.global.hub }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}{{ template "beagle.imageArch" . }}"
{{- end }}
imagePullPolicy: "{{ .Values.global.imagePullPolicy }}"
name: redis name: redis
ports: ports:
- containerPort: 6379 - containerPort: 6379
protocol: TCP resources: {}
livenessProbe: livenessProbe:
failureThreshold: 3
initialDelaySeconds: 300
periodSeconds: 10
successThreshold: 1
tcpSocket: tcpSocket:
port: 6379 port: 6379
initialDelaySeconds: 50
periodSeconds: 10
timeoutSeconds: 1 timeoutSeconds: 1
successThreshold: 1
volumeMounts: volumeMounts:
- mountPath: /etc/localtime
name: localtime
- mountPath: /usr/local/etc/redis - mountPath: /usr/local/etc/redis
name: conf name: conf
- mountPath: /data
name: data
restartPolicy: Always
volumes: volumes:
- hostPath:
path: /etc/localtime
type: ""
name: localtime
- configMap: - configMap:
defaultMode: 420 defaultMode: 420
name: usma-redis name: redis
name: conf name: conf
volumeClaimTemplates:
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
app: redis
name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: {{ .Values.storageClassName }}
volumeMode: Filesystem
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 -}}
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 -}}
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 -}}
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 -}}
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: 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
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: 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
### 安装命令
helm install usma . -f values.yaml -n usma
### 安装方式
``` shell
helm install usma . -f values.yaml -n namespace
```
### 卸载方式
``` shell
helm uninstall usma -n namespace
```
\ No newline at end of file
logo.png

89 KB

dependencies: dependencies:
- name: file-upload - name: postgresql
version: v2.0 version: 13.5
condition: file-upload.enabled condition: postgresql.enabled
- name: sms-verify-api - name: redis
version: v2.0.0 version: 6.2.6
condition: sms-verify-api.enabled condition: redis.enabled
- name: usma-api \ No newline at end of file
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
configInfo:
- name: global.host
text: 地址
type: text
value: "bg-usma.ysdpaas.local"
{{/* vim: set filetype=mustache: */}}
{{/* {{/*
Expand the name of the chart. Create chart imageArch suffix.
*/}} */}}
{{- define "usma.name" -}} {{- define "beagle.imageArch" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} {{- if not (eq "amd64" .Values.global.imageArch) -}}
{{- print "-" .Values.global.imageArch -}}
{{- else -}}
{{- print "-" "amd64" -}}
{{- end -}}
{{- end }} {{- end }}
{{/* vim: set filetype=mustache: */}}
{{/* {{/*
Create a default fully qualified app name. Expand the name of the chart.
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" -}} {{- define "usma.name" -}}
{{- if .Values.fullnameOverride }} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} {{- end -}}
{{- 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 }}
{{/* {{/* Helm required labels */}}
Create chart name and version as used by the chart label. {{- define "usma-ui.labels" -}}
*/}} heritage: {{ .Release.Service }}
{{- define "usma.chart" -}} release: {{ .Release.Name }}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
{{- end }} {{- end -}}
{{/* {{/* Helm required labels */}}
Common labels {{- define "usma-login.labels" -}}
*/}} heritage: {{ .Release.Service }}
{{- define "usma.labels" -}} release: {{ .Release.Name }}
helm.sh/chart: {{ include "usma.chart" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
{{ include "usma.selectorLabels" . }} {{- end -}}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/* {{/* Helm required labels */}}
Selector labels {{- define "usma-api.labels" -}}
*/}} heritage: {{ .Release.Service }}
{{- define "usma.selectorLabels" -}} release: {{ .Release.Name }}
app.kubernetes.io/name: {{ include "usma.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/instance: {{ .Release.Name }} {{- end -}}
{{- end }}
{{/* Helm required labels */}}
{{- define "sms-verify-api.labels" -}}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
{{- end -}}
{{/* Helm required labels */}}
{{- define "file-upload.labels" -}}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
{{- end -}}
{{/* Helm required labels */}}
{{- define "portal-ui.labels" -}}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
{{- 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.matchLabels" -}}
release: {{ .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: usma
namespace: {{ .Release.Namespace }}
data:
GIN_MODE: "debug"
DB_SCHEMA: public
TOKEN_KEY: usmaToken
# GIN_MODE: "release"
LOG_DIR_PREFIX: "/app/log"
USMA_HOST: "https://{{ .Values.global.host }}"
{{ toYaml .Values.usma.conf | indent 2 }}
kind: Deployment
apiVersion: apps/v1
metadata:
name: file-upload
namespace: {{ .Release.Namespace }}
labels:
{{ include "file-upload.labels" . | indent 4 }}
app: file-upload
versoin: {{ .Values.fileUpload.image.tag }}
spec:
replicas: 1
selector:
matchLabels:
app: file-upload
template:
metadata:
labels:
{{ include "file-upload.labels" . | indent 8 }}
app: file-upload
version: {{ .Values.fileUpload.image.tag }}
spec:
volumes:
- name: localtime
hostPath:
path: /etc/localtime
type: ''
- name: data-file-upload
persistentVolumeClaim:
claimName: data-file-upload
containers:
- name: file-upload
{{- if contains "/" .Values.fileUpload.image.repository }}
image: "{{ .Values.fileUpload.image.repository }}:{{ .Values.fileUpload.image.tag }}{{ template "beagle.imageArch" . }}"
{{- else }}
image: "{{ .Values.global.hub }}/{{ .Values.fileUpload.image.repository }}:{{ .Values.fileUpload.image.tag }}{{ template "beagle.imageArch" . }}"
{{- end }}
imagePullPolicy: "{{ .Values.global.imagePullPolicy }}"
volumeMounts:
- name: localtime
mountPath: /etc/localtime
- name: data-file-upload
mountPath: /app/static
apiVersion: bcc.bd-apaas.com/v1alpha1
kind: IngressRoute
metadata:
name: file-upload
namespace: {{ .Release.Namespace }}
spec:
entryPoints:
- websecure
routes:
- kind: Rule
match: Host(`{{ .Values.global.host }}`) && PathPrefix(`/bgfile`)
services:
- kind: Service
name: file-upload
port: 80
tls:
certResolver: default
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: data-file-upload
namespace: {{ .Release.Namespace }}
spec:
accessModes:
- ReadWriteOnce
storageClassName: {{ .Values.fileUpload.storageClassName }}
resources:
requests:
storage: 10Gi
apiVersion: v1
kind: Service kind: Service
apiVersion: v1
metadata: metadata:
name: file-upload name: file-upload
namespace: {{ .Release.Namespace }}
labels: labels:
{{ include "file-upload.labels" . | indent 4 }} {{ include "file-upload.labels" . | indent 4 }}
app: file-upload app: file-upload
versoin: {{ .Values.fileUpload.image.tag }}
spec: spec:
selector:
app: file-upload
ports: ports:
- name: http - name: http
port: 80 port: 80
targetPort: 80
protocol: TCP protocol: TCP
targetPort: 80
selector:
app: file-upload
type: ClusterIP
sessionAffinity: None
apiVersion: bcc.bd-apaas.com/v1alpha1
kind: IngressHost
metadata:
name: usma
namespace: {{ .Release.Namespace }}
spec:
host: {{ .Values.global.host }}
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 }}
---
kind: ConfigMap kind: ConfigMap
apiVersion: v1 apiVersion: v1
metadata: metadata:
name: sms name: sms-verify-api
labels: namespace: {{ .Release.Namespace }}
{{ include "usma.labels" . | indent 4 }}
release: sms
app: sms
data: data:
GIN_MODE: "debug" GIN_MODE: "debug"
# GIN_MODE: "release" REDIS_URL: {{ .Values.usma.conf.REDIS_URL }}
REDIS_URL: "redis://usma-redis.{{ .Release.Namespace }}:6379" REDIS_PASSWORD: {{ .Values.usma.conf.REDIS_PASSWORD }}
REDIS_PASSWORD: "passwd123"
ACCESS_KEY_ID: "LTAI4GBcVubRjzX7ABPcHnhB" ACCESS_KEY_ID: "LTAI4GBcVubRjzX7ABPcHnhB"
ACCESS_SECRET: "dYE2dtABFOqYtK1ijcrits0yedHkw7" ACCESS_SECRET: "dYE2dtABFOqYtK1ijcrits0yedHkw7"
TPL_CODE_LOGIN: "SMS_212925130" TPL_CODE_LOGIN: "SMS_212925130"
TPL_CODE_PWD: "SMS_212925127" TPL_CODE_PWD: "SMS_212925127"
TPL_CODE_REGISTRY: "SMS_212925128" TPL_CODE_REGISTRY: "SMS_212925128"
TPL_CODE_LOGIN_ABNORMAL: "SMS_212925129" TPL_CODE_LOGIN_ABNORMAL: "SMS_212925129"
TPL_CODE_ID_CARD: "SMS_212925131" TPL_CODE_ID_CARD: "SMS_460741011"
TPL_CODE_MOBILE: "SMS_212925126" TPL_CODE_MOBILE: "SMS_212925126"
TPL_CODE_SYSTEM: "SMS_229477217" TPL_CODE_SYSTEM: "SMS_229477217"
SIGN_NAME: "比格数据" SIGN_NAME: "比格数据"
SMS_MODE: "aliYun" 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"
---
kind: Deployment kind: Deployment
apiVersion: apps/v1 apiVersion: apps/v1
metadata: metadata:
...@@ -7,46 +6,39 @@ metadata: ...@@ -7,46 +6,39 @@ metadata:
labels: labels:
{{ include "sms-verify-api.labels" . | indent 4 }} {{ include "sms-verify-api.labels" . | indent 4 }}
app: sms-verify-api app: sms-verify-api
versoin: {{ .Values.tag }} versoin: {{ .Values.smsVerifyApi.image.tag }}
spec: spec:
replicas: 1 replicas: 1
selector: selector:
matchLabels: matchLabels:
{{ include "sms-verify-api.matchLabels" . | indent 6 }}
app: sms-verify-api app: sms-verify-api
template: template:
metadata: metadata:
labels: labels:
{{ include "sms-verify-api.labels" . | indent 8 }} {{ include "sms-verify-api.labels" . | indent 8 }}
app: sms-verify-api app: sms-verify-api
version: {{ .Values.tag }} version: {{ .Values.smsVerifyApi.image.tag }}
spec: spec:
volumes: volumes:
- name: localtime - name: localtime
hostPath: hostPath:
path: /etc/localtime path: /etc/localtime
type: ''
containers: containers:
- name: sms-verify-api - name: sms-verify-api
image: {{ .Values.global.hub }}/{{ .Values.image }}:{{ .Values.tag }} {{- if contains "/" .Values.smsVerifyApi.image.repository }}
image: "{{ .Values.smsVerifyApi.image.repository }}:{{ .Values.smsVerifyApi.image.tag }}{{ template "beagle.imageArch" . }}"
{{- else }}
image: "{{ .Values.global.hub }}/{{ .Values.smsVerifyApi.image.repository }}:{{ .Values.smsVerifyApi.image.tag }}{{ template "beagle.imageArch" . }}"
{{- end }}
imagePullPolicy: "{{ .Values.global.imagePullPolicy }}"
ports: ports:
- name: http - containerPort: 8080
containerPort: 8080
protocol: TCP protocol: TCP
livenessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 50
periodSeconds: 10
timeoutSeconds: 1
successThreshold: 1
resources:
{{- toYaml .Values.resources | nindent 12 }}
envFrom: envFrom:
- configMapRef: - configMapRef:
name: "sms" name: sms-verify-api
volumeMounts: volumeMounts:
- name: localtime - name: localtime
mountPath: /etc/localtime mountPath: /etc/localtime
imagePullPolicy: "Always" restartPolicy: Always
restartPolicy: "Always"
apiVersion: bcc.bd-apaas.com/v1alpha1
kind: IngressRoute
metadata:
name: sms-verify-api
namespace: {{ .Release.Namespace }}
spec:
entryPoints:
- websecure
routes:
- kind: Rule
match: Host(`{{ .Values.global.host }}`) && PathPrefix(`/sms/api`)
services:
- kind: Service
name: sms-verify-api
port: 80
tls:
certResolver: default
apiVersion: v1
kind: Service kind: Service
apiVersion: v1
metadata: metadata:
name: sms-verify-api name: sms-verify-api
namespace: {{ .Release.Namespace }}
labels: labels:
{{ include "sms-verify-api.labels" . | indent 4 }} {{ include "sms-verify-api.labels" . | indent 4 }}
app: sms-verify-api app: sms-verify-api
versoin: {{ .Values.smsVerifyApi.image.tag }}
spec: spec:
selector:
app: sms-verify-api
ports: ports:
- name: http - name: sms-verify-api
protocol: TCP
port: 80 port: 80
targetPort: 8080 targetPort: 8080
protocol: TCP selector:
app: sms-verify-api
type: ClusterIP
sessionAffinity: None
---
kind: Deployment kind: Deployment
apiVersion: apps/v1 apiVersion: apps/v1
metadata: metadata:
...@@ -7,64 +6,44 @@ metadata: ...@@ -7,64 +6,44 @@ metadata:
labels: labels:
{{ include "usma-api.labels" . | indent 4 }} {{ include "usma-api.labels" . | indent 4 }}
app: usma-api app: usma-api
versoin: {{ .Values.tag }} versoin: {{ .Values.usmaApi.image.tag }}
spec: spec:
replicas: 1 replicas: 1
selector: selector:
matchLabels: matchLabels:
{{ include "usma-api.matchLabels" . | indent 6 }}
app: usma-api app: usma-api
template: template:
metadata: metadata:
labels: labels:
{{ include "usma-api.labels" . | indent 8 }} {{ include "usma-api.labels" . | indent 8 }}
app: usma-api app: usma-api
version: {{ .Values.tag }} version: {{ .Values.usmaApi.image.tag }}
spec: spec:
nodeSelector: volumes:
{{ toYaml $.Values.nodeSelector | indent 8 }} - name: localtime
hostPath:
path: /etc/localtime
type: ''
- name: data-usma-log
persistentVolumeClaim:
claimName: data-usma-log
containers: containers:
- name: usma-api - name: usma-api
image: {{ .Values.global.hub }}/{{ .Values.image }}:{{ .Values.tag }} {{- if contains "/" .Values.usmaApi.image.repository }}
image: "{{ .Values.usmaApi.image.repository }}:{{ .Values.usmaApi.image.tag }}{{ template "beagle.imageArch" . }}"
{{- else }}
image: "{{ .Values.global.hub }}/{{ .Values.usmaApi.image.repository }}:{{ .Values.usmaApi.image.tag }}{{ template "beagle.imageArch" . }}"
{{- end }}
imagePullPolicy: "{{ .Values.global.imagePullPolicy }}"
ports: ports:
- name: http - name: "usma-api"
containerPort: 8080 containerPort: 8080
protocol: TCP protocol: "TCP"
livenessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 50
periodSeconds: 10
timeoutSeconds: 1
successThreshold: 1
envFrom: envFrom:
- configMapRef: - configMapRef:
name: usma name: "usma"
volumeMounts: volumeMounts:
- name: localtime - name: localtime
mountPath: /etc/localtime mountPath: /etc/localtime
- name: log - name: data-usma-log
mountPath: "/app/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 }}
apiVersion: bcc.bd-apaas.com/v1alpha1
kind: IngressRoute
metadata:
name: usma-api
namespace: {{ .Release.Namespace }}
spec:
entryPoints:
- websecure
routes:
- kind: Rule
match: Host(`{{ .Values.global.host }}`) && PathPrefix(`/usma/api`)
services:
- kind: Service
name: usma-api
port: 80
tls:
certResolver: default
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: data-usma-log
namespace: {{ .Release.Namespace }}
spec:
accessModes:
- ReadWriteOnce
storageClassName: {{ .Values.usmaApi.storageClassName }}
resources:
requests:
storage: 10Gi
apiVersion: v1
kind: Service kind: Service
apiVersion: v1
metadata: metadata:
name: usma-api name: usma-api
namespace: {{ .Release.Namespace }}
labels: labels:
{{ include "usma-api.labels" . | indent 4 }} {{ include "usma-api.labels" . | indent 4 }}
app: usma-api app: usma-api
versoin: {{ .Values.usmaApi.image.tag }}
spec: spec:
selector:
app: usma-api
ports: ports:
- name: http - name: usma-api
port: 80 port: 80
targetPort: 80 targetPort: 8080
protocol: TCP selector:
app: usma-api
\ No newline at end of file
apiVersion: batch/v1
kind: Job
metadata:
name: usma-db-init
namespace: {{ .Release.Namespace }}
spec:
template:
spec:
restartPolicy: Never
containers:
- name: usma-db-init
{{- if contains "/" .Values.usmaDbInit.image.repository }}
image: "{{ .Values.usmaDbInit.image.repository }}:{{ .Values.usmaDbInit.image.tag }}{{ template "beagle.imageArch" . }}"
{{- else }}
image: "{{ .Values.global.hub }}/{{ .Values.usmaDbInit.image.repository }}:{{ .Values.usmaDbInit.image.tag }}{{ template "beagle.imageArch" . }}"
{{- end }}
imagePullPolicy: Always
envFrom:
- configMapRef:
name: "usma"
backoffLimit: 2
---
kind: Deployment kind: Deployment
apiVersion: apps/v1 apiVersion: apps/v1
metadata: metadata:
...@@ -7,42 +6,42 @@ metadata: ...@@ -7,42 +6,42 @@ metadata:
labels: labels:
{{ include "usma-login-api.labels" . | indent 4 }} {{ include "usma-login-api.labels" . | indent 4 }}
app: usma-login-api app: usma-login-api
versoin: {{ .Values.tag }} versoin: {{ .Values.usmaLoginApi.image.tag }}
spec: spec:
replicas: 1 replicas: 1
selector: selector:
matchLabels: matchLabels:
{{ include "usma-login-api.matchLabels" . | indent 6 }}
app: usma-login-api app: usma-login-api
template: template:
metadata: metadata:
labels: labels:
{{ include "usma-login-api.labels" . | indent 8 }} {{ include "usma-login-api.labels" . | indent 8 }}
app: usma-login-api app: usma-login-api
version: {{ .Values.usmaLoginApi.image.tag }}
spec: spec:
volumes: volumes:
- name: "localtime" - name: localtime
hostPath: hostPath:
path: "/etc/localtime" path: /etc/localtime
type: ''
containers: containers:
- name: "usma-login-api" - name: usma-login-api
image: {{ .Values.global.hub }}/{{ .Values.image }}:{{ .Values.tag }} {{- if contains "/" .Values.usmaLoginApi.image.repository }}
image: "{{ .Values.usmaLoginApi.image.repository }}:{{ .Values.usmaLoginApi.image.tag }}{{ template "beagle.imageArch" . }}"
{{- else }}
image: "{{ .Values.global.hub }}/{{ .Values.usmaLoginApi.image.repository }}:{{ .Values.usmaLoginApi.image.tag }}{{ template "beagle.imageArch" . }}"
{{- end }}
imagePullPolicy: "{{ .Values.global.imagePullPolicy }}"
ports: ports:
- name: "usma-login-api" - containerPort: 80
containerPort: 80 protocol: TCP
protocol: "TCP"
livenessProbe:
tcpSocket:
port: 80
initialDelaySeconds: 50
periodSeconds: 10
timeoutSeconds: 1
successThreshold: 1
resources:
{{- toYaml .Values.resources | nindent 12 }}
envFrom: envFrom:
- configMapRef: - configMapRef:
name: "usma" name: usma
volumeMounts: volumeMounts:
- name: "localtime" - name: localtime
mountPath: "/etc/localtime" mountPath: /etc/localtime
restartPolicy: Always
apiVersion: bcc.bd-apaas.com/v1alpha1
kind: IngressRoute
metadata:
name: usma-login-api
namespace: {{ .Release.Namespace }}
spec:
entryPoints:
- websecure
routes:
- kind: Rule
match: Host(`{{ .Values.global.host }}`) && PathPrefix(`/iam/api`)
services:
- kind: Service
name: usma-login-api
port: 80
tls:
certResolver: default
apiVersion: v1
kind: Service kind: Service
apiVersion: v1
metadata: metadata:
name: usma-login-api name: usma-login-api
namespace: {{ .Release.Namespace }}
labels: labels:
{{ include "usma-login-api.labels" . | indent 4 }} {{ include "usma-login-api.labels" . | indent 4 }}
app: usma-login-api app: usma-login-api
versoin: {{ .Values.usmaLoginApi.image.tag }}
spec: spec:
selector:
app: usma-login-api
ports: ports:
- name: usma-login-api - name: usma-login-api
protocol: TCP
port: 80 port: 80
targetPort: 80 targetPort: 80
protocol: TCP selector:
\ No newline at end of file app: usma-login-api
type: ClusterIP
sessionAffinity: None
---
apiVersion: apps/v1
kind: Deployment kind: Deployment
apiVersion: apps/v1
metadata: metadata:
name: usma-login name: usma-login
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: labels:
{{ include "usma-login.labels" . | indent 4 }} {{ include "usma-login.labels" . | indent 4 }}
app: usma-login app: usma-login
versoin: {{ .Values.tag }} versoin: {{ .Values.usmaLogin.image.tag }}
spec: spec:
replicas: 1 replicas: 1
selector: selector:
matchLabels: matchLabels:
{{ include "usma-login.matchLabels" . | indent 6 }}
app: usma-login app: usma-login
template: template:
metadata: metadata:
labels: labels:
{{ include "usma-login.labels" . | indent 8 }} {{ include "usma-login.labels" . | indent 8 }}
app: usma-login app: usma-login
version: {{ .Values.usmaLogin.image.tag }}
spec: spec:
volumes: volumes:
- name: localtime - name: localtime
hostPath: hostPath:
path: /etc/localtime path: /etc/localtime
type: ''
containers: containers:
- name: usma-login - name: usma-login
image: {{ .Values.global.hub }}/{{ .Values.image }}:{{ .Values.tag }} {{- if contains "/" .Values.usmaLogin.image.repository }}
imagePullPolicy: Always image: "{{ .Values.usmaLogin.image.repository }}:{{ .Values.usmaLogin.image.tag }}{{ template "beagle.imageArch" . }}"
resources: {{- else }}
{{- toYaml .Values.resources | nindent 12 }} image: "{{ .Values.global.hub }}/{{ .Values.usmaLogin.image.repository }}:{{ .Values.usmaLogin.image.tag }}{{ template "beagle.imageArch" . }}"
{{- end }}
imagePullPolicy: "{{ .Values.global.imagePullPolicy }}"
ports: ports:
- name: http - containerPort: 80
containerPort: 80 protocol: TCP
livenessProbe:
httpGet:
path: /usma/login
port: 80
scheme: HTTP
volumeMounts: volumeMounts:
- name: localtime - name: localtime
mountPath: "/etc/localtime" mountPath: /etc/localtime
\ No newline at end of file resources:
limits:
cpu: 0.5
memory: 1Gi
requests:
cpu: 0.1
memory: 256Mi
restartPolicy: Always
apiVersion: bcc.bd-apaas.com/v1alpha1
kind: IngressRoute
metadata:
name: usma-login
namespace: {{ .Release.Namespace }}
spec:
entryPoints:
- websecure
routes:
- kind: Rule
match: Host(`{{ .Values.global.host }}`) && PathPrefix(`/usma/login`)
services:
- kind: Service
name: usma-login
port: 80
tls:
certResolver: default
apiVersion: v1
kind: Service kind: Service
apiVersion: v1
metadata: metadata:
name: usma-login name: usma-login
namespace: {{ .Release.Namespace }}
labels: labels:
{{ include "usma-login.labels" . | indent 4 }} {{ include "usma-login.labels" . | indent 4 }}
app: usma-login app: usma-login
versoin: {{ .Values.usmaLogin.image.tag }}
spec: spec:
selector:
app: usma-login
ports: ports:
- name: http - name: usma-login
protocol: TCP
port: 80 port: 80
targetPort: 80 targetPort: 80
protocol: TCP selector:
\ No newline at end of file app: usma-login
type: ClusterIP
sessionAffinity: None
kind: ConfigMap
apiVersion: v1
metadata:
name: usma-ui
namespace: {{ .Release.Namespace }}
data:
configmap: |-
window.defaultConfig = {
tokenName: "usmaToken",
gitLogoutUrl: "https://gitlab.ysdpaas.local/usma/rest/v5/git/sign_out",
usmaLoginUrl: "https://{{ .Values.global.host }}/usma/login/#/login"
};
kind: Deployment
apiVersion: apps/v1
metadata:
name: usma-ui
namespace: {{ .Release.Namespace }}
labels:
{{ include "usma-ui.labels" . | indent 4 }}
app: usma-ui
versoin: {{ .Values.usmaUi.image.tag }}
spec:
replicas: 1
selector:
matchLabels:
app: usma-ui
template:
metadata:
labels:
{{ include "usma-ui.labels" . | indent 8 }}
app: usma-ui
version: {{ .Values.usmaUi.image.tag }}
spec:
volumes:
- name: localtime
hostPath:
path: /etc/localtime
type: ''
- name: configmap
configMap:
name: usma-ui
items:
- key: configmap
path: configmap.js
containers:
- name: usma-ui
{{- if contains "/" .Values.usmaUi.image.repository }}
image: "{{ .Values.usmaUi.image.repository }}:{{ .Values.usmaUi.image.tag }}{{ template "beagle.imageArch" . }}"
{{- else }}
image: "{{ .Values.global.hub }}/{{ .Values.usmaUi.image.repository }}:{{ .Values.usmaUi.image.tag }}{{ template "beagle.imageArch" . }}"
{{- end }}
imagePullPolicy: "{{ .Values.global.imagePullPolicy }}"
envFrom:
- configMapRef:
name: "usma"
ports:
- containerPort: 8080
protocol: TCP
volumeMounts:
- name: localtime
mountPath: /etc/localtime
- name: configmap
mountPath: /www/usma/ui/static/config/configmap.js
subPath: configmap.js
resources:
limits:
cpu: 0.5
memory: 1Gi
requests:
cpu: 0.1
memory: 256Mi
restartPolicy: Always
apiVersion: bcc.bd-apaas.com/v1alpha1
kind: IngressRoute
metadata:
name: usma-ui
namespace: {{ .Release.Namespace }}
spec:
entryPoints:
- websecure
routes:
- kind: Rule
match: Host(`{{ .Values.global.host }}`) && PathPrefix(`/usma/ui`)
services:
- kind: Service
name: usma-ui
port: 8080
tls:
certResolver: default
apiVersion: v1
kind: Service kind: Service
apiVersion: v1
metadata: metadata:
name: usma-ui name: usma-ui
namespace: {{ .Release.Namespace }}
labels: labels:
{{ include "usma-ui.labels" . | indent 4 }} {{ include "usma-ui.labels" . | indent 4 }}
app: usma-ui app: usma-ui
versoin: {{ .Values.usmaUi.image.tag }}
spec: spec:
selector:
app: usma-ui
ports: ports:
- name: http - name: usma-ui
port: 80
targetPort: 80
protocol: TCP protocol: TCP
port: 8080
targetPort: 8080
selector:
app: usma-ui
# 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: global:
hub: hub.hbyjkffn.hb.cegn.cn:30443/wod # 镜像仓库地址
host: usma.hbyjkffn.hb.cegn.cn hub: registry.cn-qingdao.aliyuncs.com/wod
# IngressHost
host: bg-usma.ysdpaas.local
# 镜像拉取策略
imagePullPolicy: "IfNotPresent"
# 镜像架构(amd64,arm64,ppc64le,mips64le),只控制servicechoreography业务系统的镜像架构,依赖组件不受此参数控制
imageArch: arm64
usma:
conf:
DB_SCHEMA: "public"
DB_URL: "host=postgresql port=5432 user=postgres password=passwd123 dbname=postgres sslmode=disable search_path=public"
REDIS_URL: "redis://redis:6379"
REDIS_PASSWORD: "passwd123"
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:80/sms/api"
resources: fileUpload:
# We usually recommend not to specify default resources and to leave this as a conscious image:
# choice for the user. This also increases chances charts run on environments with little repository: hub.wodcloud.com/devops/fileupload
# 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 tag: v2.0
storageSpec: storageClassName: "hostpath"
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: smsVerifyApi:
enabled: true image:
image: sms-verify-api repository: registry.cn-qingdao.aliyuncs.com/wod/sms-verify-api
tag: v2.0.0-hbyjt tag: v2.4.0
usma-api: usmaApi:
enabled: true image:
image: bg-usma-api repository: hub.wodcloud.com/apaas-sxxcy/usma-api
tag: v2.2.2 tag: v1.0.2
storageSpec: storageClassName: "hostpath"
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: usmaLoginApi:
enabled: true image:
image: usma-login repository: hub.wodcloud.com/apaas-sxxcy/usma-login-api
tag: hbyjt-2.2.2 tag: v1.0.0
storageClassName: "hostpath"
usma-login-api: usmaLogin:
enabled: true image:
image: bg-login-base repository: hub.wodcloud.com/apaas-sxxcy/usma-login-ui
tag: v2.2.2 tag: v1.0.0
usma-postgresql: usmaUi:
enabled: true image:
image: postgres repository: hub.wodcloud.com/apaas-sxxcy/usma-ui
tag: 10.6 tag: v1.0.1
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: # 初始化数据库job
usmaDbInit:
image:
repository: hub.wodcloud.com/wod/usma-db-init
tag: v1.0.0
# redis中间件默认svc是 redis
redis:
enabled: true enabled: true
image: redis image:
tag: 5.0.3 repository: redis
tag: 6.2.6
#redis的config
conf:
port: 'port 6379'
db: 'databases 16'
maxmem: 'maxmemory 256mb'
apl: 'appendonly yes'
passwd: 'requirepass passwd123'
#持久化存储类
storageClassName: "hostpath"
usma-ui: # postgresql中间件默认svc是 postgresql
postgresql:
enabled: true enabled: true
image: usma-ui image:
tag: hbyjt-2.2.2 repository: postgres
\ No newline at end of file tag: 13.5
initImage:
repository: busybox
tag: 1.33
#数据库密码
POSTGRES_PASSWORD: "passwd123"
#持久化存储类
storageClassName: "hostpath"
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