This guide has information to setup enforcer component for development.
The following should be installed in your dev machine.
-
Make following changes to
helm-chart/templates/data-plane/gateway-components/gateway-runtime/gateway-runtime-deployment.yaml
file.containers: - name: enforcer image: {{ .Values.wso2.apk.dp.gatewayRuntime.deployment.enforcer.image }} imagePullPolicy: {{ .Values.wso2.apk.dp.gatewayRuntime.deployment.enforcer.imagePullPolicy }} ports: - containerPort: 8081 protocol: "TCP" - containerPort: 9001 protocol: "TCP" + - containerPort: 5006 + protocol: "TCP" ... ... - name: JAVA_OPTS - value: -Dhttpclient.hostnameVerifier=AllowAll -Xms512m -Xmx512m -XX:MaxRAMFraction=2 + value: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5006 -Dhttpclient.hostnameVerifier=AllowAll -Xms512m -Xmx512m -XX:MaxRAMFraction=2
-
Start WSO2 APK.
-
Port forward the port 5006.
kubectl port-forward <apk-gateway-runtime-deployment-pod-name> -n apk 5006:5006
-
Start debugging from port 5006 in IntelliJ IDEA.