From 0e665056ed54c1cca72a8b6351b3de8e030905ae Mon Sep 17 00:00:00 2001 From: ycz008 Date: Fri, 2 Jun 2023 19:16:23 +0800 Subject: [PATCH] add config-server.yaml --- trainer-upgrade/kafka/akhq.yaml | 7 ++ .../service_group/config-server.yaml | 106 ++++++++++++++++++ 2 files changed, 113 insertions(+) create mode 100644 trainer-upgrade/service_group/config-server.yaml diff --git a/trainer-upgrade/kafka/akhq.yaml b/trainer-upgrade/kafka/akhq.yaml index b8d7ce8..274dc61 100644 --- a/trainer-upgrade/kafka/akhq.yaml +++ b/trainer-upgrade/kafka/akhq.yaml @@ -23,6 +23,13 @@ data: generator: secret: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjpbeyJ0b29sdHQiOiJodHRwczovL3Rvb2x0dC5jb20ifV0sImlhdCI6MTY4NTY4OTU1MiwiZXhwIjoyNTM3NjI1NTk5LCJhdWQiOiIiLCJpc3MiOiJzbWFsbGtvdWRhaSIsInN1YiI6IiJ9.mKw9nKRhQimdaNtMWLHT9TqIn2-iIcZR4txgy8z07xQ + akhq.security: + basic-auth: + - username: admin + password: "$2a$10$ARWW4TWyaAywZ0vS4ua62OS8s.qm3cVHGmApWx8vALSMzUVS.q.Se" + passwordHash: BCRYPT + groups: + - admin --- apiVersion: apps/v1 diff --git a/trainer-upgrade/service_group/config-server.yaml b/trainer-upgrade/service_group/config-server.yaml new file mode 100644 index 0000000..0330245 --- /dev/null +++ b/trainer-upgrade/service_group/config-server.yaml @@ -0,0 +1,106 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: config-server +data: + application.yml: | + server: + port: 8888 + spring: + cloud: + config: + server: + git: + uri: https://github.com/beaconfire-projects/cloud-config.git + search-paths: + - '{application}' + - micro/* + username: zyu@beaconfireinc.com + password: ENC(5/I4EP0HwkLv/ZFigX3bmP+U/yR0HAOgWpbVg4tHuREz0G9CfOZzZfFTHA342PpoLYVkj924iqo=) + bus: + refresh: + enabled: true + trace: + enabled: true + stream: + kafka: + binder: + brokers: http://kafka-0-internal.basic:9092,http://kafka-1-internal.basic:9092, http://kafka-2-internal.basic:9092 + + jasypt: + encryptor: + algorithm: PBEWithMD5AndDES + iv-generator-classname: org.jasypt.iv.NoIvGenerator + + management: + endpoints: + web: + exposure: + include: 'busrefresh' #refresh + + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: config-server +spec: + replicas: 1 + selector: + matchLabels: + app: config-server + template: + metadata: + labels: + app: config-server + spec: + imagePullSecrets: + - name: docker-regcred + containers: + - name: config-server + image: beaconfireiic/config-server:1.1.1-prod + ports: + - name: http + containerPort: 8888 + protocol: TCP + env: + - name: "LOGGING_LEVEL_ROOT" + value: "info" + - name: "SERVER_PORT" + value: "8888" + - name: "LOG_APP-NAME" + value: "config-server" + volumeMounts: + - name: config + mountPath: /app/application.yml + subPath: application.yml + - name: app-logs + mountPath: /logs + resources: + requests: + cpu: 0.1 + memory: 256Mi + limits: + cpu: 1 + memory: 2Gi + volumes: + - name: config + configMap: + name: config-server + - name: app-logs + hostPath: + path: /data/app_logs/config-server +--- +apiVersion: v1 +kind: Service +metadata: + name: config-server +spec: + type: ClusterIP + ports: + - name: http + protocol: TCP + port: 8888 + targetPort: http + selector: + app: config-server \ No newline at end of file