diff --git a/advanced/am-pattern-1/README.md b/advanced/am-pattern-1/README.md index 1ac5487b..fe978118 100644 --- a/advanced/am-pattern-1/README.md +++ b/advanced/am-pattern-1/README.md @@ -292,6 +292,7 @@ If you do not have an active WSO2 subscription, **do not change** the parameters | `wso2.deployment.mi.resources.requests.cpu` | The minimum amount of CPU that should be allocated for a Pod | 500m | | `wso2.deployment.mi.resources.limits.memory` | The maximum amount of memory that should be allocated for a Pod | 1Gi | | `wso2.deployment.mi.resources.limits.cpu` | The maximum amount of CPU that should be allocated for a Pod | 1000m | +| `wso2.deployment.mi.config` | Custom deployment configuration file (`/conf/deployment.toml`) | - | | `wso2.deployment.mi.ingress.management.hostname` | Hostname for Micro Integrator management apis | `management.mi.wso2.com` | | `wso2.deployment.mi.ingress.management.annotations` | Ingress resource annotations for API Manager Gateway | Community NGINX Ingress controller annotations | diff --git a/advanced/am-pattern-1/templates/mi/instance-1/wso2am-pattern-1-mi-conf.yaml b/advanced/am-pattern-1/templates/mi/instance-1/wso2am-pattern-1-mi-conf.yaml new file mode 100644 index 00000000..b9cc70a6 --- /dev/null +++ b/advanced/am-pattern-1/templates/mi/instance-1/wso2am-pattern-1-mi-conf.yaml @@ -0,0 +1,26 @@ +{{- if .Values.wso2.deployment.mi.config }} +# Copyright (c) 2023, WSO2 LLC (https://www.wso2.com) All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "am-pattern-1.resource.prefix" . }}-mi-1-conf + namespace: {{ .Release.Namespace }} +data: + {{- range $index, $content := .Values.wso2.deployment.mi.config }} + {{ $index }}: |- +{{ tpl $content $ | indent 4 }} + {{- end }} +{{- end }} diff --git a/advanced/am-pattern-1/templates/mi/instance-1/wso2am-pattern-1-mi-deployment.yaml b/advanced/am-pattern-1/templates/mi/instance-1/wso2am-pattern-1-mi-deployment.yaml index 9bcb3a27..d20b2454 100644 --- a/advanced/am-pattern-1/templates/mi/instance-1/wso2am-pattern-1-mi-deployment.yaml +++ b/advanced/am-pattern-1/templates/mi/instance-1/wso2am-pattern-1-mi-deployment.yaml @@ -31,6 +31,10 @@ spec: node: {{ template "am-pattern-1.resource.prefix" . }}-mi-1 template: metadata: + {{- if .Values.wso2.deployment.mi.config }} + annotations: + checksum.mi.conf: {{ include (print $.Template.BasePath "/mi/instance-1/wso2am-pattern-1-mi-conf.yaml") . | sha256sum }} + {{- end }} labels: deployment: {{ template "am-pattern-1.resource.prefix" . }}-mi node: {{ template "am-pattern-1.resource.prefix" . }}-mi-1 @@ -89,6 +93,12 @@ spec: value: {{ $val | quote }} {{- end }} {{- end }} + {{- if .Values.wso2.deployment.mi.config }} + volumeMounts: + - name: wso2mi-conf + mountPath: /home/wso2carbon/wso2-config-volume/conf/deployment.toml + subPath: deployment.toml + {{- end }} serviceAccountName: {{ .Values.kubernetes.serviceAccount }} {{- if .Values.wso2.deployment.mi.imagePullSecrets }} imagePullSecrets: @@ -97,3 +107,9 @@ spec: imagePullSecrets: - name: {{ template "am-pattern-1.resource.prefix" . }}-mi-1-wso2-private-registry-creds {{ end }} + {{- if .Values.wso2.deployment.mi.config }} + volumes: + - name: wso2mi-conf + configMap: + name: {{ template "am-pattern-1.resource.prefix" . }}-mi-1-conf + {{ end }} diff --git a/advanced/am-pattern-1/values.yaml b/advanced/am-pattern-1/values.yaml index 84b2f882..8b8638bb 100644 --- a/advanced/am-pattern-1/values.yaml +++ b/advanced/am-pattern-1/values.yaml @@ -193,6 +193,12 @@ wso2: # Environment variables for the Micro integrator deployment. envs: # ENV_NAME: ENV_VALUE + + # Add the customized deployment configurations for the WSO2 MI v4.2.0 (/conf/deployment.toml) + # config: + # deployment.toml: |- + # # toml configurations for the WSO2 MI v4.2.0 + # Configure synapse testing. synapseTest: enabled: false diff --git a/advanced/am-pattern-2/README.md b/advanced/am-pattern-2/README.md index 5bcf7968..a0f30090 100644 --- a/advanced/am-pattern-2/README.md +++ b/advanced/am-pattern-2/README.md @@ -342,6 +342,7 @@ If you do not have an active WSO2 subscription, **do not change** the parameters | `wso2.deployment.mi.resources.requests.cpu` | The minimum amount of CPU that should be allocated for a Pod | 500m | | `wso2.deployment.mi.resources.limits.memory` | The maximum amount of memory that should be allocated for a Pod | 1Gi | | `wso2.deployment.mi.resources.limits.cpu` | The maximum amount of CPU that should be allocated for a Pod | 1000m | +| `wso2.deployment.mi.config` | Custom deployment configuration file (`/conf/deployment.toml`) | - | | `wso2.deployment.mi.ingress.management.hostname` | Hostname for Micro Integrator management apis | `management.mi.wso2.com` | | `wso2.deployment.mi.ingress.management.annotations` | Ingress resource annotations for API Manager Gateway | Community NGINX Ingress controller annotations | diff --git a/advanced/am-pattern-2/templates/mi/instance-2/wso2am-pattern-2-mi-conf.yaml b/advanced/am-pattern-2/templates/mi/instance-2/wso2am-pattern-2-mi-conf.yaml new file mode 100644 index 00000000..a4c33957 --- /dev/null +++ b/advanced/am-pattern-2/templates/mi/instance-2/wso2am-pattern-2-mi-conf.yaml @@ -0,0 +1,26 @@ +{{- if .Values.wso2.deployment.mi.config }} +# Copyright (c) 2023, WSO2 LLC (https://www.wso2.com) All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "am-pattern-2.resource.prefix" . }}-mi-2-conf + namespace: {{ .Release.Namespace }} +data: + {{- range $index, $content := .Values.wso2.deployment.mi.config }} + {{ $index }}: |- +{{ tpl $content $ | indent 4 }} + {{- end }} +{{- end }} diff --git a/advanced/am-pattern-2/templates/mi/instance-2/wso2am-pattern-2-mi-deployment.yaml b/advanced/am-pattern-2/templates/mi/instance-2/wso2am-pattern-2-mi-deployment.yaml index 304494ed..69422ee4 100644 --- a/advanced/am-pattern-2/templates/mi/instance-2/wso2am-pattern-2-mi-deployment.yaml +++ b/advanced/am-pattern-2/templates/mi/instance-2/wso2am-pattern-2-mi-deployment.yaml @@ -31,6 +31,10 @@ spec: node: {{ template "am-pattern-2.resource.prefix" . }}-mi-2 template: metadata: + {{- if .Values.wso2.deployment.mi.config }} + annotations: + checksum.mi.conf: {{ include (print $.Template.BasePath "/mi/instance-2/wso2am-pattern-2-mi-conf.yaml") . | sha256sum }} + {{- end }} labels: deployment: {{ template "am-pattern-2.resource.prefix" . }}-mi node: {{ template "am-pattern-2.resource.prefix" . }}-mi-2 @@ -89,6 +93,12 @@ spec: value: {{ $val | quote }} {{- end }} {{- end }} + {{- if .Values.wso2.deployment.mi.config }} + volumeMounts: + - name: wso2mi-conf + mountPath: /home/wso2carbon/wso2-config-volume/conf/deployment.toml + subPath: deployment.toml + {{- end }} serviceAccountName: {{ .Values.kubernetes.serviceAccount }} {{- if .Values.wso2.deployment.mi.imagePullSecrets }} imagePullSecrets: @@ -97,3 +107,9 @@ spec: imagePullSecrets: - name: {{ template "am-pattern-2.resource.prefix" . }}-mi-2-wso2-private-registry-creds {{ end }} + {{- if .Values.wso2.deployment.mi.config }} + volumes: + - name: wso2mi-conf + configMap: + name: {{ template "am-pattern-2.resource.prefix" . }}-mi-2-conf + {{ end }} diff --git a/advanced/am-pattern-2/values.yaml b/advanced/am-pattern-2/values.yaml index 924a684e..e7c419f6 100644 --- a/advanced/am-pattern-2/values.yaml +++ b/advanced/am-pattern-2/values.yaml @@ -61,6 +61,12 @@ wso2: # Environment variables for the Micro integrator deployment. envs: # ENV_NAME: ENV_VALUE + + # Add the customized deployment configurations for the WSO2 MI v4.2.0 (/conf/deployment.toml) + # config: + # deployment.toml: |- + # # toml configurations for the WSO2 MI v4.2.0 + # Configure synapse testing. synapseTest: enabled: false diff --git a/advanced/am-pattern-3/README.md b/advanced/am-pattern-3/README.md index 5efc11ea..46bf3c62 100644 --- a/advanced/am-pattern-3/README.md +++ b/advanced/am-pattern-3/README.md @@ -301,6 +301,7 @@ If you do not have an active WSO2 subscription, **do not change** the parameters | `wso2.deployment.mi.resources.requests.cpu` | The minimum amount of CPU that should be allocated for a Pod | 500m | | `wso2.deployment.mi.resources.limits.memory` | The maximum amount of memory that should be allocated for a Pod | 1Gi | | `wso2.deployment.mi.resources.limits.cpu` | The maximum amount of CPU that should be allocated for a Pod | 1000m | +| `wso2.deployment.mi.config` | Custom deployment configuration file (`/conf/deployment.toml`) | - | | `wso2.deployment.mi.ingress.management.hostname` | Hostname for Micro Integrator management apis | `management.mi.wso2.com` | | `wso2.deployment.mi.ingress.management.annotations` | Ingress resource annotations for API Manager Gateway | Community NGINX Ingress controller annotations | diff --git a/advanced/am-pattern-3/templates/mi/instance-1/wso2am-pattern-3-mi-conf.yaml b/advanced/am-pattern-3/templates/mi/instance-1/wso2am-pattern-3-mi-conf.yaml new file mode 100644 index 00000000..046d1a98 --- /dev/null +++ b/advanced/am-pattern-3/templates/mi/instance-1/wso2am-pattern-3-mi-conf.yaml @@ -0,0 +1,26 @@ +{{- if .Values.wso2.deployment.mi.config }} +# Copyright (c) 2023, WSO2 LLC (https://www.wso2.com) All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "am-pattern-3.resource.prefix" . }}-mi-1-conf + namespace: {{ .Release.Namespace }} +data: + {{- range $index, $content := .Values.wso2.deployment.mi.config }} + {{ $index }}: |- +{{ tpl $content $ | indent 4 }} + {{- end }} +{{- end }} diff --git a/advanced/am-pattern-3/templates/mi/instance-1/wso2am-pattern-3-mi-deployment.yaml b/advanced/am-pattern-3/templates/mi/instance-1/wso2am-pattern-3-mi-deployment.yaml index 7d60dbcc..6c90dbe7 100644 --- a/advanced/am-pattern-3/templates/mi/instance-1/wso2am-pattern-3-mi-deployment.yaml +++ b/advanced/am-pattern-3/templates/mi/instance-1/wso2am-pattern-3-mi-deployment.yaml @@ -31,6 +31,10 @@ spec: node: {{ template "am-pattern-3.resource.prefix" . }}-mi-1 template: metadata: + {{- if .Values.wso2.deployment.mi.config }} + annotations: + checksum.mi.conf: {{ include (print $.Template.BasePath "/mi/instance-1/wso2am-pattern-3-mi-conf.yaml") . | sha256sum }} + {{- end }} labels: deployment: {{ template "am-pattern-3.resource.prefix" . }}-mi node: {{ template "am-pattern-3.resource.prefix" . }}-mi-1 @@ -100,6 +104,12 @@ spec: value: {{ $val | quote }} {{- end }} {{- end }} + {{- if .Values.wso2.deployment.mi.config }} + volumeMounts: + - name: wso2mi-conf + mountPath: /home/wso2carbon/wso2-config-volume/conf/deployment.toml + subPath: deployment.toml + {{- end }} serviceAccountName: {{ .Values.kubernetes.serviceAccount }} {{- if .Values.wso2.deployment.mi.imagePullSecrets }} imagePullSecrets: @@ -108,3 +118,9 @@ spec: imagePullSecrets: - name: {{ template "am-pattern-3.resource.prefix" . }}-mi-1-wso2-private-registry-creds {{ end }} + {{- if .Values.wso2.deployment.mi.config }} + volumes: + - name: wso2mi-conf + configMap: + name: {{ template "am-pattern-3.resource.prefix" . }}-mi-1-conf + {{ end }} diff --git a/advanced/am-pattern-3/values.yaml b/advanced/am-pattern-3/values.yaml index 8ddd601f..40f4cc7b 100644 --- a/advanced/am-pattern-3/values.yaml +++ b/advanced/am-pattern-3/values.yaml @@ -19,7 +19,7 @@ wso2: subscription: username: "" password: "" - + # WSO2 Choreo Analytics Parameters # If provided, these parameters will be used publish analytics data to Choreo Analytics environment (https://apim.docs.wso2.com/en/latest/observe/api-manager-analytics/configure-analytics/register-for-analytics/). choreoAnalytics: @@ -164,7 +164,7 @@ wso2: # API Manager's Control Plane specific configurations cp: - db: + db: hostname: wso2am-mysql-db-service port: 3306 type: mysql @@ -174,7 +174,7 @@ wso2: username: wso2carbon password: wso2carbon url: jdbc:mysql://wso2am-mysql-db-service:3306/WSO2AM_DB?useSSL=false&autoReconnect=true&requireSSL=false&verifyServerCertificate=false - apim_shared: + apim_shared: username: wso2carbon password: wso2carbon url: jdbc:mysql://wso2am-mysql-db-service:3306/WSO2AM_SHARED_DB?useSSL=false&autoReconnect=true&requireSSL=false&verifyServerCertificate=false @@ -287,6 +287,12 @@ wso2: # Environment variables for the Micro integrator deployment. envs: # ENV_NAME: ENV_VALUE + + # Add the customized deployment configurations for the WSO2 MI v4.2.0 (/conf/deployment.toml) + # config: + # deployment.toml: |- + # # toml configurations for the WSO2 MI v4.2.0 + # Configure synapse testing. synapseTest: enabled: false diff --git a/advanced/am-pattern-4/README.md b/advanced/am-pattern-4/README.md index e9e2b231..9a067ce4 100644 --- a/advanced/am-pattern-4/README.md +++ b/advanced/am-pattern-4/README.md @@ -312,6 +312,7 @@ If you do not have an active WSO2 subscription, **do not change** the parameters | `wso2.deployment.mi.resources.requests.cpu` | The minimum amount of CPU that should be allocated for a Pod | 500m | | `wso2.deployment.mi.resources.limits.memory` | The maximum amount of memory that should be allocated for a Pod | 1Gi | | `wso2.deployment.mi.resources.limits.cpu` | The maximum amount of CPU that should be allocated for a Pod | 1000m | +| `wso2.deployment.mi.config` | Custom deployment configuration file (`/conf/deployment.toml`) | - | | `wso2.deployment.mi.ingress.management.hostname` | Hostname for Micro Integrator management apis | `management.mi.wso2.com` | | `wso2.deployment.mi.ingress.management.annotations` | Ingress resource annotations for API Manager Gateway | Community NGINX Ingress controller annotations | diff --git a/advanced/am-pattern-4/templates/mi/wso2am-pattern-4-mi-conf.yaml b/advanced/am-pattern-4/templates/mi/wso2am-pattern-4-mi-conf.yaml new file mode 100644 index 00000000..1e4a513a --- /dev/null +++ b/advanced/am-pattern-4/templates/mi/wso2am-pattern-4-mi-conf.yaml @@ -0,0 +1,26 @@ +{{- if .Values.wso2.deployment.mi.config }} +# Copyright (c) 2023, WSO2 LLC (https://www.wso2.com) All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "am-pattern-4.resource.prefix" . }}-mi-conf + namespace: {{ .Release.Namespace }} +data: + {{- range $index, $content := .Values.wso2.deployment.mi.config }} + {{ $index }}: |- +{{ tpl $content $ | indent 4 }} + {{- end }} +{{- end }} diff --git a/advanced/am-pattern-4/templates/mi/wso2am-pattern-4-mi-deployment.yaml b/advanced/am-pattern-4/templates/mi/wso2am-pattern-4-mi-deployment.yaml index 1e23e484..9fb1efba 100644 --- a/advanced/am-pattern-4/templates/mi/wso2am-pattern-4-mi-deployment.yaml +++ b/advanced/am-pattern-4/templates/mi/wso2am-pattern-4-mi-deployment.yaml @@ -31,6 +31,10 @@ spec: node: {{ template "am-pattern-4.resource.prefix" . }}-mi template: metadata: + {{- if .Values.wso2.deployment.mi.config }} + annotations: + checksum.mi.conf: {{ include (print $.Template.BasePath "/mi/wso2am-pattern-4-mi-conf.yaml") . | sha256sum }} + {{- end }} labels: deployment: {{ template "am-pattern-4.resource.prefix" . }}-mi node: {{ template "am-pattern-4.resource.prefix" . }}-mi @@ -100,6 +104,12 @@ spec: value: {{ $val | quote }} {{- end }} {{- end }} + {{- if .Values.wso2.deployment.mi.config }} + volumeMounts: + - name: wso2mi-conf + mountPath: /home/wso2carbon/wso2-config-volume/conf/deployment.toml + subPath: deployment.toml + {{- end }} serviceAccountName: {{ .Values.kubernetes.serviceAccount }} {{- if .Values.wso2.deployment.mi.imagePullSecrets }} imagePullSecrets: @@ -108,3 +118,9 @@ spec: imagePullSecrets: - name: {{ template "am-pattern-4.resource.prefix" . }}-mi-wso2-private-registry-creds {{ end }} + {{- if .Values.wso2.deployment.mi.config }} + volumes: + - name: wso2mi-conf + configMap: + name: {{ template "am-pattern-4.resource.prefix" . }}-mi-conf + {{ end }} diff --git a/advanced/am-pattern-4/values.yaml b/advanced/am-pattern-4/values.yaml index 64b3e8a0..09a1b718 100644 --- a/advanced/am-pattern-4/values.yaml +++ b/advanced/am-pattern-4/values.yaml @@ -19,7 +19,7 @@ wso2: subscription: username: "" password: "" - + # WSO2 Choreo Analytics Parameters # If provided, these parameters will be used publish analytics data to Choreo Analytics environment (https://apim.docs.wso2.com/en/latest/observe/api-manager-analytics/configure-analytics/register-for-analytics/). choreoAnalytics: @@ -117,7 +117,7 @@ wso2: annotations: kubernetes.io/ingress.class: "nginx" nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" - + # API Manager's WebSocket specific configurations websocket: # Configure Ingress @@ -177,28 +177,28 @@ wso2: initialDelaySeconds: 180 # How often (in seconds) to perform the probe periodSeconds: 10 - # Number of deployment replicas + # Number of deployment replicas replicas: 2 resources: - # These are the minimum resource recommendations for running WSO2 API Management Control Plane deployment - # as per official documentation (https://apim.docs.wso2.com/en/latest/install-and-setup/install/installation-prerequisites/) - requests: - memory: "2Gi" - cpu: "2000m" - limits: - memory: "3Gi" - cpu: "3000m" - # JVM settings - # These are the resource allocation configurations associated with the JVM - # Refer to the official documentation for advanced details (https://apim.docs.wso2.com/en/latest/install-and-setup/install/installation-prerequisites/) - jvm: - # Resource allocation for the Java Heap - heap: - memory: + # These are the minimum resource recommendations for running WSO2 API Management Control Plane deployment + # as per official documentation (https://apim.docs.wso2.com/en/latest/install-and-setup/install/installation-prerequisites/) + requests: + memory: "2Gi" + cpu: "2000m" + limits: + memory: "3Gi" + cpu: "3000m" + # JVM settings + # These are the resource allocation configurations associated with the JVM + # Refer to the official documentation for advanced details (https://apim.docs.wso2.com/en/latest/install-and-setup/install/installation-prerequisites/) + jvm: + # Resource allocation for the Java Heap + heap: + memory: # Initial and minimum Heap size - xms: "1024m" - # Maximum Heap size - xmx: "1024m" + xms: "1024m" + # Maximum Heap size + xmx: "1024m" # If the deployment configurations for the Gateway profile of WSO2 API Manager v4.0.0 (/repository/conf/deployment.toml), # add the customized configuration file under (wso2 -> deployment -> am -> gateway -> config -> deployment.toml) @@ -208,7 +208,7 @@ wso2: # API Manager's Control Plane specific configurations cp: - db: + db: hostname: wso2am-mysql-db-service port: 3306 type: mysql @@ -218,7 +218,7 @@ wso2: username: wso2carbon password: wso2carbon url: jdbc:mysql://wso2am-mysql-db-service:3306/WSO2AM_DB?useSSL=false&autoReconnect=true&requireSSL=false&verifyServerCertificate=false - apim_shared: + apim_shared: username: wso2carbon password: wso2carbon url: jdbc:mysql://wso2am-mysql-db-service:3306/WSO2AM_SHARED_DB?useSSL=false&autoReconnect=true&requireSSL=false&verifyServerCertificate=false @@ -331,6 +331,12 @@ wso2: # Environment variables for the Micro integrator deployment. envs: # ENV_NAME: ENV_VALUE + + # Add the customized deployment configurations for the WSO2 MI v4.2.0 (/conf/deployment.toml) + # config: + # deployment.toml: |- + # # toml configurations for the WSO2 MI v4.2.0 + # Configure synapse testing. synapseTest: enabled: false