Shell apiVersion: apps/v1 kind: Deployment metadata: labels: app: flink-dinky name: dinky namespace: dinky spec: selector: matchLabels: app: flink-dinky template: metadata: labels: app: flink-dinky spec: imagePullSecrets: - name: bigdata # 引用您创建的 ImagePullSecret containers: - image: 172.xx.xx.xx/bigdata/dinky-server_flink18@sha256:0d9d6018fad7574951c257e74fac212945e79f4a089d657bd8f90e9d049e07db # 包含您的 Harbor 仓库地址 imagePullPolicy: IfNotPresent name: dinky volumeMounts: - mountPath: /opt/dinky/config/application.yml name: admin-config subPath: application.yml - mountPath: /opt/dinky/config/application-mysql.yml name: mysql-config subPath: application-mysql.yml volumes: # 注意这里volumes已经移动到了Pod模板的spec下 - name: admin-config configMap: name: dinky-config - name: mysql-config configMap: name: mysql-config ---
apiVersion: v1 kind: ConfigMap metadata: name: dinky-config namespace: dinky data: #配置项均为【conf】目录下的application.yaml文件内容,如果有更新,把下面整段替换即可 application.yml: |- # Dinky application port server: port: 8888 shutdown: graceful spring: # Dinky application name application: name: Dinky profiles: # The h2 database is used by default. If you need to use other databases, please set the configuration active to: mysql, currently supports [mysql, pgsql, h2] # If you use mysql database, please configure mysql database connection information in application-mysql.yml # If you use pgsql database, please configure pgsql database connection information in application-pgsql.yml # If you use the h2 database, please configure the h2 database connection information in application-h2.yml, # note: the h2 database is only for experience use, and the related data that has been created cannot be migrated, please use it with caution active: ${DB_ACTIVE:mysql} #[h2,mysql,pgsql] include: jmx lifecycle: timeout-per-shutdown-phase: 30s # mvc config mvc: pathmatch: # Path matching strategy, default ant_path_matcher, support ant_path_matcher and path_pattern_parser matching-strategy: ant_path_matcher format: date: yyyy-MM-dd HH:mm:ss # date format time: HH:mm:ss # time format date-time: yyyy-MM-dd HH:mm:ss # date-time format # json format global configuration jackson: time-zone: GMT+8 # Time zone, default is GMT+8 date-format: yyyy-MM-dd HH:mm:ss # Date format, the default is yyyy-MM-dd HH:mm:ss # circular references allowed main: allow-circular-references: true # 默认使用内存缓存元数据信息, # dinky支持redis缓存,如有需要请把simple改为redis,并打开下面的redis连接配置 # 子配置项可以按需要打开或自定义配置 cache: type: simple # # 如果type配置为redis,则该项可按需配置 # redis: ## 是否缓存空值,保存默认即可 # cache-null-values: false ## 缓存过期时间,24小时 # time-to-live: 86400 # redis: # host: 172.xx.xx.xx # port: 6379 # password: xxxxx # database: 10 # jedis: # pool: # # 连接池最大连接数(使用负值表示没有限制) # max-active: 50 # # 连接池最大阻塞等待时间(使用负值表示没有限制) # max-wait: 3000 # # 连接池中的最大空闲连接数 # max-idle: 20 # # 连接池中的最小空闲连接数 # min-idle: 5 # # 连接超时时间(毫秒) # timeout: 5000 # file upload config of servlet , the default is 500MB servlet: multipart: enabled: true max-file-size: 524288000 max-request-size: 524288000 ########################################################## Redis配置 ########################################################## # If sa-token needs to rely on redis, please open the redis configuration and depend on pom.xml and dinky-admin/pom.xml, and configure redis connection information in application.yml # note: pay attention to the indentation of this configuration item # redis: # host: localhost # port: 6379 # password: # database: 10 # jedis: # pool: # # The maximum number of connections in the connection pool (use a negative value to indicate no limit) # max-active: 50 # # The maximum blocking waiting time of the connection pool (use a negative value to indicate no limit) # max-wait: 3000 # # The maximum number of idle connections in the connection pool # max-idle: 20 # # The minimum number of idle connections in the connection pool # min-idle: 5 # # Connection timeout (milliseconds) # timeout: 5000 ################################################################################################################# ################################################# Mybatis Config ################################################ ######### Please note: that the following configurations are not recommended to be modified ##################### ################################################################################################################# mybatis-plus: mapper-locations: classpath:/mapper/*Mapper.xml # Entity scanning, multiple packages are separated by commas or semicolons typeAliasesPackage: org.dinky.model global-config: db-config: id-type: auto # Logic delete configuration : 0: false(Not deleted), 1: true(deleted) logic-delete-field: is_delete logic-delete-value: 1 logic-not-delete-value: 0 banner: false configuration: ##### mybatis-plus prints complete sql (only for development environment) #log-impl: org.apache.ibatis.logging.stdout.StdOutImpl log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl type-handlers-package: org.dinky.data.typehandler ################################################################################################################# ################################################# SMS Config #################################################### ################################################################################################################# sms: is-print: false ################################################################################################################# ################################################# Sa-Token Config ############################################### ################################################################################################################# # Sa-Token basic configuration sa-token: # The validity period of the token, the unit is 10 hours by default, -1 means it will never expire timeout: 36000 # The temporary validity period of the token (the token will be considered as expired if there is no operation within the specified time) # unit: second , if you do not need to set a temporary token, you can set it to -1 active-timeout: -1 # Whether to allow the same account to log in concurrently (when true, allow login together, when false, new login squeezes out old login) is-concurrent: false # When multiple people log in to the same account, whether to share a token (if true, all logins share a token, and if false, create a new token for each login) is-share: true # token style token-style: uuid # Whether to output the operation log is-log: false # Whether to print banner is-print: false # The secret key jwt-secret-key: 0DA4198858E84F1AADDF846340587A85 # is write header is-write-header: true # is read header is-read-header: true token-name: token is-read-cookie: true ################################################################################################################# ################################################# knife4j Config ################################################ ################################################################################################################# knife4j: enable: true setting: language: en ################################################################################################################# ################################################# Crypto Config ################################################# ################################################################################################################# crypto: enabled: false encryption-password:
---
apiVersion: v1 kind: ConfigMap metadata: name: mysql-config namespace: dinky data: #配置项均为【conf】目录下的application.yaml文件内容,如果有更新,把下面整段替换即可 application-mysql.yml: |- # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # spring: datasource: url: jdbc:mysql://${MYSQL_ADDR:172.xx.xx.xx:3306}/${MYSQL_DATABASE:dinky}?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: ${MYSQL_USERNAME:root} password: ${MYSQL_PASSWORD:xxxxx} driver-class-name: com.mysql.cj.jdbc.Driver ---
apiVersion: v1 kind: Service metadata: name: flink-dinky namespace: dinky spec: ports: - name: web-flink-dinky port: 8888 #dinky pod 的端口号 protocol: TCP nodePort: 32323 #【对外暴露端口号】,如果出现端口冲突,可自行更改 selector: app: flink-dinky type: NodePort
|