[Agent][Deploy] - dev all accomplished
This commit is contained in:
@@ -15,6 +15,17 @@ import (
|
|||||||
|
|
||||||
var log = logger.Log
|
var log = logger.Log
|
||||||
|
|
||||||
|
const (
|
||||||
|
dev = "uavcloud-dev"
|
||||||
|
devFlight = "uavcloud-devflight"
|
||||||
|
devOperation = "uavcloud-devoperation"
|
||||||
|
validation = "uavcloud-feature"
|
||||||
|
integration = "uavcloud-test"
|
||||||
|
uat = "uavcloud-uat"
|
||||||
|
demo = "uavcloud-demo"
|
||||||
|
uavms = "uavcloud-uavms"
|
||||||
|
)
|
||||||
|
|
||||||
func OctopusDeploy() {
|
func OctopusDeploy() {
|
||||||
|
|
||||||
// common environment
|
// common environment
|
||||||
@@ -105,6 +116,7 @@ var IgnoreCmiiBackendAppName = map[string]string{
|
|||||||
"cmii-uav-multilink": "",
|
"cmii-uav-multilink": "",
|
||||||
"cmii-uav-alarm": "",
|
"cmii-uav-alarm": "",
|
||||||
"cmii-uav-tower": "",
|
"cmii-uav-tower": "",
|
||||||
|
"cmii-uav-clusters": "",
|
||||||
}
|
}
|
||||||
|
|
||||||
func backendDeploy(common *z_dep.CommonEnvironmentConfig, backendImageVersionMap map[string]string) {
|
func backendDeploy(common *z_dep.CommonEnvironmentConfig, backendImageVersionMap map[string]string) {
|
||||||
@@ -180,9 +192,8 @@ func CmiiEnvironmentDeploy(isCompleteDeploy bool, commonEnv *z_dep.CommonEnviron
|
|||||||
// move all apply file to old folder
|
// move all apply file to old folder
|
||||||
_ = utils.FolderMoveFiles(commonEnv.ApplyFilePrefix, oldApplyFileFolder)
|
_ = utils.FolderMoveFiles(commonEnv.ApplyFilePrefix, oldApplyFileFolder)
|
||||||
|
|
||||||
// clear all middleware data
|
// get cmii env config from namespace
|
||||||
// ignore redis rabbitmq mongo nacos emqx
|
cmiiEnvConfig := getCmiiEnvConfigurationFromNamespace(commonEnv.Namespace)
|
||||||
// sync mysql-data
|
|
||||||
|
|
||||||
// generate
|
// generate
|
||||||
|
|
||||||
@@ -193,12 +204,12 @@ func CmiiEnvironmentDeploy(isCompleteDeploy bool, commonEnv *z_dep.CommonEnviron
|
|||||||
c_middle.PVCDeploy(commonEnv)
|
c_middle.PVCDeploy(commonEnv)
|
||||||
|
|
||||||
// middlewares
|
// middlewares
|
||||||
e_cmii.CmiiDevConfig.MySQlConfig.MidMySQlDeploy(commonEnv)
|
cmiiEnvConfig.MySQlConfig.MidMySQlDeploy(commonEnv)
|
||||||
e_cmii.CmiiDevConfig.RedisConfig.MidRedisDeploy(commonEnv)
|
cmiiEnvConfig.RedisConfig.MidRedisDeploy(commonEnv)
|
||||||
e_cmii.CmiiDevConfig.EmqxConfig.MidEmqxDeploy(commonEnv)
|
cmiiEnvConfig.EmqxConfig.MidEmqxDeploy(commonEnv)
|
||||||
e_cmii.CmiiDevConfig.MongoConfig.MidMongoDeploy(commonEnv)
|
cmiiEnvConfig.MongoConfig.MidMongoDeploy(commonEnv)
|
||||||
e_cmii.CmiiDevConfig.RabbitMQConfig.MidRabbitMQDeploy(commonEnv)
|
cmiiEnvConfig.RabbitMQConfig.MidRabbitMQDeploy(commonEnv)
|
||||||
e_cmii.CmiiDevConfig.NacosConfig.MidNacosDeploy(commonEnv)
|
cmiiEnvConfig.NacosConfig.MidNacosDeploy(commonEnv)
|
||||||
|
|
||||||
configMapDeploy(commonEnv)
|
configMapDeploy(commonEnv)
|
||||||
|
|
||||||
@@ -206,11 +217,30 @@ func CmiiEnvironmentDeploy(isCompleteDeploy bool, commonEnv *z_dep.CommonEnviron
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// frontend
|
|
||||||
|
|
||||||
// frontend
|
// frontend
|
||||||
frontendDeploy(commonEnv, frontendImageVersionMap)
|
frontendDeploy(commonEnv, frontendImageVersionMap)
|
||||||
// backend
|
// backend
|
||||||
backendDeploy(commonEnv, backendImageVersionMap)
|
backendDeploy(commonEnv, backendImageVersionMap)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func getCmiiEnvConfigurationFromNamespace(namespace string) *e_cmii.CmiiEnvConfig {
|
||||||
|
switch namespace {
|
||||||
|
case dev:
|
||||||
|
return e_cmii.CmiiDevConfig
|
||||||
|
case devFlight:
|
||||||
|
return e_cmii.CmiiDevFlightConfig
|
||||||
|
case devOperation:
|
||||||
|
return e_cmii.CmiiDevOperationConfig
|
||||||
|
case integration:
|
||||||
|
return e_cmii.CmiiIntegrationConfig
|
||||||
|
case uat:
|
||||||
|
return e_cmii.CmiiUatConfig
|
||||||
|
case validation:
|
||||||
|
return e_cmii.CmiiValidationConfig
|
||||||
|
case uavms:
|
||||||
|
return e_cmii.CmiiDemoConfig
|
||||||
|
default:
|
||||||
|
return e_cmii.CmiiDevConfig
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -91,6 +91,11 @@ spec:
|
|||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
{{- if .TenantEnv }}
|
{{- if .TenantEnv }}
|
||||||
|
- path: /{{ $tenantEnv }}/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform
|
||||||
|
servicePort: 9528
|
||||||
{{- $tenantEnv := .TenantEnv }}
|
{{- $tenantEnv := .TenantEnv }}
|
||||||
{{- range $key, $value := .FrontendShortNameMaps }}
|
{{- range $key, $value := .FrontendShortNameMaps }}
|
||||||
- path: /{{ $tenantEnv }}/{{ $value }}/?(.*)
|
- path: /{{ $tenantEnv }}/{{ $value }}/?(.*)
|
||||||
@@ -100,6 +105,11 @@ spec:
|
|||||||
servicePort: 9528
|
servicePort: 9528
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
|
- path: /?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform
|
||||||
|
servicePort: 9528
|
||||||
{{- range $key, $value := .FrontendShortNameMaps }}
|
{{- range $key, $value := .FrontendShortNameMaps }}
|
||||||
- path: /{{ $value }}/?(.*)
|
- path: /{{ $value }}/?(.*)
|
||||||
pathType: ImplementationSpecific
|
pathType: ImplementationSpecific
|
||||||
|
|||||||
@@ -48,3 +48,71 @@ var CmiiDevConfig = &CmiiEnvConfig{
|
|||||||
CmiiFrontendConfig: d_app.CmiiFrontendConfig{},
|
CmiiFrontendConfig: d_app.CmiiFrontendConfig{},
|
||||||
CmiiBackendConfig: d_app.CmiiBackendConfig{},
|
CmiiBackendConfig: d_app.CmiiBackendConfig{},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var CmiiDevFlightConfig = &CmiiEnvConfig{
|
||||||
|
MySQlConfig: c_middle.MySQlConfig{
|
||||||
|
MySQLNodePort: "33307",
|
||||||
|
MySQLRootPassword: "Gwubc6CxRM",
|
||||||
|
MySQLRootPasswordBase64: "R3d1YmM2Q3hSTQ==",
|
||||||
|
MySQLK8sAdminPassword: "VFJncwy58^Zm",
|
||||||
|
},
|
||||||
|
RedisConfig: c_middle.RedisConfig{},
|
||||||
|
MongoConfig: c_middle.MongoConfig{
|
||||||
|
MongoPassword: "7(#dD3zcz8",
|
||||||
|
},
|
||||||
|
RabbitMQConfig: c_middle.RabbitMQConfig{
|
||||||
|
CommonEnvironmentConfig: z_dep.CommonEnvironmentConfig{},
|
||||||
|
RabbitNodePort: "35673",
|
||||||
|
RabbitDashboardNodePort: "36676",
|
||||||
|
RabbitPassword: "7v&7#w1ef)T-",
|
||||||
|
RabbitPasswordBase64: "N3YmNyN3MWVmKVQt",
|
||||||
|
},
|
||||||
|
NacosConfig: c_middle.NacosConfig{
|
||||||
|
MySQLK8sAdminPassword: "VFJncwy58^Zm",
|
||||||
|
NacosNodePort: "33849",
|
||||||
|
},
|
||||||
|
EmqxConfig: c_middle.EmqxConfig{
|
||||||
|
EmqxNodePort: "31884",
|
||||||
|
EmqxDashboardNodePort: "38086",
|
||||||
|
EmqxWebSocketNodePort: "38084",
|
||||||
|
EmqxPassword: "4YPk*DS%+5",
|
||||||
|
},
|
||||||
|
CmiiFrontendConfig: d_app.CmiiFrontendConfig{},
|
||||||
|
CmiiBackendConfig: d_app.CmiiBackendConfig{},
|
||||||
|
}
|
||||||
|
|
||||||
|
var CmiiDevOperationConfig = &CmiiEnvConfig{
|
||||||
|
MySQlConfig: c_middle.MySQlConfig{
|
||||||
|
MySQLNodePort: "33308",
|
||||||
|
MySQLRootPassword: "Gwubc6CxRM",
|
||||||
|
MySQLRootPasswordBase64: "R3d1YmM2Q3hSTQ==",
|
||||||
|
MySQLK8sAdminPassword: "VFJncwy58^Zm",
|
||||||
|
},
|
||||||
|
RedisConfig: c_middle.RedisConfig{},
|
||||||
|
MongoConfig: c_middle.MongoConfig{
|
||||||
|
MongoPassword: "7(#dD3zcz8",
|
||||||
|
},
|
||||||
|
RabbitMQConfig: c_middle.RabbitMQConfig{
|
||||||
|
CommonEnvironmentConfig: z_dep.CommonEnvironmentConfig{},
|
||||||
|
RabbitNodePort: "35674",
|
||||||
|
RabbitDashboardNodePort: "36677",
|
||||||
|
RabbitPassword: "7v&7#w1ef)T-",
|
||||||
|
RabbitPasswordBase64: "N3YmNyN3MWVmKVQt",
|
||||||
|
},
|
||||||
|
NacosConfig: c_middle.NacosConfig{
|
||||||
|
MySQLK8sAdminPassword: "VFJncwy58^Zm",
|
||||||
|
NacosNodePort: "33850",
|
||||||
|
},
|
||||||
|
EmqxConfig: c_middle.EmqxConfig{
|
||||||
|
EmqxNodePort: "31885",
|
||||||
|
EmqxDashboardNodePort: "38087",
|
||||||
|
EmqxWebSocketNodePort: "38085",
|
||||||
|
EmqxPassword: "4YPk*DS%+5",
|
||||||
|
},
|
||||||
|
CmiiFrontendConfig: d_app.CmiiFrontendConfig{},
|
||||||
|
CmiiBackendConfig: d_app.CmiiBackendConfig{},
|
||||||
|
}
|
||||||
|
var CmiiIntegrationConfig = &CmiiEnvConfig{}
|
||||||
|
var CmiiUatConfig = &CmiiEnvConfig{}
|
||||||
|
var CmiiValidationConfig = &CmiiEnvConfig{}
|
||||||
|
var CmiiDemoConfig = &CmiiEnvConfig{}
|
||||||
|
|||||||
@@ -46,6 +46,11 @@ spec:
|
|||||||
- host: fake-domain.uavcloud-dev.io
|
- host: fake-domain.uavcloud-dev.io
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
|
- path: /dev/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform
|
||||||
|
servicePort: 9528
|
||||||
- path: /dev/supervision/?(.*)
|
- path: /dev/supervision/?(.*)
|
||||||
pathType: ImplementationSpecific
|
pathType: ImplementationSpecific
|
||||||
backend:
|
backend:
|
||||||
|
|||||||
5282
agent-deploy/uavcloud-devflight/k8s-backend.yaml
Normal file
5282
agent-deploy/uavcloud-devflight/k8s-backend.yaml
Normal file
File diff suppressed because it is too large
Load Diff
378
agent-deploy/uavcloud-devflight/k8s-configmap.yaml
Normal file
378
agent-deploy/uavcloud-devflight/k8s-configmap.yaml
Normal file
@@ -0,0 +1,378 @@
|
|||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-base
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "base",
|
||||||
|
AppClientId: "APP_9LY41OaKSqk2btY0"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-multiterminal
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "multiterminal",
|
||||||
|
AppClientId: "APP_PvdfRRRBPL8xbIwl"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-splice
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "splice",
|
||||||
|
AppClientId: "APP_zE0M3sTRXrCIJS8Y"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-emergency
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "emergency",
|
||||||
|
AppClientId: "APP_aGsTAY1uMZrpKdfk"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-logistics
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "logistics",
|
||||||
|
AppClientId: "APP_PvdfRRRBPL8xbIwl"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-supervisionh5
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "supervisionh5",
|
||||||
|
AppClientId: "APP_qqSu82THfexI8PLM"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-cmsportal
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "cmsportal",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-share
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "share",
|
||||||
|
AppClientId: "APP_4lVSVI0ZGxTssir8"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-qinghaitourism
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "qinghaitourism",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-detection
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "detection",
|
||||||
|
AppClientId: "APP_FDHW2VLVDWPnnOCy"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-open
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "open",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-traffic
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "traffic",
|
||||||
|
AppClientId: "APP_Jc8i2wOQ1t73QEJS"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-hljtt
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "hljtt",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-oms
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "oms",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-security
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "security",
|
||||||
|
AppClientId: "APP_JUSEMc7afyWXxvE7"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-qingdao
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "qingdao",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-threedsimulation
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "threedsimulation",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-pangu
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-media
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "media",
|
||||||
|
AppClientId: "APP_4AU8lbifESQO4FD6"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-mws
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "mws",
|
||||||
|
AppClientId: "APP_uKniXPELlRERBBwK"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-armypeople
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "armypeople",
|
||||||
|
AppClientId: "APP_UIegse6Lfou9pO1U"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-visualization
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "visualization",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-seniclive
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "seniclive",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-jiangsuwenlv
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "jiangsuwenlv",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-supervision
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "supervision",
|
||||||
|
AppClientId: "APP_qqSu82THfexI8PLM"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-ai-brain
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "ai-brain",
|
||||||
|
AppClientId: "APP_rafnuCAmBESIVYMH"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-securityh5
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "securityh5",
|
||||||
|
AppClientId: "APP_N3ImO0Ubfu9peRHD"
|
||||||
|
}
|
||||||
265
agent-deploy/uavcloud-devflight/k8s-emqx.yaml
Normal file
265
agent-deploy/uavcloud-devflight/k8s-emqx.yaml
Normal file
@@ -0,0 +1,265 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs-env
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
helm.sh/chart: emqx-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
data:
|
||||||
|
EMQX_CLUSTER__K8S__APISERVER: "https://kubernetes.default.svc.cluster.local:443"
|
||||||
|
EMQX_NAME: "helm-emqxs"
|
||||||
|
EMQX_CLUSTER__DISCOVERY: "k8s"
|
||||||
|
EMQX_CLUSTER__K8S__APP_NAME: "helm-emqxs"
|
||||||
|
EMQX_CLUSTER__K8S__SERVICE_NAME: "helm-emqxs-headless"
|
||||||
|
EMQX_CLUSTER__K8S__ADDRESS_TYPE: "dns"
|
||||||
|
EMQX_CLUSTER__K8S__namespace: "uavcloud-devflight"
|
||||||
|
EMQX_CLUSTER__K8S__SUFFIX: "svc.cluster.local"
|
||||||
|
EMQX_ALLOW_ANONYMOUS: "false"
|
||||||
|
EMQX_ACL_NOMATCH: "deny"
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs-cm
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
helm.sh/chart: emqx-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
data:
|
||||||
|
emqx_auth_username.conf: |-
|
||||||
|
auth.user.1.username = cmlc
|
||||||
|
auth.user.1.password = 4YPk*DS%+5
|
||||||
|
auth.user.password_hash = sha256
|
||||||
|
|
||||||
|
acl.conf: |-
|
||||||
|
{allow, {user, "admin"}, pubsub, ["admin/#"]}.
|
||||||
|
{allow, {user, "dashboard"}, subscribe, ["$SYS/#"]}.
|
||||||
|
{allow, {ipaddr, "127.0.0.1"}, pubsub, ["$SYS/#", "#"]}.
|
||||||
|
{deny, all, subscribe, ["$SYS/#", {eq, "#"}]}.
|
||||||
|
{allow, all}.
|
||||||
|
|
||||||
|
loaded_plugins: |-
|
||||||
|
{emqx_auth_username,true}.
|
||||||
|
{emqx_management, true}.
|
||||||
|
{emqx_recon, true}.
|
||||||
|
{emqx_retainer, false}.
|
||||||
|
{emqx_dashboard, true}.
|
||||||
|
{emqx_telemetry, true}.
|
||||||
|
{emqx_rule_engine, true}.
|
||||||
|
{emqx_bridge_mqtt, false}.
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
helm.sh/chart: emqx-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
serviceName: helm-emqxs-headless
|
||||||
|
updateStrategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
helm.sh/chart: emqx-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
affinity: { }
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: harborsecret
|
||||||
|
serviceAccountName: helm-emqxs
|
||||||
|
containers:
|
||||||
|
- name: helm-emqxs
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/emqx:5.5.1
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- name: mqtt
|
||||||
|
containerPort: 1883
|
||||||
|
- name: mqttssl
|
||||||
|
containerPort: 8883
|
||||||
|
- name: mgmt
|
||||||
|
containerPort: 8081
|
||||||
|
- name: ws
|
||||||
|
containerPort: 8083
|
||||||
|
- name: wss
|
||||||
|
containerPort: 8084
|
||||||
|
- name: dashboard
|
||||||
|
containerPort: 18083
|
||||||
|
- name: ekka
|
||||||
|
containerPort: 4370
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: helm-emqxs-env
|
||||||
|
resources: { }
|
||||||
|
volumeMounts:
|
||||||
|
- name: emqx-data
|
||||||
|
mountPath: "/opt/emqx/data/mnesia"
|
||||||
|
readOnly: false
|
||||||
|
- name: helm-emqxs-cm
|
||||||
|
mountPath: "/opt/emqx/etc/plugins/emqx_auth_username.conf"
|
||||||
|
subPath: emqx_auth_username.conf
|
||||||
|
readOnly: false
|
||||||
|
# - name: helm-emqxs-cm
|
||||||
|
# mountPath: "/opt/emqx/etc/acl.conf"
|
||||||
|
# subPath: "acl.conf"
|
||||||
|
# readOnly: false
|
||||||
|
- name: helm-emqxs-cm
|
||||||
|
mountPath: "/opt/emqx/data/loaded_plugins"
|
||||||
|
subPath: loaded_plugins
|
||||||
|
readOnly: false
|
||||||
|
volumes:
|
||||||
|
- name: emqx-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: helm-emqxs
|
||||||
|
- name: helm-emqxs-cm
|
||||||
|
configMap:
|
||||||
|
name: helm-emqxs-cm
|
||||||
|
items:
|
||||||
|
- key: emqx_auth_username.conf
|
||||||
|
path: emqx_auth_username.conf
|
||||||
|
- key: acl.conf
|
||||||
|
path: acl.conf
|
||||||
|
- key: loaded_plugins
|
||||||
|
path: loaded_plugins
|
||||||
|
---
|
||||||
|
kind: Role
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- endpoints
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- watch
|
||||||
|
- list
|
||||||
|
---
|
||||||
|
kind: RoleBinding
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: helm-emqxs
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
roleRef:
|
||||||
|
kind: Role
|
||||||
|
name: helm-emqxs
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
helm.sh/chart: emqx-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
type: NodePort
|
||||||
|
selector:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
ports:
|
||||||
|
- port: 1883
|
||||||
|
name: mqtt
|
||||||
|
targetPort: 1883
|
||||||
|
nodePort: 31884
|
||||||
|
- port: 18083
|
||||||
|
name: dashboard
|
||||||
|
targetPort: 18083
|
||||||
|
nodePort: 38086
|
||||||
|
- port: 8083
|
||||||
|
name: mqtt-websocket
|
||||||
|
targetPort: 8083
|
||||||
|
nodePort: 38084
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs-headless
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
helm.sh/chart: emqx-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
clusterIP: None
|
||||||
|
selector:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
ports:
|
||||||
|
- name: mqtt
|
||||||
|
port: 1883
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 1883
|
||||||
|
- name: mqttssl
|
||||||
|
port: 8883
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 8883
|
||||||
|
- name: mgmt
|
||||||
|
port: 8081
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 8081
|
||||||
|
- name: websocket
|
||||||
|
port: 8083
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 8083
|
||||||
|
- name: wss
|
||||||
|
port: 8084
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 8084
|
||||||
|
- name: dashboard
|
||||||
|
port: 18083
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 18083
|
||||||
|
- name: ekka
|
||||||
|
port: 4370
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 4370
|
||||||
2354
agent-deploy/uavcloud-devflight/k8s-frontend.yaml
Normal file
2354
agent-deploy/uavcloud-devflight/k8s-frontend.yaml
Normal file
File diff suppressed because it is too large
Load Diff
546
agent-deploy/uavcloud-devflight/k8s-ingress.yaml
Normal file
546
agent-deploy/uavcloud-devflight/k8s-ingress.yaml
Normal file
@@ -0,0 +1,546 @@
|
|||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1beta1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: frontend-applications-ingress
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
type: frontend
|
||||||
|
octopus.control: all-ingress-config-wdd
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: "nginx"
|
||||||
|
nginx.ingress.kubernetes.io/enable-cors: "true"
|
||||||
|
nginx.ingress.kubernetes.io/rewrite-target: /$1
|
||||||
|
nginx.ingress.kubernetes.io/configuration-snippet: |
|
||||||
|
rewrite ^(/supervision)$ $1/ redirect;
|
||||||
|
rewrite ^(/supervisionh5)$ $1/ redirect;
|
||||||
|
rewrite ^(/pangu)$ $1/ redirect;
|
||||||
|
rewrite ^(/ai-brain)$ $1/ redirect;
|
||||||
|
rewrite ^(/armypeople)$ $1/ redirect;
|
||||||
|
rewrite ^(/base)$ $1/ redirect;
|
||||||
|
rewrite ^(/cmsportal)$ $1/ redirect;
|
||||||
|
rewrite ^(/detection)$ $1/ redirect;
|
||||||
|
rewrite ^(/emergency)$ $1/ redirect;
|
||||||
|
rewrite ^(/hljtt)$ $1/ redirect;
|
||||||
|
rewrite ^(/jiangsuwenlv)$ $1/ redirect;
|
||||||
|
rewrite ^(/logistics)$ $1/ redirect;
|
||||||
|
rewrite ^(/media)$ $1/ redirect;
|
||||||
|
rewrite ^(/multiterminal)$ $1/ redirect;
|
||||||
|
rewrite ^(/mws)$ $1/ redirect;
|
||||||
|
rewrite ^(/oms)$ $1/ redirect;
|
||||||
|
rewrite ^(/open)$ $1/ redirect;
|
||||||
|
rewrite ^(/qingdao)$ $1/ redirect;
|
||||||
|
rewrite ^(/qinghaitourism)$ $1/ redirect;
|
||||||
|
rewrite ^(/security)$ $1/ redirect;
|
||||||
|
rewrite ^(/securityh5)$ $1/ redirect;
|
||||||
|
rewrite ^(/seniclive)$ $1/ redirect;
|
||||||
|
rewrite ^(/share)$ $1/ redirect;
|
||||||
|
rewrite ^(/splice)$ $1/ redirect;
|
||||||
|
rewrite ^(/threedsimulation)$ $1/ redirect;
|
||||||
|
rewrite ^(/traffic)$ $1/ redirect;
|
||||||
|
rewrite ^(/visualization)$ $1/ redirect;
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: fake-domain.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /devflight/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/supervision/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-suav-platform-supervision
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/supervisionh5/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-suav-platform-supervisionh5
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/pangu/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/ai-brain/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-ai-brain
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/armypeople/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-armypeople
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/base/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-base
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/cmsportal/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-cms-portal
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/detection/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-detection
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/emergency/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-emergency-rescue
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/hljtt/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-hljtt
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/jiangsuwenlv/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-jiangsuwenlv
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/logistics/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-logistics
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/media/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-media
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/multiterminal/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-multiterminal
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/mws/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-mws
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/oms/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-oms
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/open/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-open
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/qingdao/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-qingdao
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/qinghaitourism/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-qinghaitourism
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/security/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-security
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/securityh5/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-securityh5
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/seniclive/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-seniclive
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/share/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-share
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/splice/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-splice
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/threedsimulation/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-threedsimulation
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/traffic/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-traffic
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/visualization/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-visualization
|
||||||
|
servicePort: 9528
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1beta1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: backend-applications-ingress
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
type: backend
|
||||||
|
octopus.control: all-ingress-config-wdd
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: "nginx"
|
||||||
|
nginx.ingress.kubernetes.io/enable-cors: "true"
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: cmii-admin-data.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-admin-data
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-admin-gateway.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-admin-gateway
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-admin-user.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-admin-user
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-app-release.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-app-release
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-open-gateway.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-open-gateway
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-suav-supervision.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-suav-supervision
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uas-gateway.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uas-gateway
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uas-lifecycle.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uas-lifecycle
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-airspace.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-airspace
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-alarm.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-alarm
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-autowaypoint.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-autowaypoint
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-brain.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-brain
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-bridge.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-bridge
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-cloud-live.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-cloud-live
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-clusters.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-clusters
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-cms.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-cms
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-data-post-process.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-data-post-process
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-depotautoreturn.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-depotautoreturn
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-developer.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-developer
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-device.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-device
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-emergency.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-emergency
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-gateway.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-gateway
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-industrial-portfolio.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-industrial-portfolio
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-integration.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-integration
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-kpi-monitor.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-kpi-monitor
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-logger.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-logger
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-material-warehouse.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-material-warehouse
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-mission.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-mission
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-mqtthandler.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-mqtthandler
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-multilink.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-multilink
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-notice.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-notice
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-oauth.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-oauth
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-process.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-process
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-surveillance.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-surveillance
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-threedsimulation.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-threedsimulation
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-tower.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-tower
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-user.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-user
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-waypoint.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-waypoint
|
||||||
|
servicePort: 8080
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1beta1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: all-gateways-ingress
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
type: api-gateway
|
||||||
|
octopus.control: all-ingress-config-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: "nginx"
|
||||||
|
nginx.ingress.kubernetes.io/enable-cors: "true"
|
||||||
|
nginx.ingress.kubernetes.io/rewrite-target: /$1
|
||||||
|
nginx.ingress.kubernetes.io/configuration-snippet: |
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "Upgrade";
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: fake-domain.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /devflight/oms/api/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-admin-gateway
|
||||||
|
servicePort: 8080
|
||||||
|
- path: /devflight/open/api/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-open-gateway
|
||||||
|
servicePort: 8080
|
||||||
|
- path: /devflight/api/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-gateway
|
||||||
|
servicePort: 8080
|
||||||
77
agent-deploy/uavcloud-devflight/k8s-mongo.yaml
Normal file
77
agent-deploy/uavcloud-devflight/k8s-mongo.yaml
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-mongo
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
cmii.app: helm-mongo
|
||||||
|
cmii.type: middleware
|
||||||
|
helm.sh/chart: mongo-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
selector:
|
||||||
|
cmii.app: helm-mongo
|
||||||
|
cmii.type: middleware
|
||||||
|
ports:
|
||||||
|
- port: 27017
|
||||||
|
name: server-27017
|
||||||
|
targetPort: 27017
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: helm-mongo
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
cmii.app: helm-mongo
|
||||||
|
cmii.type: middleware
|
||||||
|
helm.sh/chart: mongo-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
serviceName: helm-mongo
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
cmii.app: helm-mongo
|
||||||
|
cmii.type: middleware
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
cmii.app: helm-mongo
|
||||||
|
cmii.type: middleware
|
||||||
|
helm.sh/chart: mongo-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
annotations:
|
||||||
|
pod.alpha.kubernetes.io/initialized: "true"
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: harborsecret
|
||||||
|
affinity: { }
|
||||||
|
containers:
|
||||||
|
- name: helm-mongo
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/mongo:5.0
|
||||||
|
resources: { }
|
||||||
|
ports:
|
||||||
|
- containerPort: 27017
|
||||||
|
name: mongo27017
|
||||||
|
protocol: TCP
|
||||||
|
env:
|
||||||
|
- name: MONGO_INITDB_ROOT_USERNAME
|
||||||
|
value: cmlc
|
||||||
|
- name: MONGO_INITDB_ROOT_PASSWORD
|
||||||
|
value: 7(#dD3zcz8
|
||||||
|
volumeMounts:
|
||||||
|
- name: mongo-data
|
||||||
|
mountPath: /data/db
|
||||||
|
readOnly: false
|
||||||
|
subPath: default/helm-mongo/data/db
|
||||||
|
volumes:
|
||||||
|
- name: mongo-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: helm-mongo
|
||||||
|
---
|
||||||
423
agent-deploy/uavcloud-devflight/k8s-mysql.yaml
Normal file
423
agent-deploy/uavcloud-devflight/k8s-mysql.yaml
Normal file
@@ -0,0 +1,423 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: helm-mysql
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
annotations: { }
|
||||||
|
secrets:
|
||||||
|
- name: helm-mysql
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: helm-mysql
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
mysql-root-password: "R3d1YmM2Q3hSTQ=="
|
||||||
|
mysql-password: "S0F0cm5PckFKNw=="
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-mysql
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
data:
|
||||||
|
my.cnf: |-
|
||||||
|
|
||||||
|
[mysqld]
|
||||||
|
port=3306
|
||||||
|
basedir=/opt/bitnami/mysql
|
||||||
|
datadir=/bitnami/mysql/data
|
||||||
|
pid-file=/opt/bitnami/mysql/tmp/mysqld.pid
|
||||||
|
socket=/opt/bitnami/mysql/tmp/mysql.sock
|
||||||
|
log-error=/bitnami/mysql/data/error.log
|
||||||
|
general_log_file = /bitnami/mysql/data/general.log
|
||||||
|
slow_query_log_file = /bitnami/mysql/data/slow.log
|
||||||
|
innodb_data_file_path = ibdata1:512M:autoextend
|
||||||
|
innodb_buffer_pool_size = 512M
|
||||||
|
innodb_buffer_pool_instances = 2
|
||||||
|
innodb_log_file_size = 512M
|
||||||
|
innodb_log_files_in_group = 4
|
||||||
|
innodb_log_files_in_group = 4
|
||||||
|
log-bin = /bitnami/mysql/data/mysql-bin
|
||||||
|
max_binlog_size=1G
|
||||||
|
transaction_isolation = REPEATABLE-READ
|
||||||
|
default_storage_engine = innodb
|
||||||
|
character-set-server = utf8mb4
|
||||||
|
collation-server=utf8mb4_bin
|
||||||
|
binlog_format = ROW
|
||||||
|
binlog_rows_query_log_events=on
|
||||||
|
binlog_cache_size=4M
|
||||||
|
binlog_expire_logs_seconds = 1296000
|
||||||
|
max_binlog_cache_size=2G
|
||||||
|
gtid_mode = on
|
||||||
|
enforce_gtid_consistency = 1
|
||||||
|
sync_binlog = 1
|
||||||
|
innodb_flush_log_at_trx_commit = 1
|
||||||
|
innodb_flush_method = O_DIRECT
|
||||||
|
log_slave_updates=1
|
||||||
|
relay_log_recovery = 1
|
||||||
|
relay-log-purge = 1
|
||||||
|
default_time_zone = '+08:00'
|
||||||
|
lower_case_table_names=1
|
||||||
|
log_bin_trust_function_creators=1
|
||||||
|
group_concat_max_len=67108864
|
||||||
|
innodb_io_capacity = 4000
|
||||||
|
innodb_io_capacity_max = 8000
|
||||||
|
innodb_flush_sync = 0
|
||||||
|
innodb_flush_neighbors = 0
|
||||||
|
innodb_write_io_threads = 8
|
||||||
|
innodb_read_io_threads = 8
|
||||||
|
innodb_purge_threads = 4
|
||||||
|
innodb_page_cleaners = 4
|
||||||
|
innodb_open_files = 65535
|
||||||
|
innodb_max_dirty_pages_pct = 50
|
||||||
|
innodb_lru_scan_depth = 4000
|
||||||
|
innodb_checksum_algorithm = crc32
|
||||||
|
innodb_lock_wait_timeout = 10
|
||||||
|
innodb_rollback_on_timeout = 1
|
||||||
|
innodb_print_all_deadlocks = 1
|
||||||
|
innodb_file_per_table = 1
|
||||||
|
innodb_online_alter_log_max_size = 4G
|
||||||
|
innodb_stats_on_metadata = 0
|
||||||
|
innodb_thread_concurrency = 0
|
||||||
|
innodb_sync_spin_loops = 100
|
||||||
|
innodb_spin_wait_delay = 30
|
||||||
|
lock_wait_timeout = 3600
|
||||||
|
slow_query_log = 1
|
||||||
|
long_query_time = 10
|
||||||
|
log_queries_not_using_indexes =1
|
||||||
|
log_throttle_queries_not_using_indexes = 60
|
||||||
|
min_examined_row_limit = 100
|
||||||
|
log_slow_admin_statements = 1
|
||||||
|
log_slow_slave_statements = 1
|
||||||
|
default_authentication_plugin=mysql_native_password
|
||||||
|
skip-name-resolve=1
|
||||||
|
explicit_defaults_for_timestamp=1
|
||||||
|
plugin_dir=/opt/bitnami/mysql/plugin
|
||||||
|
max_allowed_packet=128M
|
||||||
|
max_connections = 2000
|
||||||
|
max_connect_errors = 1000000
|
||||||
|
table_definition_cache=2000
|
||||||
|
table_open_cache_instances=64
|
||||||
|
tablespace_definition_cache=1024
|
||||||
|
thread_cache_size=256
|
||||||
|
interactive_timeout = 600
|
||||||
|
wait_timeout = 600
|
||||||
|
tmpdir=/opt/bitnami/mysql/tmp
|
||||||
|
max_allowed_packet=32M
|
||||||
|
bind-address=0.0.0.0
|
||||||
|
performance_schema = 1
|
||||||
|
performance_schema_instrument = '%memory%=on'
|
||||||
|
performance_schema_instrument = '%lock%=on'
|
||||||
|
innodb_monitor_enable=ALL
|
||||||
|
|
||||||
|
[mysql]
|
||||||
|
no-auto-rehash
|
||||||
|
|
||||||
|
[mysqldump]
|
||||||
|
quick
|
||||||
|
max_allowed_packet = 32M
|
||||||
|
|
||||||
|
[client]
|
||||||
|
port=3306
|
||||||
|
socket=/opt/bitnami/mysql/tmp/mysql.sock
|
||||||
|
default-character-set=UTF8
|
||||||
|
plugin_dir=/opt/bitnami/mysql/plugin
|
||||||
|
|
||||||
|
[manager]
|
||||||
|
port=3306
|
||||||
|
socket=/opt/bitnami/mysql/tmp/mysql.sock
|
||||||
|
pid-file=/opt/bitnami/mysql/tmp/mysqld.pid
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-mysql-init-scripts
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
data:
|
||||||
|
create_users_grants_core.sql: |-
|
||||||
|
create
|
||||||
|
user zyly@'%' identified by 'Cmii@451315';
|
||||||
|
grant select on *.* to zyly@'%';
|
||||||
|
create
|
||||||
|
user zyly_qc@'%' identified by 'Uh)E_owCyb16';
|
||||||
|
grant all
|
||||||
|
on *.* to zyly_qc@'%';
|
||||||
|
create
|
||||||
|
user k8s_admin@'%' identified by 'VFJncwy58^Zm';
|
||||||
|
grant all
|
||||||
|
on *.* to k8s_admin@'%';
|
||||||
|
create
|
||||||
|
user audit_dba@'%' identified by 'PjCzqiBmJaTpgkoYXynH';
|
||||||
|
grant all
|
||||||
|
on *.* to audit_dba@'%';
|
||||||
|
create
|
||||||
|
user db_backup@'%' identified by 'RU5Pu(4FGdT9';
|
||||||
|
GRANT
|
||||||
|
SELECT, RELOAD, PROCESS, LOCK TABLES, REPLICATION CLIENT, EVENT
|
||||||
|
on *.* to db_backup@'%';
|
||||||
|
create
|
||||||
|
user monitor@'%' identified by 'PL3#nGtrWbf-';
|
||||||
|
grant REPLICATION
|
||||||
|
CLIENT on *.* to monitor@'%';
|
||||||
|
flush
|
||||||
|
privileges;
|
||||||
|
---
|
||||||
|
kind: Service
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: cmii-mysql
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
cmii.app: mysql
|
||||||
|
cmii.type: middleware
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: mysql
|
||||||
|
protocol: TCP
|
||||||
|
port: 13306
|
||||||
|
targetPort: mysql
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
cmii.app: mysql
|
||||||
|
cmii.type: middleware
|
||||||
|
type: ClusterIP
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-mysql-headless
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: mysql
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
annotations: { }
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
clusterIP: None
|
||||||
|
publishNotReadyAddresses: true
|
||||||
|
ports:
|
||||||
|
- name: mysql
|
||||||
|
port: 3306
|
||||||
|
targetPort: mysql
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: mysql
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-mysql
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: mysql
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
annotations: { }
|
||||||
|
spec:
|
||||||
|
type: NodePort
|
||||||
|
ports:
|
||||||
|
- name: mysql
|
||||||
|
port: 3306
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: mysql
|
||||||
|
nodePort: 33307
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: mysql
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: helm-mysql
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: mysql
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: mysql
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
serviceName: helm-mysql
|
||||||
|
updateStrategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
checksum/configuration: 6b60fa0f3a846a6ada8effdc4f823cf8003d42a8c8f630fe8b1b66d3454082dd
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: mysql
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: harborsecret
|
||||||
|
serviceAccountName: helm-mysql
|
||||||
|
affinity: { }
|
||||||
|
nodeSelector:
|
||||||
|
mysql-deploy: "true"
|
||||||
|
securityContext:
|
||||||
|
fsGroup: 1001
|
||||||
|
initContainers:
|
||||||
|
- name: change-volume-permissions
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/bitnami-shell:11-debian-11-r136
|
||||||
|
imagePullPolicy: "Always"
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- -ec
|
||||||
|
- |
|
||||||
|
chown -R 1001:1001 /bitnami/mysql
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
volumeMounts:
|
||||||
|
- name: mysql-data
|
||||||
|
mountPath: /bitnami/mysql
|
||||||
|
containers:
|
||||||
|
- name: mysql
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/mysql:8.1.0-debian-11-r42
|
||||||
|
imagePullPolicy: "IfNotPresent"
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 1001
|
||||||
|
env:
|
||||||
|
- name: BITNAMI_DEBUG
|
||||||
|
value: "true"
|
||||||
|
- name: MYSQL_ROOT_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: helm-mysql
|
||||||
|
key: mysql-root-password
|
||||||
|
- name: MYSQL_DATABASE
|
||||||
|
value: "cmii"
|
||||||
|
ports:
|
||||||
|
- name: mysql
|
||||||
|
containerPort: 3306
|
||||||
|
livenessProbe:
|
||||||
|
failureThreshold: 5
|
||||||
|
initialDelaySeconds: 120
|
||||||
|
periodSeconds: 10
|
||||||
|
successThreshold: 1
|
||||||
|
timeoutSeconds: 3
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- -ec
|
||||||
|
- |
|
||||||
|
password_aux="${MYSQL_ROOT_PASSWORD:-}"
|
||||||
|
if [[ -f "${MYSQL_ROOT_PASSWORD_FILE:-}" ]]; then
|
||||||
|
password_aux=$(cat "$MYSQL_ROOT_PASSWORD_FILE")
|
||||||
|
fi
|
||||||
|
mysqladmin status -uroot -p"${password_aux}"
|
||||||
|
readinessProbe:
|
||||||
|
failureThreshold: 5
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
periodSeconds: 10
|
||||||
|
successThreshold: 1
|
||||||
|
timeoutSeconds: 3
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- -ec
|
||||||
|
- |
|
||||||
|
password_aux="${MYSQL_ROOT_PASSWORD:-}"
|
||||||
|
if [[ -f "${MYSQL_ROOT_PASSWORD_FILE:-}" ]]; then
|
||||||
|
password_aux=$(cat "$MYSQL_ROOT_PASSWORD_FILE")
|
||||||
|
fi
|
||||||
|
mysqladmin status -uroot -p"${password_aux}"
|
||||||
|
startupProbe:
|
||||||
|
failureThreshold: 60
|
||||||
|
initialDelaySeconds: 120
|
||||||
|
periodSeconds: 10
|
||||||
|
successThreshold: 1
|
||||||
|
timeoutSeconds: 1
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- -ec
|
||||||
|
- |
|
||||||
|
password_aux="${MYSQL_ROOT_PASSWORD:-}"
|
||||||
|
if [[ -f "${MYSQL_ROOT_PASSWORD_FILE:-}" ]]; then
|
||||||
|
password_aux=$(cat "$MYSQL_ROOT_PASSWORD_FILE")
|
||||||
|
fi
|
||||||
|
mysqladmin status -uroot -p"${password_aux}"
|
||||||
|
resources:
|
||||||
|
limits: { }
|
||||||
|
requests: { }
|
||||||
|
volumeMounts:
|
||||||
|
- name: mysql-data
|
||||||
|
mountPath: /bitnami/mysql
|
||||||
|
- name: custom-init-scripts
|
||||||
|
mountPath: /docker-entrypoint-initdb.d
|
||||||
|
- name: config
|
||||||
|
mountPath: /opt/bitnami/mysql/conf/my.cnf
|
||||||
|
subPath: my.cnf
|
||||||
|
volumes:
|
||||||
|
- name: config
|
||||||
|
configMap:
|
||||||
|
name: helm-mysql
|
||||||
|
- name: custom-init-scripts
|
||||||
|
configMap:
|
||||||
|
name: helm-mysql-init-scripts
|
||||||
|
- name: mysql-data
|
||||||
|
hostPath:
|
||||||
|
path: /var/lib/docker/mysql-pv/uavcloud-devflight/
|
||||||
130
agent-deploy/uavcloud-devflight/k8s-nacos.yaml
Normal file
130
agent-deploy/uavcloud-devflight/k8s-nacos.yaml
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-nacos-cm
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
cmii.app: helm-nacos
|
||||||
|
cmii.type: middleware
|
||||||
|
octopus.control: nacos-wdd
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
data:
|
||||||
|
mysql.db.name: "cmii_nacos_config"
|
||||||
|
mysql.db.host: "helm-mysql"
|
||||||
|
mysql.port: "3306"
|
||||||
|
mysql.user: "k8s_admin"
|
||||||
|
mysql.password: "VFJncwy58^Zm"
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-nacos
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
cmii.app: helm-nacos
|
||||||
|
cmii.type: middleware
|
||||||
|
octopus.control: nacos-wdd
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
type: NodePort
|
||||||
|
selector:
|
||||||
|
cmii.app: helm-nacos
|
||||||
|
cmii.type: middleware
|
||||||
|
ports:
|
||||||
|
- port: 8848
|
||||||
|
name: server
|
||||||
|
targetPort: 8848
|
||||||
|
nodePort: 33849
|
||||||
|
- port: 9848
|
||||||
|
name: server12
|
||||||
|
targetPort: 9848
|
||||||
|
- port: 9849
|
||||||
|
name: server23
|
||||||
|
targetPort: 9849
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: helm-nacos
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
cmii.app: helm-nacos
|
||||||
|
cmii.type: middleware
|
||||||
|
octopus.control: nacos-wdd
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
serviceName: helm-nacos
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
cmii.app: helm-nacos
|
||||||
|
cmii.type: middleware
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
cmii.app: helm-nacos
|
||||||
|
cmii.type: middleware
|
||||||
|
octopus.control: nacos-wdd
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
annotations:
|
||||||
|
pod.alpha.kubernetes.io/initialized: "true"
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: harborsecret
|
||||||
|
affinity: { }
|
||||||
|
containers:
|
||||||
|
- name: nacos-server
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/nacos-server:v2.1.2
|
||||||
|
ports:
|
||||||
|
- containerPort: 8848
|
||||||
|
name: dashboard
|
||||||
|
- containerPort: 9848
|
||||||
|
name: tcp-9848
|
||||||
|
- containerPort: 9849
|
||||||
|
name: tcp-9849
|
||||||
|
env:
|
||||||
|
- name: NACOS_AUTH_ENABLE
|
||||||
|
value: "false"
|
||||||
|
- name: NACOS_REPLICAS
|
||||||
|
value: "1"
|
||||||
|
- name: MYSQL_SERVICE_DB_NAME
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: helm-nacos-cm
|
||||||
|
key: mysql.db.name
|
||||||
|
- name: MYSQL_SERVICE_PORT
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: helm-nacos-cm
|
||||||
|
key: mysql.port
|
||||||
|
- name: MYSQL_SERVICE_USER
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: helm-nacos-cm
|
||||||
|
key: mysql.user
|
||||||
|
- name: MYSQL_SERVICE_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: helm-nacos-cm
|
||||||
|
key: mysql.password
|
||||||
|
- name: MYSQL_SERVICE_HOST
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: helm-nacos-cm
|
||||||
|
key: mysql.db.host
|
||||||
|
- name: NACOS_SERVER_PORT
|
||||||
|
value: "8848"
|
||||||
|
- name: NACOS_APPLICATION_PORT
|
||||||
|
value: "8848"
|
||||||
|
- name: PREFER_HOST_MODE
|
||||||
|
value: "hostname"
|
||||||
|
- name: MODE
|
||||||
|
value: standalone
|
||||||
|
- name: SPRING_DATASOURCE_PLATFORM
|
||||||
|
value: mysql
|
||||||
|
---
|
||||||
76
agent-deploy/uavcloud-devflight/k8s-pvc.yaml
Normal file
76
agent-deploy/uavcloud-devflight/k8s-pvc.yaml
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: nfs-backend-log-pvc
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware-base
|
||||||
|
cmii.app: nfs-backend-log-pvc
|
||||||
|
helm.sh/chart: all-persistence-volume-claims-1.1.0
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
storageClassName: nfs-prod-distribute
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
volumeMode: Filesystem
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 100Gi
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware-base
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
helm.sh/chart: all-persistence-volume-claims-1.1.0
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
storageClassName: nfs-prod-distribute
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
volumeMode: Filesystem
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 20Gi
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: helm-mongo
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware-base
|
||||||
|
cmii.app: helm-mongo
|
||||||
|
helm.sh/chart: all-persistence-volume-claims-1.1.0
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
storageClassName: nfs-prod-distribute
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
volumeMode: Filesystem
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 30Gi
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware-base
|
||||||
|
cmii.app: helm-rabbitmq
|
||||||
|
helm.sh/chart: all-persistence-volume-claims-1.1.0
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
storageClassName: nfs-prod-distribute
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
volumeMode: Filesystem
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 20Gi
|
||||||
328
agent-deploy/uavcloud-devflight/k8s-rabbitmq.yaml
Normal file
328
agent-deploy/uavcloud-devflight/k8s-rabbitmq.yaml
Normal file
@@ -0,0 +1,328 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
automountServiceAccountToken: true
|
||||||
|
secrets:
|
||||||
|
- name: helm-rabbitmq
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
rabbitmq-password: "N3YmNyN3MWVmKVQt"
|
||||||
|
rabbitmq-erlang-cookie: "emFBRmt1ZU1xMkJieXZvdHRYbWpoWk52UThuVXFzcTU="
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq-config
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
data:
|
||||||
|
rabbitmq.conf: |-
|
||||||
|
## Username and password
|
||||||
|
##
|
||||||
|
default_user = admin
|
||||||
|
default_pass = 7v&7#w1ef)T-
|
||||||
|
## Clustering
|
||||||
|
##
|
||||||
|
cluster_formation.peer_discovery_backend = rabbit_peer_discovery_k8s
|
||||||
|
cluster_formation.k8s.host = kubernetes.default.svc.cluster.local
|
||||||
|
cluster_formation.node_cleanup.interval = 10
|
||||||
|
cluster_formation.node_cleanup.only_log_warning = true
|
||||||
|
cluster_partition_handling = autoheal
|
||||||
|
# queue master locator
|
||||||
|
queue_master_locator = min-masters
|
||||||
|
# enable guest user
|
||||||
|
loopback_users.guest = false
|
||||||
|
#default_vhost = default-vhost
|
||||||
|
#disk_free_limit.absolute = 50MB
|
||||||
|
#load_definitions = /app/load_definition.json
|
||||||
|
---
|
||||||
|
kind: Role
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq-endpoint-reader
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
rules:
|
||||||
|
- apiGroups: [ "" ]
|
||||||
|
resources: [ "endpoints" ]
|
||||||
|
verbs: [ "get" ]
|
||||||
|
- apiGroups: [ "" ]
|
||||||
|
resources: [ "events" ]
|
||||||
|
verbs: [ "create" ]
|
||||||
|
---
|
||||||
|
kind: RoleBinding
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq-endpoint-reader
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: helm-rabbitmq
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: helm-rabbitmq-endpoint-reader
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq-headless
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
spec:
|
||||||
|
clusterIP: None
|
||||||
|
ports:
|
||||||
|
- name: epmd
|
||||||
|
port: 4369
|
||||||
|
targetPort: epmd
|
||||||
|
- name: amqp
|
||||||
|
port: 5672
|
||||||
|
targetPort: amqp
|
||||||
|
- name: dist
|
||||||
|
port: 25672
|
||||||
|
targetPort: dist
|
||||||
|
- name: dashboard
|
||||||
|
port: 15672
|
||||||
|
targetPort: stats
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
publishNotReadyAddresses: true
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
spec:
|
||||||
|
type: NodePort
|
||||||
|
ports:
|
||||||
|
- name: amqp
|
||||||
|
port: 5672
|
||||||
|
targetPort: amqp
|
||||||
|
nodePort: 35673
|
||||||
|
- name: dashboard
|
||||||
|
port: 15672
|
||||||
|
targetPort: dashboard
|
||||||
|
nodePort: 36676
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
spec:
|
||||||
|
serviceName: helm-rabbitmq-headless
|
||||||
|
podManagementPolicy: OrderedReady
|
||||||
|
replicas: 1
|
||||||
|
updateStrategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
annotations:
|
||||||
|
checksum/config: d6c2caa9572f64a06d9f7daa34c664a186b4778cd1697ef8e59663152fc628f1
|
||||||
|
checksum/secret: d764e7b3d999e7324d1afdfec6140092a612f04b6e0306818675815cec2f454f
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: harborsecret
|
||||||
|
serviceAccountName: helm-rabbitmq
|
||||||
|
affinity: { }
|
||||||
|
securityContext:
|
||||||
|
fsGroup: 5001
|
||||||
|
runAsUser: 5001
|
||||||
|
terminationGracePeriodSeconds: 120
|
||||||
|
initContainers:
|
||||||
|
- name: volume-permissions
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/bitnami-shell:11-debian-11-r136
|
||||||
|
imagePullPolicy: "Always"
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
args:
|
||||||
|
- -ec
|
||||||
|
- |
|
||||||
|
mkdir -p "/bitnami/rabbitmq/mnesia"
|
||||||
|
chown -R "5001:5001" "/bitnami/rabbitmq/mnesia"
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
resources:
|
||||||
|
limits: { }
|
||||||
|
requests: { }
|
||||||
|
volumeMounts:
|
||||||
|
- name: data
|
||||||
|
mountPath: /bitnami/rabbitmq/mnesia
|
||||||
|
containers:
|
||||||
|
- name: rabbitmq
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/rabbitmq:3.9.12-debian-10-r3
|
||||||
|
imagePullPolicy: "Always"
|
||||||
|
env:
|
||||||
|
- name: BITNAMI_DEBUG
|
||||||
|
value: "false"
|
||||||
|
- name: MY_POD_IP
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: status.podIP
|
||||||
|
- name: MY_POD_NAME
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.name
|
||||||
|
- name: MY_POD_NAMESPACE
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.namespace
|
||||||
|
- name: K8S_SERVICE_NAME
|
||||||
|
value: "helm-rabbitmq-headless"
|
||||||
|
- name: K8S_ADDRESS_TYPE
|
||||||
|
value: hostname
|
||||||
|
- name: RABBITMQ_FORCE_BOOT
|
||||||
|
value: "no"
|
||||||
|
- name: RABBITMQ_NODE_NAME
|
||||||
|
value: "rabbit@$(MY_POD_NAME).$(K8S_SERVICE_NAME).$(MY_POD_NAMESPACE).svc.cluster.local"
|
||||||
|
- name: K8S_HOSTNAME_SUFFIX
|
||||||
|
value: ".$(K8S_SERVICE_NAME).$(MY_POD_NAMESPACE).svc.cluster.local"
|
||||||
|
- name: RABBITMQ_MNESIA_DIR
|
||||||
|
value: "/bitnami/rabbitmq/mnesia/$(RABBITMQ_NODE_NAME)"
|
||||||
|
- name: RABBITMQ_LDAP_ENABLE
|
||||||
|
value: "no"
|
||||||
|
- name: RABBITMQ_LOGS
|
||||||
|
value: "-"
|
||||||
|
- name: RABBITMQ_ULIMIT_NOFILES
|
||||||
|
value: "65536"
|
||||||
|
- name: RABBITMQ_USE_LONGNAME
|
||||||
|
value: "true"
|
||||||
|
- name: RABBITMQ_ERL_COOKIE
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: helm-rabbitmq
|
||||||
|
key: rabbitmq-erlang-cookie
|
||||||
|
- name: RABBITMQ_LOAD_DEFINITIONS
|
||||||
|
value: "no"
|
||||||
|
- name: RABBITMQ_SECURE_PASSWORD
|
||||||
|
value: "yes"
|
||||||
|
- name: RABBITMQ_USERNAME
|
||||||
|
value: "admin"
|
||||||
|
- name: RABBITMQ_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: helm-rabbitmq
|
||||||
|
key: rabbitmq-password
|
||||||
|
- name: RABBITMQ_PLUGINS
|
||||||
|
value: "rabbitmq_management, rabbitmq_peer_discovery_k8s, rabbitmq_shovel, rabbitmq_shovel_management, rabbitmq_auth_backend_ldap"
|
||||||
|
ports:
|
||||||
|
- name: amqp
|
||||||
|
containerPort: 5672
|
||||||
|
- name: dist
|
||||||
|
containerPort: 25672
|
||||||
|
- name: dashboard
|
||||||
|
containerPort: 15672
|
||||||
|
- name: epmd
|
||||||
|
containerPort: 4369
|
||||||
|
livenessProbe:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- -ec
|
||||||
|
- rabbitmq-diagnostics -q ping
|
||||||
|
initialDelaySeconds: 120
|
||||||
|
periodSeconds: 30
|
||||||
|
timeoutSeconds: 20
|
||||||
|
successThreshold: 1
|
||||||
|
failureThreshold: 6
|
||||||
|
readinessProbe:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- -ec
|
||||||
|
- rabbitmq-diagnostics -q check_running && rabbitmq-diagnostics -q check_local_alarms
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 30
|
||||||
|
timeoutSeconds: 20
|
||||||
|
successThreshold: 1
|
||||||
|
failureThreshold: 3
|
||||||
|
lifecycle:
|
||||||
|
preStop:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- -ec
|
||||||
|
- |
|
||||||
|
if [[ -f /opt/bitnami/scripts/rabbitmq/nodeshutdown.sh ]]; then
|
||||||
|
/opt/bitnami/scripts/rabbitmq/nodeshutdown.sh -t "120" -d "false"
|
||||||
|
else
|
||||||
|
rabbitmqctl stop_app
|
||||||
|
fi
|
||||||
|
resources:
|
||||||
|
limits: { }
|
||||||
|
requests: { }
|
||||||
|
volumeMounts:
|
||||||
|
- name: configuration
|
||||||
|
mountPath: /bitnami/rabbitmq/conf
|
||||||
|
- name: data
|
||||||
|
mountPath: /bitnami/rabbitmq/mnesia
|
||||||
|
volumes:
|
||||||
|
- name: configuration
|
||||||
|
configMap:
|
||||||
|
name: helm-rabbitmq-config
|
||||||
|
items:
|
||||||
|
- key: rabbitmq.conf
|
||||||
|
path: rabbitmq.conf
|
||||||
|
- name: data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: helm-rabbitmq
|
||||||
585
agent-deploy/uavcloud-devflight/k8s-redis.yaml
Normal file
585
agent-deploy/uavcloud-devflight/k8s-redis.yaml
Normal file
@@ -0,0 +1,585 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
automountServiceAccountToken: true
|
||||||
|
metadata:
|
||||||
|
name: helm-redis
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: helm-redis
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
redis-password: "TWNhY2hlQDQ1MjI="
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-redis-configuration
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
data:
|
||||||
|
redis.conf: |-
|
||||||
|
# User-supplied common configuration:
|
||||||
|
# Enable AOF https://redis.io/topics/persistence#append-only-file
|
||||||
|
appendonly yes
|
||||||
|
# Disable RDB persistence, AOF persistence already enabled.
|
||||||
|
save ""
|
||||||
|
# End of common configuration
|
||||||
|
master.conf: |-
|
||||||
|
dir /data
|
||||||
|
# User-supplied master configuration:
|
||||||
|
rename-command FLUSHDB ""
|
||||||
|
rename-command FLUSHALL ""
|
||||||
|
# End of master configuration
|
||||||
|
replica.conf: |-
|
||||||
|
dir /data
|
||||||
|
slave-read-only yes
|
||||||
|
# User-supplied replica configuration:
|
||||||
|
rename-command FLUSHDB ""
|
||||||
|
rename-command FLUSHALL ""
|
||||||
|
# End of replica configuration
|
||||||
|
---
|
||||||
|
# Source: outside-deploy/charts/redis-db/templates/health-configmap.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-redis-health
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
data:
|
||||||
|
ping_readiness_local.sh: |-
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
[[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD="$(< "${REDIS_PASSWORD_FILE}")"
|
||||||
|
[[ -n "$REDIS_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_PASSWORD"
|
||||||
|
response=$(
|
||||||
|
timeout -s 3 $1 \
|
||||||
|
redis-cli \
|
||||||
|
-h localhost \
|
||||||
|
-p $REDIS_PORT \
|
||||||
|
ping
|
||||||
|
)
|
||||||
|
if [ "$response" != "PONG" ]; then
|
||||||
|
echo "$response"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
ping_liveness_local.sh: |-
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
[[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD="$(< "${REDIS_PASSWORD_FILE}")"
|
||||||
|
[[ -n "$REDIS_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_PASSWORD"
|
||||||
|
response=$(
|
||||||
|
timeout -s 3 $1 \
|
||||||
|
redis-cli \
|
||||||
|
-h localhost \
|
||||||
|
-p $REDIS_PORT \
|
||||||
|
ping
|
||||||
|
)
|
||||||
|
if [ "$response" != "PONG" ] && [ "$response" != "LOADING Redis is loading the dataset in memory" ]; then
|
||||||
|
echo "$response"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
ping_readiness_master.sh: |-
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
[[ -f $REDIS_MASTER_PASSWORD_FILE ]] && export REDIS_MASTER_PASSWORD="$(< "${REDIS_MASTER_PASSWORD_FILE}")"
|
||||||
|
[[ -n "$REDIS_MASTER_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_MASTER_PASSWORD"
|
||||||
|
response=$(
|
||||||
|
timeout -s 3 $1 \
|
||||||
|
redis-cli \
|
||||||
|
-h $REDIS_MASTER_HOST \
|
||||||
|
-p $REDIS_MASTER_PORT_NUMBER \
|
||||||
|
ping
|
||||||
|
)
|
||||||
|
if [ "$response" != "PONG" ]; then
|
||||||
|
echo "$response"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
ping_liveness_master.sh: |-
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
[[ -f $REDIS_MASTER_PASSWORD_FILE ]] && export REDIS_MASTER_PASSWORD="$(< "${REDIS_MASTER_PASSWORD_FILE}")"
|
||||||
|
[[ -n "$REDIS_MASTER_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_MASTER_PASSWORD"
|
||||||
|
response=$(
|
||||||
|
timeout -s 3 $1 \
|
||||||
|
redis-cli \
|
||||||
|
-h $REDIS_MASTER_HOST \
|
||||||
|
-p $REDIS_MASTER_PORT_NUMBER \
|
||||||
|
ping
|
||||||
|
)
|
||||||
|
if [ "$response" != "PONG" ] && [ "$response" != "LOADING Redis is loading the dataset in memory" ]; then
|
||||||
|
echo "$response"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
ping_readiness_local_and_master.sh: |-
|
||||||
|
script_dir="$(dirname "$0")"
|
||||||
|
exit_status=0
|
||||||
|
"$script_dir/ping_readiness_local.sh" $1 || exit_status=$?
|
||||||
|
"$script_dir/ping_readiness_master.sh" $1 || exit_status=$?
|
||||||
|
exit $exit_status
|
||||||
|
ping_liveness_local_and_master.sh: |-
|
||||||
|
script_dir="$(dirname "$0")"
|
||||||
|
exit_status=0
|
||||||
|
"$script_dir/ping_liveness_local.sh" $1 || exit_status=$?
|
||||||
|
"$script_dir/ping_liveness_master.sh" $1 || exit_status=$?
|
||||||
|
exit $exit_status
|
||||||
|
---
|
||||||
|
# Source: outside-deploy/charts/redis-db/templates/scripts-configmap.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-redis-scripts
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
data:
|
||||||
|
start-master.sh: |
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
[[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD="$(< "${REDIS_PASSWORD_FILE}")"
|
||||||
|
if [[ ! -f /opt/bitnami/redis/etc/master.conf ]];then
|
||||||
|
cp /opt/bitnami/redis/mounted-etc/master.conf /opt/bitnami/redis/etc/master.conf
|
||||||
|
fi
|
||||||
|
if [[ ! -f /opt/bitnami/redis/etc/redis.conf ]];then
|
||||||
|
cp /opt/bitnami/redis/mounted-etc/redis.conf /opt/bitnami/redis/etc/redis.conf
|
||||||
|
fi
|
||||||
|
ARGS=("--port" "${REDIS_PORT}")
|
||||||
|
ARGS+=("--requirepass" "${REDIS_PASSWORD}")
|
||||||
|
ARGS+=("--masterauth" "${REDIS_PASSWORD}")
|
||||||
|
ARGS+=("--include" "/opt/bitnami/redis/etc/redis.conf")
|
||||||
|
ARGS+=("--include" "/opt/bitnami/redis/etc/master.conf")
|
||||||
|
exec redis-server "${ARGS[@]}"
|
||||||
|
start-replica.sh: |
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
get_port() {
|
||||||
|
hostname="$1"
|
||||||
|
type="$2"
|
||||||
|
|
||||||
|
port_var=$(echo "${hostname^^}_SERVICE_PORT_$type" | sed "s/-/_/g")
|
||||||
|
port=${!port_var}
|
||||||
|
|
||||||
|
if [ -z "$port" ]; then
|
||||||
|
case $type in
|
||||||
|
"SENTINEL")
|
||||||
|
echo 26379
|
||||||
|
;;
|
||||||
|
"REDIS")
|
||||||
|
echo 6379
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
echo $port
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
get_full_hostname() {
|
||||||
|
hostname="$1"
|
||||||
|
echo "${hostname}.${HEADLESS_SERVICE}"
|
||||||
|
}
|
||||||
|
|
||||||
|
REDISPORT=$(get_port "$HOSTNAME" "REDIS")
|
||||||
|
|
||||||
|
[[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD="$(< "${REDIS_PASSWORD_FILE}")"
|
||||||
|
[[ -f $REDIS_MASTER_PASSWORD_FILE ]] && export REDIS_MASTER_PASSWORD="$(< "${REDIS_MASTER_PASSWORD_FILE}")"
|
||||||
|
if [[ ! -f /opt/bitnami/redis/etc/replica.conf ]];then
|
||||||
|
cp /opt/bitnami/redis/mounted-etc/replica.conf /opt/bitnami/redis/etc/replica.conf
|
||||||
|
fi
|
||||||
|
if [[ ! -f /opt/bitnami/redis/etc/redis.conf ]];then
|
||||||
|
cp /opt/bitnami/redis/mounted-etc/redis.conf /opt/bitnami/redis/etc/redis.conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "" >> /opt/bitnami/redis/etc/replica.conf
|
||||||
|
echo "replica-announce-port $REDISPORT" >> /opt/bitnami/redis/etc/replica.conf
|
||||||
|
echo "replica-announce-ip $(get_full_hostname "$HOSTNAME")" >> /opt/bitnami/redis/etc/replica.conf
|
||||||
|
ARGS=("--port" "${REDIS_PORT}")
|
||||||
|
ARGS+=("--slaveof" "${REDIS_MASTER_HOST}" "${REDIS_MASTER_PORT_NUMBER}")
|
||||||
|
ARGS+=("--requirepass" "${REDIS_PASSWORD}")
|
||||||
|
ARGS+=("--masterauth" "${REDIS_MASTER_PASSWORD}")
|
||||||
|
ARGS+=("--include" "/opt/bitnami/redis/etc/redis.conf")
|
||||||
|
ARGS+=("--include" "/opt/bitnami/redis/etc/replica.conf")
|
||||||
|
exec redis-server "${ARGS[@]}"
|
||||||
|
---
|
||||||
|
# Source: outside-deploy/charts/redis-db/templates/headless-svc.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-redis-headless
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
clusterIP: None
|
||||||
|
ports:
|
||||||
|
- name: tcp-redis
|
||||||
|
port: 6379
|
||||||
|
targetPort: redis
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
---
|
||||||
|
# Source: outside-deploy/charts/redis-db/templates/master/service.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-redis-master
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: redis
|
||||||
|
app.kubernetes.io/component: master
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
|
||||||
|
ports:
|
||||||
|
- name: tcp-redis
|
||||||
|
port: 6379
|
||||||
|
targetPort: redis
|
||||||
|
nodePort: null
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: redis
|
||||||
|
app.kubernetes.io/component: master
|
||||||
|
---
|
||||||
|
# Source: outside-deploy/charts/redis-db/templates/replicas/service.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-redis-replicas
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
app.kubernetes.io/component: replica
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- name: tcp-redis
|
||||||
|
port: 6379
|
||||||
|
targetPort: redis
|
||||||
|
nodePort: null
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/component: replica
|
||||||
|
---
|
||||||
|
# Source: outside-deploy/charts/redis-db/templates/master/statefulset.yaml
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: helm-redis-master
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: redis
|
||||||
|
app.kubernetes.io/component: master
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: redis
|
||||||
|
app.kubernetes.io/component: master
|
||||||
|
serviceName: helm-redis-headless
|
||||||
|
updateStrategy:
|
||||||
|
rollingUpdate: { }
|
||||||
|
type: RollingUpdate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: redis
|
||||||
|
app.kubernetes.io/component: master
|
||||||
|
annotations:
|
||||||
|
checksum/configmap: b64aa5db67e6e63811f3c1095b9fce34d83c86a471fccdda0e48eedb53a179b0
|
||||||
|
checksum/health: 6e0a6330e5ac63e565ae92af1444527d72d8897f91266f333555b3d323570623
|
||||||
|
checksum/scripts: b88df93710b7c42a76006e20218f05c6e500e6cc2affd4bb1985832f03166e98
|
||||||
|
checksum/secret: 43f1b0e20f9cb2de936bd182bc3683b720fc3cf4f4e76cb23c06a52398a50e8d
|
||||||
|
spec:
|
||||||
|
affinity: { }
|
||||||
|
securityContext:
|
||||||
|
fsGroup: 1001
|
||||||
|
serviceAccountName: helm-redis
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: harborsecret
|
||||||
|
terminationGracePeriodSeconds: 30
|
||||||
|
containers:
|
||||||
|
- name: redis
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/redis:6.2.6-debian-10-r0
|
||||||
|
imagePullPolicy: "Always"
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 1001
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
args:
|
||||||
|
- -c
|
||||||
|
- /opt/bitnami/scripts/start-scripts/start-master.sh
|
||||||
|
env:
|
||||||
|
- name: BITNAMI_DEBUG
|
||||||
|
value: "false"
|
||||||
|
- name: REDIS_REPLICATION_MODE
|
||||||
|
value: master
|
||||||
|
- name: ALLOW_EMPTY_PASSWORD
|
||||||
|
value: "no"
|
||||||
|
- name: REDIS_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: helm-redis
|
||||||
|
key: redis-password
|
||||||
|
- name: REDIS_TLS_ENABLED
|
||||||
|
value: "no"
|
||||||
|
- name: REDIS_PORT
|
||||||
|
value: "6379"
|
||||||
|
ports:
|
||||||
|
- name: redis
|
||||||
|
containerPort: 6379
|
||||||
|
livenessProbe:
|
||||||
|
initialDelaySeconds: 20
|
||||||
|
periodSeconds: 5
|
||||||
|
# One second longer than command timeout should prevent generation of zombie processes.
|
||||||
|
timeoutSeconds: 6
|
||||||
|
successThreshold: 1
|
||||||
|
failureThreshold: 5
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- /health/ping_liveness_local.sh 5
|
||||||
|
readinessProbe:
|
||||||
|
initialDelaySeconds: 20
|
||||||
|
periodSeconds: 5
|
||||||
|
timeoutSeconds: 2
|
||||||
|
successThreshold: 1
|
||||||
|
failureThreshold: 5
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- /health/ping_readiness_local.sh 1
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: "2"
|
||||||
|
memory: 8Gi
|
||||||
|
requests:
|
||||||
|
cpu: "100m"
|
||||||
|
memory: 1Gi
|
||||||
|
volumeMounts:
|
||||||
|
- name: start-scripts
|
||||||
|
mountPath: /opt/bitnami/scripts/start-scripts
|
||||||
|
- name: health
|
||||||
|
mountPath: /health
|
||||||
|
- name: redis-data
|
||||||
|
mountPath: /data
|
||||||
|
subPath:
|
||||||
|
- name: config
|
||||||
|
mountPath: /opt/bitnami/redis/mounted-etc
|
||||||
|
- name: redis-tmp-conf
|
||||||
|
mountPath: /opt/bitnami/redis/etc/
|
||||||
|
- name: tmp
|
||||||
|
mountPath: /tmp
|
||||||
|
volumes:
|
||||||
|
- name: start-scripts
|
||||||
|
configMap:
|
||||||
|
name: helm-redis-scripts
|
||||||
|
defaultMode: 0755
|
||||||
|
- name: health
|
||||||
|
configMap:
|
||||||
|
name: helm-redis-health
|
||||||
|
defaultMode: 0755
|
||||||
|
- name: config
|
||||||
|
configMap:
|
||||||
|
name: helm-redis-configuration
|
||||||
|
- name: redis-tmp-conf
|
||||||
|
emptyDir: { }
|
||||||
|
- name: tmp
|
||||||
|
emptyDir: { }
|
||||||
|
- name: redis-data
|
||||||
|
emptyDir: { }
|
||||||
|
---
|
||||||
|
# Source: outside-deploy/charts/redis-db/templates/replicas/statefulset.yaml
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: helm-redis-replicas
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
app.kubernetes.io/component: replica
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/component: replica
|
||||||
|
serviceName: helm-redis-headless
|
||||||
|
updateStrategy:
|
||||||
|
rollingUpdate: { }
|
||||||
|
type: RollingUpdate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
app.kubernetes.io/component: replica
|
||||||
|
annotations:
|
||||||
|
checksum/configmap: b64aa5db67e6e63811f3c1095b9fce34d83c86a471fccdda0e48eedb53a179b0
|
||||||
|
checksum/health: 6e0a6330e5ac63e565ae92af1444527d72d8897f91266f333555b3d323570623
|
||||||
|
checksum/scripts: b88df93710b7c42a76006e20218f05c6e500e6cc2affd4bb1985832f03166e98
|
||||||
|
checksum/secret: 43f1b0e20f9cb2de936bd182bc3683b720fc3cf4f4e76cb23c06a52398a50e8d
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: harborsecret
|
||||||
|
securityContext:
|
||||||
|
fsGroup: 1001
|
||||||
|
serviceAccountName: helm-redis
|
||||||
|
terminationGracePeriodSeconds: 30
|
||||||
|
containers:
|
||||||
|
- name: redis
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/redis:6.2.6-debian-10-r0
|
||||||
|
imagePullPolicy: "Always"
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 1001
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
args:
|
||||||
|
- -c
|
||||||
|
- /opt/bitnami/scripts/start-scripts/start-replica.sh
|
||||||
|
env:
|
||||||
|
- name: BITNAMI_DEBUG
|
||||||
|
value: "false"
|
||||||
|
- name: REDIS_REPLICATION_MODE
|
||||||
|
value: slave
|
||||||
|
- name: REDIS_MASTER_HOST
|
||||||
|
value: helm-redis-master-0.helm-redis-headless.uavcloud-devflight.svc.cluster.local
|
||||||
|
- name: REDIS_MASTER_PORT_NUMBER
|
||||||
|
value: "6379"
|
||||||
|
- name: ALLOW_EMPTY_PASSWORD
|
||||||
|
value: "no"
|
||||||
|
- name: REDIS_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: helm-redis
|
||||||
|
key: redis-password
|
||||||
|
- name: REDIS_MASTER_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: helm-redis
|
||||||
|
key: redis-password
|
||||||
|
- name: REDIS_TLS_ENABLED
|
||||||
|
value: "no"
|
||||||
|
- name: REDIS_PORT
|
||||||
|
value: "6379"
|
||||||
|
ports:
|
||||||
|
- name: redis
|
||||||
|
containerPort: 6379
|
||||||
|
livenessProbe:
|
||||||
|
initialDelaySeconds: 20
|
||||||
|
periodSeconds: 5
|
||||||
|
timeoutSeconds: 6
|
||||||
|
successThreshold: 1
|
||||||
|
failureThreshold: 5
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- /health/ping_liveness_local_and_master.sh 5
|
||||||
|
readinessProbe:
|
||||||
|
initialDelaySeconds: 20
|
||||||
|
periodSeconds: 5
|
||||||
|
timeoutSeconds: 2
|
||||||
|
successThreshold: 1
|
||||||
|
failureThreshold: 5
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- /health/ping_readiness_local_and_master.sh 1
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: "2"
|
||||||
|
memory: 8Gi
|
||||||
|
requests:
|
||||||
|
cpu: "100m"
|
||||||
|
memory: 1Gi
|
||||||
|
volumeMounts:
|
||||||
|
- name: start-scripts
|
||||||
|
mountPath: /opt/bitnami/scripts/start-scripts
|
||||||
|
- name: health
|
||||||
|
mountPath: /health
|
||||||
|
- name: redis-data
|
||||||
|
mountPath: /data
|
||||||
|
subPath:
|
||||||
|
- name: config
|
||||||
|
mountPath: /opt/bitnami/redis/mounted-etc
|
||||||
|
- name: redis-tmp-conf
|
||||||
|
mountPath: /opt/bitnami/redis/etc
|
||||||
|
volumes:
|
||||||
|
- name: start-scripts
|
||||||
|
configMap:
|
||||||
|
name: helm-redis-scripts
|
||||||
|
defaultMode: 0755
|
||||||
|
- name: health
|
||||||
|
configMap:
|
||||||
|
name: helm-redis-health
|
||||||
|
defaultMode: 0755
|
||||||
|
- name: config
|
||||||
|
configMap:
|
||||||
|
name: helm-redis-configuration
|
||||||
|
- name: redis-tmp-conf
|
||||||
|
emptyDir: { }
|
||||||
|
- name: redis-data
|
||||||
|
emptyDir: { }
|
||||||
|
|
||||||
5282
agent-deploy/uavcloud-devflight/old/k8s-backend.yaml
Normal file
5282
agent-deploy/uavcloud-devflight/old/k8s-backend.yaml
Normal file
File diff suppressed because it is too large
Load Diff
378
agent-deploy/uavcloud-devflight/old/k8s-configmap.yaml
Normal file
378
agent-deploy/uavcloud-devflight/old/k8s-configmap.yaml
Normal file
@@ -0,0 +1,378 @@
|
|||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-supervision
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "supervision",
|
||||||
|
AppClientId: "APP_qqSu82THfexI8PLM"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-security
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "security",
|
||||||
|
AppClientId: "APP_JUSEMc7afyWXxvE7"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-detection
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "detection",
|
||||||
|
AppClientId: "APP_FDHW2VLVDWPnnOCy"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-open
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "open",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-hljtt
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "hljtt",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-seniclive
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "seniclive",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-splice
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "splice",
|
||||||
|
AppClientId: "APP_zE0M3sTRXrCIJS8Y"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-jiangsuwenlv
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "jiangsuwenlv",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-mws
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "mws",
|
||||||
|
AppClientId: "APP_uKniXPELlRERBBwK"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-oms
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "oms",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-base
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "base",
|
||||||
|
AppClientId: "APP_9LY41OaKSqk2btY0"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-cmsportal
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "cmsportal",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-logistics
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "logistics",
|
||||||
|
AppClientId: "APP_PvdfRRRBPL8xbIwl"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-pangu
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-ai-brain
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "ai-brain",
|
||||||
|
AppClientId: "APP_rafnuCAmBESIVYMH"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-emergency
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "emergency",
|
||||||
|
AppClientId: "APP_aGsTAY1uMZrpKdfk"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-qinghaitourism
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "qinghaitourism",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-multiterminal
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "multiterminal",
|
||||||
|
AppClientId: "APP_PvdfRRRBPL8xbIwl"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-threedsimulation
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "threedsimulation",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-qingdao
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "qingdao",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-armypeople
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "armypeople",
|
||||||
|
AppClientId: "APP_UIegse6Lfou9pO1U"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-media
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "media",
|
||||||
|
AppClientId: "APP_4AU8lbifESQO4FD6"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-share
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "share",
|
||||||
|
AppClientId: "APP_4lVSVI0ZGxTssir8"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-traffic
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "traffic",
|
||||||
|
AppClientId: "APP_Jc8i2wOQ1t73QEJS"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-visualization
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "visualization",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-supervisionh5
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "supervisionh5",
|
||||||
|
AppClientId: "APP_qqSu82THfexI8PLM"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-securityh5
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devflight",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "securityh5",
|
||||||
|
AppClientId: "APP_N3ImO0Ubfu9peRHD"
|
||||||
|
}
|
||||||
265
agent-deploy/uavcloud-devflight/old/k8s-emqx.yaml
Normal file
265
agent-deploy/uavcloud-devflight/old/k8s-emqx.yaml
Normal file
@@ -0,0 +1,265 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs-env
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
helm.sh/chart: emqx-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
data:
|
||||||
|
EMQX_CLUSTER__K8S__APISERVER: "https://kubernetes.default.svc.cluster.local:443"
|
||||||
|
EMQX_NAME: "helm-emqxs"
|
||||||
|
EMQX_CLUSTER__DISCOVERY: "k8s"
|
||||||
|
EMQX_CLUSTER__K8S__APP_NAME: "helm-emqxs"
|
||||||
|
EMQX_CLUSTER__K8S__SERVICE_NAME: "helm-emqxs-headless"
|
||||||
|
EMQX_CLUSTER__K8S__ADDRESS_TYPE: "dns"
|
||||||
|
EMQX_CLUSTER__K8S__namespace: "uavcloud-devflight"
|
||||||
|
EMQX_CLUSTER__K8S__SUFFIX: "svc.cluster.local"
|
||||||
|
EMQX_ALLOW_ANONYMOUS: "false"
|
||||||
|
EMQX_ACL_NOMATCH: "deny"
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs-cm
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
helm.sh/chart: emqx-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
data:
|
||||||
|
emqx_auth_username.conf: |-
|
||||||
|
auth.user.1.username = cmlc
|
||||||
|
auth.user.1.password = 4YPk*DS%+5
|
||||||
|
auth.user.password_hash = sha256
|
||||||
|
|
||||||
|
acl.conf: |-
|
||||||
|
{allow, {user, "admin"}, pubsub, ["admin/#"]}.
|
||||||
|
{allow, {user, "dashboard"}, subscribe, ["$SYS/#"]}.
|
||||||
|
{allow, {ipaddr, "127.0.0.1"}, pubsub, ["$SYS/#", "#"]}.
|
||||||
|
{deny, all, subscribe, ["$SYS/#", {eq, "#"}]}.
|
||||||
|
{allow, all}.
|
||||||
|
|
||||||
|
loaded_plugins: |-
|
||||||
|
{emqx_auth_username,true}.
|
||||||
|
{emqx_management, true}.
|
||||||
|
{emqx_recon, true}.
|
||||||
|
{emqx_retainer, false}.
|
||||||
|
{emqx_dashboard, true}.
|
||||||
|
{emqx_telemetry, true}.
|
||||||
|
{emqx_rule_engine, true}.
|
||||||
|
{emqx_bridge_mqtt, false}.
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
helm.sh/chart: emqx-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
serviceName: helm-emqxs-headless
|
||||||
|
updateStrategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
helm.sh/chart: emqx-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
affinity: { }
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: harborsecret
|
||||||
|
serviceAccountName: helm-emqxs
|
||||||
|
containers:
|
||||||
|
- name: helm-emqxs
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/emqx:5.5.1
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- name: mqtt
|
||||||
|
containerPort: 1883
|
||||||
|
- name: mqttssl
|
||||||
|
containerPort: 8883
|
||||||
|
- name: mgmt
|
||||||
|
containerPort: 8081
|
||||||
|
- name: ws
|
||||||
|
containerPort: 8083
|
||||||
|
- name: wss
|
||||||
|
containerPort: 8084
|
||||||
|
- name: dashboard
|
||||||
|
containerPort: 18083
|
||||||
|
- name: ekka
|
||||||
|
containerPort: 4370
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: helm-emqxs-env
|
||||||
|
resources: { }
|
||||||
|
volumeMounts:
|
||||||
|
- name: emqx-data
|
||||||
|
mountPath: "/opt/emqx/data/mnesia"
|
||||||
|
readOnly: false
|
||||||
|
- name: helm-emqxs-cm
|
||||||
|
mountPath: "/opt/emqx/etc/plugins/emqx_auth_username.conf"
|
||||||
|
subPath: emqx_auth_username.conf
|
||||||
|
readOnly: false
|
||||||
|
# - name: helm-emqxs-cm
|
||||||
|
# mountPath: "/opt/emqx/etc/acl.conf"
|
||||||
|
# subPath: "acl.conf"
|
||||||
|
# readOnly: false
|
||||||
|
- name: helm-emqxs-cm
|
||||||
|
mountPath: "/opt/emqx/data/loaded_plugins"
|
||||||
|
subPath: loaded_plugins
|
||||||
|
readOnly: false
|
||||||
|
volumes:
|
||||||
|
- name: emqx-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: helm-emqxs
|
||||||
|
- name: helm-emqxs-cm
|
||||||
|
configMap:
|
||||||
|
name: helm-emqxs-cm
|
||||||
|
items:
|
||||||
|
- key: emqx_auth_username.conf
|
||||||
|
path: emqx_auth_username.conf
|
||||||
|
- key: acl.conf
|
||||||
|
path: acl.conf
|
||||||
|
- key: loaded_plugins
|
||||||
|
path: loaded_plugins
|
||||||
|
---
|
||||||
|
kind: Role
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- endpoints
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- watch
|
||||||
|
- list
|
||||||
|
---
|
||||||
|
kind: RoleBinding
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: helm-emqxs
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
roleRef:
|
||||||
|
kind: Role
|
||||||
|
name: helm-emqxs
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
helm.sh/chart: emqx-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
type: NodePort
|
||||||
|
selector:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
ports:
|
||||||
|
- port: 1883
|
||||||
|
name: mqtt
|
||||||
|
targetPort: 1883
|
||||||
|
nodePort: 31884
|
||||||
|
- port: 18083
|
||||||
|
name: dashboard
|
||||||
|
targetPort: 18083
|
||||||
|
nodePort: 38086
|
||||||
|
- port: 8083
|
||||||
|
name: mqtt-websocket
|
||||||
|
targetPort: 8083
|
||||||
|
nodePort: 38084
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs-headless
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
helm.sh/chart: emqx-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
clusterIP: None
|
||||||
|
selector:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
ports:
|
||||||
|
- name: mqtt
|
||||||
|
port: 1883
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 1883
|
||||||
|
- name: mqttssl
|
||||||
|
port: 8883
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 8883
|
||||||
|
- name: mgmt
|
||||||
|
port: 8081
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 8081
|
||||||
|
- name: websocket
|
||||||
|
port: 8083
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 8083
|
||||||
|
- name: wss
|
||||||
|
port: 8084
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 8084
|
||||||
|
- name: dashboard
|
||||||
|
port: 18083
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 18083
|
||||||
|
- name: ekka
|
||||||
|
port: 4370
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 4370
|
||||||
2354
agent-deploy/uavcloud-devflight/old/k8s-frontend.yaml
Normal file
2354
agent-deploy/uavcloud-devflight/old/k8s-frontend.yaml
Normal file
File diff suppressed because it is too large
Load Diff
541
agent-deploy/uavcloud-devflight/old/k8s-ingress.yaml
Normal file
541
agent-deploy/uavcloud-devflight/old/k8s-ingress.yaml
Normal file
@@ -0,0 +1,541 @@
|
|||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1beta1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: frontend-applications-ingress
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
type: frontend
|
||||||
|
octopus.control: all-ingress-config-wdd
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: "nginx"
|
||||||
|
nginx.ingress.kubernetes.io/enable-cors: "true"
|
||||||
|
nginx.ingress.kubernetes.io/rewrite-target: /$1
|
||||||
|
nginx.ingress.kubernetes.io/configuration-snippet: |
|
||||||
|
rewrite ^(/supervision)$ $1/ redirect;
|
||||||
|
rewrite ^(/supervisionh5)$ $1/ redirect;
|
||||||
|
rewrite ^(/pangu)$ $1/ redirect;
|
||||||
|
rewrite ^(/ai-brain)$ $1/ redirect;
|
||||||
|
rewrite ^(/armypeople)$ $1/ redirect;
|
||||||
|
rewrite ^(/base)$ $1/ redirect;
|
||||||
|
rewrite ^(/cmsportal)$ $1/ redirect;
|
||||||
|
rewrite ^(/detection)$ $1/ redirect;
|
||||||
|
rewrite ^(/emergency)$ $1/ redirect;
|
||||||
|
rewrite ^(/hljtt)$ $1/ redirect;
|
||||||
|
rewrite ^(/jiangsuwenlv)$ $1/ redirect;
|
||||||
|
rewrite ^(/logistics)$ $1/ redirect;
|
||||||
|
rewrite ^(/media)$ $1/ redirect;
|
||||||
|
rewrite ^(/multiterminal)$ $1/ redirect;
|
||||||
|
rewrite ^(/mws)$ $1/ redirect;
|
||||||
|
rewrite ^(/oms)$ $1/ redirect;
|
||||||
|
rewrite ^(/open)$ $1/ redirect;
|
||||||
|
rewrite ^(/qingdao)$ $1/ redirect;
|
||||||
|
rewrite ^(/qinghaitourism)$ $1/ redirect;
|
||||||
|
rewrite ^(/security)$ $1/ redirect;
|
||||||
|
rewrite ^(/securityh5)$ $1/ redirect;
|
||||||
|
rewrite ^(/seniclive)$ $1/ redirect;
|
||||||
|
rewrite ^(/share)$ $1/ redirect;
|
||||||
|
rewrite ^(/splice)$ $1/ redirect;
|
||||||
|
rewrite ^(/threedsimulation)$ $1/ redirect;
|
||||||
|
rewrite ^(/traffic)$ $1/ redirect;
|
||||||
|
rewrite ^(/visualization)$ $1/ redirect;
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: fake-domain.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /devflight/supervision/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-suav-platform-supervision
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/supervisionh5/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-suav-platform-supervisionh5
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/pangu/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/ai-brain/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-ai-brain
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/armypeople/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-armypeople
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/base/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-base
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/cmsportal/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-cms-portal
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/detection/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-detection
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/emergency/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-emergency-rescue
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/hljtt/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-hljtt
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/jiangsuwenlv/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-jiangsuwenlv
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/logistics/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-logistics
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/media/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-media
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/multiterminal/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-multiterminal
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/mws/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-mws
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/oms/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-oms
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/open/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-open
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/qingdao/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-qingdao
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/qinghaitourism/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-qinghaitourism
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/security/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-security
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/securityh5/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-securityh5
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/seniclive/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-seniclive
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/share/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-share
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/splice/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-splice
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/threedsimulation/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-threedsimulation
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/traffic/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-traffic
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devflight/visualization/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-visualization
|
||||||
|
servicePort: 9528
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1beta1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: backend-applications-ingress
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
type: backend
|
||||||
|
octopus.control: all-ingress-config-wdd
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: "nginx"
|
||||||
|
nginx.ingress.kubernetes.io/enable-cors: "true"
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: cmii-admin-data.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-admin-data
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-admin-gateway.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-admin-gateway
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-admin-user.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-admin-user
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-app-release.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-app-release
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-open-gateway.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-open-gateway
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-suav-supervision.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-suav-supervision
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uas-gateway.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uas-gateway
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uas-lifecycle.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uas-lifecycle
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-airspace.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-airspace
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-alarm.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-alarm
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-autowaypoint.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-autowaypoint
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-brain.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-brain
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-bridge.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-bridge
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-cloud-live.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-cloud-live
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-clusters.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-clusters
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-cms.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-cms
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-data-post-process.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-data-post-process
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-depotautoreturn.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-depotautoreturn
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-developer.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-developer
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-device.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-device
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-emergency.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-emergency
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-gateway.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-gateway
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-industrial-portfolio.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-industrial-portfolio
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-integration.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-integration
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-kpi-monitor.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-kpi-monitor
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-logger.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-logger
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-material-warehouse.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-material-warehouse
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-mission.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-mission
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-mqtthandler.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-mqtthandler
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-multilink.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-multilink
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-notice.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-notice
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-oauth.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-oauth
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-process.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-process
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-surveillance.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-surveillance
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-threedsimulation.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-threedsimulation
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-tower.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-tower
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-user.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-user
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-waypoint.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-waypoint
|
||||||
|
servicePort: 8080
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1beta1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: all-gateways-ingress
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
type: api-gateway
|
||||||
|
octopus.control: all-ingress-config-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: "nginx"
|
||||||
|
nginx.ingress.kubernetes.io/enable-cors: "true"
|
||||||
|
nginx.ingress.kubernetes.io/rewrite-target: /$1
|
||||||
|
nginx.ingress.kubernetes.io/configuration-snippet: |
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "Upgrade";
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: fake-domain.uavcloud-devflight.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /devflight/oms/api/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-admin-gateway
|
||||||
|
servicePort: 8080
|
||||||
|
- path: /devflight/open/api/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-open-gateway
|
||||||
|
servicePort: 8080
|
||||||
|
- path: /devflight/api/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-gateway
|
||||||
|
servicePort: 8080
|
||||||
77
agent-deploy/uavcloud-devflight/old/k8s-mongo.yaml
Normal file
77
agent-deploy/uavcloud-devflight/old/k8s-mongo.yaml
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-mongo
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
cmii.app: helm-mongo
|
||||||
|
cmii.type: middleware
|
||||||
|
helm.sh/chart: mongo-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
selector:
|
||||||
|
cmii.app: helm-mongo
|
||||||
|
cmii.type: middleware
|
||||||
|
ports:
|
||||||
|
- port: 27017
|
||||||
|
name: server-27017
|
||||||
|
targetPort: 27017
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: helm-mongo
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
cmii.app: helm-mongo
|
||||||
|
cmii.type: middleware
|
||||||
|
helm.sh/chart: mongo-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
serviceName: helm-mongo
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
cmii.app: helm-mongo
|
||||||
|
cmii.type: middleware
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
cmii.app: helm-mongo
|
||||||
|
cmii.type: middleware
|
||||||
|
helm.sh/chart: mongo-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
annotations:
|
||||||
|
pod.alpha.kubernetes.io/initialized: "true"
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: harborsecret
|
||||||
|
affinity: { }
|
||||||
|
containers:
|
||||||
|
- name: helm-mongo
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/mongo:5.0
|
||||||
|
resources: { }
|
||||||
|
ports:
|
||||||
|
- containerPort: 27017
|
||||||
|
name: mongo27017
|
||||||
|
protocol: TCP
|
||||||
|
env:
|
||||||
|
- name: MONGO_INITDB_ROOT_USERNAME
|
||||||
|
value: cmlc
|
||||||
|
- name: MONGO_INITDB_ROOT_PASSWORD
|
||||||
|
value: 7(#dD3zcz8
|
||||||
|
volumeMounts:
|
||||||
|
- name: mongo-data
|
||||||
|
mountPath: /data/db
|
||||||
|
readOnly: false
|
||||||
|
subPath: default/helm-mongo/data/db
|
||||||
|
volumes:
|
||||||
|
- name: mongo-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: helm-mongo
|
||||||
|
---
|
||||||
423
agent-deploy/uavcloud-devflight/old/k8s-mysql.yaml
Normal file
423
agent-deploy/uavcloud-devflight/old/k8s-mysql.yaml
Normal file
@@ -0,0 +1,423 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: helm-mysql
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
annotations: { }
|
||||||
|
secrets:
|
||||||
|
- name: helm-mysql
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: helm-mysql
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
mysql-root-password: "R3d1YmM2Q3hSTQ=="
|
||||||
|
mysql-password: "S0F0cm5PckFKNw=="
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-mysql
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
data:
|
||||||
|
my.cnf: |-
|
||||||
|
|
||||||
|
[mysqld]
|
||||||
|
port=3306
|
||||||
|
basedir=/opt/bitnami/mysql
|
||||||
|
datadir=/bitnami/mysql/data
|
||||||
|
pid-file=/opt/bitnami/mysql/tmp/mysqld.pid
|
||||||
|
socket=/opt/bitnami/mysql/tmp/mysql.sock
|
||||||
|
log-error=/bitnami/mysql/data/error.log
|
||||||
|
general_log_file = /bitnami/mysql/data/general.log
|
||||||
|
slow_query_log_file = /bitnami/mysql/data/slow.log
|
||||||
|
innodb_data_file_path = ibdata1:512M:autoextend
|
||||||
|
innodb_buffer_pool_size = 512M
|
||||||
|
innodb_buffer_pool_instances = 2
|
||||||
|
innodb_log_file_size = 512M
|
||||||
|
innodb_log_files_in_group = 4
|
||||||
|
innodb_log_files_in_group = 4
|
||||||
|
log-bin = /bitnami/mysql/data/mysql-bin
|
||||||
|
max_binlog_size=1G
|
||||||
|
transaction_isolation = REPEATABLE-READ
|
||||||
|
default_storage_engine = innodb
|
||||||
|
character-set-server = utf8mb4
|
||||||
|
collation-server=utf8mb4_bin
|
||||||
|
binlog_format = ROW
|
||||||
|
binlog_rows_query_log_events=on
|
||||||
|
binlog_cache_size=4M
|
||||||
|
binlog_expire_logs_seconds = 1296000
|
||||||
|
max_binlog_cache_size=2G
|
||||||
|
gtid_mode = on
|
||||||
|
enforce_gtid_consistency = 1
|
||||||
|
sync_binlog = 1
|
||||||
|
innodb_flush_log_at_trx_commit = 1
|
||||||
|
innodb_flush_method = O_DIRECT
|
||||||
|
log_slave_updates=1
|
||||||
|
relay_log_recovery = 1
|
||||||
|
relay-log-purge = 1
|
||||||
|
default_time_zone = '+08:00'
|
||||||
|
lower_case_table_names=1
|
||||||
|
log_bin_trust_function_creators=1
|
||||||
|
group_concat_max_len=67108864
|
||||||
|
innodb_io_capacity = 4000
|
||||||
|
innodb_io_capacity_max = 8000
|
||||||
|
innodb_flush_sync = 0
|
||||||
|
innodb_flush_neighbors = 0
|
||||||
|
innodb_write_io_threads = 8
|
||||||
|
innodb_read_io_threads = 8
|
||||||
|
innodb_purge_threads = 4
|
||||||
|
innodb_page_cleaners = 4
|
||||||
|
innodb_open_files = 65535
|
||||||
|
innodb_max_dirty_pages_pct = 50
|
||||||
|
innodb_lru_scan_depth = 4000
|
||||||
|
innodb_checksum_algorithm = crc32
|
||||||
|
innodb_lock_wait_timeout = 10
|
||||||
|
innodb_rollback_on_timeout = 1
|
||||||
|
innodb_print_all_deadlocks = 1
|
||||||
|
innodb_file_per_table = 1
|
||||||
|
innodb_online_alter_log_max_size = 4G
|
||||||
|
innodb_stats_on_metadata = 0
|
||||||
|
innodb_thread_concurrency = 0
|
||||||
|
innodb_sync_spin_loops = 100
|
||||||
|
innodb_spin_wait_delay = 30
|
||||||
|
lock_wait_timeout = 3600
|
||||||
|
slow_query_log = 1
|
||||||
|
long_query_time = 10
|
||||||
|
log_queries_not_using_indexes =1
|
||||||
|
log_throttle_queries_not_using_indexes = 60
|
||||||
|
min_examined_row_limit = 100
|
||||||
|
log_slow_admin_statements = 1
|
||||||
|
log_slow_slave_statements = 1
|
||||||
|
default_authentication_plugin=mysql_native_password
|
||||||
|
skip-name-resolve=1
|
||||||
|
explicit_defaults_for_timestamp=1
|
||||||
|
plugin_dir=/opt/bitnami/mysql/plugin
|
||||||
|
max_allowed_packet=128M
|
||||||
|
max_connections = 2000
|
||||||
|
max_connect_errors = 1000000
|
||||||
|
table_definition_cache=2000
|
||||||
|
table_open_cache_instances=64
|
||||||
|
tablespace_definition_cache=1024
|
||||||
|
thread_cache_size=256
|
||||||
|
interactive_timeout = 600
|
||||||
|
wait_timeout = 600
|
||||||
|
tmpdir=/opt/bitnami/mysql/tmp
|
||||||
|
max_allowed_packet=32M
|
||||||
|
bind-address=0.0.0.0
|
||||||
|
performance_schema = 1
|
||||||
|
performance_schema_instrument = '%memory%=on'
|
||||||
|
performance_schema_instrument = '%lock%=on'
|
||||||
|
innodb_monitor_enable=ALL
|
||||||
|
|
||||||
|
[mysql]
|
||||||
|
no-auto-rehash
|
||||||
|
|
||||||
|
[mysqldump]
|
||||||
|
quick
|
||||||
|
max_allowed_packet = 32M
|
||||||
|
|
||||||
|
[client]
|
||||||
|
port=3306
|
||||||
|
socket=/opt/bitnami/mysql/tmp/mysql.sock
|
||||||
|
default-character-set=UTF8
|
||||||
|
plugin_dir=/opt/bitnami/mysql/plugin
|
||||||
|
|
||||||
|
[manager]
|
||||||
|
port=3306
|
||||||
|
socket=/opt/bitnami/mysql/tmp/mysql.sock
|
||||||
|
pid-file=/opt/bitnami/mysql/tmp/mysqld.pid
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-mysql-init-scripts
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
data:
|
||||||
|
create_users_grants_core.sql: |-
|
||||||
|
create
|
||||||
|
user zyly@'%' identified by 'Cmii@451315';
|
||||||
|
grant select on *.* to zyly@'%';
|
||||||
|
create
|
||||||
|
user zyly_qc@'%' identified by 'Uh)E_owCyb16';
|
||||||
|
grant all
|
||||||
|
on *.* to zyly_qc@'%';
|
||||||
|
create
|
||||||
|
user k8s_admin@'%' identified by 'VFJncwy58^Zm';
|
||||||
|
grant all
|
||||||
|
on *.* to k8s_admin@'%';
|
||||||
|
create
|
||||||
|
user audit_dba@'%' identified by 'PjCzqiBmJaTpgkoYXynH';
|
||||||
|
grant all
|
||||||
|
on *.* to audit_dba@'%';
|
||||||
|
create
|
||||||
|
user db_backup@'%' identified by 'RU5Pu(4FGdT9';
|
||||||
|
GRANT
|
||||||
|
SELECT, RELOAD, PROCESS, LOCK TABLES, REPLICATION CLIENT, EVENT
|
||||||
|
on *.* to db_backup@'%';
|
||||||
|
create
|
||||||
|
user monitor@'%' identified by 'PL3#nGtrWbf-';
|
||||||
|
grant REPLICATION
|
||||||
|
CLIENT on *.* to monitor@'%';
|
||||||
|
flush
|
||||||
|
privileges;
|
||||||
|
---
|
||||||
|
kind: Service
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: cmii-mysql
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
cmii.app: mysql
|
||||||
|
cmii.type: middleware
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: mysql
|
||||||
|
protocol: TCP
|
||||||
|
port: 13306
|
||||||
|
targetPort: mysql
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
cmii.app: mysql
|
||||||
|
cmii.type: middleware
|
||||||
|
type: ClusterIP
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-mysql-headless
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: mysql
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
annotations: { }
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
clusterIP: None
|
||||||
|
publishNotReadyAddresses: true
|
||||||
|
ports:
|
||||||
|
- name: mysql
|
||||||
|
port: 3306
|
||||||
|
targetPort: mysql
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: mysql
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-mysql
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: mysql
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
annotations: { }
|
||||||
|
spec:
|
||||||
|
type: NodePort
|
||||||
|
ports:
|
||||||
|
- name: mysql
|
||||||
|
port: 3306
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: mysql
|
||||||
|
nodePort: 33307
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: mysql
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: helm-mysql
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: mysql
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: mysql
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
serviceName: helm-mysql
|
||||||
|
updateStrategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
checksum/configuration: 6b60fa0f3a846a6ada8effdc4f823cf8003d42a8c8f630fe8b1b66d3454082dd
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: mysql
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: harborsecret
|
||||||
|
serviceAccountName: helm-mysql
|
||||||
|
affinity: { }
|
||||||
|
nodeSelector:
|
||||||
|
mysql-deploy: "true"
|
||||||
|
securityContext:
|
||||||
|
fsGroup: 1001
|
||||||
|
initContainers:
|
||||||
|
- name: change-volume-permissions
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/bitnami-shell:11-debian-11-r136
|
||||||
|
imagePullPolicy: "Always"
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- -ec
|
||||||
|
- |
|
||||||
|
chown -R 1001:1001 /bitnami/mysql
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
volumeMounts:
|
||||||
|
- name: mysql-data
|
||||||
|
mountPath: /bitnami/mysql
|
||||||
|
containers:
|
||||||
|
- name: mysql
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/mysql:8.1.0-debian-11-r42
|
||||||
|
imagePullPolicy: "IfNotPresent"
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 1001
|
||||||
|
env:
|
||||||
|
- name: BITNAMI_DEBUG
|
||||||
|
value: "true"
|
||||||
|
- name: MYSQL_ROOT_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: helm-mysql
|
||||||
|
key: mysql-root-password
|
||||||
|
- name: MYSQL_DATABASE
|
||||||
|
value: "cmii"
|
||||||
|
ports:
|
||||||
|
- name: mysql
|
||||||
|
containerPort: 3306
|
||||||
|
livenessProbe:
|
||||||
|
failureThreshold: 5
|
||||||
|
initialDelaySeconds: 120
|
||||||
|
periodSeconds: 10
|
||||||
|
successThreshold: 1
|
||||||
|
timeoutSeconds: 3
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- -ec
|
||||||
|
- |
|
||||||
|
password_aux="${MYSQL_ROOT_PASSWORD:-}"
|
||||||
|
if [[ -f "${MYSQL_ROOT_PASSWORD_FILE:-}" ]]; then
|
||||||
|
password_aux=$(cat "$MYSQL_ROOT_PASSWORD_FILE")
|
||||||
|
fi
|
||||||
|
mysqladmin status -uroot -p"${password_aux}"
|
||||||
|
readinessProbe:
|
||||||
|
failureThreshold: 5
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
periodSeconds: 10
|
||||||
|
successThreshold: 1
|
||||||
|
timeoutSeconds: 3
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- -ec
|
||||||
|
- |
|
||||||
|
password_aux="${MYSQL_ROOT_PASSWORD:-}"
|
||||||
|
if [[ -f "${MYSQL_ROOT_PASSWORD_FILE:-}" ]]; then
|
||||||
|
password_aux=$(cat "$MYSQL_ROOT_PASSWORD_FILE")
|
||||||
|
fi
|
||||||
|
mysqladmin status -uroot -p"${password_aux}"
|
||||||
|
startupProbe:
|
||||||
|
failureThreshold: 60
|
||||||
|
initialDelaySeconds: 120
|
||||||
|
periodSeconds: 10
|
||||||
|
successThreshold: 1
|
||||||
|
timeoutSeconds: 1
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- -ec
|
||||||
|
- |
|
||||||
|
password_aux="${MYSQL_ROOT_PASSWORD:-}"
|
||||||
|
if [[ -f "${MYSQL_ROOT_PASSWORD_FILE:-}" ]]; then
|
||||||
|
password_aux=$(cat "$MYSQL_ROOT_PASSWORD_FILE")
|
||||||
|
fi
|
||||||
|
mysqladmin status -uroot -p"${password_aux}"
|
||||||
|
resources:
|
||||||
|
limits: { }
|
||||||
|
requests: { }
|
||||||
|
volumeMounts:
|
||||||
|
- name: mysql-data
|
||||||
|
mountPath: /bitnami/mysql
|
||||||
|
- name: custom-init-scripts
|
||||||
|
mountPath: /docker-entrypoint-initdb.d
|
||||||
|
- name: config
|
||||||
|
mountPath: /opt/bitnami/mysql/conf/my.cnf
|
||||||
|
subPath: my.cnf
|
||||||
|
volumes:
|
||||||
|
- name: config
|
||||||
|
configMap:
|
||||||
|
name: helm-mysql
|
||||||
|
- name: custom-init-scripts
|
||||||
|
configMap:
|
||||||
|
name: helm-mysql-init-scripts
|
||||||
|
- name: mysql-data
|
||||||
|
hostPath:
|
||||||
|
path: /var/lib/docker/mysql-pv/uavcloud-devflight/
|
||||||
130
agent-deploy/uavcloud-devflight/old/k8s-nacos.yaml
Normal file
130
agent-deploy/uavcloud-devflight/old/k8s-nacos.yaml
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-nacos-cm
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
cmii.app: helm-nacos
|
||||||
|
cmii.type: middleware
|
||||||
|
octopus.control: nacos-wdd
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
data:
|
||||||
|
mysql.db.name: "cmii_nacos_config"
|
||||||
|
mysql.db.host: "helm-mysql"
|
||||||
|
mysql.port: "3306"
|
||||||
|
mysql.user: "k8s_admin"
|
||||||
|
mysql.password: "VFJncwy58^Zm"
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-nacos
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
cmii.app: helm-nacos
|
||||||
|
cmii.type: middleware
|
||||||
|
octopus.control: nacos-wdd
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
type: NodePort
|
||||||
|
selector:
|
||||||
|
cmii.app: helm-nacos
|
||||||
|
cmii.type: middleware
|
||||||
|
ports:
|
||||||
|
- port: 8848
|
||||||
|
name: server
|
||||||
|
targetPort: 8848
|
||||||
|
nodePort: 33848
|
||||||
|
- port: 9848
|
||||||
|
name: server12
|
||||||
|
targetPort: 9848
|
||||||
|
- port: 9849
|
||||||
|
name: server23
|
||||||
|
targetPort: 9849
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: helm-nacos
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
cmii.app: helm-nacos
|
||||||
|
cmii.type: middleware
|
||||||
|
octopus.control: nacos-wdd
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
serviceName: helm-nacos
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
cmii.app: helm-nacos
|
||||||
|
cmii.type: middleware
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
cmii.app: helm-nacos
|
||||||
|
cmii.type: middleware
|
||||||
|
octopus.control: nacos-wdd
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
annotations:
|
||||||
|
pod.alpha.kubernetes.io/initialized: "true"
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: harborsecret
|
||||||
|
affinity: { }
|
||||||
|
containers:
|
||||||
|
- name: nacos-server
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/nacos-server:v2.1.2
|
||||||
|
ports:
|
||||||
|
- containerPort: 8848
|
||||||
|
name: dashboard
|
||||||
|
- containerPort: 9848
|
||||||
|
name: tcp-9848
|
||||||
|
- containerPort: 9849
|
||||||
|
name: tcp-9849
|
||||||
|
env:
|
||||||
|
- name: NACOS_AUTH_ENABLE
|
||||||
|
value: "false"
|
||||||
|
- name: NACOS_REPLICAS
|
||||||
|
value: "1"
|
||||||
|
- name: MYSQL_SERVICE_DB_NAME
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: helm-nacos-cm
|
||||||
|
key: mysql.db.name
|
||||||
|
- name: MYSQL_SERVICE_PORT
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: helm-nacos-cm
|
||||||
|
key: mysql.port
|
||||||
|
- name: MYSQL_SERVICE_USER
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: helm-nacos-cm
|
||||||
|
key: mysql.user
|
||||||
|
- name: MYSQL_SERVICE_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: helm-nacos-cm
|
||||||
|
key: mysql.password
|
||||||
|
- name: MYSQL_SERVICE_HOST
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: helm-nacos-cm
|
||||||
|
key: mysql.db.host
|
||||||
|
- name: NACOS_SERVER_PORT
|
||||||
|
value: "8848"
|
||||||
|
- name: NACOS_APPLICATION_PORT
|
||||||
|
value: "8848"
|
||||||
|
- name: PREFER_HOST_MODE
|
||||||
|
value: "hostname"
|
||||||
|
- name: MODE
|
||||||
|
value: standalone
|
||||||
|
- name: SPRING_DATASOURCE_PLATFORM
|
||||||
|
value: mysql
|
||||||
|
---
|
||||||
76
agent-deploy/uavcloud-devflight/old/k8s-pvc.yaml
Normal file
76
agent-deploy/uavcloud-devflight/old/k8s-pvc.yaml
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: nfs-backend-log-pvc
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware-base
|
||||||
|
cmii.app: nfs-backend-log-pvc
|
||||||
|
helm.sh/chart: all-persistence-volume-claims-1.1.0
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
storageClassName: nfs-prod-distribute
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
volumeMode: Filesystem
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 100Gi
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware-base
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
helm.sh/chart: all-persistence-volume-claims-1.1.0
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
storageClassName: nfs-prod-distribute
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
volumeMode: Filesystem
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 20Gi
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: helm-mongo
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware-base
|
||||||
|
cmii.app: helm-mongo
|
||||||
|
helm.sh/chart: all-persistence-volume-claims-1.1.0
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
storageClassName: nfs-prod-distribute
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
volumeMode: Filesystem
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 30Gi
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware-base
|
||||||
|
cmii.app: helm-rabbitmq
|
||||||
|
helm.sh/chart: all-persistence-volume-claims-1.1.0
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
storageClassName: nfs-prod-distribute
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
volumeMode: Filesystem
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 20Gi
|
||||||
328
agent-deploy/uavcloud-devflight/old/k8s-rabbitmq.yaml
Normal file
328
agent-deploy/uavcloud-devflight/old/k8s-rabbitmq.yaml
Normal file
@@ -0,0 +1,328 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
automountServiceAccountToken: true
|
||||||
|
secrets:
|
||||||
|
- name: helm-rabbitmq
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
rabbitmq-password: "N3YmNyN3MWVmKVQt"
|
||||||
|
rabbitmq-erlang-cookie: "emFBRmt1ZU1xMkJieXZvdHRYbWpoWk52UThuVXFzcTU="
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq-config
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
data:
|
||||||
|
rabbitmq.conf: |-
|
||||||
|
## Username and password
|
||||||
|
##
|
||||||
|
default_user = admin
|
||||||
|
default_pass = 7v&7#w1ef)T-
|
||||||
|
## Clustering
|
||||||
|
##
|
||||||
|
cluster_formation.peer_discovery_backend = rabbit_peer_discovery_k8s
|
||||||
|
cluster_formation.k8s.host = kubernetes.default.svc.cluster.local
|
||||||
|
cluster_formation.node_cleanup.interval = 10
|
||||||
|
cluster_formation.node_cleanup.only_log_warning = true
|
||||||
|
cluster_partition_handling = autoheal
|
||||||
|
# queue master locator
|
||||||
|
queue_master_locator = min-masters
|
||||||
|
# enable guest user
|
||||||
|
loopback_users.guest = false
|
||||||
|
#default_vhost = default-vhost
|
||||||
|
#disk_free_limit.absolute = 50MB
|
||||||
|
#load_definitions = /app/load_definition.json
|
||||||
|
---
|
||||||
|
kind: Role
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq-endpoint-reader
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
rules:
|
||||||
|
- apiGroups: [ "" ]
|
||||||
|
resources: [ "endpoints" ]
|
||||||
|
verbs: [ "get" ]
|
||||||
|
- apiGroups: [ "" ]
|
||||||
|
resources: [ "events" ]
|
||||||
|
verbs: [ "create" ]
|
||||||
|
---
|
||||||
|
kind: RoleBinding
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq-endpoint-reader
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: helm-rabbitmq
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: helm-rabbitmq-endpoint-reader
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq-headless
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
spec:
|
||||||
|
clusterIP: None
|
||||||
|
ports:
|
||||||
|
- name: epmd
|
||||||
|
port: 4369
|
||||||
|
targetPort: epmd
|
||||||
|
- name: amqp
|
||||||
|
port: 5672
|
||||||
|
targetPort: amqp
|
||||||
|
- name: dist
|
||||||
|
port: 25672
|
||||||
|
targetPort: dist
|
||||||
|
- name: dashboard
|
||||||
|
port: 15672
|
||||||
|
targetPort: stats
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
publishNotReadyAddresses: true
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
spec:
|
||||||
|
type: NodePort
|
||||||
|
ports:
|
||||||
|
- name: amqp
|
||||||
|
port: 5672
|
||||||
|
targetPort: amqp
|
||||||
|
nodePort: 35673
|
||||||
|
- name: dashboard
|
||||||
|
port: 15672
|
||||||
|
targetPort: dashboard
|
||||||
|
nodePort: 36676
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
spec:
|
||||||
|
serviceName: helm-rabbitmq-headless
|
||||||
|
podManagementPolicy: OrderedReady
|
||||||
|
replicas: 1
|
||||||
|
updateStrategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
annotations:
|
||||||
|
checksum/config: d6c2caa9572f64a06d9f7daa34c664a186b4778cd1697ef8e59663152fc628f1
|
||||||
|
checksum/secret: d764e7b3d999e7324d1afdfec6140092a612f04b6e0306818675815cec2f454f
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: harborsecret
|
||||||
|
serviceAccountName: helm-rabbitmq
|
||||||
|
affinity: { }
|
||||||
|
securityContext:
|
||||||
|
fsGroup: 5001
|
||||||
|
runAsUser: 5001
|
||||||
|
terminationGracePeriodSeconds: 120
|
||||||
|
initContainers:
|
||||||
|
- name: volume-permissions
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/bitnami-shell:11-debian-11-r136
|
||||||
|
imagePullPolicy: "Always"
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
args:
|
||||||
|
- -ec
|
||||||
|
- |
|
||||||
|
mkdir -p "/bitnami/rabbitmq/mnesia"
|
||||||
|
chown -R "5001:5001" "/bitnami/rabbitmq/mnesia"
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
resources:
|
||||||
|
limits: { }
|
||||||
|
requests: { }
|
||||||
|
volumeMounts:
|
||||||
|
- name: data
|
||||||
|
mountPath: /bitnami/rabbitmq/mnesia
|
||||||
|
containers:
|
||||||
|
- name: rabbitmq
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/rabbitmq:3.9.12-debian-10-r3
|
||||||
|
imagePullPolicy: "Always"
|
||||||
|
env:
|
||||||
|
- name: BITNAMI_DEBUG
|
||||||
|
value: "false"
|
||||||
|
- name: MY_POD_IP
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: status.podIP
|
||||||
|
- name: MY_POD_NAME
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.name
|
||||||
|
- name: MY_POD_NAMESPACE
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.namespace
|
||||||
|
- name: K8S_SERVICE_NAME
|
||||||
|
value: "helm-rabbitmq-headless"
|
||||||
|
- name: K8S_ADDRESS_TYPE
|
||||||
|
value: hostname
|
||||||
|
- name: RABBITMQ_FORCE_BOOT
|
||||||
|
value: "no"
|
||||||
|
- name: RABBITMQ_NODE_NAME
|
||||||
|
value: "rabbit@$(MY_POD_NAME).$(K8S_SERVICE_NAME).$(MY_POD_NAMESPACE).svc.cluster.local"
|
||||||
|
- name: K8S_HOSTNAME_SUFFIX
|
||||||
|
value: ".$(K8S_SERVICE_NAME).$(MY_POD_NAMESPACE).svc.cluster.local"
|
||||||
|
- name: RABBITMQ_MNESIA_DIR
|
||||||
|
value: "/bitnami/rabbitmq/mnesia/$(RABBITMQ_NODE_NAME)"
|
||||||
|
- name: RABBITMQ_LDAP_ENABLE
|
||||||
|
value: "no"
|
||||||
|
- name: RABBITMQ_LOGS
|
||||||
|
value: "-"
|
||||||
|
- name: RABBITMQ_ULIMIT_NOFILES
|
||||||
|
value: "65536"
|
||||||
|
- name: RABBITMQ_USE_LONGNAME
|
||||||
|
value: "true"
|
||||||
|
- name: RABBITMQ_ERL_COOKIE
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: helm-rabbitmq
|
||||||
|
key: rabbitmq-erlang-cookie
|
||||||
|
- name: RABBITMQ_LOAD_DEFINITIONS
|
||||||
|
value: "no"
|
||||||
|
- name: RABBITMQ_SECURE_PASSWORD
|
||||||
|
value: "yes"
|
||||||
|
- name: RABBITMQ_USERNAME
|
||||||
|
value: "admin"
|
||||||
|
- name: RABBITMQ_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: helm-rabbitmq
|
||||||
|
key: rabbitmq-password
|
||||||
|
- name: RABBITMQ_PLUGINS
|
||||||
|
value: "rabbitmq_management, rabbitmq_peer_discovery_k8s, rabbitmq_shovel, rabbitmq_shovel_management, rabbitmq_auth_backend_ldap"
|
||||||
|
ports:
|
||||||
|
- name: amqp
|
||||||
|
containerPort: 5672
|
||||||
|
- name: dist
|
||||||
|
containerPort: 25672
|
||||||
|
- name: dashboard
|
||||||
|
containerPort: 15672
|
||||||
|
- name: epmd
|
||||||
|
containerPort: 4369
|
||||||
|
livenessProbe:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- -ec
|
||||||
|
- rabbitmq-diagnostics -q ping
|
||||||
|
initialDelaySeconds: 120
|
||||||
|
periodSeconds: 30
|
||||||
|
timeoutSeconds: 20
|
||||||
|
successThreshold: 1
|
||||||
|
failureThreshold: 6
|
||||||
|
readinessProbe:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- -ec
|
||||||
|
- rabbitmq-diagnostics -q check_running && rabbitmq-diagnostics -q check_local_alarms
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 30
|
||||||
|
timeoutSeconds: 20
|
||||||
|
successThreshold: 1
|
||||||
|
failureThreshold: 3
|
||||||
|
lifecycle:
|
||||||
|
preStop:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- -ec
|
||||||
|
- |
|
||||||
|
if [[ -f /opt/bitnami/scripts/rabbitmq/nodeshutdown.sh ]]; then
|
||||||
|
/opt/bitnami/scripts/rabbitmq/nodeshutdown.sh -t "120" -d "false"
|
||||||
|
else
|
||||||
|
rabbitmqctl stop_app
|
||||||
|
fi
|
||||||
|
resources:
|
||||||
|
limits: { }
|
||||||
|
requests: { }
|
||||||
|
volumeMounts:
|
||||||
|
- name: configuration
|
||||||
|
mountPath: /bitnami/rabbitmq/conf
|
||||||
|
- name: data
|
||||||
|
mountPath: /bitnami/rabbitmq/mnesia
|
||||||
|
volumes:
|
||||||
|
- name: configuration
|
||||||
|
configMap:
|
||||||
|
name: helm-rabbitmq-config
|
||||||
|
items:
|
||||||
|
- key: rabbitmq.conf
|
||||||
|
path: rabbitmq.conf
|
||||||
|
- name: data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: helm-rabbitmq
|
||||||
585
agent-deploy/uavcloud-devflight/old/k8s-redis.yaml
Normal file
585
agent-deploy/uavcloud-devflight/old/k8s-redis.yaml
Normal file
@@ -0,0 +1,585 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
automountServiceAccountToken: true
|
||||||
|
metadata:
|
||||||
|
name: helm-redis
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: helm-redis
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
redis-password: "TWNhY2hlQDQ1MjI="
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-redis-configuration
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
data:
|
||||||
|
redis.conf: |-
|
||||||
|
# User-supplied common configuration:
|
||||||
|
# Enable AOF https://redis.io/topics/persistence#append-only-file
|
||||||
|
appendonly yes
|
||||||
|
# Disable RDB persistence, AOF persistence already enabled.
|
||||||
|
save ""
|
||||||
|
# End of common configuration
|
||||||
|
master.conf: |-
|
||||||
|
dir /data
|
||||||
|
# User-supplied master configuration:
|
||||||
|
rename-command FLUSHDB ""
|
||||||
|
rename-command FLUSHALL ""
|
||||||
|
# End of master configuration
|
||||||
|
replica.conf: |-
|
||||||
|
dir /data
|
||||||
|
slave-read-only yes
|
||||||
|
# User-supplied replica configuration:
|
||||||
|
rename-command FLUSHDB ""
|
||||||
|
rename-command FLUSHALL ""
|
||||||
|
# End of replica configuration
|
||||||
|
---
|
||||||
|
# Source: outside-deploy/charts/redis-db/templates/health-configmap.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-redis-health
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
data:
|
||||||
|
ping_readiness_local.sh: |-
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
[[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD="$(< "${REDIS_PASSWORD_FILE}")"
|
||||||
|
[[ -n "$REDIS_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_PASSWORD"
|
||||||
|
response=$(
|
||||||
|
timeout -s 3 $1 \
|
||||||
|
redis-cli \
|
||||||
|
-h localhost \
|
||||||
|
-p $REDIS_PORT \
|
||||||
|
ping
|
||||||
|
)
|
||||||
|
if [ "$response" != "PONG" ]; then
|
||||||
|
echo "$response"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
ping_liveness_local.sh: |-
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
[[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD="$(< "${REDIS_PASSWORD_FILE}")"
|
||||||
|
[[ -n "$REDIS_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_PASSWORD"
|
||||||
|
response=$(
|
||||||
|
timeout -s 3 $1 \
|
||||||
|
redis-cli \
|
||||||
|
-h localhost \
|
||||||
|
-p $REDIS_PORT \
|
||||||
|
ping
|
||||||
|
)
|
||||||
|
if [ "$response" != "PONG" ] && [ "$response" != "LOADING Redis is loading the dataset in memory" ]; then
|
||||||
|
echo "$response"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
ping_readiness_master.sh: |-
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
[[ -f $REDIS_MASTER_PASSWORD_FILE ]] && export REDIS_MASTER_PASSWORD="$(< "${REDIS_MASTER_PASSWORD_FILE}")"
|
||||||
|
[[ -n "$REDIS_MASTER_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_MASTER_PASSWORD"
|
||||||
|
response=$(
|
||||||
|
timeout -s 3 $1 \
|
||||||
|
redis-cli \
|
||||||
|
-h $REDIS_MASTER_HOST \
|
||||||
|
-p $REDIS_MASTER_PORT_NUMBER \
|
||||||
|
ping
|
||||||
|
)
|
||||||
|
if [ "$response" != "PONG" ]; then
|
||||||
|
echo "$response"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
ping_liveness_master.sh: |-
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
[[ -f $REDIS_MASTER_PASSWORD_FILE ]] && export REDIS_MASTER_PASSWORD="$(< "${REDIS_MASTER_PASSWORD_FILE}")"
|
||||||
|
[[ -n "$REDIS_MASTER_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_MASTER_PASSWORD"
|
||||||
|
response=$(
|
||||||
|
timeout -s 3 $1 \
|
||||||
|
redis-cli \
|
||||||
|
-h $REDIS_MASTER_HOST \
|
||||||
|
-p $REDIS_MASTER_PORT_NUMBER \
|
||||||
|
ping
|
||||||
|
)
|
||||||
|
if [ "$response" != "PONG" ] && [ "$response" != "LOADING Redis is loading the dataset in memory" ]; then
|
||||||
|
echo "$response"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
ping_readiness_local_and_master.sh: |-
|
||||||
|
script_dir="$(dirname "$0")"
|
||||||
|
exit_status=0
|
||||||
|
"$script_dir/ping_readiness_local.sh" $1 || exit_status=$?
|
||||||
|
"$script_dir/ping_readiness_master.sh" $1 || exit_status=$?
|
||||||
|
exit $exit_status
|
||||||
|
ping_liveness_local_and_master.sh: |-
|
||||||
|
script_dir="$(dirname "$0")"
|
||||||
|
exit_status=0
|
||||||
|
"$script_dir/ping_liveness_local.sh" $1 || exit_status=$?
|
||||||
|
"$script_dir/ping_liveness_master.sh" $1 || exit_status=$?
|
||||||
|
exit $exit_status
|
||||||
|
---
|
||||||
|
# Source: outside-deploy/charts/redis-db/templates/scripts-configmap.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-redis-scripts
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
data:
|
||||||
|
start-master.sh: |
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
[[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD="$(< "${REDIS_PASSWORD_FILE}")"
|
||||||
|
if [[ ! -f /opt/bitnami/redis/etc/master.conf ]];then
|
||||||
|
cp /opt/bitnami/redis/mounted-etc/master.conf /opt/bitnami/redis/etc/master.conf
|
||||||
|
fi
|
||||||
|
if [[ ! -f /opt/bitnami/redis/etc/redis.conf ]];then
|
||||||
|
cp /opt/bitnami/redis/mounted-etc/redis.conf /opt/bitnami/redis/etc/redis.conf
|
||||||
|
fi
|
||||||
|
ARGS=("--port" "${REDIS_PORT}")
|
||||||
|
ARGS+=("--requirepass" "${REDIS_PASSWORD}")
|
||||||
|
ARGS+=("--masterauth" "${REDIS_PASSWORD}")
|
||||||
|
ARGS+=("--include" "/opt/bitnami/redis/etc/redis.conf")
|
||||||
|
ARGS+=("--include" "/opt/bitnami/redis/etc/master.conf")
|
||||||
|
exec redis-server "${ARGS[@]}"
|
||||||
|
start-replica.sh: |
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
get_port() {
|
||||||
|
hostname="$1"
|
||||||
|
type="$2"
|
||||||
|
|
||||||
|
port_var=$(echo "${hostname^^}_SERVICE_PORT_$type" | sed "s/-/_/g")
|
||||||
|
port=${!port_var}
|
||||||
|
|
||||||
|
if [ -z "$port" ]; then
|
||||||
|
case $type in
|
||||||
|
"SENTINEL")
|
||||||
|
echo 26379
|
||||||
|
;;
|
||||||
|
"REDIS")
|
||||||
|
echo 6379
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
echo $port
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
get_full_hostname() {
|
||||||
|
hostname="$1"
|
||||||
|
echo "${hostname}.${HEADLESS_SERVICE}"
|
||||||
|
}
|
||||||
|
|
||||||
|
REDISPORT=$(get_port "$HOSTNAME" "REDIS")
|
||||||
|
|
||||||
|
[[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD="$(< "${REDIS_PASSWORD_FILE}")"
|
||||||
|
[[ -f $REDIS_MASTER_PASSWORD_FILE ]] && export REDIS_MASTER_PASSWORD="$(< "${REDIS_MASTER_PASSWORD_FILE}")"
|
||||||
|
if [[ ! -f /opt/bitnami/redis/etc/replica.conf ]];then
|
||||||
|
cp /opt/bitnami/redis/mounted-etc/replica.conf /opt/bitnami/redis/etc/replica.conf
|
||||||
|
fi
|
||||||
|
if [[ ! -f /opt/bitnami/redis/etc/redis.conf ]];then
|
||||||
|
cp /opt/bitnami/redis/mounted-etc/redis.conf /opt/bitnami/redis/etc/redis.conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "" >> /opt/bitnami/redis/etc/replica.conf
|
||||||
|
echo "replica-announce-port $REDISPORT" >> /opt/bitnami/redis/etc/replica.conf
|
||||||
|
echo "replica-announce-ip $(get_full_hostname "$HOSTNAME")" >> /opt/bitnami/redis/etc/replica.conf
|
||||||
|
ARGS=("--port" "${REDIS_PORT}")
|
||||||
|
ARGS+=("--slaveof" "${REDIS_MASTER_HOST}" "${REDIS_MASTER_PORT_NUMBER}")
|
||||||
|
ARGS+=("--requirepass" "${REDIS_PASSWORD}")
|
||||||
|
ARGS+=("--masterauth" "${REDIS_MASTER_PASSWORD}")
|
||||||
|
ARGS+=("--include" "/opt/bitnami/redis/etc/redis.conf")
|
||||||
|
ARGS+=("--include" "/opt/bitnami/redis/etc/replica.conf")
|
||||||
|
exec redis-server "${ARGS[@]}"
|
||||||
|
---
|
||||||
|
# Source: outside-deploy/charts/redis-db/templates/headless-svc.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-redis-headless
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
clusterIP: None
|
||||||
|
ports:
|
||||||
|
- name: tcp-redis
|
||||||
|
port: 6379
|
||||||
|
targetPort: redis
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
---
|
||||||
|
# Source: outside-deploy/charts/redis-db/templates/master/service.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-redis-master
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: redis
|
||||||
|
app.kubernetes.io/component: master
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
|
||||||
|
ports:
|
||||||
|
- name: tcp-redis
|
||||||
|
port: 6379
|
||||||
|
targetPort: redis
|
||||||
|
nodePort: null
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: redis
|
||||||
|
app.kubernetes.io/component: master
|
||||||
|
---
|
||||||
|
# Source: outside-deploy/charts/redis-db/templates/replicas/service.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-redis-replicas
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
app.kubernetes.io/component: replica
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- name: tcp-redis
|
||||||
|
port: 6379
|
||||||
|
targetPort: redis
|
||||||
|
nodePort: null
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/component: replica
|
||||||
|
---
|
||||||
|
# Source: outside-deploy/charts/redis-db/templates/master/statefulset.yaml
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: helm-redis-master
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: redis
|
||||||
|
app.kubernetes.io/component: master
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: redis
|
||||||
|
app.kubernetes.io/component: master
|
||||||
|
serviceName: helm-redis-headless
|
||||||
|
updateStrategy:
|
||||||
|
rollingUpdate: { }
|
||||||
|
type: RollingUpdate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: redis
|
||||||
|
app.kubernetes.io/component: master
|
||||||
|
annotations:
|
||||||
|
checksum/configmap: b64aa5db67e6e63811f3c1095b9fce34d83c86a471fccdda0e48eedb53a179b0
|
||||||
|
checksum/health: 6e0a6330e5ac63e565ae92af1444527d72d8897f91266f333555b3d323570623
|
||||||
|
checksum/scripts: b88df93710b7c42a76006e20218f05c6e500e6cc2affd4bb1985832f03166e98
|
||||||
|
checksum/secret: 43f1b0e20f9cb2de936bd182bc3683b720fc3cf4f4e76cb23c06a52398a50e8d
|
||||||
|
spec:
|
||||||
|
affinity: { }
|
||||||
|
securityContext:
|
||||||
|
fsGroup: 1001
|
||||||
|
serviceAccountName: helm-redis
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: harborsecret
|
||||||
|
terminationGracePeriodSeconds: 30
|
||||||
|
containers:
|
||||||
|
- name: redis
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/redis:6.2.6-debian-10-r0
|
||||||
|
imagePullPolicy: "Always"
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 1001
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
args:
|
||||||
|
- -c
|
||||||
|
- /opt/bitnami/scripts/start-scripts/start-master.sh
|
||||||
|
env:
|
||||||
|
- name: BITNAMI_DEBUG
|
||||||
|
value: "false"
|
||||||
|
- name: REDIS_REPLICATION_MODE
|
||||||
|
value: master
|
||||||
|
- name: ALLOW_EMPTY_PASSWORD
|
||||||
|
value: "no"
|
||||||
|
- name: REDIS_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: helm-redis
|
||||||
|
key: redis-password
|
||||||
|
- name: REDIS_TLS_ENABLED
|
||||||
|
value: "no"
|
||||||
|
- name: REDIS_PORT
|
||||||
|
value: "6379"
|
||||||
|
ports:
|
||||||
|
- name: redis
|
||||||
|
containerPort: 6379
|
||||||
|
livenessProbe:
|
||||||
|
initialDelaySeconds: 20
|
||||||
|
periodSeconds: 5
|
||||||
|
# One second longer than command timeout should prevent generation of zombie processes.
|
||||||
|
timeoutSeconds: 6
|
||||||
|
successThreshold: 1
|
||||||
|
failureThreshold: 5
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- /health/ping_liveness_local.sh 5
|
||||||
|
readinessProbe:
|
||||||
|
initialDelaySeconds: 20
|
||||||
|
periodSeconds: 5
|
||||||
|
timeoutSeconds: 2
|
||||||
|
successThreshold: 1
|
||||||
|
failureThreshold: 5
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- /health/ping_readiness_local.sh 1
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: "2"
|
||||||
|
memory: 8Gi
|
||||||
|
requests:
|
||||||
|
cpu: "100m"
|
||||||
|
memory: 1Gi
|
||||||
|
volumeMounts:
|
||||||
|
- name: start-scripts
|
||||||
|
mountPath: /opt/bitnami/scripts/start-scripts
|
||||||
|
- name: health
|
||||||
|
mountPath: /health
|
||||||
|
- name: redis-data
|
||||||
|
mountPath: /data
|
||||||
|
subPath:
|
||||||
|
- name: config
|
||||||
|
mountPath: /opt/bitnami/redis/mounted-etc
|
||||||
|
- name: redis-tmp-conf
|
||||||
|
mountPath: /opt/bitnami/redis/etc/
|
||||||
|
- name: tmp
|
||||||
|
mountPath: /tmp
|
||||||
|
volumes:
|
||||||
|
- name: start-scripts
|
||||||
|
configMap:
|
||||||
|
name: helm-redis-scripts
|
||||||
|
defaultMode: 0755
|
||||||
|
- name: health
|
||||||
|
configMap:
|
||||||
|
name: helm-redis-health
|
||||||
|
defaultMode: 0755
|
||||||
|
- name: config
|
||||||
|
configMap:
|
||||||
|
name: helm-redis-configuration
|
||||||
|
- name: redis-tmp-conf
|
||||||
|
emptyDir: { }
|
||||||
|
- name: tmp
|
||||||
|
emptyDir: { }
|
||||||
|
- name: redis-data
|
||||||
|
emptyDir: { }
|
||||||
|
---
|
||||||
|
# Source: outside-deploy/charts/redis-db/templates/replicas/statefulset.yaml
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: helm-redis-replicas
|
||||||
|
namespace: uavcloud-devflight
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
app.kubernetes.io/component: replica
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/component: replica
|
||||||
|
serviceName: helm-redis-headless
|
||||||
|
updateStrategy:
|
||||||
|
rollingUpdate: { }
|
||||||
|
type: RollingUpdate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devflight
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
app.kubernetes.io/component: replica
|
||||||
|
annotations:
|
||||||
|
checksum/configmap: b64aa5db67e6e63811f3c1095b9fce34d83c86a471fccdda0e48eedb53a179b0
|
||||||
|
checksum/health: 6e0a6330e5ac63e565ae92af1444527d72d8897f91266f333555b3d323570623
|
||||||
|
checksum/scripts: b88df93710b7c42a76006e20218f05c6e500e6cc2affd4bb1985832f03166e98
|
||||||
|
checksum/secret: 43f1b0e20f9cb2de936bd182bc3683b720fc3cf4f4e76cb23c06a52398a50e8d
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: harborsecret
|
||||||
|
securityContext:
|
||||||
|
fsGroup: 1001
|
||||||
|
serviceAccountName: helm-redis
|
||||||
|
terminationGracePeriodSeconds: 30
|
||||||
|
containers:
|
||||||
|
- name: redis
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/redis:6.2.6-debian-10-r0
|
||||||
|
imagePullPolicy: "Always"
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 1001
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
args:
|
||||||
|
- -c
|
||||||
|
- /opt/bitnami/scripts/start-scripts/start-replica.sh
|
||||||
|
env:
|
||||||
|
- name: BITNAMI_DEBUG
|
||||||
|
value: "false"
|
||||||
|
- name: REDIS_REPLICATION_MODE
|
||||||
|
value: slave
|
||||||
|
- name: REDIS_MASTER_HOST
|
||||||
|
value: helm-redis-master-0.helm-redis-headless.uavcloud-devflight.svc.cluster.local
|
||||||
|
- name: REDIS_MASTER_PORT_NUMBER
|
||||||
|
value: "6379"
|
||||||
|
- name: ALLOW_EMPTY_PASSWORD
|
||||||
|
value: "no"
|
||||||
|
- name: REDIS_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: helm-redis
|
||||||
|
key: redis-password
|
||||||
|
- name: REDIS_MASTER_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: helm-redis
|
||||||
|
key: redis-password
|
||||||
|
- name: REDIS_TLS_ENABLED
|
||||||
|
value: "no"
|
||||||
|
- name: REDIS_PORT
|
||||||
|
value: "6379"
|
||||||
|
ports:
|
||||||
|
- name: redis
|
||||||
|
containerPort: 6379
|
||||||
|
livenessProbe:
|
||||||
|
initialDelaySeconds: 20
|
||||||
|
periodSeconds: 5
|
||||||
|
timeoutSeconds: 6
|
||||||
|
successThreshold: 1
|
||||||
|
failureThreshold: 5
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- /health/ping_liveness_local_and_master.sh 5
|
||||||
|
readinessProbe:
|
||||||
|
initialDelaySeconds: 20
|
||||||
|
periodSeconds: 5
|
||||||
|
timeoutSeconds: 2
|
||||||
|
successThreshold: 1
|
||||||
|
failureThreshold: 5
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- /health/ping_readiness_local_and_master.sh 1
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: "2"
|
||||||
|
memory: 8Gi
|
||||||
|
requests:
|
||||||
|
cpu: "100m"
|
||||||
|
memory: 1Gi
|
||||||
|
volumeMounts:
|
||||||
|
- name: start-scripts
|
||||||
|
mountPath: /opt/bitnami/scripts/start-scripts
|
||||||
|
- name: health
|
||||||
|
mountPath: /health
|
||||||
|
- name: redis-data
|
||||||
|
mountPath: /data
|
||||||
|
subPath:
|
||||||
|
- name: config
|
||||||
|
mountPath: /opt/bitnami/redis/mounted-etc
|
||||||
|
- name: redis-tmp-conf
|
||||||
|
mountPath: /opt/bitnami/redis/etc
|
||||||
|
volumes:
|
||||||
|
- name: start-scripts
|
||||||
|
configMap:
|
||||||
|
name: helm-redis-scripts
|
||||||
|
defaultMode: 0755
|
||||||
|
- name: health
|
||||||
|
configMap:
|
||||||
|
name: helm-redis-health
|
||||||
|
defaultMode: 0755
|
||||||
|
- name: config
|
||||||
|
configMap:
|
||||||
|
name: helm-redis-configuration
|
||||||
|
- name: redis-tmp-conf
|
||||||
|
emptyDir: { }
|
||||||
|
- name: redis-data
|
||||||
|
emptyDir: { }
|
||||||
|
|
||||||
5282
agent-deploy/uavcloud-devoperation/k8s-backend.yaml
Normal file
5282
agent-deploy/uavcloud-devoperation/k8s-backend.yaml
Normal file
File diff suppressed because it is too large
Load Diff
378
agent-deploy/uavcloud-devoperation/k8s-configmap.yaml
Normal file
378
agent-deploy/uavcloud-devoperation/k8s-configmap.yaml
Normal file
@@ -0,0 +1,378 @@
|
|||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-ai-brain
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "ai-brain",
|
||||||
|
AppClientId: "APP_rafnuCAmBESIVYMH"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-cmsportal
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "cmsportal",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-share
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "share",
|
||||||
|
AppClientId: "APP_4lVSVI0ZGxTssir8"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-splice
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "splice",
|
||||||
|
AppClientId: "APP_zE0M3sTRXrCIJS8Y"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-base
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "base",
|
||||||
|
AppClientId: "APP_9LY41OaKSqk2btY0"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-logistics
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "logistics",
|
||||||
|
AppClientId: "APP_PvdfRRRBPL8xbIwl"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-open
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "open",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-security
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "security",
|
||||||
|
AppClientId: "APP_JUSEMc7afyWXxvE7"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-securityh5
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "securityh5",
|
||||||
|
AppClientId: "APP_N3ImO0Ubfu9peRHD"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-traffic
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "traffic",
|
||||||
|
AppClientId: "APP_Jc8i2wOQ1t73QEJS"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-threedsimulation
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "threedsimulation",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-qingdao
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "qingdao",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-hljtt
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "hljtt",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-visualization
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "visualization",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-supervision
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "supervision",
|
||||||
|
AppClientId: "APP_qqSu82THfexI8PLM"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-pangu
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-detection
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "detection",
|
||||||
|
AppClientId: "APP_FDHW2VLVDWPnnOCy"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-mws
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "mws",
|
||||||
|
AppClientId: "APP_uKniXPELlRERBBwK"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-supervisionh5
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "supervisionh5",
|
||||||
|
AppClientId: "APP_qqSu82THfexI8PLM"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-media
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "media",
|
||||||
|
AppClientId: "APP_4AU8lbifESQO4FD6"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-multiterminal
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "multiterminal",
|
||||||
|
AppClientId: "APP_PvdfRRRBPL8xbIwl"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-oms
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "oms",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-jiangsuwenlv
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "jiangsuwenlv",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-armypeople
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "armypeople",
|
||||||
|
AppClientId: "APP_UIegse6Lfou9pO1U"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-emergency
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "emergency",
|
||||||
|
AppClientId: "APP_aGsTAY1uMZrpKdfk"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-seniclive
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "seniclive",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-qinghaitourism
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "qinghaitourism",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
265
agent-deploy/uavcloud-devoperation/k8s-emqx.yaml
Normal file
265
agent-deploy/uavcloud-devoperation/k8s-emqx.yaml
Normal file
@@ -0,0 +1,265 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs-env
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
helm.sh/chart: emqx-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
data:
|
||||||
|
EMQX_CLUSTER__K8S__APISERVER: "https://kubernetes.default.svc.cluster.local:443"
|
||||||
|
EMQX_NAME: "helm-emqxs"
|
||||||
|
EMQX_CLUSTER__DISCOVERY: "k8s"
|
||||||
|
EMQX_CLUSTER__K8S__APP_NAME: "helm-emqxs"
|
||||||
|
EMQX_CLUSTER__K8S__SERVICE_NAME: "helm-emqxs-headless"
|
||||||
|
EMQX_CLUSTER__K8S__ADDRESS_TYPE: "dns"
|
||||||
|
EMQX_CLUSTER__K8S__namespace: "uavcloud-devoperation"
|
||||||
|
EMQX_CLUSTER__K8S__SUFFIX: "svc.cluster.local"
|
||||||
|
EMQX_ALLOW_ANONYMOUS: "false"
|
||||||
|
EMQX_ACL_NOMATCH: "deny"
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs-cm
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
helm.sh/chart: emqx-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
data:
|
||||||
|
emqx_auth_username.conf: |-
|
||||||
|
auth.user.1.username = cmlc
|
||||||
|
auth.user.1.password = 4YPk*DS%+5
|
||||||
|
auth.user.password_hash = sha256
|
||||||
|
|
||||||
|
acl.conf: |-
|
||||||
|
{allow, {user, "admin"}, pubsub, ["admin/#"]}.
|
||||||
|
{allow, {user, "dashboard"}, subscribe, ["$SYS/#"]}.
|
||||||
|
{allow, {ipaddr, "127.0.0.1"}, pubsub, ["$SYS/#", "#"]}.
|
||||||
|
{deny, all, subscribe, ["$SYS/#", {eq, "#"}]}.
|
||||||
|
{allow, all}.
|
||||||
|
|
||||||
|
loaded_plugins: |-
|
||||||
|
{emqx_auth_username,true}.
|
||||||
|
{emqx_management, true}.
|
||||||
|
{emqx_recon, true}.
|
||||||
|
{emqx_retainer, false}.
|
||||||
|
{emqx_dashboard, true}.
|
||||||
|
{emqx_telemetry, true}.
|
||||||
|
{emqx_rule_engine, true}.
|
||||||
|
{emqx_bridge_mqtt, false}.
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
helm.sh/chart: emqx-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
serviceName: helm-emqxs-headless
|
||||||
|
updateStrategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
helm.sh/chart: emqx-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
affinity: { }
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: harborsecret
|
||||||
|
serviceAccountName: helm-emqxs
|
||||||
|
containers:
|
||||||
|
- name: helm-emqxs
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/emqx:5.5.1
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- name: mqtt
|
||||||
|
containerPort: 1883
|
||||||
|
- name: mqttssl
|
||||||
|
containerPort: 8883
|
||||||
|
- name: mgmt
|
||||||
|
containerPort: 8081
|
||||||
|
- name: ws
|
||||||
|
containerPort: 8083
|
||||||
|
- name: wss
|
||||||
|
containerPort: 8084
|
||||||
|
- name: dashboard
|
||||||
|
containerPort: 18083
|
||||||
|
- name: ekka
|
||||||
|
containerPort: 4370
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: helm-emqxs-env
|
||||||
|
resources: { }
|
||||||
|
volumeMounts:
|
||||||
|
- name: emqx-data
|
||||||
|
mountPath: "/opt/emqx/data/mnesia"
|
||||||
|
readOnly: false
|
||||||
|
- name: helm-emqxs-cm
|
||||||
|
mountPath: "/opt/emqx/etc/plugins/emqx_auth_username.conf"
|
||||||
|
subPath: emqx_auth_username.conf
|
||||||
|
readOnly: false
|
||||||
|
# - name: helm-emqxs-cm
|
||||||
|
# mountPath: "/opt/emqx/etc/acl.conf"
|
||||||
|
# subPath: "acl.conf"
|
||||||
|
# readOnly: false
|
||||||
|
- name: helm-emqxs-cm
|
||||||
|
mountPath: "/opt/emqx/data/loaded_plugins"
|
||||||
|
subPath: loaded_plugins
|
||||||
|
readOnly: false
|
||||||
|
volumes:
|
||||||
|
- name: emqx-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: helm-emqxs
|
||||||
|
- name: helm-emqxs-cm
|
||||||
|
configMap:
|
||||||
|
name: helm-emqxs-cm
|
||||||
|
items:
|
||||||
|
- key: emqx_auth_username.conf
|
||||||
|
path: emqx_auth_username.conf
|
||||||
|
- key: acl.conf
|
||||||
|
path: acl.conf
|
||||||
|
- key: loaded_plugins
|
||||||
|
path: loaded_plugins
|
||||||
|
---
|
||||||
|
kind: Role
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- endpoints
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- watch
|
||||||
|
- list
|
||||||
|
---
|
||||||
|
kind: RoleBinding
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: helm-emqxs
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
roleRef:
|
||||||
|
kind: Role
|
||||||
|
name: helm-emqxs
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
helm.sh/chart: emqx-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
type: NodePort
|
||||||
|
selector:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
ports:
|
||||||
|
- port: 1883
|
||||||
|
name: mqtt
|
||||||
|
targetPort: 1883
|
||||||
|
nodePort: 31885
|
||||||
|
- port: 18083
|
||||||
|
name: dashboard
|
||||||
|
targetPort: 18083
|
||||||
|
nodePort: 38087
|
||||||
|
- port: 8083
|
||||||
|
name: mqtt-websocket
|
||||||
|
targetPort: 8083
|
||||||
|
nodePort: 38085
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs-headless
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
helm.sh/chart: emqx-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
clusterIP: None
|
||||||
|
selector:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
ports:
|
||||||
|
- name: mqtt
|
||||||
|
port: 1883
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 1883
|
||||||
|
- name: mqttssl
|
||||||
|
port: 8883
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 8883
|
||||||
|
- name: mgmt
|
||||||
|
port: 8081
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 8081
|
||||||
|
- name: websocket
|
||||||
|
port: 8083
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 8083
|
||||||
|
- name: wss
|
||||||
|
port: 8084
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 8084
|
||||||
|
- name: dashboard
|
||||||
|
port: 18083
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 18083
|
||||||
|
- name: ekka
|
||||||
|
port: 4370
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 4370
|
||||||
2354
agent-deploy/uavcloud-devoperation/k8s-frontend.yaml
Normal file
2354
agent-deploy/uavcloud-devoperation/k8s-frontend.yaml
Normal file
File diff suppressed because it is too large
Load Diff
546
agent-deploy/uavcloud-devoperation/k8s-ingress.yaml
Normal file
546
agent-deploy/uavcloud-devoperation/k8s-ingress.yaml
Normal file
@@ -0,0 +1,546 @@
|
|||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1beta1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: frontend-applications-ingress
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
type: frontend
|
||||||
|
octopus.control: all-ingress-config-wdd
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: "nginx"
|
||||||
|
nginx.ingress.kubernetes.io/enable-cors: "true"
|
||||||
|
nginx.ingress.kubernetes.io/rewrite-target: /$1
|
||||||
|
nginx.ingress.kubernetes.io/configuration-snippet: |
|
||||||
|
rewrite ^(/supervision)$ $1/ redirect;
|
||||||
|
rewrite ^(/supervisionh5)$ $1/ redirect;
|
||||||
|
rewrite ^(/pangu)$ $1/ redirect;
|
||||||
|
rewrite ^(/ai-brain)$ $1/ redirect;
|
||||||
|
rewrite ^(/armypeople)$ $1/ redirect;
|
||||||
|
rewrite ^(/base)$ $1/ redirect;
|
||||||
|
rewrite ^(/cmsportal)$ $1/ redirect;
|
||||||
|
rewrite ^(/detection)$ $1/ redirect;
|
||||||
|
rewrite ^(/emergency)$ $1/ redirect;
|
||||||
|
rewrite ^(/hljtt)$ $1/ redirect;
|
||||||
|
rewrite ^(/jiangsuwenlv)$ $1/ redirect;
|
||||||
|
rewrite ^(/logistics)$ $1/ redirect;
|
||||||
|
rewrite ^(/media)$ $1/ redirect;
|
||||||
|
rewrite ^(/multiterminal)$ $1/ redirect;
|
||||||
|
rewrite ^(/mws)$ $1/ redirect;
|
||||||
|
rewrite ^(/oms)$ $1/ redirect;
|
||||||
|
rewrite ^(/open)$ $1/ redirect;
|
||||||
|
rewrite ^(/qingdao)$ $1/ redirect;
|
||||||
|
rewrite ^(/qinghaitourism)$ $1/ redirect;
|
||||||
|
rewrite ^(/security)$ $1/ redirect;
|
||||||
|
rewrite ^(/securityh5)$ $1/ redirect;
|
||||||
|
rewrite ^(/seniclive)$ $1/ redirect;
|
||||||
|
rewrite ^(/share)$ $1/ redirect;
|
||||||
|
rewrite ^(/splice)$ $1/ redirect;
|
||||||
|
rewrite ^(/threedsimulation)$ $1/ redirect;
|
||||||
|
rewrite ^(/traffic)$ $1/ redirect;
|
||||||
|
rewrite ^(/visualization)$ $1/ redirect;
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: fake-domain.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /devoperation/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/supervision/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-suav-platform-supervision
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/supervisionh5/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-suav-platform-supervisionh5
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/pangu/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/ai-brain/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-ai-brain
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/armypeople/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-armypeople
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/base/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-base
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/cmsportal/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-cms-portal
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/detection/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-detection
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/emergency/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-emergency-rescue
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/hljtt/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-hljtt
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/jiangsuwenlv/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-jiangsuwenlv
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/logistics/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-logistics
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/media/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-media
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/multiterminal/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-multiterminal
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/mws/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-mws
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/oms/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-oms
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/open/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-open
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/qingdao/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-qingdao
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/qinghaitourism/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-qinghaitourism
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/security/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-security
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/securityh5/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-securityh5
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/seniclive/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-seniclive
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/share/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-share
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/splice/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-splice
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/threedsimulation/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-threedsimulation
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/traffic/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-traffic
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/visualization/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-visualization
|
||||||
|
servicePort: 9528
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1beta1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: backend-applications-ingress
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
type: backend
|
||||||
|
octopus.control: all-ingress-config-wdd
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: "nginx"
|
||||||
|
nginx.ingress.kubernetes.io/enable-cors: "true"
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: cmii-admin-data.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-admin-data
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-admin-gateway.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-admin-gateway
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-admin-user.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-admin-user
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-app-release.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-app-release
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-open-gateway.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-open-gateway
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-suav-supervision.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-suav-supervision
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uas-gateway.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uas-gateway
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uas-lifecycle.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uas-lifecycle
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-airspace.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-airspace
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-alarm.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-alarm
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-autowaypoint.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-autowaypoint
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-brain.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-brain
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-bridge.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-bridge
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-cloud-live.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-cloud-live
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-clusters.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-clusters
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-cms.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-cms
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-data-post-process.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-data-post-process
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-depotautoreturn.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-depotautoreturn
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-developer.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-developer
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-device.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-device
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-emergency.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-emergency
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-gateway.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-gateway
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-industrial-portfolio.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-industrial-portfolio
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-integration.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-integration
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-kpi-monitor.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-kpi-monitor
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-logger.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-logger
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-material-warehouse.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-material-warehouse
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-mission.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-mission
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-mqtthandler.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-mqtthandler
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-multilink.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-multilink
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-notice.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-notice
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-oauth.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-oauth
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-process.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-process
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-surveillance.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-surveillance
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-threedsimulation.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-threedsimulation
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-tower.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-tower
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-user.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-user
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-waypoint.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-waypoint
|
||||||
|
servicePort: 8080
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1beta1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: all-gateways-ingress
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
type: api-gateway
|
||||||
|
octopus.control: all-ingress-config-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: "nginx"
|
||||||
|
nginx.ingress.kubernetes.io/enable-cors: "true"
|
||||||
|
nginx.ingress.kubernetes.io/rewrite-target: /$1
|
||||||
|
nginx.ingress.kubernetes.io/configuration-snippet: |
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "Upgrade";
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: fake-domain.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /devoperation/oms/api/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-admin-gateway
|
||||||
|
servicePort: 8080
|
||||||
|
- path: /devoperation/open/api/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-open-gateway
|
||||||
|
servicePort: 8080
|
||||||
|
- path: /devoperation/api/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-gateway
|
||||||
|
servicePort: 8080
|
||||||
77
agent-deploy/uavcloud-devoperation/k8s-mongo.yaml
Normal file
77
agent-deploy/uavcloud-devoperation/k8s-mongo.yaml
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-mongo
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
cmii.app: helm-mongo
|
||||||
|
cmii.type: middleware
|
||||||
|
helm.sh/chart: mongo-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
selector:
|
||||||
|
cmii.app: helm-mongo
|
||||||
|
cmii.type: middleware
|
||||||
|
ports:
|
||||||
|
- port: 27017
|
||||||
|
name: server-27017
|
||||||
|
targetPort: 27017
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: helm-mongo
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
cmii.app: helm-mongo
|
||||||
|
cmii.type: middleware
|
||||||
|
helm.sh/chart: mongo-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
serviceName: helm-mongo
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
cmii.app: helm-mongo
|
||||||
|
cmii.type: middleware
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
cmii.app: helm-mongo
|
||||||
|
cmii.type: middleware
|
||||||
|
helm.sh/chart: mongo-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
annotations:
|
||||||
|
pod.alpha.kubernetes.io/initialized: "true"
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: harborsecret
|
||||||
|
affinity: { }
|
||||||
|
containers:
|
||||||
|
- name: helm-mongo
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/mongo:5.0
|
||||||
|
resources: { }
|
||||||
|
ports:
|
||||||
|
- containerPort: 27017
|
||||||
|
name: mongo27017
|
||||||
|
protocol: TCP
|
||||||
|
env:
|
||||||
|
- name: MONGO_INITDB_ROOT_USERNAME
|
||||||
|
value: cmlc
|
||||||
|
- name: MONGO_INITDB_ROOT_PASSWORD
|
||||||
|
value: 7(#dD3zcz8
|
||||||
|
volumeMounts:
|
||||||
|
- name: mongo-data
|
||||||
|
mountPath: /data/db
|
||||||
|
readOnly: false
|
||||||
|
subPath: default/helm-mongo/data/db
|
||||||
|
volumes:
|
||||||
|
- name: mongo-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: helm-mongo
|
||||||
|
---
|
||||||
423
agent-deploy/uavcloud-devoperation/k8s-mysql.yaml
Normal file
423
agent-deploy/uavcloud-devoperation/k8s-mysql.yaml
Normal file
@@ -0,0 +1,423 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: helm-mysql
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
annotations: { }
|
||||||
|
secrets:
|
||||||
|
- name: helm-mysql
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: helm-mysql
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
mysql-root-password: "R3d1YmM2Q3hSTQ=="
|
||||||
|
mysql-password: "S0F0cm5PckFKNw=="
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-mysql
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
data:
|
||||||
|
my.cnf: |-
|
||||||
|
|
||||||
|
[mysqld]
|
||||||
|
port=3306
|
||||||
|
basedir=/opt/bitnami/mysql
|
||||||
|
datadir=/bitnami/mysql/data
|
||||||
|
pid-file=/opt/bitnami/mysql/tmp/mysqld.pid
|
||||||
|
socket=/opt/bitnami/mysql/tmp/mysql.sock
|
||||||
|
log-error=/bitnami/mysql/data/error.log
|
||||||
|
general_log_file = /bitnami/mysql/data/general.log
|
||||||
|
slow_query_log_file = /bitnami/mysql/data/slow.log
|
||||||
|
innodb_data_file_path = ibdata1:512M:autoextend
|
||||||
|
innodb_buffer_pool_size = 512M
|
||||||
|
innodb_buffer_pool_instances = 2
|
||||||
|
innodb_log_file_size = 512M
|
||||||
|
innodb_log_files_in_group = 4
|
||||||
|
innodb_log_files_in_group = 4
|
||||||
|
log-bin = /bitnami/mysql/data/mysql-bin
|
||||||
|
max_binlog_size=1G
|
||||||
|
transaction_isolation = REPEATABLE-READ
|
||||||
|
default_storage_engine = innodb
|
||||||
|
character-set-server = utf8mb4
|
||||||
|
collation-server=utf8mb4_bin
|
||||||
|
binlog_format = ROW
|
||||||
|
binlog_rows_query_log_events=on
|
||||||
|
binlog_cache_size=4M
|
||||||
|
binlog_expire_logs_seconds = 1296000
|
||||||
|
max_binlog_cache_size=2G
|
||||||
|
gtid_mode = on
|
||||||
|
enforce_gtid_consistency = 1
|
||||||
|
sync_binlog = 1
|
||||||
|
innodb_flush_log_at_trx_commit = 1
|
||||||
|
innodb_flush_method = O_DIRECT
|
||||||
|
log_slave_updates=1
|
||||||
|
relay_log_recovery = 1
|
||||||
|
relay-log-purge = 1
|
||||||
|
default_time_zone = '+08:00'
|
||||||
|
lower_case_table_names=1
|
||||||
|
log_bin_trust_function_creators=1
|
||||||
|
group_concat_max_len=67108864
|
||||||
|
innodb_io_capacity = 4000
|
||||||
|
innodb_io_capacity_max = 8000
|
||||||
|
innodb_flush_sync = 0
|
||||||
|
innodb_flush_neighbors = 0
|
||||||
|
innodb_write_io_threads = 8
|
||||||
|
innodb_read_io_threads = 8
|
||||||
|
innodb_purge_threads = 4
|
||||||
|
innodb_page_cleaners = 4
|
||||||
|
innodb_open_files = 65535
|
||||||
|
innodb_max_dirty_pages_pct = 50
|
||||||
|
innodb_lru_scan_depth = 4000
|
||||||
|
innodb_checksum_algorithm = crc32
|
||||||
|
innodb_lock_wait_timeout = 10
|
||||||
|
innodb_rollback_on_timeout = 1
|
||||||
|
innodb_print_all_deadlocks = 1
|
||||||
|
innodb_file_per_table = 1
|
||||||
|
innodb_online_alter_log_max_size = 4G
|
||||||
|
innodb_stats_on_metadata = 0
|
||||||
|
innodb_thread_concurrency = 0
|
||||||
|
innodb_sync_spin_loops = 100
|
||||||
|
innodb_spin_wait_delay = 30
|
||||||
|
lock_wait_timeout = 3600
|
||||||
|
slow_query_log = 1
|
||||||
|
long_query_time = 10
|
||||||
|
log_queries_not_using_indexes =1
|
||||||
|
log_throttle_queries_not_using_indexes = 60
|
||||||
|
min_examined_row_limit = 100
|
||||||
|
log_slow_admin_statements = 1
|
||||||
|
log_slow_slave_statements = 1
|
||||||
|
default_authentication_plugin=mysql_native_password
|
||||||
|
skip-name-resolve=1
|
||||||
|
explicit_defaults_for_timestamp=1
|
||||||
|
plugin_dir=/opt/bitnami/mysql/plugin
|
||||||
|
max_allowed_packet=128M
|
||||||
|
max_connections = 2000
|
||||||
|
max_connect_errors = 1000000
|
||||||
|
table_definition_cache=2000
|
||||||
|
table_open_cache_instances=64
|
||||||
|
tablespace_definition_cache=1024
|
||||||
|
thread_cache_size=256
|
||||||
|
interactive_timeout = 600
|
||||||
|
wait_timeout = 600
|
||||||
|
tmpdir=/opt/bitnami/mysql/tmp
|
||||||
|
max_allowed_packet=32M
|
||||||
|
bind-address=0.0.0.0
|
||||||
|
performance_schema = 1
|
||||||
|
performance_schema_instrument = '%memory%=on'
|
||||||
|
performance_schema_instrument = '%lock%=on'
|
||||||
|
innodb_monitor_enable=ALL
|
||||||
|
|
||||||
|
[mysql]
|
||||||
|
no-auto-rehash
|
||||||
|
|
||||||
|
[mysqldump]
|
||||||
|
quick
|
||||||
|
max_allowed_packet = 32M
|
||||||
|
|
||||||
|
[client]
|
||||||
|
port=3306
|
||||||
|
socket=/opt/bitnami/mysql/tmp/mysql.sock
|
||||||
|
default-character-set=UTF8
|
||||||
|
plugin_dir=/opt/bitnami/mysql/plugin
|
||||||
|
|
||||||
|
[manager]
|
||||||
|
port=3306
|
||||||
|
socket=/opt/bitnami/mysql/tmp/mysql.sock
|
||||||
|
pid-file=/opt/bitnami/mysql/tmp/mysqld.pid
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-mysql-init-scripts
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
data:
|
||||||
|
create_users_grants_core.sql: |-
|
||||||
|
create
|
||||||
|
user zyly@'%' identified by 'Cmii@451315';
|
||||||
|
grant select on *.* to zyly@'%';
|
||||||
|
create
|
||||||
|
user zyly_qc@'%' identified by 'Uh)E_owCyb16';
|
||||||
|
grant all
|
||||||
|
on *.* to zyly_qc@'%';
|
||||||
|
create
|
||||||
|
user k8s_admin@'%' identified by 'VFJncwy58^Zm';
|
||||||
|
grant all
|
||||||
|
on *.* to k8s_admin@'%';
|
||||||
|
create
|
||||||
|
user audit_dba@'%' identified by 'PjCzqiBmJaTpgkoYXynH';
|
||||||
|
grant all
|
||||||
|
on *.* to audit_dba@'%';
|
||||||
|
create
|
||||||
|
user db_backup@'%' identified by 'RU5Pu(4FGdT9';
|
||||||
|
GRANT
|
||||||
|
SELECT, RELOAD, PROCESS, LOCK TABLES, REPLICATION CLIENT, EVENT
|
||||||
|
on *.* to db_backup@'%';
|
||||||
|
create
|
||||||
|
user monitor@'%' identified by 'PL3#nGtrWbf-';
|
||||||
|
grant REPLICATION
|
||||||
|
CLIENT on *.* to monitor@'%';
|
||||||
|
flush
|
||||||
|
privileges;
|
||||||
|
---
|
||||||
|
kind: Service
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: cmii-mysql
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
cmii.app: mysql
|
||||||
|
cmii.type: middleware
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: mysql
|
||||||
|
protocol: TCP
|
||||||
|
port: 13306
|
||||||
|
targetPort: mysql
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
cmii.app: mysql
|
||||||
|
cmii.type: middleware
|
||||||
|
type: ClusterIP
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-mysql-headless
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: mysql
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
annotations: { }
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
clusterIP: None
|
||||||
|
publishNotReadyAddresses: true
|
||||||
|
ports:
|
||||||
|
- name: mysql
|
||||||
|
port: 3306
|
||||||
|
targetPort: mysql
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: mysql
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-mysql
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: mysql
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
annotations: { }
|
||||||
|
spec:
|
||||||
|
type: NodePort
|
||||||
|
ports:
|
||||||
|
- name: mysql
|
||||||
|
port: 3306
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: mysql
|
||||||
|
nodePort: 33308
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: mysql
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: helm-mysql
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: mysql
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: mysql
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
serviceName: helm-mysql
|
||||||
|
updateStrategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
checksum/configuration: 6b60fa0f3a846a6ada8effdc4f823cf8003d42a8c8f630fe8b1b66d3454082dd
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: mysql
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: harborsecret
|
||||||
|
serviceAccountName: helm-mysql
|
||||||
|
affinity: { }
|
||||||
|
nodeSelector:
|
||||||
|
mysql-deploy: "true"
|
||||||
|
securityContext:
|
||||||
|
fsGroup: 1001
|
||||||
|
initContainers:
|
||||||
|
- name: change-volume-permissions
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/bitnami-shell:11-debian-11-r136
|
||||||
|
imagePullPolicy: "Always"
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- -ec
|
||||||
|
- |
|
||||||
|
chown -R 1001:1001 /bitnami/mysql
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
volumeMounts:
|
||||||
|
- name: mysql-data
|
||||||
|
mountPath: /bitnami/mysql
|
||||||
|
containers:
|
||||||
|
- name: mysql
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/mysql:8.1.0-debian-11-r42
|
||||||
|
imagePullPolicy: "IfNotPresent"
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 1001
|
||||||
|
env:
|
||||||
|
- name: BITNAMI_DEBUG
|
||||||
|
value: "true"
|
||||||
|
- name: MYSQL_ROOT_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: helm-mysql
|
||||||
|
key: mysql-root-password
|
||||||
|
- name: MYSQL_DATABASE
|
||||||
|
value: "cmii"
|
||||||
|
ports:
|
||||||
|
- name: mysql
|
||||||
|
containerPort: 3306
|
||||||
|
livenessProbe:
|
||||||
|
failureThreshold: 5
|
||||||
|
initialDelaySeconds: 120
|
||||||
|
periodSeconds: 10
|
||||||
|
successThreshold: 1
|
||||||
|
timeoutSeconds: 3
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- -ec
|
||||||
|
- |
|
||||||
|
password_aux="${MYSQL_ROOT_PASSWORD:-}"
|
||||||
|
if [[ -f "${MYSQL_ROOT_PASSWORD_FILE:-}" ]]; then
|
||||||
|
password_aux=$(cat "$MYSQL_ROOT_PASSWORD_FILE")
|
||||||
|
fi
|
||||||
|
mysqladmin status -uroot -p"${password_aux}"
|
||||||
|
readinessProbe:
|
||||||
|
failureThreshold: 5
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
periodSeconds: 10
|
||||||
|
successThreshold: 1
|
||||||
|
timeoutSeconds: 3
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- -ec
|
||||||
|
- |
|
||||||
|
password_aux="${MYSQL_ROOT_PASSWORD:-}"
|
||||||
|
if [[ -f "${MYSQL_ROOT_PASSWORD_FILE:-}" ]]; then
|
||||||
|
password_aux=$(cat "$MYSQL_ROOT_PASSWORD_FILE")
|
||||||
|
fi
|
||||||
|
mysqladmin status -uroot -p"${password_aux}"
|
||||||
|
startupProbe:
|
||||||
|
failureThreshold: 60
|
||||||
|
initialDelaySeconds: 120
|
||||||
|
periodSeconds: 10
|
||||||
|
successThreshold: 1
|
||||||
|
timeoutSeconds: 1
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- -ec
|
||||||
|
- |
|
||||||
|
password_aux="${MYSQL_ROOT_PASSWORD:-}"
|
||||||
|
if [[ -f "${MYSQL_ROOT_PASSWORD_FILE:-}" ]]; then
|
||||||
|
password_aux=$(cat "$MYSQL_ROOT_PASSWORD_FILE")
|
||||||
|
fi
|
||||||
|
mysqladmin status -uroot -p"${password_aux}"
|
||||||
|
resources:
|
||||||
|
limits: { }
|
||||||
|
requests: { }
|
||||||
|
volumeMounts:
|
||||||
|
- name: mysql-data
|
||||||
|
mountPath: /bitnami/mysql
|
||||||
|
- name: custom-init-scripts
|
||||||
|
mountPath: /docker-entrypoint-initdb.d
|
||||||
|
- name: config
|
||||||
|
mountPath: /opt/bitnami/mysql/conf/my.cnf
|
||||||
|
subPath: my.cnf
|
||||||
|
volumes:
|
||||||
|
- name: config
|
||||||
|
configMap:
|
||||||
|
name: helm-mysql
|
||||||
|
- name: custom-init-scripts
|
||||||
|
configMap:
|
||||||
|
name: helm-mysql-init-scripts
|
||||||
|
- name: mysql-data
|
||||||
|
hostPath:
|
||||||
|
path: /var/lib/docker/mysql-pv/uavcloud-devoperation/
|
||||||
130
agent-deploy/uavcloud-devoperation/k8s-nacos.yaml
Normal file
130
agent-deploy/uavcloud-devoperation/k8s-nacos.yaml
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-nacos-cm
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
cmii.app: helm-nacos
|
||||||
|
cmii.type: middleware
|
||||||
|
octopus.control: nacos-wdd
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
data:
|
||||||
|
mysql.db.name: "cmii_nacos_config"
|
||||||
|
mysql.db.host: "helm-mysql"
|
||||||
|
mysql.port: "3306"
|
||||||
|
mysql.user: "k8s_admin"
|
||||||
|
mysql.password: "VFJncwy58^Zm"
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-nacos
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
cmii.app: helm-nacos
|
||||||
|
cmii.type: middleware
|
||||||
|
octopus.control: nacos-wdd
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
type: NodePort
|
||||||
|
selector:
|
||||||
|
cmii.app: helm-nacos
|
||||||
|
cmii.type: middleware
|
||||||
|
ports:
|
||||||
|
- port: 8848
|
||||||
|
name: server
|
||||||
|
targetPort: 8848
|
||||||
|
nodePort: 33850
|
||||||
|
- port: 9848
|
||||||
|
name: server12
|
||||||
|
targetPort: 9848
|
||||||
|
- port: 9849
|
||||||
|
name: server23
|
||||||
|
targetPort: 9849
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: helm-nacos
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
cmii.app: helm-nacos
|
||||||
|
cmii.type: middleware
|
||||||
|
octopus.control: nacos-wdd
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
serviceName: helm-nacos
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
cmii.app: helm-nacos
|
||||||
|
cmii.type: middleware
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
cmii.app: helm-nacos
|
||||||
|
cmii.type: middleware
|
||||||
|
octopus.control: nacos-wdd
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
annotations:
|
||||||
|
pod.alpha.kubernetes.io/initialized: "true"
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: harborsecret
|
||||||
|
affinity: { }
|
||||||
|
containers:
|
||||||
|
- name: nacos-server
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/nacos-server:v2.1.2
|
||||||
|
ports:
|
||||||
|
- containerPort: 8848
|
||||||
|
name: dashboard
|
||||||
|
- containerPort: 9848
|
||||||
|
name: tcp-9848
|
||||||
|
- containerPort: 9849
|
||||||
|
name: tcp-9849
|
||||||
|
env:
|
||||||
|
- name: NACOS_AUTH_ENABLE
|
||||||
|
value: "false"
|
||||||
|
- name: NACOS_REPLICAS
|
||||||
|
value: "1"
|
||||||
|
- name: MYSQL_SERVICE_DB_NAME
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: helm-nacos-cm
|
||||||
|
key: mysql.db.name
|
||||||
|
- name: MYSQL_SERVICE_PORT
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: helm-nacos-cm
|
||||||
|
key: mysql.port
|
||||||
|
- name: MYSQL_SERVICE_USER
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: helm-nacos-cm
|
||||||
|
key: mysql.user
|
||||||
|
- name: MYSQL_SERVICE_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: helm-nacos-cm
|
||||||
|
key: mysql.password
|
||||||
|
- name: MYSQL_SERVICE_HOST
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: helm-nacos-cm
|
||||||
|
key: mysql.db.host
|
||||||
|
- name: NACOS_SERVER_PORT
|
||||||
|
value: "8848"
|
||||||
|
- name: NACOS_APPLICATION_PORT
|
||||||
|
value: "8848"
|
||||||
|
- name: PREFER_HOST_MODE
|
||||||
|
value: "hostname"
|
||||||
|
- name: MODE
|
||||||
|
value: standalone
|
||||||
|
- name: SPRING_DATASOURCE_PLATFORM
|
||||||
|
value: mysql
|
||||||
|
---
|
||||||
76
agent-deploy/uavcloud-devoperation/k8s-pvc.yaml
Normal file
76
agent-deploy/uavcloud-devoperation/k8s-pvc.yaml
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: nfs-backend-log-pvc
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware-base
|
||||||
|
cmii.app: nfs-backend-log-pvc
|
||||||
|
helm.sh/chart: all-persistence-volume-claims-1.1.0
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
storageClassName: nfs-prod-distribute
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
volumeMode: Filesystem
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 100Gi
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware-base
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
helm.sh/chart: all-persistence-volume-claims-1.1.0
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
storageClassName: nfs-prod-distribute
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
volumeMode: Filesystem
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 20Gi
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: helm-mongo
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware-base
|
||||||
|
cmii.app: helm-mongo
|
||||||
|
helm.sh/chart: all-persistence-volume-claims-1.1.0
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
storageClassName: nfs-prod-distribute
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
volumeMode: Filesystem
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 30Gi
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware-base
|
||||||
|
cmii.app: helm-rabbitmq
|
||||||
|
helm.sh/chart: all-persistence-volume-claims-1.1.0
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
storageClassName: nfs-prod-distribute
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
volumeMode: Filesystem
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 20Gi
|
||||||
328
agent-deploy/uavcloud-devoperation/k8s-rabbitmq.yaml
Normal file
328
agent-deploy/uavcloud-devoperation/k8s-rabbitmq.yaml
Normal file
@@ -0,0 +1,328 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
automountServiceAccountToken: true
|
||||||
|
secrets:
|
||||||
|
- name: helm-rabbitmq
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
rabbitmq-password: "N3YmNyN3MWVmKVQt"
|
||||||
|
rabbitmq-erlang-cookie: "emFBRmt1ZU1xMkJieXZvdHRYbWpoWk52UThuVXFzcTU="
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq-config
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
data:
|
||||||
|
rabbitmq.conf: |-
|
||||||
|
## Username and password
|
||||||
|
##
|
||||||
|
default_user = admin
|
||||||
|
default_pass = 7v&7#w1ef)T-
|
||||||
|
## Clustering
|
||||||
|
##
|
||||||
|
cluster_formation.peer_discovery_backend = rabbit_peer_discovery_k8s
|
||||||
|
cluster_formation.k8s.host = kubernetes.default.svc.cluster.local
|
||||||
|
cluster_formation.node_cleanup.interval = 10
|
||||||
|
cluster_formation.node_cleanup.only_log_warning = true
|
||||||
|
cluster_partition_handling = autoheal
|
||||||
|
# queue master locator
|
||||||
|
queue_master_locator = min-masters
|
||||||
|
# enable guest user
|
||||||
|
loopback_users.guest = false
|
||||||
|
#default_vhost = default-vhost
|
||||||
|
#disk_free_limit.absolute = 50MB
|
||||||
|
#load_definitions = /app/load_definition.json
|
||||||
|
---
|
||||||
|
kind: Role
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq-endpoint-reader
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
rules:
|
||||||
|
- apiGroups: [ "" ]
|
||||||
|
resources: [ "endpoints" ]
|
||||||
|
verbs: [ "get" ]
|
||||||
|
- apiGroups: [ "" ]
|
||||||
|
resources: [ "events" ]
|
||||||
|
verbs: [ "create" ]
|
||||||
|
---
|
||||||
|
kind: RoleBinding
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq-endpoint-reader
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: helm-rabbitmq
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: helm-rabbitmq-endpoint-reader
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq-headless
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
spec:
|
||||||
|
clusterIP: None
|
||||||
|
ports:
|
||||||
|
- name: epmd
|
||||||
|
port: 4369
|
||||||
|
targetPort: epmd
|
||||||
|
- name: amqp
|
||||||
|
port: 5672
|
||||||
|
targetPort: amqp
|
||||||
|
- name: dist
|
||||||
|
port: 25672
|
||||||
|
targetPort: dist
|
||||||
|
- name: dashboard
|
||||||
|
port: 15672
|
||||||
|
targetPort: stats
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
publishNotReadyAddresses: true
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
spec:
|
||||||
|
type: NodePort
|
||||||
|
ports:
|
||||||
|
- name: amqp
|
||||||
|
port: 5672
|
||||||
|
targetPort: amqp
|
||||||
|
nodePort: 35674
|
||||||
|
- name: dashboard
|
||||||
|
port: 15672
|
||||||
|
targetPort: dashboard
|
||||||
|
nodePort: 36677
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
spec:
|
||||||
|
serviceName: helm-rabbitmq-headless
|
||||||
|
podManagementPolicy: OrderedReady
|
||||||
|
replicas: 1
|
||||||
|
updateStrategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
annotations:
|
||||||
|
checksum/config: d6c2caa9572f64a06d9f7daa34c664a186b4778cd1697ef8e59663152fc628f1
|
||||||
|
checksum/secret: d764e7b3d999e7324d1afdfec6140092a612f04b6e0306818675815cec2f454f
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: harborsecret
|
||||||
|
serviceAccountName: helm-rabbitmq
|
||||||
|
affinity: { }
|
||||||
|
securityContext:
|
||||||
|
fsGroup: 5001
|
||||||
|
runAsUser: 5001
|
||||||
|
terminationGracePeriodSeconds: 120
|
||||||
|
initContainers:
|
||||||
|
- name: volume-permissions
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/bitnami-shell:11-debian-11-r136
|
||||||
|
imagePullPolicy: "Always"
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
args:
|
||||||
|
- -ec
|
||||||
|
- |
|
||||||
|
mkdir -p "/bitnami/rabbitmq/mnesia"
|
||||||
|
chown -R "5001:5001" "/bitnami/rabbitmq/mnesia"
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
resources:
|
||||||
|
limits: { }
|
||||||
|
requests: { }
|
||||||
|
volumeMounts:
|
||||||
|
- name: data
|
||||||
|
mountPath: /bitnami/rabbitmq/mnesia
|
||||||
|
containers:
|
||||||
|
- name: rabbitmq
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/rabbitmq:3.9.12-debian-10-r3
|
||||||
|
imagePullPolicy: "Always"
|
||||||
|
env:
|
||||||
|
- name: BITNAMI_DEBUG
|
||||||
|
value: "false"
|
||||||
|
- name: MY_POD_IP
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: status.podIP
|
||||||
|
- name: MY_POD_NAME
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.name
|
||||||
|
- name: MY_POD_NAMESPACE
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.namespace
|
||||||
|
- name: K8S_SERVICE_NAME
|
||||||
|
value: "helm-rabbitmq-headless"
|
||||||
|
- name: K8S_ADDRESS_TYPE
|
||||||
|
value: hostname
|
||||||
|
- name: RABBITMQ_FORCE_BOOT
|
||||||
|
value: "no"
|
||||||
|
- name: RABBITMQ_NODE_NAME
|
||||||
|
value: "rabbit@$(MY_POD_NAME).$(K8S_SERVICE_NAME).$(MY_POD_NAMESPACE).svc.cluster.local"
|
||||||
|
- name: K8S_HOSTNAME_SUFFIX
|
||||||
|
value: ".$(K8S_SERVICE_NAME).$(MY_POD_NAMESPACE).svc.cluster.local"
|
||||||
|
- name: RABBITMQ_MNESIA_DIR
|
||||||
|
value: "/bitnami/rabbitmq/mnesia/$(RABBITMQ_NODE_NAME)"
|
||||||
|
- name: RABBITMQ_LDAP_ENABLE
|
||||||
|
value: "no"
|
||||||
|
- name: RABBITMQ_LOGS
|
||||||
|
value: "-"
|
||||||
|
- name: RABBITMQ_ULIMIT_NOFILES
|
||||||
|
value: "65536"
|
||||||
|
- name: RABBITMQ_USE_LONGNAME
|
||||||
|
value: "true"
|
||||||
|
- name: RABBITMQ_ERL_COOKIE
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: helm-rabbitmq
|
||||||
|
key: rabbitmq-erlang-cookie
|
||||||
|
- name: RABBITMQ_LOAD_DEFINITIONS
|
||||||
|
value: "no"
|
||||||
|
- name: RABBITMQ_SECURE_PASSWORD
|
||||||
|
value: "yes"
|
||||||
|
- name: RABBITMQ_USERNAME
|
||||||
|
value: "admin"
|
||||||
|
- name: RABBITMQ_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: helm-rabbitmq
|
||||||
|
key: rabbitmq-password
|
||||||
|
- name: RABBITMQ_PLUGINS
|
||||||
|
value: "rabbitmq_management, rabbitmq_peer_discovery_k8s, rabbitmq_shovel, rabbitmq_shovel_management, rabbitmq_auth_backend_ldap"
|
||||||
|
ports:
|
||||||
|
- name: amqp
|
||||||
|
containerPort: 5672
|
||||||
|
- name: dist
|
||||||
|
containerPort: 25672
|
||||||
|
- name: dashboard
|
||||||
|
containerPort: 15672
|
||||||
|
- name: epmd
|
||||||
|
containerPort: 4369
|
||||||
|
livenessProbe:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- -ec
|
||||||
|
- rabbitmq-diagnostics -q ping
|
||||||
|
initialDelaySeconds: 120
|
||||||
|
periodSeconds: 30
|
||||||
|
timeoutSeconds: 20
|
||||||
|
successThreshold: 1
|
||||||
|
failureThreshold: 6
|
||||||
|
readinessProbe:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- -ec
|
||||||
|
- rabbitmq-diagnostics -q check_running && rabbitmq-diagnostics -q check_local_alarms
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 30
|
||||||
|
timeoutSeconds: 20
|
||||||
|
successThreshold: 1
|
||||||
|
failureThreshold: 3
|
||||||
|
lifecycle:
|
||||||
|
preStop:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- -ec
|
||||||
|
- |
|
||||||
|
if [[ -f /opt/bitnami/scripts/rabbitmq/nodeshutdown.sh ]]; then
|
||||||
|
/opt/bitnami/scripts/rabbitmq/nodeshutdown.sh -t "120" -d "false"
|
||||||
|
else
|
||||||
|
rabbitmqctl stop_app
|
||||||
|
fi
|
||||||
|
resources:
|
||||||
|
limits: { }
|
||||||
|
requests: { }
|
||||||
|
volumeMounts:
|
||||||
|
- name: configuration
|
||||||
|
mountPath: /bitnami/rabbitmq/conf
|
||||||
|
- name: data
|
||||||
|
mountPath: /bitnami/rabbitmq/mnesia
|
||||||
|
volumes:
|
||||||
|
- name: configuration
|
||||||
|
configMap:
|
||||||
|
name: helm-rabbitmq-config
|
||||||
|
items:
|
||||||
|
- key: rabbitmq.conf
|
||||||
|
path: rabbitmq.conf
|
||||||
|
- name: data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: helm-rabbitmq
|
||||||
585
agent-deploy/uavcloud-devoperation/k8s-redis.yaml
Normal file
585
agent-deploy/uavcloud-devoperation/k8s-redis.yaml
Normal file
@@ -0,0 +1,585 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
automountServiceAccountToken: true
|
||||||
|
metadata:
|
||||||
|
name: helm-redis
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: helm-redis
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
redis-password: "TWNhY2hlQDQ1MjI="
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-redis-configuration
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
data:
|
||||||
|
redis.conf: |-
|
||||||
|
# User-supplied common configuration:
|
||||||
|
# Enable AOF https://redis.io/topics/persistence#append-only-file
|
||||||
|
appendonly yes
|
||||||
|
# Disable RDB persistence, AOF persistence already enabled.
|
||||||
|
save ""
|
||||||
|
# End of common configuration
|
||||||
|
master.conf: |-
|
||||||
|
dir /data
|
||||||
|
# User-supplied master configuration:
|
||||||
|
rename-command FLUSHDB ""
|
||||||
|
rename-command FLUSHALL ""
|
||||||
|
# End of master configuration
|
||||||
|
replica.conf: |-
|
||||||
|
dir /data
|
||||||
|
slave-read-only yes
|
||||||
|
# User-supplied replica configuration:
|
||||||
|
rename-command FLUSHDB ""
|
||||||
|
rename-command FLUSHALL ""
|
||||||
|
# End of replica configuration
|
||||||
|
---
|
||||||
|
# Source: outside-deploy/charts/redis-db/templates/health-configmap.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-redis-health
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
data:
|
||||||
|
ping_readiness_local.sh: |-
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
[[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD="$(< "${REDIS_PASSWORD_FILE}")"
|
||||||
|
[[ -n "$REDIS_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_PASSWORD"
|
||||||
|
response=$(
|
||||||
|
timeout -s 3 $1 \
|
||||||
|
redis-cli \
|
||||||
|
-h localhost \
|
||||||
|
-p $REDIS_PORT \
|
||||||
|
ping
|
||||||
|
)
|
||||||
|
if [ "$response" != "PONG" ]; then
|
||||||
|
echo "$response"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
ping_liveness_local.sh: |-
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
[[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD="$(< "${REDIS_PASSWORD_FILE}")"
|
||||||
|
[[ -n "$REDIS_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_PASSWORD"
|
||||||
|
response=$(
|
||||||
|
timeout -s 3 $1 \
|
||||||
|
redis-cli \
|
||||||
|
-h localhost \
|
||||||
|
-p $REDIS_PORT \
|
||||||
|
ping
|
||||||
|
)
|
||||||
|
if [ "$response" != "PONG" ] && [ "$response" != "LOADING Redis is loading the dataset in memory" ]; then
|
||||||
|
echo "$response"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
ping_readiness_master.sh: |-
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
[[ -f $REDIS_MASTER_PASSWORD_FILE ]] && export REDIS_MASTER_PASSWORD="$(< "${REDIS_MASTER_PASSWORD_FILE}")"
|
||||||
|
[[ -n "$REDIS_MASTER_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_MASTER_PASSWORD"
|
||||||
|
response=$(
|
||||||
|
timeout -s 3 $1 \
|
||||||
|
redis-cli \
|
||||||
|
-h $REDIS_MASTER_HOST \
|
||||||
|
-p $REDIS_MASTER_PORT_NUMBER \
|
||||||
|
ping
|
||||||
|
)
|
||||||
|
if [ "$response" != "PONG" ]; then
|
||||||
|
echo "$response"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
ping_liveness_master.sh: |-
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
[[ -f $REDIS_MASTER_PASSWORD_FILE ]] && export REDIS_MASTER_PASSWORD="$(< "${REDIS_MASTER_PASSWORD_FILE}")"
|
||||||
|
[[ -n "$REDIS_MASTER_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_MASTER_PASSWORD"
|
||||||
|
response=$(
|
||||||
|
timeout -s 3 $1 \
|
||||||
|
redis-cli \
|
||||||
|
-h $REDIS_MASTER_HOST \
|
||||||
|
-p $REDIS_MASTER_PORT_NUMBER \
|
||||||
|
ping
|
||||||
|
)
|
||||||
|
if [ "$response" != "PONG" ] && [ "$response" != "LOADING Redis is loading the dataset in memory" ]; then
|
||||||
|
echo "$response"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
ping_readiness_local_and_master.sh: |-
|
||||||
|
script_dir="$(dirname "$0")"
|
||||||
|
exit_status=0
|
||||||
|
"$script_dir/ping_readiness_local.sh" $1 || exit_status=$?
|
||||||
|
"$script_dir/ping_readiness_master.sh" $1 || exit_status=$?
|
||||||
|
exit $exit_status
|
||||||
|
ping_liveness_local_and_master.sh: |-
|
||||||
|
script_dir="$(dirname "$0")"
|
||||||
|
exit_status=0
|
||||||
|
"$script_dir/ping_liveness_local.sh" $1 || exit_status=$?
|
||||||
|
"$script_dir/ping_liveness_master.sh" $1 || exit_status=$?
|
||||||
|
exit $exit_status
|
||||||
|
---
|
||||||
|
# Source: outside-deploy/charts/redis-db/templates/scripts-configmap.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-redis-scripts
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
data:
|
||||||
|
start-master.sh: |
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
[[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD="$(< "${REDIS_PASSWORD_FILE}")"
|
||||||
|
if [[ ! -f /opt/bitnami/redis/etc/master.conf ]];then
|
||||||
|
cp /opt/bitnami/redis/mounted-etc/master.conf /opt/bitnami/redis/etc/master.conf
|
||||||
|
fi
|
||||||
|
if [[ ! -f /opt/bitnami/redis/etc/redis.conf ]];then
|
||||||
|
cp /opt/bitnami/redis/mounted-etc/redis.conf /opt/bitnami/redis/etc/redis.conf
|
||||||
|
fi
|
||||||
|
ARGS=("--port" "${REDIS_PORT}")
|
||||||
|
ARGS+=("--requirepass" "${REDIS_PASSWORD}")
|
||||||
|
ARGS+=("--masterauth" "${REDIS_PASSWORD}")
|
||||||
|
ARGS+=("--include" "/opt/bitnami/redis/etc/redis.conf")
|
||||||
|
ARGS+=("--include" "/opt/bitnami/redis/etc/master.conf")
|
||||||
|
exec redis-server "${ARGS[@]}"
|
||||||
|
start-replica.sh: |
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
get_port() {
|
||||||
|
hostname="$1"
|
||||||
|
type="$2"
|
||||||
|
|
||||||
|
port_var=$(echo "${hostname^^}_SERVICE_PORT_$type" | sed "s/-/_/g")
|
||||||
|
port=${!port_var}
|
||||||
|
|
||||||
|
if [ -z "$port" ]; then
|
||||||
|
case $type in
|
||||||
|
"SENTINEL")
|
||||||
|
echo 26379
|
||||||
|
;;
|
||||||
|
"REDIS")
|
||||||
|
echo 6379
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
echo $port
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
get_full_hostname() {
|
||||||
|
hostname="$1"
|
||||||
|
echo "${hostname}.${HEADLESS_SERVICE}"
|
||||||
|
}
|
||||||
|
|
||||||
|
REDISPORT=$(get_port "$HOSTNAME" "REDIS")
|
||||||
|
|
||||||
|
[[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD="$(< "${REDIS_PASSWORD_FILE}")"
|
||||||
|
[[ -f $REDIS_MASTER_PASSWORD_FILE ]] && export REDIS_MASTER_PASSWORD="$(< "${REDIS_MASTER_PASSWORD_FILE}")"
|
||||||
|
if [[ ! -f /opt/bitnami/redis/etc/replica.conf ]];then
|
||||||
|
cp /opt/bitnami/redis/mounted-etc/replica.conf /opt/bitnami/redis/etc/replica.conf
|
||||||
|
fi
|
||||||
|
if [[ ! -f /opt/bitnami/redis/etc/redis.conf ]];then
|
||||||
|
cp /opt/bitnami/redis/mounted-etc/redis.conf /opt/bitnami/redis/etc/redis.conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "" >> /opt/bitnami/redis/etc/replica.conf
|
||||||
|
echo "replica-announce-port $REDISPORT" >> /opt/bitnami/redis/etc/replica.conf
|
||||||
|
echo "replica-announce-ip $(get_full_hostname "$HOSTNAME")" >> /opt/bitnami/redis/etc/replica.conf
|
||||||
|
ARGS=("--port" "${REDIS_PORT}")
|
||||||
|
ARGS+=("--slaveof" "${REDIS_MASTER_HOST}" "${REDIS_MASTER_PORT_NUMBER}")
|
||||||
|
ARGS+=("--requirepass" "${REDIS_PASSWORD}")
|
||||||
|
ARGS+=("--masterauth" "${REDIS_MASTER_PASSWORD}")
|
||||||
|
ARGS+=("--include" "/opt/bitnami/redis/etc/redis.conf")
|
||||||
|
ARGS+=("--include" "/opt/bitnami/redis/etc/replica.conf")
|
||||||
|
exec redis-server "${ARGS[@]}"
|
||||||
|
---
|
||||||
|
# Source: outside-deploy/charts/redis-db/templates/headless-svc.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-redis-headless
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
clusterIP: None
|
||||||
|
ports:
|
||||||
|
- name: tcp-redis
|
||||||
|
port: 6379
|
||||||
|
targetPort: redis
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
---
|
||||||
|
# Source: outside-deploy/charts/redis-db/templates/master/service.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-redis-master
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: redis
|
||||||
|
app.kubernetes.io/component: master
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
|
||||||
|
ports:
|
||||||
|
- name: tcp-redis
|
||||||
|
port: 6379
|
||||||
|
targetPort: redis
|
||||||
|
nodePort: null
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: redis
|
||||||
|
app.kubernetes.io/component: master
|
||||||
|
---
|
||||||
|
# Source: outside-deploy/charts/redis-db/templates/replicas/service.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-redis-replicas
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
app.kubernetes.io/component: replica
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- name: tcp-redis
|
||||||
|
port: 6379
|
||||||
|
targetPort: redis
|
||||||
|
nodePort: null
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/component: replica
|
||||||
|
---
|
||||||
|
# Source: outside-deploy/charts/redis-db/templates/master/statefulset.yaml
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: helm-redis-master
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: redis
|
||||||
|
app.kubernetes.io/component: master
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: redis
|
||||||
|
app.kubernetes.io/component: master
|
||||||
|
serviceName: helm-redis-headless
|
||||||
|
updateStrategy:
|
||||||
|
rollingUpdate: { }
|
||||||
|
type: RollingUpdate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: redis
|
||||||
|
app.kubernetes.io/component: master
|
||||||
|
annotations:
|
||||||
|
checksum/configmap: b64aa5db67e6e63811f3c1095b9fce34d83c86a471fccdda0e48eedb53a179b0
|
||||||
|
checksum/health: 6e0a6330e5ac63e565ae92af1444527d72d8897f91266f333555b3d323570623
|
||||||
|
checksum/scripts: b88df93710b7c42a76006e20218f05c6e500e6cc2affd4bb1985832f03166e98
|
||||||
|
checksum/secret: 43f1b0e20f9cb2de936bd182bc3683b720fc3cf4f4e76cb23c06a52398a50e8d
|
||||||
|
spec:
|
||||||
|
affinity: { }
|
||||||
|
securityContext:
|
||||||
|
fsGroup: 1001
|
||||||
|
serviceAccountName: helm-redis
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: harborsecret
|
||||||
|
terminationGracePeriodSeconds: 30
|
||||||
|
containers:
|
||||||
|
- name: redis
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/redis:6.2.6-debian-10-r0
|
||||||
|
imagePullPolicy: "Always"
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 1001
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
args:
|
||||||
|
- -c
|
||||||
|
- /opt/bitnami/scripts/start-scripts/start-master.sh
|
||||||
|
env:
|
||||||
|
- name: BITNAMI_DEBUG
|
||||||
|
value: "false"
|
||||||
|
- name: REDIS_REPLICATION_MODE
|
||||||
|
value: master
|
||||||
|
- name: ALLOW_EMPTY_PASSWORD
|
||||||
|
value: "no"
|
||||||
|
- name: REDIS_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: helm-redis
|
||||||
|
key: redis-password
|
||||||
|
- name: REDIS_TLS_ENABLED
|
||||||
|
value: "no"
|
||||||
|
- name: REDIS_PORT
|
||||||
|
value: "6379"
|
||||||
|
ports:
|
||||||
|
- name: redis
|
||||||
|
containerPort: 6379
|
||||||
|
livenessProbe:
|
||||||
|
initialDelaySeconds: 20
|
||||||
|
periodSeconds: 5
|
||||||
|
# One second longer than command timeout should prevent generation of zombie processes.
|
||||||
|
timeoutSeconds: 6
|
||||||
|
successThreshold: 1
|
||||||
|
failureThreshold: 5
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- /health/ping_liveness_local.sh 5
|
||||||
|
readinessProbe:
|
||||||
|
initialDelaySeconds: 20
|
||||||
|
periodSeconds: 5
|
||||||
|
timeoutSeconds: 2
|
||||||
|
successThreshold: 1
|
||||||
|
failureThreshold: 5
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- /health/ping_readiness_local.sh 1
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: "2"
|
||||||
|
memory: 8Gi
|
||||||
|
requests:
|
||||||
|
cpu: "100m"
|
||||||
|
memory: 1Gi
|
||||||
|
volumeMounts:
|
||||||
|
- name: start-scripts
|
||||||
|
mountPath: /opt/bitnami/scripts/start-scripts
|
||||||
|
- name: health
|
||||||
|
mountPath: /health
|
||||||
|
- name: redis-data
|
||||||
|
mountPath: /data
|
||||||
|
subPath:
|
||||||
|
- name: config
|
||||||
|
mountPath: /opt/bitnami/redis/mounted-etc
|
||||||
|
- name: redis-tmp-conf
|
||||||
|
mountPath: /opt/bitnami/redis/etc/
|
||||||
|
- name: tmp
|
||||||
|
mountPath: /tmp
|
||||||
|
volumes:
|
||||||
|
- name: start-scripts
|
||||||
|
configMap:
|
||||||
|
name: helm-redis-scripts
|
||||||
|
defaultMode: 0755
|
||||||
|
- name: health
|
||||||
|
configMap:
|
||||||
|
name: helm-redis-health
|
||||||
|
defaultMode: 0755
|
||||||
|
- name: config
|
||||||
|
configMap:
|
||||||
|
name: helm-redis-configuration
|
||||||
|
- name: redis-tmp-conf
|
||||||
|
emptyDir: { }
|
||||||
|
- name: tmp
|
||||||
|
emptyDir: { }
|
||||||
|
- name: redis-data
|
||||||
|
emptyDir: { }
|
||||||
|
---
|
||||||
|
# Source: outside-deploy/charts/redis-db/templates/replicas/statefulset.yaml
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: helm-redis-replicas
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
app.kubernetes.io/component: replica
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/component: replica
|
||||||
|
serviceName: helm-redis-headless
|
||||||
|
updateStrategy:
|
||||||
|
rollingUpdate: { }
|
||||||
|
type: RollingUpdate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
app.kubernetes.io/component: replica
|
||||||
|
annotations:
|
||||||
|
checksum/configmap: b64aa5db67e6e63811f3c1095b9fce34d83c86a471fccdda0e48eedb53a179b0
|
||||||
|
checksum/health: 6e0a6330e5ac63e565ae92af1444527d72d8897f91266f333555b3d323570623
|
||||||
|
checksum/scripts: b88df93710b7c42a76006e20218f05c6e500e6cc2affd4bb1985832f03166e98
|
||||||
|
checksum/secret: 43f1b0e20f9cb2de936bd182bc3683b720fc3cf4f4e76cb23c06a52398a50e8d
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: harborsecret
|
||||||
|
securityContext:
|
||||||
|
fsGroup: 1001
|
||||||
|
serviceAccountName: helm-redis
|
||||||
|
terminationGracePeriodSeconds: 30
|
||||||
|
containers:
|
||||||
|
- name: redis
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/redis:6.2.6-debian-10-r0
|
||||||
|
imagePullPolicy: "Always"
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 1001
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
args:
|
||||||
|
- -c
|
||||||
|
- /opt/bitnami/scripts/start-scripts/start-replica.sh
|
||||||
|
env:
|
||||||
|
- name: BITNAMI_DEBUG
|
||||||
|
value: "false"
|
||||||
|
- name: REDIS_REPLICATION_MODE
|
||||||
|
value: slave
|
||||||
|
- name: REDIS_MASTER_HOST
|
||||||
|
value: helm-redis-master-0.helm-redis-headless.uavcloud-devoperation.svc.cluster.local
|
||||||
|
- name: REDIS_MASTER_PORT_NUMBER
|
||||||
|
value: "6379"
|
||||||
|
- name: ALLOW_EMPTY_PASSWORD
|
||||||
|
value: "no"
|
||||||
|
- name: REDIS_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: helm-redis
|
||||||
|
key: redis-password
|
||||||
|
- name: REDIS_MASTER_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: helm-redis
|
||||||
|
key: redis-password
|
||||||
|
- name: REDIS_TLS_ENABLED
|
||||||
|
value: "no"
|
||||||
|
- name: REDIS_PORT
|
||||||
|
value: "6379"
|
||||||
|
ports:
|
||||||
|
- name: redis
|
||||||
|
containerPort: 6379
|
||||||
|
livenessProbe:
|
||||||
|
initialDelaySeconds: 20
|
||||||
|
periodSeconds: 5
|
||||||
|
timeoutSeconds: 6
|
||||||
|
successThreshold: 1
|
||||||
|
failureThreshold: 5
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- /health/ping_liveness_local_and_master.sh 5
|
||||||
|
readinessProbe:
|
||||||
|
initialDelaySeconds: 20
|
||||||
|
periodSeconds: 5
|
||||||
|
timeoutSeconds: 2
|
||||||
|
successThreshold: 1
|
||||||
|
failureThreshold: 5
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- /health/ping_readiness_local_and_master.sh 1
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: "2"
|
||||||
|
memory: 8Gi
|
||||||
|
requests:
|
||||||
|
cpu: "100m"
|
||||||
|
memory: 1Gi
|
||||||
|
volumeMounts:
|
||||||
|
- name: start-scripts
|
||||||
|
mountPath: /opt/bitnami/scripts/start-scripts
|
||||||
|
- name: health
|
||||||
|
mountPath: /health
|
||||||
|
- name: redis-data
|
||||||
|
mountPath: /data
|
||||||
|
subPath:
|
||||||
|
- name: config
|
||||||
|
mountPath: /opt/bitnami/redis/mounted-etc
|
||||||
|
- name: redis-tmp-conf
|
||||||
|
mountPath: /opt/bitnami/redis/etc
|
||||||
|
volumes:
|
||||||
|
- name: start-scripts
|
||||||
|
configMap:
|
||||||
|
name: helm-redis-scripts
|
||||||
|
defaultMode: 0755
|
||||||
|
- name: health
|
||||||
|
configMap:
|
||||||
|
name: helm-redis-health
|
||||||
|
defaultMode: 0755
|
||||||
|
- name: config
|
||||||
|
configMap:
|
||||||
|
name: helm-redis-configuration
|
||||||
|
- name: redis-tmp-conf
|
||||||
|
emptyDir: { }
|
||||||
|
- name: redis-data
|
||||||
|
emptyDir: { }
|
||||||
|
|
||||||
5282
agent-deploy/uavcloud-devoperation/old/k8s-backend.yaml
Normal file
5282
agent-deploy/uavcloud-devoperation/old/k8s-backend.yaml
Normal file
File diff suppressed because it is too large
Load Diff
378
agent-deploy/uavcloud-devoperation/old/k8s-configmap.yaml
Normal file
378
agent-deploy/uavcloud-devoperation/old/k8s-configmap.yaml
Normal file
@@ -0,0 +1,378 @@
|
|||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-base
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "base",
|
||||||
|
AppClientId: "APP_9LY41OaKSqk2btY0"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-jiangsuwenlv
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "jiangsuwenlv",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-ai-brain
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "ai-brain",
|
||||||
|
AppClientId: "APP_rafnuCAmBESIVYMH"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-armypeople
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "armypeople",
|
||||||
|
AppClientId: "APP_UIegse6Lfou9pO1U"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-cmsportal
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "cmsportal",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-threedsimulation
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "threedsimulation",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-emergency
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "emergency",
|
||||||
|
AppClientId: "APP_aGsTAY1uMZrpKdfk"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-mws
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "mws",
|
||||||
|
AppClientId: "APP_uKniXPELlRERBBwK"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-oms
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "oms",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-security
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "security",
|
||||||
|
AppClientId: "APP_JUSEMc7afyWXxvE7"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-qinghaitourism
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "qinghaitourism",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-hljtt
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "hljtt",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-detection
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "detection",
|
||||||
|
AppClientId: "APP_FDHW2VLVDWPnnOCy"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-media
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "media",
|
||||||
|
AppClientId: "APP_4AU8lbifESQO4FD6"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-multiterminal
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "multiterminal",
|
||||||
|
AppClientId: "APP_PvdfRRRBPL8xbIwl"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-supervision
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "supervision",
|
||||||
|
AppClientId: "APP_qqSu82THfexI8PLM"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-supervisionh5
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "supervisionh5",
|
||||||
|
AppClientId: "APP_qqSu82THfexI8PLM"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-pangu
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-securityh5
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "securityh5",
|
||||||
|
AppClientId: "APP_N3ImO0Ubfu9peRHD"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-share
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "share",
|
||||||
|
AppClientId: "APP_4lVSVI0ZGxTssir8"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-qingdao
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "qingdao",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-seniclive
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "seniclive",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-visualization
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "visualization",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-traffic
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "traffic",
|
||||||
|
AppClientId: "APP_Jc8i2wOQ1t73QEJS"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-logistics
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "logistics",
|
||||||
|
AppClientId: "APP_PvdfRRRBPL8xbIwl"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-open
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "open",
|
||||||
|
AppClientId: "empty"
|
||||||
|
}
|
||||||
|
---
|
||||||
|
kind: ConfigMap
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: tenant-prefix-splice
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
data:
|
||||||
|
ingress-config.js: |-
|
||||||
|
var __GlobalIngressConfig = {
|
||||||
|
TenantEnvironment: "devoperation",
|
||||||
|
CloudHOST: "lab.uavcmlc.com",
|
||||||
|
ApplicationShortName: "splice",
|
||||||
|
AppClientId: "APP_zE0M3sTRXrCIJS8Y"
|
||||||
|
}
|
||||||
265
agent-deploy/uavcloud-devoperation/old/k8s-emqx.yaml
Normal file
265
agent-deploy/uavcloud-devoperation/old/k8s-emqx.yaml
Normal file
@@ -0,0 +1,265 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs-env
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
helm.sh/chart: emqx-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
data:
|
||||||
|
EMQX_CLUSTER__K8S__APISERVER: "https://kubernetes.default.svc.cluster.local:443"
|
||||||
|
EMQX_NAME: "helm-emqxs"
|
||||||
|
EMQX_CLUSTER__DISCOVERY: "k8s"
|
||||||
|
EMQX_CLUSTER__K8S__APP_NAME: "helm-emqxs"
|
||||||
|
EMQX_CLUSTER__K8S__SERVICE_NAME: "helm-emqxs-headless"
|
||||||
|
EMQX_CLUSTER__K8S__ADDRESS_TYPE: "dns"
|
||||||
|
EMQX_CLUSTER__K8S__namespace: "uavcloud-devoperation"
|
||||||
|
EMQX_CLUSTER__K8S__SUFFIX: "svc.cluster.local"
|
||||||
|
EMQX_ALLOW_ANONYMOUS: "false"
|
||||||
|
EMQX_ACL_NOMATCH: "deny"
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs-cm
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
helm.sh/chart: emqx-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
data:
|
||||||
|
emqx_auth_username.conf: |-
|
||||||
|
auth.user.1.username = cmlc
|
||||||
|
auth.user.1.password = 4YPk*DS%+5
|
||||||
|
auth.user.password_hash = sha256
|
||||||
|
|
||||||
|
acl.conf: |-
|
||||||
|
{allow, {user, "admin"}, pubsub, ["admin/#"]}.
|
||||||
|
{allow, {user, "dashboard"}, subscribe, ["$SYS/#"]}.
|
||||||
|
{allow, {ipaddr, "127.0.0.1"}, pubsub, ["$SYS/#", "#"]}.
|
||||||
|
{deny, all, subscribe, ["$SYS/#", {eq, "#"}]}.
|
||||||
|
{allow, all}.
|
||||||
|
|
||||||
|
loaded_plugins: |-
|
||||||
|
{emqx_auth_username,true}.
|
||||||
|
{emqx_management, true}.
|
||||||
|
{emqx_recon, true}.
|
||||||
|
{emqx_retainer, false}.
|
||||||
|
{emqx_dashboard, true}.
|
||||||
|
{emqx_telemetry, true}.
|
||||||
|
{emqx_rule_engine, true}.
|
||||||
|
{emqx_bridge_mqtt, false}.
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
helm.sh/chart: emqx-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
serviceName: helm-emqxs-headless
|
||||||
|
updateStrategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
helm.sh/chart: emqx-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
affinity: { }
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: harborsecret
|
||||||
|
serviceAccountName: helm-emqxs
|
||||||
|
containers:
|
||||||
|
- name: helm-emqxs
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/emqx:5.5.1
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- name: mqtt
|
||||||
|
containerPort: 1883
|
||||||
|
- name: mqttssl
|
||||||
|
containerPort: 8883
|
||||||
|
- name: mgmt
|
||||||
|
containerPort: 8081
|
||||||
|
- name: ws
|
||||||
|
containerPort: 8083
|
||||||
|
- name: wss
|
||||||
|
containerPort: 8084
|
||||||
|
- name: dashboard
|
||||||
|
containerPort: 18083
|
||||||
|
- name: ekka
|
||||||
|
containerPort: 4370
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: helm-emqxs-env
|
||||||
|
resources: { }
|
||||||
|
volumeMounts:
|
||||||
|
- name: emqx-data
|
||||||
|
mountPath: "/opt/emqx/data/mnesia"
|
||||||
|
readOnly: false
|
||||||
|
- name: helm-emqxs-cm
|
||||||
|
mountPath: "/opt/emqx/etc/plugins/emqx_auth_username.conf"
|
||||||
|
subPath: emqx_auth_username.conf
|
||||||
|
readOnly: false
|
||||||
|
# - name: helm-emqxs-cm
|
||||||
|
# mountPath: "/opt/emqx/etc/acl.conf"
|
||||||
|
# subPath: "acl.conf"
|
||||||
|
# readOnly: false
|
||||||
|
- name: helm-emqxs-cm
|
||||||
|
mountPath: "/opt/emqx/data/loaded_plugins"
|
||||||
|
subPath: loaded_plugins
|
||||||
|
readOnly: false
|
||||||
|
volumes:
|
||||||
|
- name: emqx-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: helm-emqxs
|
||||||
|
- name: helm-emqxs-cm
|
||||||
|
configMap:
|
||||||
|
name: helm-emqxs-cm
|
||||||
|
items:
|
||||||
|
- key: emqx_auth_username.conf
|
||||||
|
path: emqx_auth_username.conf
|
||||||
|
- key: acl.conf
|
||||||
|
path: acl.conf
|
||||||
|
- key: loaded_plugins
|
||||||
|
path: loaded_plugins
|
||||||
|
---
|
||||||
|
kind: Role
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- endpoints
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- watch
|
||||||
|
- list
|
||||||
|
---
|
||||||
|
kind: RoleBinding
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: helm-emqxs
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
roleRef:
|
||||||
|
kind: Role
|
||||||
|
name: helm-emqxs
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
helm.sh/chart: emqx-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
type: NodePort
|
||||||
|
selector:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
ports:
|
||||||
|
- port: 1883
|
||||||
|
name: mqtt
|
||||||
|
targetPort: 1883
|
||||||
|
nodePort: 31885
|
||||||
|
- port: 18083
|
||||||
|
name: dashboard
|
||||||
|
targetPort: 18083
|
||||||
|
nodePort: 38087
|
||||||
|
- port: 8083
|
||||||
|
name: mqtt-websocket
|
||||||
|
targetPort: 8083
|
||||||
|
nodePort: 38085
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs-headless
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
helm.sh/chart: emqx-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
clusterIP: None
|
||||||
|
selector:
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
cmii.emqx.architecture: cluster
|
||||||
|
ports:
|
||||||
|
- name: mqtt
|
||||||
|
port: 1883
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 1883
|
||||||
|
- name: mqttssl
|
||||||
|
port: 8883
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 8883
|
||||||
|
- name: mgmt
|
||||||
|
port: 8081
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 8081
|
||||||
|
- name: websocket
|
||||||
|
port: 8083
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 8083
|
||||||
|
- name: wss
|
||||||
|
port: 8084
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 8084
|
||||||
|
- name: dashboard
|
||||||
|
port: 18083
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 18083
|
||||||
|
- name: ekka
|
||||||
|
port: 4370
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 4370
|
||||||
2354
agent-deploy/uavcloud-devoperation/old/k8s-frontend.yaml
Normal file
2354
agent-deploy/uavcloud-devoperation/old/k8s-frontend.yaml
Normal file
File diff suppressed because it is too large
Load Diff
541
agent-deploy/uavcloud-devoperation/old/k8s-ingress.yaml
Normal file
541
agent-deploy/uavcloud-devoperation/old/k8s-ingress.yaml
Normal file
@@ -0,0 +1,541 @@
|
|||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1beta1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: frontend-applications-ingress
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
type: frontend
|
||||||
|
octopus.control: all-ingress-config-wdd
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: "nginx"
|
||||||
|
nginx.ingress.kubernetes.io/enable-cors: "true"
|
||||||
|
nginx.ingress.kubernetes.io/rewrite-target: /$1
|
||||||
|
nginx.ingress.kubernetes.io/configuration-snippet: |
|
||||||
|
rewrite ^(/supervision)$ $1/ redirect;
|
||||||
|
rewrite ^(/supervisionh5)$ $1/ redirect;
|
||||||
|
rewrite ^(/pangu)$ $1/ redirect;
|
||||||
|
rewrite ^(/ai-brain)$ $1/ redirect;
|
||||||
|
rewrite ^(/armypeople)$ $1/ redirect;
|
||||||
|
rewrite ^(/base)$ $1/ redirect;
|
||||||
|
rewrite ^(/cmsportal)$ $1/ redirect;
|
||||||
|
rewrite ^(/detection)$ $1/ redirect;
|
||||||
|
rewrite ^(/emergency)$ $1/ redirect;
|
||||||
|
rewrite ^(/hljtt)$ $1/ redirect;
|
||||||
|
rewrite ^(/jiangsuwenlv)$ $1/ redirect;
|
||||||
|
rewrite ^(/logistics)$ $1/ redirect;
|
||||||
|
rewrite ^(/media)$ $1/ redirect;
|
||||||
|
rewrite ^(/multiterminal)$ $1/ redirect;
|
||||||
|
rewrite ^(/mws)$ $1/ redirect;
|
||||||
|
rewrite ^(/oms)$ $1/ redirect;
|
||||||
|
rewrite ^(/open)$ $1/ redirect;
|
||||||
|
rewrite ^(/qingdao)$ $1/ redirect;
|
||||||
|
rewrite ^(/qinghaitourism)$ $1/ redirect;
|
||||||
|
rewrite ^(/security)$ $1/ redirect;
|
||||||
|
rewrite ^(/securityh5)$ $1/ redirect;
|
||||||
|
rewrite ^(/seniclive)$ $1/ redirect;
|
||||||
|
rewrite ^(/share)$ $1/ redirect;
|
||||||
|
rewrite ^(/splice)$ $1/ redirect;
|
||||||
|
rewrite ^(/threedsimulation)$ $1/ redirect;
|
||||||
|
rewrite ^(/traffic)$ $1/ redirect;
|
||||||
|
rewrite ^(/visualization)$ $1/ redirect;
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: fake-domain.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /devoperation/supervision/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-suav-platform-supervision
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/supervisionh5/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-suav-platform-supervisionh5
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/pangu/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/ai-brain/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-ai-brain
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/armypeople/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-armypeople
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/base/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-base
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/cmsportal/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-cms-portal
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/detection/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-detection
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/emergency/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-emergency-rescue
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/hljtt/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-hljtt
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/jiangsuwenlv/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-jiangsuwenlv
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/logistics/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-logistics
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/media/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-media
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/multiterminal/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-multiterminal
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/mws/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-mws
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/oms/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-oms
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/open/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-open
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/qingdao/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-qingdao
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/qinghaitourism/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-qinghaitourism
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/security/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-security
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/securityh5/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-securityh5
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/seniclive/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-seniclive
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/share/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-share
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/splice/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-splice
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/threedsimulation/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-threedsimulation
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/traffic/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-traffic
|
||||||
|
servicePort: 9528
|
||||||
|
- path: /devoperation/visualization/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-platform-visualization
|
||||||
|
servicePort: 9528
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1beta1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: backend-applications-ingress
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
type: backend
|
||||||
|
octopus.control: all-ingress-config-wdd
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: "nginx"
|
||||||
|
nginx.ingress.kubernetes.io/enable-cors: "true"
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: cmii-admin-data.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-admin-data
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-admin-gateway.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-admin-gateway
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-admin-user.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-admin-user
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-app-release.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-app-release
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-open-gateway.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-open-gateway
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-suav-supervision.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-suav-supervision
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uas-gateway.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uas-gateway
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uas-lifecycle.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uas-lifecycle
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-airspace.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-airspace
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-alarm.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-alarm
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-autowaypoint.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-autowaypoint
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-brain.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-brain
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-bridge.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-bridge
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-cloud-live.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-cloud-live
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-clusters.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-clusters
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-cms.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-cms
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-data-post-process.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-data-post-process
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-depotautoreturn.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-depotautoreturn
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-developer.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-developer
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-device.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-device
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-emergency.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-emergency
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-gateway.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-gateway
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-industrial-portfolio.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-industrial-portfolio
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-integration.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-integration
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-kpi-monitor.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-kpi-monitor
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-logger.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-logger
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-material-warehouse.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-material-warehouse
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-mission.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-mission
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-mqtthandler.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-mqtthandler
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-multilink.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-multilink
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-notice.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-notice
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-oauth.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-oauth
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-process.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-process
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-surveillance.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-surveillance
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-threedsimulation.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-threedsimulation
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-tower.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-tower
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-user.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-user
|
||||||
|
servicePort: 8080
|
||||||
|
- host: cmii-uav-waypoint.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-waypoint
|
||||||
|
servicePort: 8080
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1beta1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: all-gateways-ingress
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
type: api-gateway
|
||||||
|
octopus.control: all-ingress-config-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: "nginx"
|
||||||
|
nginx.ingress.kubernetes.io/enable-cors: "true"
|
||||||
|
nginx.ingress.kubernetes.io/rewrite-target: /$1
|
||||||
|
nginx.ingress.kubernetes.io/configuration-snippet: |
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "Upgrade";
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: fake-domain.uavcloud-devoperation.io
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /devoperation/oms/api/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-admin-gateway
|
||||||
|
servicePort: 8080
|
||||||
|
- path: /devoperation/open/api/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-open-gateway
|
||||||
|
servicePort: 8080
|
||||||
|
- path: /devoperation/api/?(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
serviceName: cmii-uav-gateway
|
||||||
|
servicePort: 8080
|
||||||
77
agent-deploy/uavcloud-devoperation/old/k8s-mongo.yaml
Normal file
77
agent-deploy/uavcloud-devoperation/old/k8s-mongo.yaml
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-mongo
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
cmii.app: helm-mongo
|
||||||
|
cmii.type: middleware
|
||||||
|
helm.sh/chart: mongo-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
selector:
|
||||||
|
cmii.app: helm-mongo
|
||||||
|
cmii.type: middleware
|
||||||
|
ports:
|
||||||
|
- port: 27017
|
||||||
|
name: server-27017
|
||||||
|
targetPort: 27017
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: helm-mongo
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
cmii.app: helm-mongo
|
||||||
|
cmii.type: middleware
|
||||||
|
helm.sh/chart: mongo-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
serviceName: helm-mongo
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
cmii.app: helm-mongo
|
||||||
|
cmii.type: middleware
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
cmii.app: helm-mongo
|
||||||
|
cmii.type: middleware
|
||||||
|
helm.sh/chart: mongo-1.1.0
|
||||||
|
app.kubernetes.io/managed-by: octopus-control
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
annotations:
|
||||||
|
pod.alpha.kubernetes.io/initialized: "true"
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: harborsecret
|
||||||
|
affinity: { }
|
||||||
|
containers:
|
||||||
|
- name: helm-mongo
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/mongo:5.0
|
||||||
|
resources: { }
|
||||||
|
ports:
|
||||||
|
- containerPort: 27017
|
||||||
|
name: mongo27017
|
||||||
|
protocol: TCP
|
||||||
|
env:
|
||||||
|
- name: MONGO_INITDB_ROOT_USERNAME
|
||||||
|
value: cmlc
|
||||||
|
- name: MONGO_INITDB_ROOT_PASSWORD
|
||||||
|
value: 7(#dD3zcz8
|
||||||
|
volumeMounts:
|
||||||
|
- name: mongo-data
|
||||||
|
mountPath: /data/db
|
||||||
|
readOnly: false
|
||||||
|
subPath: default/helm-mongo/data/db
|
||||||
|
volumes:
|
||||||
|
- name: mongo-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: helm-mongo
|
||||||
|
---
|
||||||
423
agent-deploy/uavcloud-devoperation/old/k8s-mysql.yaml
Normal file
423
agent-deploy/uavcloud-devoperation/old/k8s-mysql.yaml
Normal file
@@ -0,0 +1,423 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: helm-mysql
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
annotations: { }
|
||||||
|
secrets:
|
||||||
|
- name: helm-mysql
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: helm-mysql
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
mysql-root-password: "R3d1YmM2Q3hSTQ=="
|
||||||
|
mysql-password: "S0F0cm5PckFKNw=="
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-mysql
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
data:
|
||||||
|
my.cnf: |-
|
||||||
|
|
||||||
|
[mysqld]
|
||||||
|
port=3306
|
||||||
|
basedir=/opt/bitnami/mysql
|
||||||
|
datadir=/bitnami/mysql/data
|
||||||
|
pid-file=/opt/bitnami/mysql/tmp/mysqld.pid
|
||||||
|
socket=/opt/bitnami/mysql/tmp/mysql.sock
|
||||||
|
log-error=/bitnami/mysql/data/error.log
|
||||||
|
general_log_file = /bitnami/mysql/data/general.log
|
||||||
|
slow_query_log_file = /bitnami/mysql/data/slow.log
|
||||||
|
innodb_data_file_path = ibdata1:512M:autoextend
|
||||||
|
innodb_buffer_pool_size = 512M
|
||||||
|
innodb_buffer_pool_instances = 2
|
||||||
|
innodb_log_file_size = 512M
|
||||||
|
innodb_log_files_in_group = 4
|
||||||
|
innodb_log_files_in_group = 4
|
||||||
|
log-bin = /bitnami/mysql/data/mysql-bin
|
||||||
|
max_binlog_size=1G
|
||||||
|
transaction_isolation = REPEATABLE-READ
|
||||||
|
default_storage_engine = innodb
|
||||||
|
character-set-server = utf8mb4
|
||||||
|
collation-server=utf8mb4_bin
|
||||||
|
binlog_format = ROW
|
||||||
|
binlog_rows_query_log_events=on
|
||||||
|
binlog_cache_size=4M
|
||||||
|
binlog_expire_logs_seconds = 1296000
|
||||||
|
max_binlog_cache_size=2G
|
||||||
|
gtid_mode = on
|
||||||
|
enforce_gtid_consistency = 1
|
||||||
|
sync_binlog = 1
|
||||||
|
innodb_flush_log_at_trx_commit = 1
|
||||||
|
innodb_flush_method = O_DIRECT
|
||||||
|
log_slave_updates=1
|
||||||
|
relay_log_recovery = 1
|
||||||
|
relay-log-purge = 1
|
||||||
|
default_time_zone = '+08:00'
|
||||||
|
lower_case_table_names=1
|
||||||
|
log_bin_trust_function_creators=1
|
||||||
|
group_concat_max_len=67108864
|
||||||
|
innodb_io_capacity = 4000
|
||||||
|
innodb_io_capacity_max = 8000
|
||||||
|
innodb_flush_sync = 0
|
||||||
|
innodb_flush_neighbors = 0
|
||||||
|
innodb_write_io_threads = 8
|
||||||
|
innodb_read_io_threads = 8
|
||||||
|
innodb_purge_threads = 4
|
||||||
|
innodb_page_cleaners = 4
|
||||||
|
innodb_open_files = 65535
|
||||||
|
innodb_max_dirty_pages_pct = 50
|
||||||
|
innodb_lru_scan_depth = 4000
|
||||||
|
innodb_checksum_algorithm = crc32
|
||||||
|
innodb_lock_wait_timeout = 10
|
||||||
|
innodb_rollback_on_timeout = 1
|
||||||
|
innodb_print_all_deadlocks = 1
|
||||||
|
innodb_file_per_table = 1
|
||||||
|
innodb_online_alter_log_max_size = 4G
|
||||||
|
innodb_stats_on_metadata = 0
|
||||||
|
innodb_thread_concurrency = 0
|
||||||
|
innodb_sync_spin_loops = 100
|
||||||
|
innodb_spin_wait_delay = 30
|
||||||
|
lock_wait_timeout = 3600
|
||||||
|
slow_query_log = 1
|
||||||
|
long_query_time = 10
|
||||||
|
log_queries_not_using_indexes =1
|
||||||
|
log_throttle_queries_not_using_indexes = 60
|
||||||
|
min_examined_row_limit = 100
|
||||||
|
log_slow_admin_statements = 1
|
||||||
|
log_slow_slave_statements = 1
|
||||||
|
default_authentication_plugin=mysql_native_password
|
||||||
|
skip-name-resolve=1
|
||||||
|
explicit_defaults_for_timestamp=1
|
||||||
|
plugin_dir=/opt/bitnami/mysql/plugin
|
||||||
|
max_allowed_packet=128M
|
||||||
|
max_connections = 2000
|
||||||
|
max_connect_errors = 1000000
|
||||||
|
table_definition_cache=2000
|
||||||
|
table_open_cache_instances=64
|
||||||
|
tablespace_definition_cache=1024
|
||||||
|
thread_cache_size=256
|
||||||
|
interactive_timeout = 600
|
||||||
|
wait_timeout = 600
|
||||||
|
tmpdir=/opt/bitnami/mysql/tmp
|
||||||
|
max_allowed_packet=32M
|
||||||
|
bind-address=0.0.0.0
|
||||||
|
performance_schema = 1
|
||||||
|
performance_schema_instrument = '%memory%=on'
|
||||||
|
performance_schema_instrument = '%lock%=on'
|
||||||
|
innodb_monitor_enable=ALL
|
||||||
|
|
||||||
|
[mysql]
|
||||||
|
no-auto-rehash
|
||||||
|
|
||||||
|
[mysqldump]
|
||||||
|
quick
|
||||||
|
max_allowed_packet = 32M
|
||||||
|
|
||||||
|
[client]
|
||||||
|
port=3306
|
||||||
|
socket=/opt/bitnami/mysql/tmp/mysql.sock
|
||||||
|
default-character-set=UTF8
|
||||||
|
plugin_dir=/opt/bitnami/mysql/plugin
|
||||||
|
|
||||||
|
[manager]
|
||||||
|
port=3306
|
||||||
|
socket=/opt/bitnami/mysql/tmp/mysql.sock
|
||||||
|
pid-file=/opt/bitnami/mysql/tmp/mysqld.pid
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-mysql-init-scripts
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
data:
|
||||||
|
create_users_grants_core.sql: |-
|
||||||
|
create
|
||||||
|
user zyly@'%' identified by 'Cmii@451315';
|
||||||
|
grant select on *.* to zyly@'%';
|
||||||
|
create
|
||||||
|
user zyly_qc@'%' identified by 'Uh)E_owCyb16';
|
||||||
|
grant all
|
||||||
|
on *.* to zyly_qc@'%';
|
||||||
|
create
|
||||||
|
user k8s_admin@'%' identified by 'VFJncwy58^Zm';
|
||||||
|
grant all
|
||||||
|
on *.* to k8s_admin@'%';
|
||||||
|
create
|
||||||
|
user audit_dba@'%' identified by 'PjCzqiBmJaTpgkoYXynH';
|
||||||
|
grant all
|
||||||
|
on *.* to audit_dba@'%';
|
||||||
|
create
|
||||||
|
user db_backup@'%' identified by 'RU5Pu(4FGdT9';
|
||||||
|
GRANT
|
||||||
|
SELECT, RELOAD, PROCESS, LOCK TABLES, REPLICATION CLIENT, EVENT
|
||||||
|
on *.* to db_backup@'%';
|
||||||
|
create
|
||||||
|
user monitor@'%' identified by 'PL3#nGtrWbf-';
|
||||||
|
grant REPLICATION
|
||||||
|
CLIENT on *.* to monitor@'%';
|
||||||
|
flush
|
||||||
|
privileges;
|
||||||
|
---
|
||||||
|
kind: Service
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: cmii-mysql
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
cmii.app: mysql
|
||||||
|
cmii.type: middleware
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: mysql
|
||||||
|
protocol: TCP
|
||||||
|
port: 13306
|
||||||
|
targetPort: mysql
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
cmii.app: mysql
|
||||||
|
cmii.type: middleware
|
||||||
|
type: ClusterIP
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-mysql-headless
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: mysql
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
annotations: { }
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
clusterIP: None
|
||||||
|
publishNotReadyAddresses: true
|
||||||
|
ports:
|
||||||
|
- name: mysql
|
||||||
|
port: 3306
|
||||||
|
targetPort: mysql
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: mysql
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-mysql
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: mysql
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
annotations: { }
|
||||||
|
spec:
|
||||||
|
type: NodePort
|
||||||
|
ports:
|
||||||
|
- name: mysql
|
||||||
|
port: 3306
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: mysql
|
||||||
|
nodePort: 33308
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: mysql
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: helm-mysql
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: mysql
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: mysql
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
serviceName: helm-mysql
|
||||||
|
updateStrategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
checksum/configuration: 6b60fa0f3a846a6ada8effdc4f823cf8003d42a8c8f630fe8b1b66d3454082dd
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: mysql-db
|
||||||
|
octopus.control: mysql-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: mysql
|
||||||
|
app.kubernetes.io/component: primary
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: harborsecret
|
||||||
|
serviceAccountName: helm-mysql
|
||||||
|
affinity: { }
|
||||||
|
nodeSelector:
|
||||||
|
mysql-deploy: "true"
|
||||||
|
securityContext:
|
||||||
|
fsGroup: 1001
|
||||||
|
initContainers:
|
||||||
|
- name: change-volume-permissions
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/bitnami-shell:11-debian-11-r136
|
||||||
|
imagePullPolicy: "Always"
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- -ec
|
||||||
|
- |
|
||||||
|
chown -R 1001:1001 /bitnami/mysql
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
volumeMounts:
|
||||||
|
- name: mysql-data
|
||||||
|
mountPath: /bitnami/mysql
|
||||||
|
containers:
|
||||||
|
- name: mysql
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/mysql:8.1.0-debian-11-r42
|
||||||
|
imagePullPolicy: "IfNotPresent"
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 1001
|
||||||
|
env:
|
||||||
|
- name: BITNAMI_DEBUG
|
||||||
|
value: "true"
|
||||||
|
- name: MYSQL_ROOT_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: helm-mysql
|
||||||
|
key: mysql-root-password
|
||||||
|
- name: MYSQL_DATABASE
|
||||||
|
value: "cmii"
|
||||||
|
ports:
|
||||||
|
- name: mysql
|
||||||
|
containerPort: 3306
|
||||||
|
livenessProbe:
|
||||||
|
failureThreshold: 5
|
||||||
|
initialDelaySeconds: 120
|
||||||
|
periodSeconds: 10
|
||||||
|
successThreshold: 1
|
||||||
|
timeoutSeconds: 3
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- -ec
|
||||||
|
- |
|
||||||
|
password_aux="${MYSQL_ROOT_PASSWORD:-}"
|
||||||
|
if [[ -f "${MYSQL_ROOT_PASSWORD_FILE:-}" ]]; then
|
||||||
|
password_aux=$(cat "$MYSQL_ROOT_PASSWORD_FILE")
|
||||||
|
fi
|
||||||
|
mysqladmin status -uroot -p"${password_aux}"
|
||||||
|
readinessProbe:
|
||||||
|
failureThreshold: 5
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
periodSeconds: 10
|
||||||
|
successThreshold: 1
|
||||||
|
timeoutSeconds: 3
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- -ec
|
||||||
|
- |
|
||||||
|
password_aux="${MYSQL_ROOT_PASSWORD:-}"
|
||||||
|
if [[ -f "${MYSQL_ROOT_PASSWORD_FILE:-}" ]]; then
|
||||||
|
password_aux=$(cat "$MYSQL_ROOT_PASSWORD_FILE")
|
||||||
|
fi
|
||||||
|
mysqladmin status -uroot -p"${password_aux}"
|
||||||
|
startupProbe:
|
||||||
|
failureThreshold: 60
|
||||||
|
initialDelaySeconds: 120
|
||||||
|
periodSeconds: 10
|
||||||
|
successThreshold: 1
|
||||||
|
timeoutSeconds: 1
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- -ec
|
||||||
|
- |
|
||||||
|
password_aux="${MYSQL_ROOT_PASSWORD:-}"
|
||||||
|
if [[ -f "${MYSQL_ROOT_PASSWORD_FILE:-}" ]]; then
|
||||||
|
password_aux=$(cat "$MYSQL_ROOT_PASSWORD_FILE")
|
||||||
|
fi
|
||||||
|
mysqladmin status -uroot -p"${password_aux}"
|
||||||
|
resources:
|
||||||
|
limits: { }
|
||||||
|
requests: { }
|
||||||
|
volumeMounts:
|
||||||
|
- name: mysql-data
|
||||||
|
mountPath: /bitnami/mysql
|
||||||
|
- name: custom-init-scripts
|
||||||
|
mountPath: /docker-entrypoint-initdb.d
|
||||||
|
- name: config
|
||||||
|
mountPath: /opt/bitnami/mysql/conf/my.cnf
|
||||||
|
subPath: my.cnf
|
||||||
|
volumes:
|
||||||
|
- name: config
|
||||||
|
configMap:
|
||||||
|
name: helm-mysql
|
||||||
|
- name: custom-init-scripts
|
||||||
|
configMap:
|
||||||
|
name: helm-mysql-init-scripts
|
||||||
|
- name: mysql-data
|
||||||
|
hostPath:
|
||||||
|
path: /var/lib/docker/mysql-pv/uavcloud-devoperation/
|
||||||
130
agent-deploy/uavcloud-devoperation/old/k8s-nacos.yaml
Normal file
130
agent-deploy/uavcloud-devoperation/old/k8s-nacos.yaml
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-nacos-cm
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
cmii.app: helm-nacos
|
||||||
|
cmii.type: middleware
|
||||||
|
octopus.control: nacos-wdd
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
data:
|
||||||
|
mysql.db.name: "cmii_nacos_config"
|
||||||
|
mysql.db.host: "helm-mysql"
|
||||||
|
mysql.port: "3306"
|
||||||
|
mysql.user: "k8s_admin"
|
||||||
|
mysql.password: "VFJncwy58^Zm"
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-nacos
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
cmii.app: helm-nacos
|
||||||
|
cmii.type: middleware
|
||||||
|
octopus.control: nacos-wdd
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
type: NodePort
|
||||||
|
selector:
|
||||||
|
cmii.app: helm-nacos
|
||||||
|
cmii.type: middleware
|
||||||
|
ports:
|
||||||
|
- port: 8848
|
||||||
|
name: server
|
||||||
|
targetPort: 8848
|
||||||
|
nodePort: 33850
|
||||||
|
- port: 9848
|
||||||
|
name: server12
|
||||||
|
targetPort: 9848
|
||||||
|
- port: 9849
|
||||||
|
name: server23
|
||||||
|
targetPort: 9849
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: helm-nacos
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
cmii.app: helm-nacos
|
||||||
|
cmii.type: middleware
|
||||||
|
octopus.control: nacos-wdd
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
serviceName: helm-nacos
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
cmii.app: helm-nacos
|
||||||
|
cmii.type: middleware
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
cmii.app: helm-nacos
|
||||||
|
cmii.type: middleware
|
||||||
|
octopus.control: nacos-wdd
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
annotations:
|
||||||
|
pod.alpha.kubernetes.io/initialized: "true"
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: harborsecret
|
||||||
|
affinity: { }
|
||||||
|
containers:
|
||||||
|
- name: nacos-server
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/nacos-server:v2.1.2
|
||||||
|
ports:
|
||||||
|
- containerPort: 8848
|
||||||
|
name: dashboard
|
||||||
|
- containerPort: 9848
|
||||||
|
name: tcp-9848
|
||||||
|
- containerPort: 9849
|
||||||
|
name: tcp-9849
|
||||||
|
env:
|
||||||
|
- name: NACOS_AUTH_ENABLE
|
||||||
|
value: "false"
|
||||||
|
- name: NACOS_REPLICAS
|
||||||
|
value: "1"
|
||||||
|
- name: MYSQL_SERVICE_DB_NAME
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: helm-nacos-cm
|
||||||
|
key: mysql.db.name
|
||||||
|
- name: MYSQL_SERVICE_PORT
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: helm-nacos-cm
|
||||||
|
key: mysql.port
|
||||||
|
- name: MYSQL_SERVICE_USER
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: helm-nacos-cm
|
||||||
|
key: mysql.user
|
||||||
|
- name: MYSQL_SERVICE_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: helm-nacos-cm
|
||||||
|
key: mysql.password
|
||||||
|
- name: MYSQL_SERVICE_HOST
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: helm-nacos-cm
|
||||||
|
key: mysql.db.host
|
||||||
|
- name: NACOS_SERVER_PORT
|
||||||
|
value: "8848"
|
||||||
|
- name: NACOS_APPLICATION_PORT
|
||||||
|
value: "8848"
|
||||||
|
- name: PREFER_HOST_MODE
|
||||||
|
value: "hostname"
|
||||||
|
- name: MODE
|
||||||
|
value: standalone
|
||||||
|
- name: SPRING_DATASOURCE_PLATFORM
|
||||||
|
value: mysql
|
||||||
|
---
|
||||||
76
agent-deploy/uavcloud-devoperation/old/k8s-pvc.yaml
Normal file
76
agent-deploy/uavcloud-devoperation/old/k8s-pvc.yaml
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: nfs-backend-log-pvc
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware-base
|
||||||
|
cmii.app: nfs-backend-log-pvc
|
||||||
|
helm.sh/chart: all-persistence-volume-claims-1.1.0
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
storageClassName: nfs-prod-distribute
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
volumeMode: Filesystem
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 100Gi
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: helm-emqxs
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware-base
|
||||||
|
cmii.app: helm-emqxs
|
||||||
|
helm.sh/chart: all-persistence-volume-claims-1.1.0
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
storageClassName: nfs-prod-distribute
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
volumeMode: Filesystem
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 20Gi
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: helm-mongo
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware-base
|
||||||
|
cmii.app: helm-mongo
|
||||||
|
helm.sh/chart: all-persistence-volume-claims-1.1.0
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
storageClassName: nfs-prod-distribute
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
volumeMode: Filesystem
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 30Gi
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
cmii.type: middleware-base
|
||||||
|
cmii.app: helm-rabbitmq
|
||||||
|
helm.sh/chart: all-persistence-volume-claims-1.1.0
|
||||||
|
app.kubernetes.io/version: 5.6.0
|
||||||
|
spec:
|
||||||
|
storageClassName: nfs-prod-distribute
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
volumeMode: Filesystem
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 20Gi
|
||||||
328
agent-deploy/uavcloud-devoperation/old/k8s-rabbitmq.yaml
Normal file
328
agent-deploy/uavcloud-devoperation/old/k8s-rabbitmq.yaml
Normal file
@@ -0,0 +1,328 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
automountServiceAccountToken: true
|
||||||
|
secrets:
|
||||||
|
- name: helm-rabbitmq
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
rabbitmq-password: "N3YmNyN3MWVmKVQt"
|
||||||
|
rabbitmq-erlang-cookie: "emFBRmt1ZU1xMkJieXZvdHRYbWpoWk52UThuVXFzcTU="
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq-config
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
data:
|
||||||
|
rabbitmq.conf: |-
|
||||||
|
## Username and password
|
||||||
|
##
|
||||||
|
default_user = admin
|
||||||
|
default_pass = 7v&7#w1ef)T-
|
||||||
|
## Clustering
|
||||||
|
##
|
||||||
|
cluster_formation.peer_discovery_backend = rabbit_peer_discovery_k8s
|
||||||
|
cluster_formation.k8s.host = kubernetes.default.svc.cluster.local
|
||||||
|
cluster_formation.node_cleanup.interval = 10
|
||||||
|
cluster_formation.node_cleanup.only_log_warning = true
|
||||||
|
cluster_partition_handling = autoheal
|
||||||
|
# queue master locator
|
||||||
|
queue_master_locator = min-masters
|
||||||
|
# enable guest user
|
||||||
|
loopback_users.guest = false
|
||||||
|
#default_vhost = default-vhost
|
||||||
|
#disk_free_limit.absolute = 50MB
|
||||||
|
#load_definitions = /app/load_definition.json
|
||||||
|
---
|
||||||
|
kind: Role
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq-endpoint-reader
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
rules:
|
||||||
|
- apiGroups: [ "" ]
|
||||||
|
resources: [ "endpoints" ]
|
||||||
|
verbs: [ "get" ]
|
||||||
|
- apiGroups: [ "" ]
|
||||||
|
resources: [ "events" ]
|
||||||
|
verbs: [ "create" ]
|
||||||
|
---
|
||||||
|
kind: RoleBinding
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq-endpoint-reader
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: helm-rabbitmq
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: helm-rabbitmq-endpoint-reader
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq-headless
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
spec:
|
||||||
|
clusterIP: None
|
||||||
|
ports:
|
||||||
|
- name: epmd
|
||||||
|
port: 4369
|
||||||
|
targetPort: epmd
|
||||||
|
- name: amqp
|
||||||
|
port: 5672
|
||||||
|
targetPort: amqp
|
||||||
|
- name: dist
|
||||||
|
port: 25672
|
||||||
|
targetPort: dist
|
||||||
|
- name: dashboard
|
||||||
|
port: 15672
|
||||||
|
targetPort: stats
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
publishNotReadyAddresses: true
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
spec:
|
||||||
|
type: NodePort
|
||||||
|
ports:
|
||||||
|
- name: amqp
|
||||||
|
port: 5672
|
||||||
|
targetPort: amqp
|
||||||
|
nodePort: 35674
|
||||||
|
- name: dashboard
|
||||||
|
port: 15672
|
||||||
|
targetPort: dashboard
|
||||||
|
nodePort: 36677
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: helm-rabbitmq
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
spec:
|
||||||
|
serviceName: helm-rabbitmq-headless
|
||||||
|
podManagementPolicy: OrderedReady
|
||||||
|
replicas: 1
|
||||||
|
updateStrategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: helm-rabbitmq
|
||||||
|
helm.sh/chart: rabbitmq-8.26.1
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: rabbitmq
|
||||||
|
annotations:
|
||||||
|
checksum/config: d6c2caa9572f64a06d9f7daa34c664a186b4778cd1697ef8e59663152fc628f1
|
||||||
|
checksum/secret: d764e7b3d999e7324d1afdfec6140092a612f04b6e0306818675815cec2f454f
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: harborsecret
|
||||||
|
serviceAccountName: helm-rabbitmq
|
||||||
|
affinity: { }
|
||||||
|
securityContext:
|
||||||
|
fsGroup: 5001
|
||||||
|
runAsUser: 5001
|
||||||
|
terminationGracePeriodSeconds: 120
|
||||||
|
initContainers:
|
||||||
|
- name: volume-permissions
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/bitnami-shell:11-debian-11-r136
|
||||||
|
imagePullPolicy: "Always"
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
args:
|
||||||
|
- -ec
|
||||||
|
- |
|
||||||
|
mkdir -p "/bitnami/rabbitmq/mnesia"
|
||||||
|
chown -R "5001:5001" "/bitnami/rabbitmq/mnesia"
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
resources:
|
||||||
|
limits: { }
|
||||||
|
requests: { }
|
||||||
|
volumeMounts:
|
||||||
|
- name: data
|
||||||
|
mountPath: /bitnami/rabbitmq/mnesia
|
||||||
|
containers:
|
||||||
|
- name: rabbitmq
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/rabbitmq:3.9.12-debian-10-r3
|
||||||
|
imagePullPolicy: "Always"
|
||||||
|
env:
|
||||||
|
- name: BITNAMI_DEBUG
|
||||||
|
value: "false"
|
||||||
|
- name: MY_POD_IP
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: status.podIP
|
||||||
|
- name: MY_POD_NAME
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.name
|
||||||
|
- name: MY_POD_NAMESPACE
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.namespace
|
||||||
|
- name: K8S_SERVICE_NAME
|
||||||
|
value: "helm-rabbitmq-headless"
|
||||||
|
- name: K8S_ADDRESS_TYPE
|
||||||
|
value: hostname
|
||||||
|
- name: RABBITMQ_FORCE_BOOT
|
||||||
|
value: "no"
|
||||||
|
- name: RABBITMQ_NODE_NAME
|
||||||
|
value: "rabbit@$(MY_POD_NAME).$(K8S_SERVICE_NAME).$(MY_POD_NAMESPACE).svc.cluster.local"
|
||||||
|
- name: K8S_HOSTNAME_SUFFIX
|
||||||
|
value: ".$(K8S_SERVICE_NAME).$(MY_POD_NAMESPACE).svc.cluster.local"
|
||||||
|
- name: RABBITMQ_MNESIA_DIR
|
||||||
|
value: "/bitnami/rabbitmq/mnesia/$(RABBITMQ_NODE_NAME)"
|
||||||
|
- name: RABBITMQ_LDAP_ENABLE
|
||||||
|
value: "no"
|
||||||
|
- name: RABBITMQ_LOGS
|
||||||
|
value: "-"
|
||||||
|
- name: RABBITMQ_ULIMIT_NOFILES
|
||||||
|
value: "65536"
|
||||||
|
- name: RABBITMQ_USE_LONGNAME
|
||||||
|
value: "true"
|
||||||
|
- name: RABBITMQ_ERL_COOKIE
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: helm-rabbitmq
|
||||||
|
key: rabbitmq-erlang-cookie
|
||||||
|
- name: RABBITMQ_LOAD_DEFINITIONS
|
||||||
|
value: "no"
|
||||||
|
- name: RABBITMQ_SECURE_PASSWORD
|
||||||
|
value: "yes"
|
||||||
|
- name: RABBITMQ_USERNAME
|
||||||
|
value: "admin"
|
||||||
|
- name: RABBITMQ_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: helm-rabbitmq
|
||||||
|
key: rabbitmq-password
|
||||||
|
- name: RABBITMQ_PLUGINS
|
||||||
|
value: "rabbitmq_management, rabbitmq_peer_discovery_k8s, rabbitmq_shovel, rabbitmq_shovel_management, rabbitmq_auth_backend_ldap"
|
||||||
|
ports:
|
||||||
|
- name: amqp
|
||||||
|
containerPort: 5672
|
||||||
|
- name: dist
|
||||||
|
containerPort: 25672
|
||||||
|
- name: dashboard
|
||||||
|
containerPort: 15672
|
||||||
|
- name: epmd
|
||||||
|
containerPort: 4369
|
||||||
|
livenessProbe:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- -ec
|
||||||
|
- rabbitmq-diagnostics -q ping
|
||||||
|
initialDelaySeconds: 120
|
||||||
|
periodSeconds: 30
|
||||||
|
timeoutSeconds: 20
|
||||||
|
successThreshold: 1
|
||||||
|
failureThreshold: 6
|
||||||
|
readinessProbe:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- -ec
|
||||||
|
- rabbitmq-diagnostics -q check_running && rabbitmq-diagnostics -q check_local_alarms
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 30
|
||||||
|
timeoutSeconds: 20
|
||||||
|
successThreshold: 1
|
||||||
|
failureThreshold: 3
|
||||||
|
lifecycle:
|
||||||
|
preStop:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- -ec
|
||||||
|
- |
|
||||||
|
if [[ -f /opt/bitnami/scripts/rabbitmq/nodeshutdown.sh ]]; then
|
||||||
|
/opt/bitnami/scripts/rabbitmq/nodeshutdown.sh -t "120" -d "false"
|
||||||
|
else
|
||||||
|
rabbitmqctl stop_app
|
||||||
|
fi
|
||||||
|
resources:
|
||||||
|
limits: { }
|
||||||
|
requests: { }
|
||||||
|
volumeMounts:
|
||||||
|
- name: configuration
|
||||||
|
mountPath: /bitnami/rabbitmq/conf
|
||||||
|
- name: data
|
||||||
|
mountPath: /bitnami/rabbitmq/mnesia
|
||||||
|
volumes:
|
||||||
|
- name: configuration
|
||||||
|
configMap:
|
||||||
|
name: helm-rabbitmq-config
|
||||||
|
items:
|
||||||
|
- key: rabbitmq.conf
|
||||||
|
path: rabbitmq.conf
|
||||||
|
- name: data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: helm-rabbitmq
|
||||||
585
agent-deploy/uavcloud-devoperation/old/k8s-redis.yaml
Normal file
585
agent-deploy/uavcloud-devoperation/old/k8s-redis.yaml
Normal file
@@ -0,0 +1,585 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
automountServiceAccountToken: true
|
||||||
|
metadata:
|
||||||
|
name: helm-redis
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: helm-redis
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
redis-password: "TWNhY2hlQDQ1MjI="
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-redis-configuration
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
data:
|
||||||
|
redis.conf: |-
|
||||||
|
# User-supplied common configuration:
|
||||||
|
# Enable AOF https://redis.io/topics/persistence#append-only-file
|
||||||
|
appendonly yes
|
||||||
|
# Disable RDB persistence, AOF persistence already enabled.
|
||||||
|
save ""
|
||||||
|
# End of common configuration
|
||||||
|
master.conf: |-
|
||||||
|
dir /data
|
||||||
|
# User-supplied master configuration:
|
||||||
|
rename-command FLUSHDB ""
|
||||||
|
rename-command FLUSHALL ""
|
||||||
|
# End of master configuration
|
||||||
|
replica.conf: |-
|
||||||
|
dir /data
|
||||||
|
slave-read-only yes
|
||||||
|
# User-supplied replica configuration:
|
||||||
|
rename-command FLUSHDB ""
|
||||||
|
rename-command FLUSHALL ""
|
||||||
|
# End of replica configuration
|
||||||
|
---
|
||||||
|
# Source: outside-deploy/charts/redis-db/templates/health-configmap.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-redis-health
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
data:
|
||||||
|
ping_readiness_local.sh: |-
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
[[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD="$(< "${REDIS_PASSWORD_FILE}")"
|
||||||
|
[[ -n "$REDIS_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_PASSWORD"
|
||||||
|
response=$(
|
||||||
|
timeout -s 3 $1 \
|
||||||
|
redis-cli \
|
||||||
|
-h localhost \
|
||||||
|
-p $REDIS_PORT \
|
||||||
|
ping
|
||||||
|
)
|
||||||
|
if [ "$response" != "PONG" ]; then
|
||||||
|
echo "$response"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
ping_liveness_local.sh: |-
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
[[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD="$(< "${REDIS_PASSWORD_FILE}")"
|
||||||
|
[[ -n "$REDIS_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_PASSWORD"
|
||||||
|
response=$(
|
||||||
|
timeout -s 3 $1 \
|
||||||
|
redis-cli \
|
||||||
|
-h localhost \
|
||||||
|
-p $REDIS_PORT \
|
||||||
|
ping
|
||||||
|
)
|
||||||
|
if [ "$response" != "PONG" ] && [ "$response" != "LOADING Redis is loading the dataset in memory" ]; then
|
||||||
|
echo "$response"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
ping_readiness_master.sh: |-
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
[[ -f $REDIS_MASTER_PASSWORD_FILE ]] && export REDIS_MASTER_PASSWORD="$(< "${REDIS_MASTER_PASSWORD_FILE}")"
|
||||||
|
[[ -n "$REDIS_MASTER_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_MASTER_PASSWORD"
|
||||||
|
response=$(
|
||||||
|
timeout -s 3 $1 \
|
||||||
|
redis-cli \
|
||||||
|
-h $REDIS_MASTER_HOST \
|
||||||
|
-p $REDIS_MASTER_PORT_NUMBER \
|
||||||
|
ping
|
||||||
|
)
|
||||||
|
if [ "$response" != "PONG" ]; then
|
||||||
|
echo "$response"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
ping_liveness_master.sh: |-
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
[[ -f $REDIS_MASTER_PASSWORD_FILE ]] && export REDIS_MASTER_PASSWORD="$(< "${REDIS_MASTER_PASSWORD_FILE}")"
|
||||||
|
[[ -n "$REDIS_MASTER_PASSWORD" ]] && export REDISCLI_AUTH="$REDIS_MASTER_PASSWORD"
|
||||||
|
response=$(
|
||||||
|
timeout -s 3 $1 \
|
||||||
|
redis-cli \
|
||||||
|
-h $REDIS_MASTER_HOST \
|
||||||
|
-p $REDIS_MASTER_PORT_NUMBER \
|
||||||
|
ping
|
||||||
|
)
|
||||||
|
if [ "$response" != "PONG" ] && [ "$response" != "LOADING Redis is loading the dataset in memory" ]; then
|
||||||
|
echo "$response"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
ping_readiness_local_and_master.sh: |-
|
||||||
|
script_dir="$(dirname "$0")"
|
||||||
|
exit_status=0
|
||||||
|
"$script_dir/ping_readiness_local.sh" $1 || exit_status=$?
|
||||||
|
"$script_dir/ping_readiness_master.sh" $1 || exit_status=$?
|
||||||
|
exit $exit_status
|
||||||
|
ping_liveness_local_and_master.sh: |-
|
||||||
|
script_dir="$(dirname "$0")"
|
||||||
|
exit_status=0
|
||||||
|
"$script_dir/ping_liveness_local.sh" $1 || exit_status=$?
|
||||||
|
"$script_dir/ping_liveness_master.sh" $1 || exit_status=$?
|
||||||
|
exit $exit_status
|
||||||
|
---
|
||||||
|
# Source: outside-deploy/charts/redis-db/templates/scripts-configmap.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: helm-redis-scripts
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
data:
|
||||||
|
start-master.sh: |
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
[[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD="$(< "${REDIS_PASSWORD_FILE}")"
|
||||||
|
if [[ ! -f /opt/bitnami/redis/etc/master.conf ]];then
|
||||||
|
cp /opt/bitnami/redis/mounted-etc/master.conf /opt/bitnami/redis/etc/master.conf
|
||||||
|
fi
|
||||||
|
if [[ ! -f /opt/bitnami/redis/etc/redis.conf ]];then
|
||||||
|
cp /opt/bitnami/redis/mounted-etc/redis.conf /opt/bitnami/redis/etc/redis.conf
|
||||||
|
fi
|
||||||
|
ARGS=("--port" "${REDIS_PORT}")
|
||||||
|
ARGS+=("--requirepass" "${REDIS_PASSWORD}")
|
||||||
|
ARGS+=("--masterauth" "${REDIS_PASSWORD}")
|
||||||
|
ARGS+=("--include" "/opt/bitnami/redis/etc/redis.conf")
|
||||||
|
ARGS+=("--include" "/opt/bitnami/redis/etc/master.conf")
|
||||||
|
exec redis-server "${ARGS[@]}"
|
||||||
|
start-replica.sh: |
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
get_port() {
|
||||||
|
hostname="$1"
|
||||||
|
type="$2"
|
||||||
|
|
||||||
|
port_var=$(echo "${hostname^^}_SERVICE_PORT_$type" | sed "s/-/_/g")
|
||||||
|
port=${!port_var}
|
||||||
|
|
||||||
|
if [ -z "$port" ]; then
|
||||||
|
case $type in
|
||||||
|
"SENTINEL")
|
||||||
|
echo 26379
|
||||||
|
;;
|
||||||
|
"REDIS")
|
||||||
|
echo 6379
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
echo $port
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
get_full_hostname() {
|
||||||
|
hostname="$1"
|
||||||
|
echo "${hostname}.${HEADLESS_SERVICE}"
|
||||||
|
}
|
||||||
|
|
||||||
|
REDISPORT=$(get_port "$HOSTNAME" "REDIS")
|
||||||
|
|
||||||
|
[[ -f $REDIS_PASSWORD_FILE ]] && export REDIS_PASSWORD="$(< "${REDIS_PASSWORD_FILE}")"
|
||||||
|
[[ -f $REDIS_MASTER_PASSWORD_FILE ]] && export REDIS_MASTER_PASSWORD="$(< "${REDIS_MASTER_PASSWORD_FILE}")"
|
||||||
|
if [[ ! -f /opt/bitnami/redis/etc/replica.conf ]];then
|
||||||
|
cp /opt/bitnami/redis/mounted-etc/replica.conf /opt/bitnami/redis/etc/replica.conf
|
||||||
|
fi
|
||||||
|
if [[ ! -f /opt/bitnami/redis/etc/redis.conf ]];then
|
||||||
|
cp /opt/bitnami/redis/mounted-etc/redis.conf /opt/bitnami/redis/etc/redis.conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "" >> /opt/bitnami/redis/etc/replica.conf
|
||||||
|
echo "replica-announce-port $REDISPORT" >> /opt/bitnami/redis/etc/replica.conf
|
||||||
|
echo "replica-announce-ip $(get_full_hostname "$HOSTNAME")" >> /opt/bitnami/redis/etc/replica.conf
|
||||||
|
ARGS=("--port" "${REDIS_PORT}")
|
||||||
|
ARGS+=("--slaveof" "${REDIS_MASTER_HOST}" "${REDIS_MASTER_PORT_NUMBER}")
|
||||||
|
ARGS+=("--requirepass" "${REDIS_PASSWORD}")
|
||||||
|
ARGS+=("--masterauth" "${REDIS_MASTER_PASSWORD}")
|
||||||
|
ARGS+=("--include" "/opt/bitnami/redis/etc/redis.conf")
|
||||||
|
ARGS+=("--include" "/opt/bitnami/redis/etc/replica.conf")
|
||||||
|
exec redis-server "${ARGS[@]}"
|
||||||
|
---
|
||||||
|
# Source: outside-deploy/charts/redis-db/templates/headless-svc.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-redis-headless
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
clusterIP: None
|
||||||
|
ports:
|
||||||
|
- name: tcp-redis
|
||||||
|
port: 6379
|
||||||
|
targetPort: redis
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
---
|
||||||
|
# Source: outside-deploy/charts/redis-db/templates/master/service.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-redis-master
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: redis
|
||||||
|
app.kubernetes.io/component: master
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
|
||||||
|
ports:
|
||||||
|
- name: tcp-redis
|
||||||
|
port: 6379
|
||||||
|
targetPort: redis
|
||||||
|
nodePort: null
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: redis
|
||||||
|
app.kubernetes.io/component: master
|
||||||
|
---
|
||||||
|
# Source: outside-deploy/charts/redis-db/templates/replicas/service.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: helm-redis-replicas
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
app.kubernetes.io/component: replica
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- name: tcp-redis
|
||||||
|
port: 6379
|
||||||
|
targetPort: redis
|
||||||
|
nodePort: null
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/component: replica
|
||||||
|
---
|
||||||
|
# Source: outside-deploy/charts/redis-db/templates/master/statefulset.yaml
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: helm-redis-master
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: redis
|
||||||
|
app.kubernetes.io/component: master
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: redis
|
||||||
|
app.kubernetes.io/component: master
|
||||||
|
serviceName: helm-redis-headless
|
||||||
|
updateStrategy:
|
||||||
|
rollingUpdate: { }
|
||||||
|
type: RollingUpdate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
cmii.type: middleware
|
||||||
|
cmii.app: redis
|
||||||
|
app.kubernetes.io/component: master
|
||||||
|
annotations:
|
||||||
|
checksum/configmap: b64aa5db67e6e63811f3c1095b9fce34d83c86a471fccdda0e48eedb53a179b0
|
||||||
|
checksum/health: 6e0a6330e5ac63e565ae92af1444527d72d8897f91266f333555b3d323570623
|
||||||
|
checksum/scripts: b88df93710b7c42a76006e20218f05c6e500e6cc2affd4bb1985832f03166e98
|
||||||
|
checksum/secret: 43f1b0e20f9cb2de936bd182bc3683b720fc3cf4f4e76cb23c06a52398a50e8d
|
||||||
|
spec:
|
||||||
|
affinity: { }
|
||||||
|
securityContext:
|
||||||
|
fsGroup: 1001
|
||||||
|
serviceAccountName: helm-redis
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: harborsecret
|
||||||
|
terminationGracePeriodSeconds: 30
|
||||||
|
containers:
|
||||||
|
- name: redis
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/redis:6.2.6-debian-10-r0
|
||||||
|
imagePullPolicy: "Always"
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 1001
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
args:
|
||||||
|
- -c
|
||||||
|
- /opt/bitnami/scripts/start-scripts/start-master.sh
|
||||||
|
env:
|
||||||
|
- name: BITNAMI_DEBUG
|
||||||
|
value: "false"
|
||||||
|
- name: REDIS_REPLICATION_MODE
|
||||||
|
value: master
|
||||||
|
- name: ALLOW_EMPTY_PASSWORD
|
||||||
|
value: "no"
|
||||||
|
- name: REDIS_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: helm-redis
|
||||||
|
key: redis-password
|
||||||
|
- name: REDIS_TLS_ENABLED
|
||||||
|
value: "no"
|
||||||
|
- name: REDIS_PORT
|
||||||
|
value: "6379"
|
||||||
|
ports:
|
||||||
|
- name: redis
|
||||||
|
containerPort: 6379
|
||||||
|
livenessProbe:
|
||||||
|
initialDelaySeconds: 20
|
||||||
|
periodSeconds: 5
|
||||||
|
# One second longer than command timeout should prevent generation of zombie processes.
|
||||||
|
timeoutSeconds: 6
|
||||||
|
successThreshold: 1
|
||||||
|
failureThreshold: 5
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- /health/ping_liveness_local.sh 5
|
||||||
|
readinessProbe:
|
||||||
|
initialDelaySeconds: 20
|
||||||
|
periodSeconds: 5
|
||||||
|
timeoutSeconds: 2
|
||||||
|
successThreshold: 1
|
||||||
|
failureThreshold: 5
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- /health/ping_readiness_local.sh 1
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: "2"
|
||||||
|
memory: 8Gi
|
||||||
|
requests:
|
||||||
|
cpu: "100m"
|
||||||
|
memory: 1Gi
|
||||||
|
volumeMounts:
|
||||||
|
- name: start-scripts
|
||||||
|
mountPath: /opt/bitnami/scripts/start-scripts
|
||||||
|
- name: health
|
||||||
|
mountPath: /health
|
||||||
|
- name: redis-data
|
||||||
|
mountPath: /data
|
||||||
|
subPath:
|
||||||
|
- name: config
|
||||||
|
mountPath: /opt/bitnami/redis/mounted-etc
|
||||||
|
- name: redis-tmp-conf
|
||||||
|
mountPath: /opt/bitnami/redis/etc/
|
||||||
|
- name: tmp
|
||||||
|
mountPath: /tmp
|
||||||
|
volumes:
|
||||||
|
- name: start-scripts
|
||||||
|
configMap:
|
||||||
|
name: helm-redis-scripts
|
||||||
|
defaultMode: 0755
|
||||||
|
- name: health
|
||||||
|
configMap:
|
||||||
|
name: helm-redis-health
|
||||||
|
defaultMode: 0755
|
||||||
|
- name: config
|
||||||
|
configMap:
|
||||||
|
name: helm-redis-configuration
|
||||||
|
- name: redis-tmp-conf
|
||||||
|
emptyDir: { }
|
||||||
|
- name: tmp
|
||||||
|
emptyDir: { }
|
||||||
|
- name: redis-data
|
||||||
|
emptyDir: { }
|
||||||
|
---
|
||||||
|
# Source: outside-deploy/charts/redis-db/templates/replicas/statefulset.yaml
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: helm-redis-replicas
|
||||||
|
namespace: uavcloud-devoperation
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
app.kubernetes.io/component: replica
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/component: replica
|
||||||
|
serviceName: helm-redis-headless
|
||||||
|
updateStrategy:
|
||||||
|
rollingUpdate: { }
|
||||||
|
type: RollingUpdate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: redis-db
|
||||||
|
octopus.control: redis-db-wdd
|
||||||
|
app.kubernetes.io/release: uavcloud-devoperation
|
||||||
|
app.kubernetes.io/managed-by: octopus
|
||||||
|
app.kubernetes.io/component: replica
|
||||||
|
annotations:
|
||||||
|
checksum/configmap: b64aa5db67e6e63811f3c1095b9fce34d83c86a471fccdda0e48eedb53a179b0
|
||||||
|
checksum/health: 6e0a6330e5ac63e565ae92af1444527d72d8897f91266f333555b3d323570623
|
||||||
|
checksum/scripts: b88df93710b7c42a76006e20218f05c6e500e6cc2affd4bb1985832f03166e98
|
||||||
|
checksum/secret: 43f1b0e20f9cb2de936bd182bc3683b720fc3cf4f4e76cb23c06a52398a50e8d
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: harborsecret
|
||||||
|
securityContext:
|
||||||
|
fsGroup: 1001
|
||||||
|
serviceAccountName: helm-redis
|
||||||
|
terminationGracePeriodSeconds: 30
|
||||||
|
containers:
|
||||||
|
- name: redis
|
||||||
|
image: harbor.cdcyy.com.cn/cmii/redis:6.2.6-debian-10-r0
|
||||||
|
imagePullPolicy: "Always"
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 1001
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
args:
|
||||||
|
- -c
|
||||||
|
- /opt/bitnami/scripts/start-scripts/start-replica.sh
|
||||||
|
env:
|
||||||
|
- name: BITNAMI_DEBUG
|
||||||
|
value: "false"
|
||||||
|
- name: REDIS_REPLICATION_MODE
|
||||||
|
value: slave
|
||||||
|
- name: REDIS_MASTER_HOST
|
||||||
|
value: helm-redis-master-0.helm-redis-headless.uavcloud-devoperation.svc.cluster.local
|
||||||
|
- name: REDIS_MASTER_PORT_NUMBER
|
||||||
|
value: "6379"
|
||||||
|
- name: ALLOW_EMPTY_PASSWORD
|
||||||
|
value: "no"
|
||||||
|
- name: REDIS_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: helm-redis
|
||||||
|
key: redis-password
|
||||||
|
- name: REDIS_MASTER_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: helm-redis
|
||||||
|
key: redis-password
|
||||||
|
- name: REDIS_TLS_ENABLED
|
||||||
|
value: "no"
|
||||||
|
- name: REDIS_PORT
|
||||||
|
value: "6379"
|
||||||
|
ports:
|
||||||
|
- name: redis
|
||||||
|
containerPort: 6379
|
||||||
|
livenessProbe:
|
||||||
|
initialDelaySeconds: 20
|
||||||
|
periodSeconds: 5
|
||||||
|
timeoutSeconds: 6
|
||||||
|
successThreshold: 1
|
||||||
|
failureThreshold: 5
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- /health/ping_liveness_local_and_master.sh 5
|
||||||
|
readinessProbe:
|
||||||
|
initialDelaySeconds: 20
|
||||||
|
periodSeconds: 5
|
||||||
|
timeoutSeconds: 2
|
||||||
|
successThreshold: 1
|
||||||
|
failureThreshold: 5
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- /health/ping_readiness_local_and_master.sh 1
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: "2"
|
||||||
|
memory: 8Gi
|
||||||
|
requests:
|
||||||
|
cpu: "100m"
|
||||||
|
memory: 1Gi
|
||||||
|
volumeMounts:
|
||||||
|
- name: start-scripts
|
||||||
|
mountPath: /opt/bitnami/scripts/start-scripts
|
||||||
|
- name: health
|
||||||
|
mountPath: /health
|
||||||
|
- name: redis-data
|
||||||
|
mountPath: /data
|
||||||
|
subPath:
|
||||||
|
- name: config
|
||||||
|
mountPath: /opt/bitnami/redis/mounted-etc
|
||||||
|
- name: redis-tmp-conf
|
||||||
|
mountPath: /opt/bitnami/redis/etc
|
||||||
|
volumes:
|
||||||
|
- name: start-scripts
|
||||||
|
configMap:
|
||||||
|
name: helm-redis-scripts
|
||||||
|
defaultMode: 0755
|
||||||
|
- name: health
|
||||||
|
configMap:
|
||||||
|
name: helm-redis-health
|
||||||
|
defaultMode: 0755
|
||||||
|
- name: config
|
||||||
|
configMap:
|
||||||
|
name: helm-redis-configuration
|
||||||
|
- name: redis-tmp-conf
|
||||||
|
emptyDir: { }
|
||||||
|
- name: redis-data
|
||||||
|
emptyDir: { }
|
||||||
|
|
||||||
@@ -15,10 +15,7 @@ import (
|
|||||||
func CmiiEnvDeploy(shouldDoCompleteDeploy bool) {
|
func CmiiEnvDeploy(shouldDoCompleteDeploy bool) {
|
||||||
|
|
||||||
// 部署的环境
|
// 部署的环境
|
||||||
cmiiNamespace := dev
|
cmiiNamespace := devOperation
|
||||||
|
|
||||||
// 完整部署
|
|
||||||
//shouldDoCompleteDeploy := false
|
|
||||||
|
|
||||||
// 输出特定版本的Tag 或者 从DEMO环境拉取
|
// 输出特定版本的Tag 或者 从DEMO环境拉取
|
||||||
DeploySpecificTag := "5.6.0"
|
DeploySpecificTag := "5.6.0"
|
||||||
@@ -71,7 +68,7 @@ func CmiiEnvDeploy(shouldDoCompleteDeploy bool) {
|
|||||||
//clearOldApplyStuff(common, shouldDoCompleteDeploy)
|
//clearOldApplyStuff(common, shouldDoCompleteDeploy)
|
||||||
|
|
||||||
// apply new app
|
// apply new app
|
||||||
//applyNewAppStuff(common, shouldDoCompleteDeploy)
|
applyNewAppStuff(common, shouldDoCompleteDeploy)
|
||||||
|
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
fmt.Println("-------------------- all done ---------------------")
|
fmt.Println("-------------------- all done ---------------------")
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ func TestBackupAllDeploymentFromEnv(t *testing.T) {
|
|||||||
|
|
||||||
func TestBackUpAllCmiiAppImageNameFromEnv(t *testing.T) {
|
func TestBackUpAllCmiiAppImageNameFromEnv(t *testing.T) {
|
||||||
|
|
||||||
BackUpAllCmiiAppImageNameFromEnv(integration)
|
BackUpAllCmiiAppImageNameFromEnv(demo)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -253,7 +253,7 @@ func TestUpdateCmiiDeploymentImageTag(t *testing.T) {
|
|||||||
// 计算20:00的时间
|
// 计算20:00的时间
|
||||||
now := time.Now()
|
now := time.Now()
|
||||||
|
|
||||||
targetTime := time.Date(now.Year(), now.Month(), now.Day(), 9, 13, 00, 0, now.Location())
|
targetTime := time.Date(now.Year(), now.Month(), now.Day(), 10, 45, 00, 0, now.Location())
|
||||||
|
|
||||||
duration := time.Duration(0)
|
duration := time.Duration(0)
|
||||||
|
|
||||||
@@ -278,7 +278,7 @@ func TestUpdateCmiiDeploymentImageTag(t *testing.T) {
|
|||||||
//"cmii-uav-multilink": "5.5.0",
|
//"cmii-uav-multilink": "5.5.0",
|
||||||
//"cmii-uav-process": "5.6.0-060601",
|
//"cmii-uav-process": "5.6.0-060601",
|
||||||
//"cmii-uav-industrial-portfolio": "5.6.0-061303",
|
//"cmii-uav-industrial-portfolio": "5.6.0-061303",
|
||||||
"cmii-uav-industrial-portfolio": "5.6.0-061801",
|
"cmii-uav-industrial-portfolio": "5.6.0-061901",
|
||||||
//"cmii-uas-lifecycle": "5.6.0",
|
//"cmii-uas-lifecycle": "5.6.0",
|
||||||
//"cmii-uas-lifecycle": "5.6.0-061401",
|
//"cmii-uas-lifecycle": "5.6.0-061401",
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -229,7 +229,7 @@ func TestCmiiK8sOperator_PodByNodeName(t *testing.T) {
|
|||||||
|
|
||||||
func TestCmiiK8sOperator_NodeCordon(t *testing.T) {
|
func TestCmiiK8sOperator_NodeCordon(t *testing.T) {
|
||||||
cmiiEnv := devOperation
|
cmiiEnv := devOperation
|
||||||
nodeName := "dev-06.ecs.io"
|
nodeName := "dev-master-01"
|
||||||
|
|
||||||
cordon := DefaultCmiiOperator.NodeCordon(cmiiEnv, nodeName)
|
cordon := DefaultCmiiOperator.NodeCordon(cmiiEnv, nodeName)
|
||||||
assert.Equal(t, cordon, true, "cordon node failed !")
|
assert.Equal(t, cordon, true, "cordon node failed !")
|
||||||
|
|||||||
@@ -63,3 +63,4 @@
|
|||||||
2024-06-14-17-47-17 uavcloud-demo cmii-uav-industrial-portfolio 5.6.0-061303 5.6.0-061401
|
2024-06-14-17-47-17 uavcloud-demo cmii-uav-industrial-portfolio 5.6.0-061303 5.6.0-061401
|
||||||
2024-06-14-17-49-53 uavcloud-demo cmii-uas-lifecycle 5.6.0 5.6.0-061401
|
2024-06-14-17-49-53 uavcloud-demo cmii-uas-lifecycle 5.6.0 5.6.0-061401
|
||||||
2024-06-18-09-13-18 uavcloud-demo cmii-uav-industrial-portfolio 5.6.0-061602 5.6.0-061801
|
2024-06-18-09-13-18 uavcloud-demo cmii-uav-industrial-portfolio 5.6.0-061602 5.6.0-061801
|
||||||
|
2024-06-19-10-45-45 uavcloud-demo cmii-uav-industrial-portfolio 5.6.0-061801 5.6.0-061901
|
||||||
|
|||||||
Reference in New Issue
Block a user