From eb0daea90b69c06ac9a8dd228b906a4dda63c290 Mon Sep 17 00:00:00 2001 From: Chiranga Alwis Date: Fri, 28 Aug 2020 17:34:25 +0530 Subject: [PATCH] [3.2.0] Fix merge errors encountered in master merge --- .../instance-1/wso2am-pattern-1-am-conf.yaml | 4 +- .../wso2am-pattern-1-am-conf.yaml~HEAD | 292 ------------------ .../wso2am-pattern-1-am-conf.yaml~HEAD_0 | 292 ------------------ .../wso2am-pattern-1-am-deployment.yaml~HEAD | 0 ...wso2am-pattern-1-am-deployment.yaml~HEAD_0 | 0 .../wso2am-pattern-1-am-service.yaml~HEAD | 0 .../wso2am-pattern-1-am-service.yaml~HEAD_0 | 0 .../instance-2/wso2am-pattern-1-am-conf.yaml | 4 +- .../wso2am-pattern-1-am-conf-entrypoint.yaml | 2 +- ...so2am-pattern-2-am-gateway-deployment.yaml | 39 +-- ...2am-pattern-2-am-gateway-volume-claim.yaml | 26 ++ ...attern-3-am-devportal-conf-entrypoint.yaml | 4 + .../wso2am-pattern-3-am-devportal-conf.yaml | 7 +- ...-pattern-3-am-devportal-volume-claims.yaml | 44 +-- ...so2am-pattern-3-am-gateway-deployment.yaml | 129 ++++++++ ...attern-3-am-publisher-conf-entrypoint.yaml | 4 + .../wso2am-pattern-3-am-publisher-conf.yaml | 6 +- ...pattern-3-am-publisher-volume-claims.yaml} | 0 ...iew APIM DevPortal deployment in pattern 3 | 101 ------ 19 files changed, 208 insertions(+), 746 deletions(-) delete mode 100644 advanced/am-pattern-1/templates/am/instance-1/wso2am-pattern-1-am-conf.yaml~HEAD delete mode 100644 advanced/am-pattern-1/templates/am/instance-1/wso2am-pattern-1-am-conf.yaml~HEAD_0 delete mode 100644 advanced/am-pattern-1/templates/am/instance-1/wso2am-pattern-1-am-deployment.yaml~HEAD delete mode 100644 advanced/am-pattern-1/templates/am/instance-1/wso2am-pattern-1-am-deployment.yaml~HEAD_0 delete mode 100644 advanced/am-pattern-1/templates/am/instance-1/wso2am-pattern-1-am-service.yaml~HEAD delete mode 100644 advanced/am-pattern-1/templates/am/instance-1/wso2am-pattern-1-am-service.yaml~HEAD_0 create mode 100644 advanced/am-pattern-2/templates/am/gateway/wso2am-pattern-2-am-gateway-volume-claim.yaml create mode 100644 advanced/am-pattern-3/templates/am/gateway/wso2am-pattern-3-am-gateway-deployment.yaml rename advanced/am-pattern-3/templates/am/publisher/{wso2am-pattern-3-am-publisher-volume-claims.yaml~HEAD => wso2am-pattern-3-am-publisher-volume-claims.yaml} (100%) delete mode 100644 advanced/am-pattern-3/templates/am/publisher/wso2am-pattern-3-am-publisher-volume-claims.yaml~[v3.1.x] Review APIM DevPortal deployment in pattern 3 diff --git a/advanced/am-pattern-1/templates/am/instance-1/wso2am-pattern-1-am-conf.yaml b/advanced/am-pattern-1/templates/am/instance-1/wso2am-pattern-1-am-conf.yaml index cda9de4e..8c24d26d 100644 --- a/advanced/am-pattern-1/templates/am/instance-1/wso2am-pattern-1-am-conf.yaml +++ b/advanced/am-pattern-1/templates/am/instance-1/wso2am-pattern-1-am-conf.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. +# Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) 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. @@ -21,7 +21,7 @@ metadata: data: {{- range $index, $content := .Values.wso2.deployment.am.config }} {{ $index }}: |- - {{ tpl $content $ | indent 4 }} + {{ tpl $content $ | indent 4 }} {{- end }} {{ else }} diff --git a/advanced/am-pattern-1/templates/am/instance-1/wso2am-pattern-1-am-conf.yaml~HEAD b/advanced/am-pattern-1/templates/am/instance-1/wso2am-pattern-1-am-conf.yaml~HEAD deleted file mode 100644 index 52187b33..00000000 --- a/advanced/am-pattern-1/templates/am/instance-1/wso2am-pattern-1-am-conf.yaml~HEAD +++ /dev/null @@ -1,292 +0,0 @@ -# Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) 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" . }}-am-1-conf - namespace : {{ .Release.Namespace }} - {{ if .Values.wso2.deployment.am.config }} -data: - {{- range $index, $content := .Values.wso2.deployment.am.config }} - {{ $index }}: |- - {{ tpl $content $ | indent 4 }} - {{- end }} - - {{ else }} -data: - deployment.toml: |- - [server] - hostname = "{{ .Values.wso2.deployment.am.hostname }}" - node_ip = "$env{NODE_IP}" - #offset=0 - mode = "single" #single or ha - base_path = "${carbon.protocol}://${carbon.host}:${carbon.management.port}" - #discard_empty_caches = false - server_role = "default" - - [super_admin] - username = "admin" - password = "admin" - create_admin_account = true - - [user_store] - type = "database_unique_id" - - [database.apim_db] - type = "mysql" - url = "jdbc:mysql://wso2am-mysql-db-service:3306/WSO2AM_DB?autoReconnect=true&useSSL=false" - username = "wso2carbon" - password = "wso2carbon" - driver = "com.mysql.cj.jdbc.Driver" - - [database.shared_db] - type = "mysql" - url = "jdbc:mysql://wso2am-mysql-db-service:3306/WSO2AM_SHARED_DB?autoReconnect=true&useSSL=false" - username = "wso2carbon" - password = "wso2carbon" - driver = "com.mysql.cj.jdbc.Driver" - - [keystore.tls] - file_name = "wso2carbon.jks" - type = "JKS" - password = "wso2carbon" - alias = "wso2carbon" - key_password = "wso2carbon" - - #[keystore.primary] - #file_name = "wso2carbon.jks" - #type = "JKS" - #password = "wso2carbon" - #alias = "wso2carbon" - #key_password = "wso2carbon" - - #[keystore.internal] - #file_name = "wso2carbon.jks" - #type = "JKS" - #password = "wso2carbon" - #alias = "wso2carbon" - #key_password = "wso2carbon" - - [[apim.gateway.environment]] - name = "Production and Sandbox" - type = "hybrid" - display_in_api_console = true - description = "This is a hybrid gateway that handles both production and sandbox token traffic." - show_as_token_endpoint_url = true - service_url = "https://localhost:${mgt.transport.https.port}/services/" - username= "${admin.username}" - password= "${admin.password}" - ws_endpoint = "ws://localhost:9099" - wss_endpoint = "wss://localhost:8099" - http_endpoint = "http://{{ .Values.wso2.deployment.am.gateway.hostname }}" - https_endpoint = "https://{{ .Values.wso2.deployment.am.gateway.hostname }}" - - #[apim.cache.gateway_token] - #enable = true - #expiry_time = "900s" - - #[apim.cache.resource] - #enable = true - #expiry_time = "900s" - - #[apim.cache.km_token] - #enable = false - #expiry_time = "15m" - - #[apim.cache.recent_apis] - #enable = false - - #[apim.cache.scopes] - #enable = true - - #[apim.cache.publisher_roles] - #enable = true - - #[apim.cache.jwt_claim] - #enable = true - #expiry_time = "15m" - - #[apim.cache.tags] - #expiry_time = "2m" - - [apim.analytics] - enable = true - store_api_url = "https://{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-service:7444" - #username = "$ref{super_admin.username}" - #password = "$ref{super_admin.password}" - #event_publisher_type = "default" - #event_publisher_impl = "org.wso2.carbon.apimgt.usage.publisher.APIMgtUsageDataBridgeDataPublisher" - #publish_response_size = true - - [[apim.analytics.url_group]] - analytics_url =["tcp://{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-statefulset-0.{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-headless-service:7612","tcp://{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-statefulset-1.{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-headless-service:7612"] - analytics_auth_url =["ssl://{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-statefulset-0.{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-headless-service:7712","ssl://{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-statefulset-1.{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-headless-service:7712"] - type = "failover" - - #[[apim.analytics.url_group]] - #analytics_url =["tcp://analytics1:7612","tcp://analytics2:7612"] - #analytics_auth_url =["ssl://analytics1:7712","ssl://analytics2:7712"] - #type = "failover" - - #[apim.key_manager] - #service_url = "https://localhost:${mgt.transport.https.port}/services/" - #username = "$ref{super_admin.username}" - #password = "$ref{super_admin.password}" - #pool.init_idle_capacity = 50 - #pool.max_idle = 100 - #key_validation_handler_type = "default" - #key_validation_handler_type = "custom" - #key_validation_handler_impl = "org.wso2.carbon.apimgt.keymgt.handlers.DefaultKeyValidationHandler" - - #[apim.idp] - #authorize_endpoint = "https://localhost:${mgt.transport.https.port}/oauth2/authorize" - #oidc_logout_endpoint = "https://localhost:${mgt.transport.https.port}/oidc/logout" - - #[apim.jwt] - #enable = true - #encoding = "base64" # base64,base64url - #generator_impl = "org.wso2.carbon.apimgt.keymgt.token.JWTGenerator" - #claim_dialect = "http://wso2.org/claims" - #header = "X-JWT-Assertion" - #signing_algorithm = "SHA256withRSA" - #enable_user_claims = true - #claims_extractor_impl = "org.wso2.carbon.apimgt.impl.token.DefaultClaimsRetriever" - - #[apim.oauth_config] - #enable_outbound_auth_header = false - #auth_header = "Authorization" - #revoke_endpoint = "https://localhost:${https.nio.port}/revoke" - #enable_token_encryption = false - #enable_token_hashing = false - - [apim.devportal] - url = "https://{{ .Values.wso2.deployment.am.hostname }}/devportal" - #enable_application_sharing = false - #if application_sharing_type, application_sharing_impl both defined priority goes to application_sharing_impl - #application_sharing_type = "default" #changed type, saml, default #todo: check the new config for rest api - #application_sharing_impl = "org.wso2.carbon.apimgt.impl.SAMLGroupIDExtractorImpl" - #display_multiple_versions = false - #display_deprecated_apis = false - #enable_comments = true - #enable_ratings = true - #enable_forum = true - - [transport.https.properties] - proxyPort = 443 - - [apim.cors] - allow_origins = "*" - allow_methods = ["GET","PUT","POST","DELETE","PATCH","OPTIONS"] - allow_headers = ["authorization","Access-Control-Allow-Origin","Content-Type","SOAPAction","apikey"] - allow_credentials = false - - [apim.throttling] - #enable_data_publishing = true - #enable_policy_deploy = true - #enable_blacklist_condition = true - #enable_persistence = true - #throttle_decision_endpoints = ["tcp://localhost:5672","tcp://localhost:5672"] - - #[apim.throttling.blacklist_condition] - #start_delay = "5m" - #period = "1h" - - #[apim.throttling.jms] - #start_delay = "5m" - - #[apim.throttling.event_sync] - #hostName = "0.0.0.0" - #port = 11224 - - #[apim.throttling.event_management] - #hostName = "0.0.0.0" - #port = 10005 - - [[apim.throttling.url_group]] - traffic_manager_urls = ["tcp://localhost:9611"] - traffic_manager_auth_urls = ["ssl://localhost:9711"] - type = "loadbalance" - - [[apim.throttling.url_group]] - traffic_manager_urls = ["tcp://{{ template "am-pattern-1.resource.prefix" . }}-am-2-service:9611"] - traffic_manager_auth_urls = ["ssl://{{ template "am-pattern-1.resource.prefix" . }}-am-2-service:9711"] - type = "loadbalance" - - #[apim.workflow] - #enable = false - #service_url = "https://localhost:9445/bpmn" - #username = "$ref{super_admin.username}" - #password = "$ref{super_admin.password}" - #callback_endpoint = "https://localhost:${mgt.transport.https.port}/api/am/admin/v0.16/workflows/update-workflow-status" - #token_endpoint = "https://localhost:${https.nio.port}/token" - #client_registration_endpoint = "https://localhost:${mgt.transport.https.port}/client-registration/v0.16/register" - #client_registration_username = "$ref{super_admin.username}" - #client_registration_password = "$ref{super_admin.password}" - - #data bridge config - #[transport.receiver] - #type = "binary" - #worker_threads = 10 - #session_timeout = "30m" - #keystore.file_name = "$ref{keystore.tls.file_name}" - #keystore.password = "$ref{keystore.tls.password}" - #tcp_port = 9611 - #ssl_port = 9711 - #ssl_receiver_thread_pool_size = 100 - #tcp_receiver_thread_pool_size = 100 - #ssl_enabled_protocols = ["TLSv1","TLSv1.1","TLSv1.2"] - #ciphers = ["SSL_RSA_WITH_RC4_128_MD5","SSL_RSA_WITH_RC4_128_SHA"] - - #[apim.notification] - #from_address = "APIM.com" - #username = "APIM" - #password = "APIM+123" - #hostname = "localhost" - #port = 3025 - #enable_start_tls = false - #enable_authentication = true - - #[apim.token.revocation] - #notifier_impl = "org.wso2.carbon.apimgt.keymgt.events.TokenRevocationNotifierImpl" - #enable_realtime_notifier = true - #realtime_notifier.ttl = 5000 - #enable_persistent_notifier = true - #persistent_notifier.hostname = "https://localhost:2379/v2/keys/jti/" - #persistent_notifier.ttl = 5000 - #persistent_notifier.username = "root" - #persistent_notifier.password = "root" - - [[event_handler]] - name="userPostSelfRegistration" - subscriptions=["POST_ADD_USER"] - - [service_provider] - sp_name_regex = "^[\\sa-zA-Z0-9._-]*$" - - {{ if .Values.wso2.deployment.persistentRuntimeArtifacts.apacheSolrIndexing.enabled }} - [database.local] - url = "jdbc:h2:/home/wso2carbon/solr/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE" - - [indexing] - location = "/home/wso2carbon/solr/indexed-data" - {{ else }} - [database.local] - url = "jdbc:h2:./repository/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE" - {{ end }} - {{ end }} - - jndi2.properties: |- - connectionfactory.TopicConnectionFactory = amqp://admin:admin@clientid/carbon?brokerlist='tcp://{{ template "am-pattern-1.resource.prefix" . }}-am-2-service:5672' - topic.throttleData = throttleData diff --git a/advanced/am-pattern-1/templates/am/instance-1/wso2am-pattern-1-am-conf.yaml~HEAD_0 b/advanced/am-pattern-1/templates/am/instance-1/wso2am-pattern-1-am-conf.yaml~HEAD_0 deleted file mode 100644 index 52187b33..00000000 --- a/advanced/am-pattern-1/templates/am/instance-1/wso2am-pattern-1-am-conf.yaml~HEAD_0 +++ /dev/null @@ -1,292 +0,0 @@ -# Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) 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" . }}-am-1-conf - namespace : {{ .Release.Namespace }} - {{ if .Values.wso2.deployment.am.config }} -data: - {{- range $index, $content := .Values.wso2.deployment.am.config }} - {{ $index }}: |- - {{ tpl $content $ | indent 4 }} - {{- end }} - - {{ else }} -data: - deployment.toml: |- - [server] - hostname = "{{ .Values.wso2.deployment.am.hostname }}" - node_ip = "$env{NODE_IP}" - #offset=0 - mode = "single" #single or ha - base_path = "${carbon.protocol}://${carbon.host}:${carbon.management.port}" - #discard_empty_caches = false - server_role = "default" - - [super_admin] - username = "admin" - password = "admin" - create_admin_account = true - - [user_store] - type = "database_unique_id" - - [database.apim_db] - type = "mysql" - url = "jdbc:mysql://wso2am-mysql-db-service:3306/WSO2AM_DB?autoReconnect=true&useSSL=false" - username = "wso2carbon" - password = "wso2carbon" - driver = "com.mysql.cj.jdbc.Driver" - - [database.shared_db] - type = "mysql" - url = "jdbc:mysql://wso2am-mysql-db-service:3306/WSO2AM_SHARED_DB?autoReconnect=true&useSSL=false" - username = "wso2carbon" - password = "wso2carbon" - driver = "com.mysql.cj.jdbc.Driver" - - [keystore.tls] - file_name = "wso2carbon.jks" - type = "JKS" - password = "wso2carbon" - alias = "wso2carbon" - key_password = "wso2carbon" - - #[keystore.primary] - #file_name = "wso2carbon.jks" - #type = "JKS" - #password = "wso2carbon" - #alias = "wso2carbon" - #key_password = "wso2carbon" - - #[keystore.internal] - #file_name = "wso2carbon.jks" - #type = "JKS" - #password = "wso2carbon" - #alias = "wso2carbon" - #key_password = "wso2carbon" - - [[apim.gateway.environment]] - name = "Production and Sandbox" - type = "hybrid" - display_in_api_console = true - description = "This is a hybrid gateway that handles both production and sandbox token traffic." - show_as_token_endpoint_url = true - service_url = "https://localhost:${mgt.transport.https.port}/services/" - username= "${admin.username}" - password= "${admin.password}" - ws_endpoint = "ws://localhost:9099" - wss_endpoint = "wss://localhost:8099" - http_endpoint = "http://{{ .Values.wso2.deployment.am.gateway.hostname }}" - https_endpoint = "https://{{ .Values.wso2.deployment.am.gateway.hostname }}" - - #[apim.cache.gateway_token] - #enable = true - #expiry_time = "900s" - - #[apim.cache.resource] - #enable = true - #expiry_time = "900s" - - #[apim.cache.km_token] - #enable = false - #expiry_time = "15m" - - #[apim.cache.recent_apis] - #enable = false - - #[apim.cache.scopes] - #enable = true - - #[apim.cache.publisher_roles] - #enable = true - - #[apim.cache.jwt_claim] - #enable = true - #expiry_time = "15m" - - #[apim.cache.tags] - #expiry_time = "2m" - - [apim.analytics] - enable = true - store_api_url = "https://{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-service:7444" - #username = "$ref{super_admin.username}" - #password = "$ref{super_admin.password}" - #event_publisher_type = "default" - #event_publisher_impl = "org.wso2.carbon.apimgt.usage.publisher.APIMgtUsageDataBridgeDataPublisher" - #publish_response_size = true - - [[apim.analytics.url_group]] - analytics_url =["tcp://{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-statefulset-0.{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-headless-service:7612","tcp://{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-statefulset-1.{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-headless-service:7612"] - analytics_auth_url =["ssl://{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-statefulset-0.{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-headless-service:7712","ssl://{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-statefulset-1.{{ template "am-pattern-1.resource.prefix" . }}-am-analytics-worker-headless-service:7712"] - type = "failover" - - #[[apim.analytics.url_group]] - #analytics_url =["tcp://analytics1:7612","tcp://analytics2:7612"] - #analytics_auth_url =["ssl://analytics1:7712","ssl://analytics2:7712"] - #type = "failover" - - #[apim.key_manager] - #service_url = "https://localhost:${mgt.transport.https.port}/services/" - #username = "$ref{super_admin.username}" - #password = "$ref{super_admin.password}" - #pool.init_idle_capacity = 50 - #pool.max_idle = 100 - #key_validation_handler_type = "default" - #key_validation_handler_type = "custom" - #key_validation_handler_impl = "org.wso2.carbon.apimgt.keymgt.handlers.DefaultKeyValidationHandler" - - #[apim.idp] - #authorize_endpoint = "https://localhost:${mgt.transport.https.port}/oauth2/authorize" - #oidc_logout_endpoint = "https://localhost:${mgt.transport.https.port}/oidc/logout" - - #[apim.jwt] - #enable = true - #encoding = "base64" # base64,base64url - #generator_impl = "org.wso2.carbon.apimgt.keymgt.token.JWTGenerator" - #claim_dialect = "http://wso2.org/claims" - #header = "X-JWT-Assertion" - #signing_algorithm = "SHA256withRSA" - #enable_user_claims = true - #claims_extractor_impl = "org.wso2.carbon.apimgt.impl.token.DefaultClaimsRetriever" - - #[apim.oauth_config] - #enable_outbound_auth_header = false - #auth_header = "Authorization" - #revoke_endpoint = "https://localhost:${https.nio.port}/revoke" - #enable_token_encryption = false - #enable_token_hashing = false - - [apim.devportal] - url = "https://{{ .Values.wso2.deployment.am.hostname }}/devportal" - #enable_application_sharing = false - #if application_sharing_type, application_sharing_impl both defined priority goes to application_sharing_impl - #application_sharing_type = "default" #changed type, saml, default #todo: check the new config for rest api - #application_sharing_impl = "org.wso2.carbon.apimgt.impl.SAMLGroupIDExtractorImpl" - #display_multiple_versions = false - #display_deprecated_apis = false - #enable_comments = true - #enable_ratings = true - #enable_forum = true - - [transport.https.properties] - proxyPort = 443 - - [apim.cors] - allow_origins = "*" - allow_methods = ["GET","PUT","POST","DELETE","PATCH","OPTIONS"] - allow_headers = ["authorization","Access-Control-Allow-Origin","Content-Type","SOAPAction","apikey"] - allow_credentials = false - - [apim.throttling] - #enable_data_publishing = true - #enable_policy_deploy = true - #enable_blacklist_condition = true - #enable_persistence = true - #throttle_decision_endpoints = ["tcp://localhost:5672","tcp://localhost:5672"] - - #[apim.throttling.blacklist_condition] - #start_delay = "5m" - #period = "1h" - - #[apim.throttling.jms] - #start_delay = "5m" - - #[apim.throttling.event_sync] - #hostName = "0.0.0.0" - #port = 11224 - - #[apim.throttling.event_management] - #hostName = "0.0.0.0" - #port = 10005 - - [[apim.throttling.url_group]] - traffic_manager_urls = ["tcp://localhost:9611"] - traffic_manager_auth_urls = ["ssl://localhost:9711"] - type = "loadbalance" - - [[apim.throttling.url_group]] - traffic_manager_urls = ["tcp://{{ template "am-pattern-1.resource.prefix" . }}-am-2-service:9611"] - traffic_manager_auth_urls = ["ssl://{{ template "am-pattern-1.resource.prefix" . }}-am-2-service:9711"] - type = "loadbalance" - - #[apim.workflow] - #enable = false - #service_url = "https://localhost:9445/bpmn" - #username = "$ref{super_admin.username}" - #password = "$ref{super_admin.password}" - #callback_endpoint = "https://localhost:${mgt.transport.https.port}/api/am/admin/v0.16/workflows/update-workflow-status" - #token_endpoint = "https://localhost:${https.nio.port}/token" - #client_registration_endpoint = "https://localhost:${mgt.transport.https.port}/client-registration/v0.16/register" - #client_registration_username = "$ref{super_admin.username}" - #client_registration_password = "$ref{super_admin.password}" - - #data bridge config - #[transport.receiver] - #type = "binary" - #worker_threads = 10 - #session_timeout = "30m" - #keystore.file_name = "$ref{keystore.tls.file_name}" - #keystore.password = "$ref{keystore.tls.password}" - #tcp_port = 9611 - #ssl_port = 9711 - #ssl_receiver_thread_pool_size = 100 - #tcp_receiver_thread_pool_size = 100 - #ssl_enabled_protocols = ["TLSv1","TLSv1.1","TLSv1.2"] - #ciphers = ["SSL_RSA_WITH_RC4_128_MD5","SSL_RSA_WITH_RC4_128_SHA"] - - #[apim.notification] - #from_address = "APIM.com" - #username = "APIM" - #password = "APIM+123" - #hostname = "localhost" - #port = 3025 - #enable_start_tls = false - #enable_authentication = true - - #[apim.token.revocation] - #notifier_impl = "org.wso2.carbon.apimgt.keymgt.events.TokenRevocationNotifierImpl" - #enable_realtime_notifier = true - #realtime_notifier.ttl = 5000 - #enable_persistent_notifier = true - #persistent_notifier.hostname = "https://localhost:2379/v2/keys/jti/" - #persistent_notifier.ttl = 5000 - #persistent_notifier.username = "root" - #persistent_notifier.password = "root" - - [[event_handler]] - name="userPostSelfRegistration" - subscriptions=["POST_ADD_USER"] - - [service_provider] - sp_name_regex = "^[\\sa-zA-Z0-9._-]*$" - - {{ if .Values.wso2.deployment.persistentRuntimeArtifacts.apacheSolrIndexing.enabled }} - [database.local] - url = "jdbc:h2:/home/wso2carbon/solr/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE" - - [indexing] - location = "/home/wso2carbon/solr/indexed-data" - {{ else }} - [database.local] - url = "jdbc:h2:./repository/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE" - {{ end }} - {{ end }} - - jndi2.properties: |- - connectionfactory.TopicConnectionFactory = amqp://admin:admin@clientid/carbon?brokerlist='tcp://{{ template "am-pattern-1.resource.prefix" . }}-am-2-service:5672' - topic.throttleData = throttleData diff --git a/advanced/am-pattern-1/templates/am/instance-1/wso2am-pattern-1-am-deployment.yaml~HEAD b/advanced/am-pattern-1/templates/am/instance-1/wso2am-pattern-1-am-deployment.yaml~HEAD deleted file mode 100644 index e69de29b..00000000 diff --git a/advanced/am-pattern-1/templates/am/instance-1/wso2am-pattern-1-am-deployment.yaml~HEAD_0 b/advanced/am-pattern-1/templates/am/instance-1/wso2am-pattern-1-am-deployment.yaml~HEAD_0 deleted file mode 100644 index e69de29b..00000000 diff --git a/advanced/am-pattern-1/templates/am/instance-1/wso2am-pattern-1-am-service.yaml~HEAD b/advanced/am-pattern-1/templates/am/instance-1/wso2am-pattern-1-am-service.yaml~HEAD deleted file mode 100644 index e69de29b..00000000 diff --git a/advanced/am-pattern-1/templates/am/instance-1/wso2am-pattern-1-am-service.yaml~HEAD_0 b/advanced/am-pattern-1/templates/am/instance-1/wso2am-pattern-1-am-service.yaml~HEAD_0 deleted file mode 100644 index e69de29b..00000000 diff --git a/advanced/am-pattern-1/templates/am/instance-2/wso2am-pattern-1-am-conf.yaml b/advanced/am-pattern-1/templates/am/instance-2/wso2am-pattern-1-am-conf.yaml index 288bd0a7..d770f5b8 100644 --- a/advanced/am-pattern-1/templates/am/instance-2/wso2am-pattern-1-am-conf.yaml +++ b/advanced/am-pattern-1/templates/am/instance-2/wso2am-pattern-1-am-conf.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. +# Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) 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. @@ -21,7 +21,7 @@ metadata: data: {{- range $index, $content := .Values.wso2.deployment.am.config }} {{ $index }}: |- - {{ tpl $content $ | indent 4 }} + {{ tpl $content $ | indent 4 }} {{- end }} {{ else }} diff --git a/advanced/am-pattern-1/templates/am/wso2am-pattern-1-am-conf-entrypoint.yaml b/advanced/am-pattern-1/templates/am/wso2am-pattern-1-am-conf-entrypoint.yaml index e0acdc77..5ca1efc8 100644 --- a/advanced/am-pattern-1/templates/am/wso2am-pattern-1-am-conf-entrypoint.yaml +++ b/advanced/am-pattern-1/templates/am/wso2am-pattern-1-am-conf-entrypoint.yaml @@ -17,7 +17,7 @@ apiVersion: v1 kind: ConfigMap metadata: - name: wso2am-pattern-1-am-conf-entrypoint + name: {{ template "am-pattern-1.resource.prefix" . }}-am-conf-entrypoint namespace: {{ .Release.Namespace }} data: docker-entrypoint.sh: | diff --git a/advanced/am-pattern-2/templates/am/gateway/wso2am-pattern-2-am-gateway-deployment.yaml b/advanced/am-pattern-2/templates/am/gateway/wso2am-pattern-2-am-gateway-deployment.yaml index cc243d4a..308b8816 100644 --- a/advanced/am-pattern-2/templates/am/gateway/wso2am-pattern-2-am-gateway-deployment.yaml +++ b/advanced/am-pattern-2/templates/am/gateway/wso2am-pattern-2-am-gateway-deployment.yaml @@ -15,7 +15,7 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ template "am-pattern-3.resource.prefix" . }}-am-gateway-deployment + name: {{ template "am-pattern-2.resource.prefix" . }}-am-gateway-deployment namespace: {{ .Release.Namespace }} spec: replicas: {{ .Values.wso2.deployment.am.gateway.replicas }} @@ -26,27 +26,27 @@ spec: type: RollingUpdate selector: matchLabels: - deployment: {{ template "am-pattern-3.resource.prefix" . }}-am-gateway + deployment: {{ template "am-pattern-2.resource.prefix" . }}-am-gateway template: metadata: annotations: - checksum.am.km.conf: {{ include (print $.Template.BasePath "/am/gateway/wso2am-pattern-3-am-gateway-conf.yaml") . | sha256sum }} + checksum.am.km.conf: {{ include (print $.Template.BasePath "/am/gateway/wso2am-pattern-2-am-gateway-conf.yaml") . | sha256sum }} labels: - deployment: {{ template "am-pattern-3.resource.prefix" . }}-am-gateway + deployment: {{ template "am-pattern-2.resource.prefix" . }}-am-gateway spec: initContainers: - name: init-apim-analytics image: busybox:1.32 - command: ['sh', '-c', 'echo -e "Checking for the availability of WSO2 API Manager Analytics Worker deployment"; while ! nc -z {{ template "am-pattern-3.resource.prefix" . }}-am-analytics-worker-service 7712; do sleep 1; printf "-"; done; echo -e " >> WSO2 API Manager Analytics Worker has started";'] + command: ['sh', '-c', 'echo -e "Checking for the availability of WSO2 API Manager Analytics Worker deployment"; while ! nc -z {{ template "am-pattern-2.resource.prefix" . }}-am-analytics-worker-service 7712; do sleep 1; printf "-"; done; echo -e " >> WSO2 API Manager Analytics Worker has started";'] - name: init-km image: busybox:1.32 - command: ['sh', '-c', 'echo -e "Checking for the availability of Key Manager deployment"; while ! nc -z {{ template "am-pattern-3.resource.prefix" . }}-km-service 9443; do sleep 1; printf "-"; done; echo -e " >> Key Manager has started";'] - - name: init-tm-1 + command: ['sh', '-c', 'echo -e "Checking for the availability of Key Manager deployment"; while ! nc -z {{ template "am-pattern-2.resource.prefix" . }}-km-service 9443; do sleep 1; printf "-"; done; echo -e " >> Key Manager has started";'] + - name: init-apim-1 image: busybox:1.32 - command: ['sh', '-c', 'echo -e "Checking for the availability of TM instance one deployment"; while ! nc -z {{ template "am-pattern-3.resource.prefix" . }}-am-tm-statefulset-0.{{ template "am-pattern-3.resource.prefix" . }}-am-tm-headless-service 9611; do sleep 1; printf "-"; done; echo -e " >> TM instance one has started";'] - - name: init-tm-2 + command: ['sh', '-c', 'echo -e "Checking for the availability of API Manager instance one deployment"; while ! nc -z {{ template "am-pattern-2.resource.prefix" . }}-am-1-service 9611; do sleep 1; printf "-"; done; echo -e " >> API Manager instance one has started";'] + - name: init-apim-2 image: busybox:1.32 - command: ['sh', '-c', 'echo -e "Checking for the availability of TM instance two deployment"; while ! nc -z {{ template "am-pattern-3.resource.prefix" . }}-am-tm-statefulset-1.{{ template "am-pattern-3.resource.prefix" . }}-am-tm-headless-service 9611; do sleep 1; printf "-"; done; echo -e " >> TM instance two has started";'] + command: ['sh', '-c', 'echo -e "Checking for the availability of API Manager instance two deployment"; while ! nc -z {{ template "am-pattern-2.resource.prefix" . }}-am-2-service 9611; do sleep 1; printf "-"; done; echo -e " >> API Manager instance two has started";'] containers: - name: wso2am-gateway {{- if .Values.wso2.deployment.am.dockerRegistry }} @@ -58,7 +58,6 @@ spec: {{- else }} image: docker.wso2.com/{{ .Values.wso2.deployment.am.imageName }}:{{ .Values.wso2.deployment.am.imageTag }} {{- end }} - imagePullPolicy: {{ .Values.wso2.deployment.am.imagePullPolicy }} env: - name: PROFILE_NAME value: gateway-worker @@ -75,16 +74,16 @@ spec: - /bin/sh - -c - nc -z localhost 8243 - initialDelaySeconds: {{ .Values.wso2.deployment.am.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.wso2.deployment.am.livenessProbe.periodSeconds }} + initialDelaySeconds: {{ .Values.wso2.deployment.am.gateway.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.wso2.deployment.am.gateway.livenessProbe.periodSeconds }} readinessProbe: exec: command: - /bin/sh - -c - nc -z localhost 8243 - initialDelaySeconds: {{ .Values.wso2.deployment.am.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.wso2.deployment.am.readinessProbe.periodSeconds }} + initialDelaySeconds: {{ .Values.wso2.deployment.am.gateway.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.wso2.deployment.am.gateway.readinessProbe.periodSeconds }} lifecycle: preStop: exec: @@ -96,6 +95,7 @@ spec: limits: memory: {{ .Values.wso2.deployment.am.resources.limits.memory }} cpu: {{ .Values.wso2.deployment.am.resources.limits.cpu }} + imagePullPolicy: {{ .Values.wso2.deployment.am.imagePullPolicy }} securityContext: runAsUser: 802 ports: @@ -111,19 +111,20 @@ spec: - name: wso2am-gateway-storage-volume mountPath: /home/wso2carbon/wso2am-3.2.0/repository/deployment/server/synapse-configs - name: wso2am-gateway-conf - mountPath: /home/wso2carbon/wso2-config-volume/repository/conf + mountPath: /home/wso2carbon/wso2-config-volume/repository/conf/deployment.toml + subPath: deployment.toml serviceAccountName: {{ .Values.kubernetes.serviceAccount }} {{- if .Values.wso2.deployment.am.imagePullSecrets }} imagePullSecrets: - name: {{ .Values.wso2.deployment.am.imagePullSecrets }} {{- else if and (not (eq .Values.wso2.subscription.username "")) (not (eq .Values.wso2.subscription.password "")) }} imagePullSecrets: - - name: {{ template "am-pattern-3.resource.prefix" . }}-wso2-private-registry-creds + - name: {{ template "am-pattern-2.resource.prefix" . }}-wso2-private-registry-creds {{ end }} volumes: - name: wso2am-gateway-storage-volume persistentVolumeClaim: - claimName: {{ template "am-pattern-3.resource.prefix" . }}-am-gateway-shared-synapse-configs-volume-claim + claimName: {{ template "am-pattern-2.resource.prefix" . }}-am-gateway-shared-synapse-configs-volume-claim - name: wso2am-gateway-conf configMap: - name: {{ template "am-pattern-3.resource.prefix" . }}-am-gateway-conf + name: {{ template "am-pattern-2.resource.prefix" . }}-am-gateway-conf diff --git a/advanced/am-pattern-2/templates/am/gateway/wso2am-pattern-2-am-gateway-volume-claim.yaml b/advanced/am-pattern-2/templates/am/gateway/wso2am-pattern-2-am-gateway-volume-claim.yaml new file mode 100644 index 00000000..4bdec299 --- /dev/null +++ b/advanced/am-pattern-2/templates/am/gateway/wso2am-pattern-2-am-gateway-volume-claim.yaml @@ -0,0 +1,26 @@ +# Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) 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: PersistentVolumeClaim +metadata: + name: {{ template "am-pattern-2.resource.prefix" . }}-am-gateway-shared-synapse-configs-volume-claim + namespace : {{ .Release.Namespace }} +spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.sharedArtifacts.capacity.synapseConfigs }} + storageClassName: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.storageClass }} diff --git a/advanced/am-pattern-3/templates/am/devportal/wso2am-pattern-3-am-devportal-conf-entrypoint.yaml b/advanced/am-pattern-3/templates/am/devportal/wso2am-pattern-3-am-devportal-conf-entrypoint.yaml index 31d8a5b9..d75257e1 100644 --- a/advanced/am-pattern-3/templates/am/devportal/wso2am-pattern-3-am-devportal-conf-entrypoint.yaml +++ b/advanced/am-pattern-3/templates/am/devportal/wso2am-pattern-3-am-devportal-conf-entrypoint.yaml @@ -1,3 +1,5 @@ + {{ if .Values.wso2.deployment.persistentRuntimeArtifacts.apacheSolrIndexing.enabled }} + # Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -83,3 +85,5 @@ data: # start the server with the specified profile and provided startup arguments sh ${WSO2_SERVER_HOME}/bin/wso2server.sh -Dprofile=${PROFILE_NAME} "$@" fi + + {{ end }} diff --git a/advanced/am-pattern-3/templates/am/devportal/wso2am-pattern-3-am-devportal-conf.yaml b/advanced/am-pattern-3/templates/am/devportal/wso2am-pattern-3-am-devportal-conf.yaml index 9a8fad21..3501078c 100644 --- a/advanced/am-pattern-3/templates/am/devportal/wso2am-pattern-3-am-devportal-conf.yaml +++ b/advanced/am-pattern-3/templates/am/devportal/wso2am-pattern-3-am-devportal-conf.yaml @@ -92,7 +92,7 @@ data: password= "$ref{super_admin.password}" [[apim.analytics.url_group]] - analytics_url =["tcp://{{ template "am-pattern-3.resource.prefix" . }}-am-analytics-worker-statefulset-0.{{ template "am-pattern-3.resource.prefix" . }}-am-analytics-worker-headless-service:7612","{{ template "am-pattern-3.resource.prefix" . }}-am-analytics-worker-statefulset-1.{{ template "am-pattern-3.resource.prefix" . }}-am-analytics-worker-headless-service:7612"] + analytics_url =["tcp://{{ template "am-pattern-3.resource.prefix" . }}-am-analytics-worker-statefulset-0.{{ template "am-pattern-3.resource.prefix" . }}-am-analytics-worker-headless-service:7612","tcp://{{ template "am-pattern-3.resource.prefix" . }}-am-analytics-worker-statefulset-1.{{ template "am-pattern-3.resource.prefix" . }}-am-analytics-worker-headless-service:7612"] analytics_auth_url =["ssl://{{ template "am-pattern-3.resource.prefix" . }}-am-analytics-worker-statefulset-0.{{ template "am-pattern-3.resource.prefix" . }}-am-analytics-worker-headless-service:7712","ssl://{{ template "am-pattern-3.resource.prefix" . }}-am-analytics-worker-statefulset-1.{{ template "am-pattern-3.resource.prefix" . }}-am-analytics-worker-headless-service:7712"] type = "failover" @@ -150,9 +150,14 @@ data: [transport.https.properties] proxyPort = 443 + {{ if .Values.wso2.deployment.persistentRuntimeArtifacts.apacheSolrIndexing.enabled }} [database.local] url = "jdbc:h2:/home/wso2carbon/solr/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE" [indexing] location = "/home/wso2carbon/solr/indexed-data" + {{ else }} + [database.local] + url = "jdbc:h2:./repository/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE" + {{ end }} {{- end }} diff --git a/advanced/am-pattern-3/templates/am/devportal/wso2am-pattern-3-am-devportal-volume-claims.yaml b/advanced/am-pattern-3/templates/am/devportal/wso2am-pattern-3-am-devportal-volume-claims.yaml index 5796bce6..d92ff7fb 100644 --- a/advanced/am-pattern-3/templates/am/devportal/wso2am-pattern-3-am-devportal-volume-claims.yaml +++ b/advanced/am-pattern-3/templates/am/devportal/wso2am-pattern-3-am-devportal-volume-claims.yaml @@ -1,4 +1,6 @@ -# Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + {{ if .Values.wso2.deployment.persistentRuntimeArtifacts.apacheSolrIndexing.enabled }} + +# Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) 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. @@ -12,36 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ template "am-pattern-3.resource.prefix" . }}-devportal-1-indexed-data-volume-claim - namespace : {{ .Release.Namespace }} -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.capacity.solrIndexedData }} - storageClassName: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.storageClass }} - ---- - -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ template "am-pattern-3.resource.prefix" . }}-devportal-2-indexed-data-volume-claim - namespace : {{ .Release.Namespace }} -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.capacity.solrIndexedData }} - storageClassName: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.storageClass }} - ---- - apiVersion: v1 kind: PersistentVolumeClaim metadata: @@ -52,7 +24,7 @@ spec: - ReadWriteMany resources: requests: - storage: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.capacity.carbonDatabase }} + storage: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.apacheSolrIndexing.capacity.carbonDatabase }} storageClassName: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.storageClass }} --- @@ -67,7 +39,7 @@ spec: - ReadWriteMany resources: requests: - storage: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.capacity.solrIndexedData }} + storage: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.apacheSolrIndexing.capacity.solrIndexedData }} storageClassName: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.storageClass }} --- @@ -82,7 +54,7 @@ spec: - ReadWriteMany resources: requests: - storage: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.capacity.carbonDatabase }} + storage: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.apacheSolrIndexing.capacity.carbonDatabase }} storageClassName: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.storageClass }} --- @@ -97,5 +69,7 @@ spec: - ReadWriteMany resources: requests: - storage: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.capacity.solrIndexedData }} + storage: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.apacheSolrIndexing.capacity.solrIndexedData }} storageClassName: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.storageClass }} + + {{ end }} diff --git a/advanced/am-pattern-3/templates/am/gateway/wso2am-pattern-3-am-gateway-deployment.yaml b/advanced/am-pattern-3/templates/am/gateway/wso2am-pattern-3-am-gateway-deployment.yaml new file mode 100644 index 00000000..cc243d4a --- /dev/null +++ b/advanced/am-pattern-3/templates/am/gateway/wso2am-pattern-3-am-gateway-deployment.yaml @@ -0,0 +1,129 @@ +# Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) 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: apps/v1 +kind: Deployment +metadata: + name: {{ template "am-pattern-3.resource.prefix" . }}-am-gateway-deployment + namespace: {{ .Release.Namespace }} +spec: + replicas: {{ .Values.wso2.deployment.am.gateway.replicas }} + strategy: + rollingUpdate: + maxSurge: {{ .Values.wso2.deployment.am.gateway.strategy.rollingUpdate.maxSurge }} + maxUnavailable: {{ .Values.wso2.deployment.am.gateway.strategy.rollingUpdate.maxUnavailable }} + type: RollingUpdate + selector: + matchLabels: + deployment: {{ template "am-pattern-3.resource.prefix" . }}-am-gateway + template: + metadata: + annotations: + checksum.am.km.conf: {{ include (print $.Template.BasePath "/am/gateway/wso2am-pattern-3-am-gateway-conf.yaml") . | sha256sum }} + labels: + deployment: {{ template "am-pattern-3.resource.prefix" . }}-am-gateway + spec: + initContainers: + - name: init-apim-analytics + image: busybox:1.32 + command: ['sh', '-c', 'echo -e "Checking for the availability of WSO2 API Manager Analytics Worker deployment"; while ! nc -z {{ template "am-pattern-3.resource.prefix" . }}-am-analytics-worker-service 7712; do sleep 1; printf "-"; done; echo -e " >> WSO2 API Manager Analytics Worker has started";'] + - name: init-km + image: busybox:1.32 + command: ['sh', '-c', 'echo -e "Checking for the availability of Key Manager deployment"; while ! nc -z {{ template "am-pattern-3.resource.prefix" . }}-km-service 9443; do sleep 1; printf "-"; done; echo -e " >> Key Manager has started";'] + - name: init-tm-1 + image: busybox:1.32 + command: ['sh', '-c', 'echo -e "Checking for the availability of TM instance one deployment"; while ! nc -z {{ template "am-pattern-3.resource.prefix" . }}-am-tm-statefulset-0.{{ template "am-pattern-3.resource.prefix" . }}-am-tm-headless-service 9611; do sleep 1; printf "-"; done; echo -e " >> TM instance one has started";'] + - name: init-tm-2 + image: busybox:1.32 + command: ['sh', '-c', 'echo -e "Checking for the availability of TM instance two deployment"; while ! nc -z {{ template "am-pattern-3.resource.prefix" . }}-am-tm-statefulset-1.{{ template "am-pattern-3.resource.prefix" . }}-am-tm-headless-service 9611; do sleep 1; printf "-"; done; echo -e " >> TM instance two has started";'] + containers: + - name: wso2am-gateway + {{- if .Values.wso2.deployment.am.dockerRegistry }} + image: {{ .Values.wso2.deployment.am.dockerRegistry }}/{{ .Values.wso2.deployment.am.imageName }} + {{- $tag := .Values.wso2.deployment.am.imageTag }} + {{- if not (eq $tag "") }}{{- printf ":%s" $tag -}}{{- end }} + {{- else if or (eq .Values.wso2.subscription.username "") (eq .Values.wso2.subscription.password "") }} + image: wso2/{{ .Values.wso2.deployment.am.imageName }}:{{ .Values.wso2.deployment.am.imageTag }} + {{- else }} + image: docker.wso2.com/{{ .Values.wso2.deployment.am.imageName }}:{{ .Values.wso2.deployment.am.imageTag }} + {{- end }} + imagePullPolicy: {{ .Values.wso2.deployment.am.imagePullPolicy }} + env: + - name: PROFILE_NAME + value: gateway-worker + - name: NODE_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP + - name: JVM_MEM_OPTS + value: "-Xms{{ .Values.wso2.deployment.am.resources.jvm.heap.memory.xms }} -Xmx{{ .Values.wso2.deployment.am.resources.jvm.heap.memory.xmx }}" + livenessProbe: + exec: + command: + - /bin/sh + - -c + - nc -z localhost 8243 + initialDelaySeconds: {{ .Values.wso2.deployment.am.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.wso2.deployment.am.livenessProbe.periodSeconds }} + readinessProbe: + exec: + command: + - /bin/sh + - -c + - nc -z localhost 8243 + initialDelaySeconds: {{ .Values.wso2.deployment.am.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.wso2.deployment.am.readinessProbe.periodSeconds }} + lifecycle: + preStop: + exec: + command: ['sh', '-c', '${WSO2_SERVER_HOME}/bin/wso2server.sh stop'] + resources: + requests: + memory: {{ .Values.wso2.deployment.am.resources.requests.memory }} + cpu: {{ .Values.wso2.deployment.am.resources.requests.cpu }} + limits: + memory: {{ .Values.wso2.deployment.am.resources.limits.memory }} + cpu: {{ .Values.wso2.deployment.am.resources.limits.cpu }} + securityContext: + runAsUser: 802 + ports: + - containerPort: 8280 + protocol: TCP + - containerPort: 8243 + protocol: TCP + - containerPort: 9763 + protocol: TCP + - containerPort: 9443 + protocol: TCP + volumeMounts: + - name: wso2am-gateway-storage-volume + mountPath: /home/wso2carbon/wso2am-3.2.0/repository/deployment/server/synapse-configs + - name: wso2am-gateway-conf + mountPath: /home/wso2carbon/wso2-config-volume/repository/conf + serviceAccountName: {{ .Values.kubernetes.serviceAccount }} + {{- if .Values.wso2.deployment.am.imagePullSecrets }} + imagePullSecrets: + - name: {{ .Values.wso2.deployment.am.imagePullSecrets }} + {{- else if and (not (eq .Values.wso2.subscription.username "")) (not (eq .Values.wso2.subscription.password "")) }} + imagePullSecrets: + - name: {{ template "am-pattern-3.resource.prefix" . }}-wso2-private-registry-creds + {{ end }} + volumes: + - name: wso2am-gateway-storage-volume + persistentVolumeClaim: + claimName: {{ template "am-pattern-3.resource.prefix" . }}-am-gateway-shared-synapse-configs-volume-claim + - name: wso2am-gateway-conf + configMap: + name: {{ template "am-pattern-3.resource.prefix" . }}-am-gateway-conf diff --git a/advanced/am-pattern-3/templates/am/publisher/wso2am-pattern-3-am-publisher-conf-entrypoint.yaml b/advanced/am-pattern-3/templates/am/publisher/wso2am-pattern-3-am-publisher-conf-entrypoint.yaml index 56d626b0..b70ac005 100644 --- a/advanced/am-pattern-3/templates/am/publisher/wso2am-pattern-3-am-publisher-conf-entrypoint.yaml +++ b/advanced/am-pattern-3/templates/am/publisher/wso2am-pattern-3-am-publisher-conf-entrypoint.yaml @@ -1,3 +1,5 @@ + {{ if .Values.wso2.deployment.persistentRuntimeArtifacts.apacheSolrIndexing.enabled }} + # Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -83,3 +85,5 @@ data: # start the server with the specified profile and provided startup arguments sh ${WSO2_SERVER_HOME}/bin/wso2server.sh -Dprofile=${PROFILE_NAME} "$@" fi + + {{ end }} diff --git a/advanced/am-pattern-3/templates/am/publisher/wso2am-pattern-3-am-publisher-conf.yaml b/advanced/am-pattern-3/templates/am/publisher/wso2am-pattern-3-am-publisher-conf.yaml index d8497dc0..dea69af3 100644 --- a/advanced/am-pattern-3/templates/am/publisher/wso2am-pattern-3-am-publisher-conf.yaml +++ b/advanced/am-pattern-3/templates/am/publisher/wso2am-pattern-3-am-publisher-conf.yaml @@ -147,10 +147,14 @@ data: [transport.https.properties] proxyPort = 443 + {{ if .Values.wso2.deployment.persistentRuntimeArtifacts.apacheSolrIndexing.enabled }} [database.local] url = "jdbc:h2:/home/wso2carbon/solr/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE" [indexing] location = "/home/wso2carbon/solr/indexed-data" + {{ else }} + [database.local] + url = "jdbc:h2:./repository/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE" + {{ end }} {{- end }} - diff --git a/advanced/am-pattern-3/templates/am/publisher/wso2am-pattern-3-am-publisher-volume-claims.yaml~HEAD b/advanced/am-pattern-3/templates/am/publisher/wso2am-pattern-3-am-publisher-volume-claims.yaml similarity index 100% rename from advanced/am-pattern-3/templates/am/publisher/wso2am-pattern-3-am-publisher-volume-claims.yaml~HEAD rename to advanced/am-pattern-3/templates/am/publisher/wso2am-pattern-3-am-publisher-volume-claims.yaml diff --git a/advanced/am-pattern-3/templates/am/publisher/wso2am-pattern-3-am-publisher-volume-claims.yaml~[v3.1.x] Review APIM DevPortal deployment in pattern 3 b/advanced/am-pattern-3/templates/am/publisher/wso2am-pattern-3-am-publisher-volume-claims.yaml~[v3.1.x] Review APIM DevPortal deployment in pattern 3 deleted file mode 100644 index 5c3e3602..00000000 --- a/advanced/am-pattern-3/templates/am/publisher/wso2am-pattern-3-am-publisher-volume-claims.yaml~[v3.1.x] Review APIM DevPortal deployment in pattern 3 +++ /dev/null @@ -1,101 +0,0 @@ -# Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) 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: PersistentVolumeClaim -metadata: - name: {{ template "am-pattern-3.resource.prefix" . }}-publisher-1-indexed-data-volume-claim - namespace : {{ .Release.Namespace }} -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.capacity.solrIndexedData }} - storageClassName: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.storageClass }} - ---- - -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ template "am-pattern-3.resource.prefix" . }}-publisher-2-indexed-data-volume-claim - namespace : {{ .Release.Namespace }} -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.capacity.solrIndexedData }} - storageClassName: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.storageClass }} - ---- - -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ template "am-pattern-3.resource.prefix" . }}-am-publisher-1-local-carbon-database-volume-claim - namespace : {{ .Release.Namespace }} -spec: - accessModes: - - ReadWriteMany - resources: - requests: - storage: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.capacity.carbonDatabase }} - storageClassName: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.storageClass }} - ---- - -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ template "am-pattern-3.resource.prefix" . }}-am-publisher-1-solr-indexed-data-volume-claim - namespace : {{ .Release.Namespace }} -spec: - accessModes: - - ReadWriteMany - resources: - requests: - storage: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.capacity.solrIndexedData }} - storageClassName: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.storageClass }} - ---- - -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ template "am-pattern-3.resource.prefix" . }}-am-publisher-2-local-carbon-database-volume-claim - namespace : {{ .Release.Namespace }} -spec: - accessModes: - - ReadWriteMany - resources: - requests: - storage: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.capacity.carbonDatabase }} - storageClassName: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.storageClass }} - ---- - -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ template "am-pattern-3.resource.prefix" . }}-am-publisher-2-solr-indexed-data-volume-claim - namespace : {{ .Release.Namespace }} -spec: - accessModes: - - ReadWriteMany - resources: - requests: - storage: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.capacity.solrIndexedData }} - storageClassName: {{ .Values.wso2.deployment.persistentRuntimeArtifacts.storageClass }}