wso2~helm-apim4.5的部署

https://apim.docs.wso2.com/en/latest/get-started/apim-architecture/

拉取代码

  • git clone git@github.com:wso2/helm-apim.git

架构设计

gateway

traffic manager(TM)

key manager(KM)

default_values.yaml文件

使用这个默认的配置文件来部署charts,它使用数据库为h2,保证你可以启动wso2-apim4.5版本,如果使用mysql,会有一个坑需要我们解决

mysql数据库

  • 需要添加mysql-connector-java-8.0.29.jar这个文件到容器的/home/wso2carbon/wso2-config-volume/repository/components/lib目录

修改已经有的am/wso2-am-deployment.yaml文件

initContainers:
- name: init-db-connector-download
  image: m.daocloud.io/docker.io/busybox:1.32
  command:
    - /bin/sh
    - "-c"
    - |
      set -e
      connector_version=8.0.17
      wget "{{ .Values.wso2.apim.configurations.databases.jdbc.driver_url }}" -P /db-connector-jar/
  volumeMounts:
    - name: db-connector-jar
      mountPath: /db-connector-jar
containers:
  volumeMounts:
    - name: db-connector-jar
      mountPath: /db-connector-jar
      
volumes:
- name: db-connector-jar
  mountPath: /home/wso2carbon/wso2-config-volume/repository/components/lib

在values.yaml中添加jdbc.driver_url配置即可

wso2:
    apim:
        configurations
            databases:
                jdbc:
                  # -- JDBC driver class name
                  driver: "com.mysql.cj.jdbc.Driver"
                  driver_url: "https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.29/mysql-connector-java-8.0.29.jar"

posted @ 2025-05-11 19:00  张占岭  阅读(105)  评论(0)    收藏  举报