apollo开启飞书登录
1、配置configmap
vim apollo-portal-dev-configmap.yml
apiVersion: v1 kind: ConfigMap metadata: name: apollo-portal-dev namespace: staging annotations: meta.helm.sh/release-name: apollo-portal-dev meta.helm.sh/release-namespace: staging labels: app.kubernetes.io/managed-by: Helm data: apollo-env.properties: | dev.meta = http://apollo-service-dev-apollo-configservice.staging:8080 application-github.properties: | spring.datasource.url = jdbc:mysql://apollo-portal-dev-apollo-portaldb:3306/apolloportaldb?characterEncoding=utf8&useSSL=false spring.datasource.username = shoplaza spring.datasource.password = shoplaza@123 apollo.portal.envs = dev application-oidc.yml: | server: forward-headers-strategy: framework spring: security: oauth2: client: provider: feishu: issuer-uri: https://anycross.feishu.cn/sso/F751196888 registration: feishu: authorization-grant-type: authorization_code client-authentication-method: client_secret_basic client-id: ac12152f2728bd44588704d561a0aa3f1a client-secret: HhBarGwhECIEo2kSLWhoNpxoSdjwND07xqIZvtWUNuY provider: feishu scope: - openid - profile - email redirect-uri: "{baseUrl}/login/oauth2/code/{registrationId}" resourceserver: jwt: issuer-uri: https://anycross.feishu.cn/sso/F751196888 oidc: user-display-name-claim-name: email jwt-user-display-name-claim-name: email
2、修改deploy
env: - name: SPRING_PROFILES_ACTIVE value: github,oidc
volumeMounts: - mountPath: /apollo-portal/config/application-github.properties name: configmap-apollo-portal-dev subPath: application-github.properties - mountPath: /apollo-portal/config/apollo-env.properties name: configmap-apollo-portal-dev subPath: apollo-env.properties - mountPath: /apollo-portal/config/application-oidc.yml name: configmap-apollo-portal-dev subPath: application-oidc.yml
volumes: - configMap: defaultMode: 420 items: - key: application-github.properties path: application-github.properties - key: apollo-env.properties path: apollo-env.properties - key: application-oidc.yml path: application-oidc.yml name: apollo-portal-dev name: configmap-apollo-portal-dev
完整yaml文件如下
vim apollo-portal-dev-deploy.yml
--- apiVersion: apps/v1 kind: Deployment metadata: name: apollo-portal-dev namespace: staging annotations: meta.helm.sh/release-name: apollo-portal-dev meta.helm.sh/release-namespace: staging labels: app.kubernetes.io/managed-by: Helm app.kubernetes.io/version: "2.4.0" spec: replicas: 1 revisionHistoryLimit: 10 progressDeadlineSeconds: 600 selector: matchLabels: app: apollo-portal-dev strategy: type: RollingUpdate rollingUpdate: maxSurge: 25% maxUnavailable: 25% template: metadata: labels: app: apollo-portal-dev spec: enableServiceLinks: false containers: - name: apollo-portal image: ecr-dev-registry-vpc.us-west-1.cr.aliyuncs.com/shoplaza-daily/apollo:dev-1138268 imagePullPolicy: IfNotPresent ports: - name: http containerPort: 8070 protocol: TCP env: - name: SPRING_PROFILES_ACTIVE value: github,oidc - name: SPRING_SESSION_STORE_TYPE value: none resources: requests: cpu: 10m memory: 500Mi livenessProbe: tcpSocket: port: 8070 initialDelaySeconds: 100 periodSeconds: 10 timeoutSeconds: 1 failureThreshold: 3 successThreshold: 1 readinessProbe: httpGet: path: /health port: 8070 scheme: HTTP initialDelaySeconds: 30 periodSeconds: 5 timeoutSeconds: 1 failureThreshold: 3 successThreshold: 1 volumeMounts: - name: configmap-apollo-portal-dev mountPath: /apollo-portal/config/application-github.properties subPath: application-github.properties - name: configmap-apollo-portal-dev mountPath: /apollo-portal/config/apollo-env.properties subPath: apollo-env.properties - name: configmap-apollo-portal-dev mountPath: /apollo-portal/config/application-oidc.yml subPath: application-oidc.yml volumes: - name: configmap-apollo-portal-dev configMap: name: apollo-portal-dev defaultMode: 420 items: - key: application-github.properties path: application-github.properties - key: apollo-env.properties path: apollo-env.properties - key: application-oidc.yml path: application-oidc.yml

浙公网安备 33010602011771号