From: 刘洪青 Date: Tue, 19 Jan 2021 15:50:50 +0000 (+0800) Subject: chore: user-authorization-service 授权服务,更新镜像版本 1.2.0-SNAPSHOT X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=8ff397b927b5b1acd727be827c57c4e544628022;p=institute%2Fdeploy-authx-service.git chore: user-authorization-service 授权服务,更新镜像版本 1.2.0-SNAPSHOT --- diff --git a/deploy-manifests/k8s-rancher/1.authx-service/3.user-authorization-service/0.user-authorization-service-base.yaml b/deploy-manifests/k8s-rancher/1.authx-service/3.user-authorization-service/0.user-authorization-service-base.yaml index e9b861d..11e1c72 100644 --- a/deploy-manifests/k8s-rancher/1.authx-service/3.user-authorization-service/0.user-authorization-service-base.yaml +++ b/deploy-manifests/k8s-rancher/1.authx-service/3.user-authorization-service/0.user-authorization-service-base.yaml @@ -15,3 +15,74 @@ data: # {"auths":{"harbor.supwisdom.com":{"password":"PWMgP85qiLFC","username":"rancher.devops"}}} .dockerconfigjson: eyJhdXRocyI6eyJoYXJib3Iuc3Vwd2lzZG9tLmNvbSI6eyJwYXNzd29yZCI6IlBXTWdQODVxaUxGQyIsInVzZXJuYW1lIjoicmFuY2hlci5kZXZvcHMifX19 + + +#################################################### +# rabbitmq-server +#################################################### +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + app: rabbitmq + release: rabbitmq-server + name: rabbitmq-server + namespace: user-data-service +type: Opaque +data: + RABBITMQ_USERNAME: Z3Vlc3Q= + RABBITMQ_PASSWORD: Z3Vlc3Q= +--- +apiVersion: v1 +kind: Service +metadata: + name: rabbitmq-server + namespace: user-data-service + labels: + app: rabbitmq-server +spec: + ports: + - port: 5672 + targetPort: tcp-1 + protocol: TCP + name: tcp-1 + - port: 15672 + targetPort: tcp-2 + protocol: TCP + name: tcp-2 + selector: + app: rabbitmq-server +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: rabbitmq-server + namespace: user-data-service +spec: + selector: + matchLabels: + app: rabbitmq-server + replicas: 1 + template: + metadata: + labels: + app: rabbitmq-server + annotations: + sidecar.istio.io/inject: "false" + spec: + containers: + - name: rabbitmq-server + # 若使用了学校搭设的私有仓库,请修改 + image: rabbitmq:management + # 若使用了学校搭设的私有仓库,请修改 为 Always + imagePullPolicy: IfNotPresent + # imagePullPolicy: Always + ports: + - containerPort: 5672 + name: tcp-1 + - containerPort: 15672 + name: tcp-2 + # 若使用了学校搭设的私有仓库,请增加以下配置(取消注释即可) + # imagePullSecrets: + # - name: harbor-registry diff --git a/deploy-manifests/k8s-rancher/1.authx-service/3.user-authorization-service/1.user-authorization-service-env.yaml b/deploy-manifests/k8s-rancher/1.authx-service/3.user-authorization-service/1.user-authorization-service-env.yaml index 3deea6b..5fa1bee 100644 --- a/deploy-manifests/k8s-rancher/1.authx-service/3.user-authorization-service/1.user-authorization-service-env.yaml +++ b/deploy-manifests/k8s-rancher/1.authx-service/3.user-authorization-service/1.user-authorization-service-env.yaml @@ -24,3 +24,16 @@ data: # 修改为实际的数据库密码,并使用 base64 工具进行编码 # kingstar JDBC_PASSWORD: a2luZ3N0YXI= + +--- +apiVersion: v1 +kind: Secret +metadata: + name: rabbitmq-env-secret + namespace: user-authorization-service +type: Opaque +data: + SPRING_RABBITMQ_HOST: cmFiYml0bXEtc2VydmVy + SPRING_RABBITMQ_PORT: NTY3Mg== + SPRING_RABBITMQ_USERNAME: Z3Vlc3Q= + SPRING_RABBITMQ_PASSWORD: Z3Vlc3Q= diff --git a/deploy-manifests/k8s-rancher/1.authx-service/3.user-authorization-service/4.0.user-authorization-installer.yaml b/deploy-manifests/k8s-rancher/1.authx-service/3.user-authorization-service/4.0.user-authorization-installer.yaml index 140af51..319f791 100644 --- a/deploy-manifests/k8s-rancher/1.authx-service/3.user-authorization-service/4.0.user-authorization-installer.yaml +++ b/deploy-manifests/k8s-rancher/1.authx-service/3.user-authorization-service/4.0.user-authorization-installer.yaml @@ -28,7 +28,7 @@ spec: containers: - name: user-authorization-installer # 若使用了学校搭设的私有仓库,请修改 - image: harbor.supwisdom.com/user-authorization-service/user-authorization-installer:1.1.7-RELEASE + image: harbor.supwisdom.com/user-authorization-service/user-authorization-installer:1.2.0-SNAPSHOT imagePullPolicy: Always envFrom: - configMapRef: diff --git a/deploy-manifests/k8s-rancher/1.authx-service/3.user-authorization-service/4.1.user-authorization-poa.yaml b/deploy-manifests/k8s-rancher/1.authx-service/3.user-authorization-service/4.1.user-authorization-poa.yaml index 56bb25f..87c78d9 100644 --- a/deploy-manifests/k8s-rancher/1.authx-service/3.user-authorization-service/4.1.user-authorization-poa.yaml +++ b/deploy-manifests/k8s-rancher/1.authx-service/3.user-authorization-service/4.1.user-authorization-poa.yaml @@ -77,7 +77,7 @@ spec: containers: - name: user-authorization-poa # 若使用了学校搭设的私有仓库,请修改 - image: harbor.supwisdom.com/user-authorization-service/user-authorization-poa:1.1.7-RELEASE + image: harbor.supwisdom.com/user-authorization-service/user-authorization-poa:1.2.0-SNAPSHOT imagePullPolicy: Always ports: - containerPort: 8080 diff --git a/deploy-manifests/k8s-rancher/1.authx-service/3.user-authorization-service/4.2.user-authorization-sa.yaml b/deploy-manifests/k8s-rancher/1.authx-service/3.user-authorization-service/4.2.user-authorization-sa.yaml index 94505e1..6c0ccd1 100644 --- a/deploy-manifests/k8s-rancher/1.authx-service/3.user-authorization-service/4.2.user-authorization-sa.yaml +++ b/deploy-manifests/k8s-rancher/1.authx-service/3.user-authorization-service/4.2.user-authorization-sa.yaml @@ -31,6 +31,12 @@ data: # SBA_URL: http://spring-boot-admin-svc.base.svc.cluster.local:8080 + USER_AUTHORIZATION_SA_USER_RABBITMQ_CONSUMER_ENABLED: "false" + USER_AUTHORIZATION_SA_USER_RABBITMQ_HOST: rabbitmq-server.jobs-server.svc.cluster.local + USER_AUTHORIZATION_SA_USER_RABBITMQ_PORT: "5672" + USER_AUTHORIZATION_SA_USER_RABBITMQ_USERNAME: guest + USER_AUTHORIZATION_SA_USER_RABBITMQ_PASSWORD: guest + --- apiVersion: v1 @@ -73,7 +79,7 @@ spec: containers: - name: user-authorization-sa # 若使用了学校搭设的私有仓库,请修改 - image: harbor.supwisdom.com/user-authorization-service/user-authorization-sa:1.1.7-RELEASE + image: harbor.supwisdom.com/user-authorization-service/user-authorization-sa:1.2.0-SNAPSHOT imagePullPolicy: Always ports: - containerPort: 8080 @@ -81,10 +87,12 @@ spec: - containerPort: 6060 name: http-metrics envFrom: - - secretRef: - name: datasource-env-secret - configMapRef: name: jvm-env + - secretRef: + name: datasource-env-secret + - secretRef: + name: rabbitmq-env-secret - configMapRef: name: user-authorization-sa-env resources: diff --git a/deploy-manifests/k8s-rancher/1.authx-service/3.user-authorization-service/5.user-authorization-datax-job.yaml b/deploy-manifests/k8s-rancher/1.authx-service/3.user-authorization-service/5.user-authorization-datax-job.yaml index 0efabff..eee8e92 100644 --- a/deploy-manifests/k8s-rancher/1.authx-service/3.user-authorization-service/5.user-authorization-datax-job.yaml +++ b/deploy-manifests/k8s-rancher/1.authx-service/3.user-authorization-service/5.user-authorization-datax-job.yaml @@ -1,57 +1,58 @@ # user-authorization-datax-job.yaml +# 废弃,改由消息队列进行数据同步 ---- -apiVersion: v1 -kind: ConfigMap -metadata: - namespace: user-authorization-service - name: user-authorization-datax-job-env -data: - JOB_USER2AUTHZ_MYSQLREADER8_USERNAME: "user" - # 修改为实际的数据库密码 - JOB_USER2AUTHZ_MYSQLREADER8_PASSWORD: "kingstar" - JOB_USER2AUTHZ_MYSQLREADER8_JDBC_URL: "jdbc:mysql://mysql-server.authx-service.svc.cluster.local:3306/user?serverTimezone=Asia/Shanghai" +# --- +# apiVersion: v1 +# kind: ConfigMap +# metadata: +# namespace: user-authorization-service +# name: user-authorization-datax-job-env +# data: +# JOB_USER2AUTHZ_MYSQLREADER8_USERNAME: "user" +# # 修改为实际的数据库密码 +# JOB_USER2AUTHZ_MYSQLREADER8_PASSWORD: "kingstar" +# JOB_USER2AUTHZ_MYSQLREADER8_JDBC_URL: "jdbc:mysql://mysql-server.authx-service.svc.cluster.local:3306/user?serverTimezone=Asia/Shanghai" - JOB_USER2AUTHZ_MYSQLWRITER8_USERNAME: "user_authz" - # 修改为实际的数据库密码 - JOB_USER2AUTHZ_MYSQLWRITER8_PASSWORD: "kingstar" - JOB_USER2AUTHZ_MYSQLWRITER8_JDBC_URL: "jdbc:mysql://mysql-server.authx-service.svc.cluster.local:3306/user_authz?serverTimezone=Asia/Shanghai" +# JOB_USER2AUTHZ_MYSQLWRITER8_USERNAME: "user_authz" +# # 修改为实际的数据库密码 +# JOB_USER2AUTHZ_MYSQLWRITER8_PASSWORD: "kingstar" +# JOB_USER2AUTHZ_MYSQLWRITER8_JDBC_URL: "jdbc:mysql://mysql-server.authx-service.svc.cluster.local:3306/user_authz?serverTimezone=Asia/Shanghai" ---- -apiVersion: batch/v1beta1 -kind: CronJob -metadata: - name: user-authorization-datax-job - namespace: user-authorization-service -spec: - schedule: "*/10 * * * *" - jobTemplate: - metadata: - labels: - app: user-authorization-datax-job - spec: - completions: 1 - parallelism: 1 - template: - metadata: - labels: - app: user-authorization-datax-job - spec: - restartPolicy: Never - containers: - - name: user-authorization-datax-job - # 若使用了学校搭设的私有仓库,请修改 - image: harbor.supwisdom.com/user-authorization-service/user-authorization-datax-job:1.1.7-RELEASE - imagePullPolicy: Always - envFrom: - - configMapRef: - name: user-authorization-datax-job-env - # resources: - # requests: - # memory: "400Mi" - # limits: - # memory: "400Mi" - imagePullSecrets: - - name: harbor-registry +# --- +# apiVersion: batch/v1beta1 +# kind: CronJob +# metadata: +# name: user-authorization-datax-job +# namespace: user-authorization-service +# spec: +# schedule: "*/10 * * * *" +# jobTemplate: +# metadata: +# labels: +# app: user-authorization-datax-job +# spec: +# completions: 1 +# parallelism: 1 +# template: +# metadata: +# labels: +# app: user-authorization-datax-job +# spec: +# restartPolicy: Never +# containers: +# - name: user-authorization-datax-job +# # 若使用了学校搭设的私有仓库,请修改 +# image: harbor.supwisdom.com/user-authorization-service/user-authorization-datax-job:1.2.0-SNAPSHOT +# imagePullPolicy: Always +# envFrom: +# - configMapRef: +# name: user-authorization-datax-job-env +# # resources: +# # requests: +# # memory: "400Mi" +# # limits: +# # memory: "400Mi" +# imagePullSecrets: +# - name: harbor-registry