deployment.toml 配置选项

deployment.toml configuration options

"WSO IS 5.9.0" 的新功能是 deployment.toml,但我没有找到配置选项,也没有找到如何从该文件设置 xml 配置文件的方法。

例如,如果我想在 carbon.xml 选项中启用 EnableHTTPAdminConsole,应该怎么做?

[server]
hostname = "my.server.com"
node_ip = "127.0.0.1"
base_path = "https://$ref{server.hostname}:${carbon.management.port}"
enable_h_t_t_p_admin_console = true
enable_http_admin_console = true
EnableHTTPAdminConsole = true

无效

此外,我已经尝试在我的 docker 图像中进行修改:

wso2is-5.9.0/repository/resources/conf/templates/repository/conf/carbon.xml.j2

wso2is-5.9.0/conf/carbon.xml

但是所有这些文件都会被覆盖。

我的用例是在没有端口的情况下在K8S中使用WSO2IS。

https://wso2is.my.domain/ > k8s nginx 入口:443(管理证书)> wso2is-service > wso2is-pod:9763(纯 http)

但是问题仍然存在,deployment.toml

中有哪些配置选项可用

这似乎无法通过 deployment.toml。作为解决方法,您可以取消注释

中的 属性

wso2is-5.9.0/repository/resources/conf/templates/repository/conf/carbon.xml.j2

将此报告为问题:https://github.com/wso2/product-is/issues

如果上述修复没有得到应用,那么您的 docker 图像会被默认配置覆盖。您可以尝试根据要求的更改构建一个新的 docker 映像吗?这个linkhttps://github.com/wso2/docker-is/tree/5.9.0/dockerfiles/ubuntu/is可以帮助你构建镜像。

但我不确定为什么您无法从 Nginx ingress 访问 ssl(9443)。也许你可以试试这个示例 Nginx ingress https://github.com/wso2/kubernetes-is/blob/master/advanced/is-pattern-1/templates/identity-server-ingress.yaml

问题what can be configured using deployment.toml的答案已经回答Buddhima,所以我将他的回答标记为答案。

可以通过模板查看 f.e。

wso2is-5.9.0/repository/resources/conf/templates/repository/conf/carbon.xml.j2

并且可以看到所有选项。

对 EnableHTTPAdminConsole 的回答 pulasthi7 是故意遗漏的。

我找到了入口连接到 ssl 的解决方法

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/rewrite-target: /
    nginx.ingress.kubernetes.io/service-upstream: "true"
    nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
  name: wso2is-ingress
  namespace: wso2is
spec:
  tls:
  - hosts:
    - wso2is.k8s.mydomain.com
    secretName: tls-wso2is
  rules:
  - host: wso2is.k8s.mydomain.com
    http:
      paths:
      - backend:
          serviceName: wso2is-is-service
          servicePort: 9443
        path: /(.*)

最重要的一行:

nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"

通过这种方式,使用自己的证书将连接加密到入口 nginx,并使用 pod 中的证书从 nginx 到 pod。