From 53e85e6e6fb2b4134fa3cf65e1dc487c08779cce Mon Sep 17 00:00:00 2001 From: CrowleyRajapakse Date: Wed, 3 Apr 2024 20:24:08 +0530 Subject: [PATCH] fixing agent integration tests --- .github/workflows/agent-integration-test.yml | 22 +- .../agent-helm-chart/Chart.yaml | 7 +- .../certificates/apim-apk-issuer-cert.yaml | 8 + .../templates/deployment.yaml | 4 + .../agent-helm-chart/templates/log-conf.yaml | 14 +- .../agent-helm-chart/values.yaml | 2 + .../apim-cp-helm-chart/Chart.yaml | 17 - .../apim-cp-helm-chart/README.md | 175 ------ .../apim-cp-helm-chart/confs/api-manager.sh | 362 ------------ .../confs/instance-1/deployment.toml | 290 ---------- .../confs/instance-2/deployment.toml | 270 --------- .../confs/log4j2.properties | 525 ------------------ .../confs/secret-conf.properties | 12 - .../templates/control-plane/_helpers.tpl | 69 --- .../instance-1/wso2am-cp-conf.yaml | 18 - .../instance-1/wso2am-cp-deployment.yaml | 233 -------- .../instance-1/wso2am-cp-service.yaml | 35 -- .../instance-2/wso2am-cp-conf.yaml | 20 - .../instance-2/wso2am-cp-deployment.yaml | 235 -------- .../instance-2/wso2am-cp-service.yaml | 37 -- .../control-plane/wso2am-conf-script.yaml | 7 - .../wso2am-cp-conf-entrypoint.yaml | 71 --- .../control-plane/wso2am-cp-conf-log4j2.yaml | 18 - .../wso2am-cp-conf-secret-conf.yaml | 19 - .../control-plane/wso2am-cp-ingress.yaml | 47 -- .../control-plane/wso2am-cp-pdb.yaml | 20 - .../wso2am-cp-secret-store-provider-gcp.yaml | 24 - .../control-plane/wso2am-cp-service.yaml | 28 - .../wso2am-cp-storageclass-aws.yaml | 24 - .../wso2am-cp-storageclass-gcp.yaml | 23 - .../control-plane/wso2am-cp-volume-aws.yaml | 92 --- .../control-plane/wso2am-cp-volume-azure.yaml | 36 -- .../wso2am-cp-volume-claims-aws.yaml | 87 --- .../wso2am-cp-volume-claims-azure.yaml | 87 --- .../control-plane/wso2am-cp-volume-gcp.yaml | 105 ---- .../wso2am-volume-claims-gcp.yaml | 85 --- .../secrets/wso2am-cp-secret-store-csi.yaml | 22 - .../wso2am-cp-secret-store-provider-aws.yaml | 29 - ...wso2am-cp-secret-store-provider-azure.yaml | 35 -- .../apim-cp-helm-chart/values.yaml | 448 --------------- .../cucumber-tests/README.md | 4 +- .../cucumber-tests/scripts/setup-hosts.sh | 10 +- 42 files changed, 41 insertions(+), 3635 deletions(-) create mode 100644 test/apim-apk-agent-test/agent-helm-chart/templates/cert-manager/certificates/apim-apk-issuer-cert.yaml delete mode 100644 test/apim-apk-agent-test/apim-cp-helm-chart/Chart.yaml delete mode 100644 test/apim-apk-agent-test/apim-cp-helm-chart/README.md delete mode 100755 test/apim-apk-agent-test/apim-cp-helm-chart/confs/api-manager.sh delete mode 100644 test/apim-apk-agent-test/apim-cp-helm-chart/confs/instance-1/deployment.toml delete mode 100644 test/apim-apk-agent-test/apim-cp-helm-chart/confs/instance-2/deployment.toml delete mode 100644 test/apim-apk-agent-test/apim-cp-helm-chart/confs/log4j2.properties delete mode 100644 test/apim-apk-agent-test/apim-cp-helm-chart/confs/secret-conf.properties delete mode 100644 test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/_helpers.tpl delete mode 100644 test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/instance-1/wso2am-cp-conf.yaml delete mode 100644 test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/instance-1/wso2am-cp-deployment.yaml delete mode 100644 test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/instance-1/wso2am-cp-service.yaml delete mode 100644 test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/instance-2/wso2am-cp-conf.yaml delete mode 100644 test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/instance-2/wso2am-cp-deployment.yaml delete mode 100644 test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/instance-2/wso2am-cp-service.yaml delete mode 100644 test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-conf-script.yaml delete mode 100644 test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-conf-entrypoint.yaml delete mode 100644 test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-conf-log4j2.yaml delete mode 100644 test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-conf-secret-conf.yaml delete mode 100644 test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-ingress.yaml delete mode 100644 test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-pdb.yaml delete mode 100644 test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-secret-store-provider-gcp.yaml delete mode 100644 test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-service.yaml delete mode 100644 test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-storageclass-aws.yaml delete mode 100644 test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-storageclass-gcp.yaml delete mode 100644 test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-volume-aws.yaml delete mode 100644 test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-volume-azure.yaml delete mode 100644 test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-volume-claims-aws.yaml delete mode 100644 test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-volume-claims-azure.yaml delete mode 100644 test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-volume-gcp.yaml delete mode 100644 test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-volume-claims-gcp.yaml delete mode 100644 test/apim-apk-agent-test/apim-cp-helm-chart/templates/secrets/wso2am-cp-secret-store-csi.yaml delete mode 100644 test/apim-apk-agent-test/apim-cp-helm-chart/templates/secrets/wso2am-cp-secret-store-provider-aws.yaml delete mode 100644 test/apim-apk-agent-test/apim-cp-helm-chart/templates/secrets/wso2am-cp-secret-store-provider-azure.yaml delete mode 100644 test/apim-apk-agent-test/apim-cp-helm-chart/values.yaml diff --git a/.github/workflows/agent-integration-test.yml b/.github/workflows/agent-integration-test.yml index d5fb8e944..a22cbdecd 100644 --- a/.github/workflows/agent-integration-test.yml +++ b/.github/workflows/agent-integration-test.yml @@ -56,24 +56,20 @@ jobs: if: github.event_name == 'pull_request_target' && contains(github.event.label.name, 'trigger-action') shell: sh run: | - cd apk-repo/test/apim-apk-agent-test/apim-cp-helm-chart - helm repo add bitnami https://charts.bitnami.com/bitnami - helm repo add jetstack https://charts.jetstack.io - helm dependency build - helm install apim -n apk . --debug --wait --timeout 5m0s \ - --set wso2.deployment.image.registry=docker.io \ - --set wso2.deployment.image.respository=rakhitharr/wso2am \ - --set wso2.deployment.image.digest=sha256:56c6625d60a01cba73cd8836d25f1469f6fec1e933e530d954064eeab4ef70b3 + helm repo add wso2apim https://github.com/wso2/helm-apim/releases/download/cp-4.3.0-beta + helm repo update + helm install apim wso2apim/wso2am-cp --version 4.3.0-beta -f https://raw.githubusercontent.com/wso2/apk/main/helm-charts/sample/apim/cp/amd-values.yaml -n apk --debug --wait --timeout 5m0s kubectl get pods -n apk kubectl get svc -n apk - - name: Helm release deploy APK DP if: github.event_name == 'pull_request_target' && contains(github.event.label.name, 'trigger-action') shell: sh run: | cd apk-repo/helm-charts + helm repo add bitnami https://charts.bitnami.com/bitnami + helm repo add jetstack https://charts.jetstack.io helm dependency build - helm install apk-test-setup -n apk . --debug --wait --timeout 15m0s \ + helm install apk -n apk . --debug --wait --timeout 15m0s \ --set wso2.apk.dp.commonController.deployment.controlplane.enabled=true \ --set wso2.apk.dp.commonController.deployment.controlplane.host="apim-apk-agent-service.apk.svc.cluster.local" \ --set wso2.apk.dp.commonController.deployment.controlplane.skipSSLVerification=true \ @@ -91,7 +87,7 @@ jobs: helm install apim-apk-agent -n apk . --debug --wait --timeout 2m0s \ --set controlPlane.serviceURL=https://apim-wso2am-cp-1-service.apk.svc.cluster.local:9443/ \ --set controlPlane.eventListeningEndpoints="amqp://admin:admin@apim-wso2am-cp-1-service.apk.svc.cluster.local:5672?retries='10'&connectdelay='30'" \ - --set dataPlane.k8ResourceEndpoint=https://apk-test-setup-wso2-apk-config-ds-service.apk.svc.cluster.local:9443/api/configurator/apis/generate-k8s-resources + --set dataPlane.k8ResourceEndpoint=https://apk-wso2-apk-config-ds-service.apk.svc.cluster.local:9443/api/configurator/apis/generate-k8s-resources kubectl get pods -n apk kubectl get svc -n apk - name: Run test cases @@ -114,10 +110,8 @@ jobs: kubectl get tokenissuers -n apk kubectl get httproutes -n apk kubectl get pods -l app.kubernetes.io/name=apim-apk-agent | awk '{print $1}' | xargs -I{} kubectl logs {} -n apk - helm uninstall apk-test-setup -n apk - cd ../test/apim-apk-agent-test/apim-cp-helm-chart + helm uninstall apk -n apk helm uninstall apim -n apk - cd ../agent-helm-chart helm uninstall apim-apk-agent -n apk - name: Delete AKS cluster if: always() diff --git a/test/apim-apk-agent-test/agent-helm-chart/Chart.yaml b/test/apim-apk-agent-test/agent-helm-chart/Chart.yaml index 23dbf0f64..66294785f 100644 --- a/test/apim-apk-agent-test/agent-helm-chart/Chart.yaml +++ b/test/apim-apk-agent-test/agent-helm-chart/Chart.yaml @@ -17,8 +17,11 @@ apiVersion: v2 name: apim-apk-agent description: A Helm chart for deploying apim-apk-agent -version: 0.1.0 +type: application +version: 1.1.0-beta +appVersion: "1.16.0" dependencies: - name: cert-manager version: "v1.10.1" - repository: "https://charts.jetstack.io" \ No newline at end of file + repository: "https://charts.jetstack.io" + condition: certmanager.enabled \ No newline at end of file diff --git a/test/apim-apk-agent-test/agent-helm-chart/templates/cert-manager/certificates/apim-apk-issuer-cert.yaml b/test/apim-apk-agent-test/agent-helm-chart/templates/cert-manager/certificates/apim-apk-issuer-cert.yaml new file mode 100644 index 000000000..4af67f309 --- /dev/null +++ b/test/apim-apk-agent-test/agent-helm-chart/templates/cert-manager/certificates/apim-apk-issuer-cert.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: Secret +metadata: + name: apim-apk-issuer-cert +type: Opaque +data: + wso2.crt: | + LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUR1VENDQXFHZ0F3SUJBZ0lVWXlTK2JjenM4R1N3Y3hoUUUyWUJqZEFFakw4d0RRWUpLb1pJaHZjTkFRRUwKQlFBd1pERUxNQWtHQTFVRUJoTUNWVk14Q3pBSkJnTlZCQWdNQWtOQk1SWXdGQVlEVlFRSERBMU5iM1Z1ZEdGcApiaUJXYVdWM01RMHdDd1lEVlFRS0RBUlhVMDh5TVEwd0N3WURWUVFMREFSWFUwOHlNUkl3RUFZRFZRUUREQWxzCmIyTmhiR2h2YzNRd0hoY05NalF3TWpJeU1EZzFNalUxV2hjTk1qWXdOVEkzTURnMU1qVTFXakJrTVFzd0NRWUQKVlFRR0V3SlZVekVMTUFrR0ExVUVDQXdDUTBFeEZqQVVCZ05WQkFjTURVMXZkVzUwWVdsdUlGWnBaWGN4RFRBTApCZ05WQkFvTUJGZFRUekl4RFRBTEJnTlZCQXNNQkZkVFR6SXhFakFRQmdOVkJBTU1DV3h2WTJGc2FHOXpkRENDCkFTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBT2JIZTRycjIxRlQ3WHVveXozQ1MwcisKeThRTGhweW9nRmxYdzBMQ0lQRmpWcUxVbUFCSTlTRkl6N3BWekpwcVRQbDRCbGFVcUc3N0I3MjJTSXNrQm5MUgpHczVHVzVBSEd1akhVZmpyUlVDL0xFMGh3YWE3QTVrU1RueHB2cUxVOWd6UGw1R1EyOHdib3BpcHcwWTJDTkdxCmxZclRKd0wwL1MyN0JDZU9iWWtSeFprNEovRlZiS2VNVm5SQVVZZUE3UjZJUjh3QnU2d2FQUzVDTk9Ua2kvWncKNTBBb2pHYWRWZm1HeTZRQzZnVmFpQzhJYW1CWktrdk9qYy90Q2F1UDlCTmtIZ3BBbkFhWE9adFNyRVg2aS9xSgpHL1pYbU9jSlNGR0hLempIT3VGaTYrOGJQK0t3czNVTS92RmZkNEdoMmFTMmI2Z093MjV0L1IwbERKVit3dEVDCkF3RUFBYU5qTUdFd0ZBWURWUjBSQkEwd0M0SUpiRzlqWVd4b2IzTjBNQjBHQTFVZERnUVdCQlNIQXhLb0tlWnMKWnMxbmkrRVhZVzc1Zk03MGJqQWRCZ05WSFNVRUZqQVVCZ2dyQmdFRkJRY0RBUVlJS3dZQkJRVUhBd0l3Q3dZRApWUjBQQkFRREFnVHdNQTBHQ1NxR1NJYjNEUUVCQ3dVQUE0SUJBUURHTDlTU0FjOHplWnBVb2loU2ExVnowZGNXCm5FR1lkdDdkQnB4U3ppcVJWSDVPNjJxVU92ZDhtbGh5M0h4N3B2Wm0yK2pKYjVMeEdKM2MvVzhGM211dDFTdGoKQVNFRXVsOWF4dXhvNWZuelVXazZBV20ycGFobEttZTBiSk8vdUJyY010WlU2TXdCdkU3NkEzZmgra1p6VlREbApMbjJUVG9ySlhydC9JQm5KdVZHT2UzWGxGTlMyMEo3bEtFUmt3UHZEZlhkZ25aSWlUYkcwdzliQUxVSmpROFUyCkFBUDlha2d1N3BMV0w3RzU1c1NWb2JGckJMSkVMZ3FxU1VUVXhBOXVybzYwRjFRMFVhWHBOd2h0MUJ3QTFVUEIKcys1T3ZmVzhnMWhkVmdWdmNmZUZIQk9oSTJOa1RtemRGRldKZTBFeE9Db3liR1dJZkZkYlZtalVZL2JSCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0= diff --git a/test/apim-apk-agent-test/agent-helm-chart/templates/deployment.yaml b/test/apim-apk-agent-test/agent-helm-chart/templates/deployment.yaml index 04e761d28..8e1c6114b 100644 --- a/test/apim-apk-agent-test/agent-helm-chart/templates/deployment.yaml +++ b/test/apim-apk-agent-test/agent-helm-chart/templates/deployment.yaml @@ -45,6 +45,10 @@ spec: containerPort: 18000 - name: rest-port containerPort: 18001 + {{ if and .Values.metrics .Values.metrics.enabled}} + - containerPort: 18006 + protocol: "TCP" + {{ end }} env: - name: APIM_APK_AGENT_PRIVATE_KEY_PATH value: /home/wso2/security/keystore/apk-agent.key diff --git a/test/apim-apk-agent-test/agent-helm-chart/templates/log-conf.yaml b/test/apim-apk-agent-test/agent-helm-chart/templates/log-conf.yaml index 6b5163912..fe52897b0 100644 --- a/test/apim-apk-agent-test/agent-helm-chart/templates/log-conf.yaml +++ b/test/apim-apk-agent-test/agent-helm-chart/templates/log-conf.yaml @@ -15,7 +15,7 @@ data: provider = "{{ .Values.controlPlane.provider | default "admin" }}" environmentLabels = ["{{ .Values.controlPlane.environmentLabels }}"] skipSSLVerification = {{ .Values.controlPlane.skipSSLVerification }} - internalKeyIssuer = {{ .Values.controlPlane.internalKeyIssuer | default "http://am.wso2.com:443/token" }} + internalKeyIssuer = "{{ .Values.controlPlane.internalKeyIssuer | default "http://am.wso2.com:443/token" }}" [controlPlane.brokerConnectionParameters] eventListeningEndpoints = ["{{ .Values.controlPlane.eventListeningEndpoints }}"] @@ -35,10 +35,10 @@ data: # The logging configuration for Adapter ## Adapter root Level configurations - + logLevel = "INFO" # LogLevels can be "DEBG", "FATL", "ERRO", "WARN", "INFO", "PANC" LogFormat = "TEXT" # Values can be "JSON", "TEXT" - + [rotation] MaxSize = 10 # In MegaBytes (MB) MaxBackups = 3 @@ -46,22 +46,22 @@ data: Compress = true ## Adapter package Level configurations - + [[pkg]] name = "github.com/wso2/apk/adapter/internal/adapter" logLevel = "INFO" # LogLevels can be "DEBG", "FATL", "ERRO", "WARN", "INFO", "PANC" - + [[pkg]] name = "github.com/wso2/apk/adapter/internal/oasparser" logLevel = "INFO" # The logging configuration for Router - + [accessLogs] enable = false format = "[%START_TIME%] '%REQ(:METHOD)% %DYNAMIC_METADATA(envoy.filters.http.ext_authz:originalPath)% %REQ(:PATH)% %PROTOCOL%' %RESPONSE_CODE% %RESPONSE_FLAGS% %BYTES_RECEIVED% %BYTES_SENT% %DURATION% %RESP(X-ENVOY-UPSTREAM-SERVICE-TIME)% '%REQ(X-FORWARDED-FOR)%' '%REQ(USER-AGENT)%' '%REQ(X-REQUEST-ID)%' '%REQ(:AUTHORITY)%' '%UPSTREAM_HOST%'\n" - + [wireLogs] enable = false include = ["Headers", "Body", "Trailers"] diff --git a/test/apim-apk-agent-test/agent-helm-chart/values.yaml b/test/apim-apk-agent-test/agent-helm-chart/values.yaml index af768b303..4e789a17a 100644 --- a/test/apim-apk-agent-test/agent-helm-chart/values.yaml +++ b/test/apim-apk-agent-test/agent-helm-chart/values.yaml @@ -39,3 +39,5 @@ metrics: enabled: false agent: mode: CPtoDP +certmanager: + enabled: true diff --git a/test/apim-apk-agent-test/apim-cp-helm-chart/Chart.yaml b/test/apim-apk-agent-test/apim-cp-helm-chart/Chart.yaml deleted file mode 100644 index ab09f3425..000000000 --- a/test/apim-apk-agent-test/apim-cp-helm-chart/Chart.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# ------------------------------------------------------------------------------------- -# -# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. -# -# This software is the property of WSO2 LLC. and its suppliers, if any. -# Dissemination of any information or reproduction of any material contained -# herein is strictly forbidden, unless permitted by WSO2 in accordance with the -# WSO2 Commercial License available at https://wso2.com/licenses/eula/3.2 -# -# -------------------------------------------------------------------------------------- - -apiVersion: v1 -appVersion: "4.2.0" -description: A Helm chart for the deployment of WSO2 API Management Control Plane profile -name: wso2am-cp -version: 4.2.0-0 -icon: https://wso2.cachefly.net/wso2/sites/all/images/wso2logo.svg diff --git a/test/apim-apk-agent-test/apim-cp-helm-chart/README.md b/test/apim-apk-agent-test/apim-cp-helm-chart/README.md deleted file mode 100644 index 9e20e7dcd..000000000 --- a/test/apim-apk-agent-test/apim-cp-helm-chart/README.md +++ /dev/null @@ -1,175 +0,0 @@ -# wso2am-cp - -![Version: 4.2.0-0](https://img.shields.io/badge/Version-4.2.0--0-informational?style=flat-square) ![AppVersion: 4.2.0](https://img.shields.io/badge/AppVersion-4.2.0-informational?style=flat-square) - -A Helm chart for the deployment of WSO2 API Management Control Plane profile - -## Values - -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| aws.efs.accessPoints | object | `{"carbonDb1":"","carbonDb2":"","solr1":"","solr2":""}` | EFS Access Points for static provisioning | -| aws.efs.capacity | string | `""` | EFS capacity | -| aws.efs.directoryPerms | string | `"0777"` | EFS directory permissions | -| aws.efs.fileSystemId | string | `""` | EFS file system ID for mounting the persistent volume | -| aws.enabled | bool | `true` | If AWS is used as the cloud provider | -| aws.region | string | `""` | AWS region | -| aws.secretsManager.secretIdentifiers.internalKeystorePassword | object | `{"secretKey":"","secretName":""}` | Internal keystore password identifier in secrets manager | -| aws.secretsManager.secretIdentifiers.internalKeystorePassword.secretKey | string | `""` | AWS Secrets Manager secret key | -| aws.secretsManager.secretIdentifiers.internalKeystorePassword.secretName | string | `""` | AWS Secrets Manager secret name | -| aws.secretsManager.secretProviderClass | string | `"wso2am-cp-secret-provider-class"` | AWS Secrets Manager secret provider class name | -| aws.serviceAccountName | string | `""` | | -| azure.enabled | bool | `false` | If Azure is used as the cloud provider | -| azure.keyVault.activeDirectory.servicePrincipal | object | `{"appId":"","clientSecretName":"","credentialsSecretName":""}` | Service Principal created for transacting with the target Azure Key Vault For advanced details refer to official documentation (https://github.com/Azure/secrets-store-csi-driver-provider-azure/blob/master/docs/service-principal-mode.md) | -| azure.keyVault.activeDirectory.servicePrincipal.appId | string | `""` | Application ID of the service principal used in secret-store-csi | -| azure.keyVault.activeDirectory.servicePrincipal.clientSecretName | string | `""` | Client secret name of the service principal used in secret-store-csi | -| azure.keyVault.activeDirectory.servicePrincipal.credentialsSecretName | string | `""` | Credentials secret name of the service principal used as nodePublisherRef | -| azure.keyVault.activeDirectory.tenantId | string | `""` | Azure Active Directory tenant ID of the target Key Vault | -| azure.keyVault.name | string | `""` | Azure Key vault used for credential management | -| azure.keyVault.resourceManager.resourceGroup | string | `""` | Name of the Azure Resource Group to which the target Azure Key Vault belongs | -| azure.keyVault.resourceManager.subscriptionId | string | `""` | Subscription ID of the target Azure Key Vault | -| azure.keyVault.secretIdentifiers.internalKeystoreKeyPassword | string | `""` | Internal keystore key password identifier in keyvault | -| azure.keyVault.secretIdentifiers.internalKeystorePassword | string | `""` | Internal keystore password identifier in keyvault | -| azure.keyVault.secretProviderClass | string | `"wso2am-cp-secret-provider-class"` | Azure Key vault secret provider class name | -| azure.persistence.capacity | string | `""` | Persistent volume capacity | -| azure.persistence.fileShare | string | `""` | Azure fileshare name | -| azure.persistence.secretName | string | `""` | Azure file secret name | -| azure.persistence.storageClass | string | `""` | Persistent volume storage class | -| gcp.enabled | bool | `false` | If GCP is used as the cloud provider | -| gcp.fs | object | `{"capacity":"","fileshares":{"carbonDB1":{"fileShareName":"","fileStoreName":"","ip":""},"carbonDB2":{"fileShareName":"","fileStoreName":"","ip":""},"solr1":{"fileShareName":"","fileStoreName":"","ip":""},"solr2":{"fileShareName":"","fileStoreName":"","ip":""}},"location":"","network":"","tier":""}` | File Store configuration parameters | -| gcp.fs.capacity | string | `""` | Storage capacity of the file system (in GB or other appropriate units) | -| gcp.fs.fileshares | object | `{"carbonDB1":{"fileShareName":"","fileStoreName":"","ip":""},"carbonDB2":{"fileShareName":"","fileStoreName":"","ip":""},"solr1":{"fileShareName":"","fileStoreName":"","ip":""},"solr2":{"fileShareName":"","fileStoreName":"","ip":""}}` | FileStore configuration for specific services | -| gcp.fs.fileshares.carbonDB1 | object | `{"fileShareName":"","fileStoreName":"","ip":""}` | FileShare configs for CarbonDB persistent storage for instance 1 | -| gcp.fs.fileshares.carbonDB1.fileShareName | string | `""` | FileShare of the CarbonDB persistent storage for instance 1 | -| gcp.fs.fileshares.carbonDB1.fileStoreName | string | `""` | FileStore of the CarbonDB persistent storage for instance 1 | -| gcp.fs.fileshares.carbonDB1.ip | string | `""` | IP of the CarbonDB persistent storage for instance 1 | -| gcp.fs.fileshares.carbonDB2 | object | `{"fileShareName":"","fileStoreName":"","ip":""}` | FileShare configs for CarbonDB2 persistent storage for instance 2 | -| gcp.fs.fileshares.carbonDB2.fileShareName | string | `""` | FileShare of the CarbonDB persistent storage for instance 2 | -| gcp.fs.fileshares.carbonDB2.fileStoreName | string | `""` | FileStore of the CarbonDB persistent storage for instance 2 | -| gcp.fs.fileshares.carbonDB2.ip | string | `""` | IP of the CarbonDB persistent storage for instance 2 | -| gcp.fs.fileshares.solr1 | object | `{"fileShareName":"","fileStoreName":"","ip":""}` | FileShare configs for Solr persistent storage for instance 1 | -| gcp.fs.fileshares.solr1.fileShareName | string | `""` | FileShare of the Solr persistent storage for instance 1 | -| gcp.fs.fileshares.solr1.fileStoreName | string | `""` | FileStore of the Solr persistent storage for instance 1 | -| gcp.fs.fileshares.solr1.ip | string | `""` | IP of the Solr persistent storage for instance 1 | -| gcp.fs.fileshares.solr2 | object | `{"fileShareName":"","fileStoreName":"","ip":""}` | FileShare configs for Solr persistent storage for instance 2 | -| gcp.fs.fileshares.solr2.fileShareName | string | `""` | FileShare of the Solr persistent storage for instance 2 | -| gcp.fs.fileshares.solr2.fileStoreName | string | `""` | FileStore of the Solr persistent storage for instance 2 | -| gcp.fs.fileshares.solr2.ip | string | `""` | IP of the Solr persistent storage for instance 2 | -| gcp.fs.location | string | `""` | Region of the FileStore | -| gcp.fs.network | string | `""` | Network of the FileStore | -| gcp.fs.tier | string | `""` | Tier of the FileStore | -| gcp.secretsManager | object | `{"projectId":"","secret":{"secretName":"","secretVersion":""},"secretProviderClass":""}` | Secrets Manager configuration parameters | -| gcp.secretsManager.projectId | string | `""` | Project ID | -| gcp.secretsManager.secret.secretName | string | `""` | Name of the secret | -| gcp.secretsManager.secret.secretVersion | string | `""` | Version of the secret | -| gcp.secretsManager.secretProviderClass | string | `""` | Secret provider class | -| gcp.serviceAccountName | string | `""` | Service Account with access to read secrets | -| kubernetes.enableAppArmor | bool | `false` | Enable AppArmor profiles for the deployment | -| kubernetes.ingress.controlPlane.annotations | object | `{"nginx.ingress.kubernetes.io/affinity":"cookie","nginx.ingress.kubernetes.io/backend-protocol":"HTTPS","nginx.ingress.kubernetes.io/session-cookie-hash":"sha1","nginx.ingress.kubernetes.io/session-cookie-name":"route"}` | Ingress annotations | -| kubernetes.ingress.controlPlane.hostname | string | `"am.wso2.com"` | Ingress hostname | -| kubernetes.ingress.ratelimit.burstLimit | string | `""` | Ingress ratelimit burst limit | -| kubernetes.ingress.ratelimit.enabled | bool | `false` | Ingress rate limit | -| kubernetes.ingress.ratelimit.zoneName | string | `""` | Ingress ratelimit zone name | -| kubernetes.ingress.tlsSecret | string | `""` | Kubernetes secret created for Ingress TLS | -| kubernetes.ingressClass | string | `"nginx"` | Ingress class to be used for the ingress resource | -| kubernetes.securityContext.runAsUser | int | `802` | User ID of the container | -| wso2.apim.configurations.adminPassword | string | `""` | Super admin password | -| wso2.apim.configurations.adminUsername | string | `""` | Super admin username | -| wso2.apim.configurations.databases.apim_db | object | `{"password":"","poolParameters":{"defaultAutoCommit":false,"maxActive":100,"maxWait":60000,"minIdle":5,"testOnBorrow":true,"testWhileIdle":true,"validationInterval":30000},"url":"","username":""}` | APIM AM_DB configurations. | -| wso2.apim.configurations.databases.apim_db.password | string | `""` | APIM AM_DB password | -| wso2.apim.configurations.databases.apim_db.poolParameters | object | `{"defaultAutoCommit":false,"maxActive":100,"maxWait":60000,"minIdle":5,"testOnBorrow":true,"testWhileIdle":true,"validationInterval":30000}` | APIM database JDBC pool parameters | -| wso2.apim.configurations.databases.apim_db.url | string | `""` | APIM AM_DB URL | -| wso2.apim.configurations.databases.apim_db.username | string | `""` | APIM AM_DB username | -| wso2.apim.configurations.databases.jdbc.driver | string | `""` | JDBC driver class name | -| wso2.apim.configurations.databases.shared_db | object | `{"password":"","poolParameters":{"defaultAutoCommit":false,"maxActive":100,"maxWait":60000,"minIdle":5,"testOnBorrow":true,"testWhileIdle":true,"validationInterval":30000},"url":"","username":""}` | APIM SharedDB configurations. | -| wso2.apim.configurations.databases.shared_db.password | string | `""` | APIM SharedDB password | -| wso2.apim.configurations.databases.shared_db.poolParameters | object | `{"defaultAutoCommit":false,"maxActive":100,"maxWait":60000,"minIdle":5,"testOnBorrow":true,"testWhileIdle":true,"validationInterval":30000}` | APIM shared database JDBC pool parameters | -| wso2.apim.configurations.databases.shared_db.url | string | `""` | APIM SharedDB URL | -| wso2.apim.configurations.databases.shared_db.username | string | `""` | APIM SharedDB username | -| wso2.apim.configurations.databases.type | string | `""` | Database type. eg: mysql, oracle, mssql, postgres | -| wso2.apim.configurations.devportal.applicationSharingImpl | string | `nil` | | -| wso2.apim.configurations.devportal.applicationSharingType | string | `nil` | | -| wso2.apim.configurations.devportal.defaultReservedUsername | string | `nil` | | -| wso2.apim.configurations.devportal.displayDeprecatedAPIs | string | `nil` | | -| wso2.apim.configurations.devportal.displayMutipleVersions | string | `nil` | | -| wso2.apim.configurations.devportal.enableAnonymousMode | string | `nil` | | -| wso2.apim.configurations.devportal.enableApplicationSharing | string | `nil` | | -| wso2.apim.configurations.devportal.enableComments | string | `nil` | | -| wso2.apim.configurations.devportal.enableCrossTenantSubscriptions | string | `nil` | | -| wso2.apim.configurations.devportal.enableForum | string | `nil` | | -| wso2.apim.configurations.devportal.enableKeyProvisioning | string | `nil` | | -| wso2.apim.configurations.devportal.enableRatings | string | `nil` | | -| wso2.apim.configurations.devportal.loginUsernameCaseInsensitive | string | `nil` | | -| wso2.apim.configurations.gateway.environments | list | `[{"description":"This is a hybrid gateway that handles both production and sandbox token traffic.","displayInApiConsole":true,"httpHostname":"gw.wso2.com","name":"Default","provider":"wso2","serviceName":"wso2am-gateway-service","servicePort":9443,"showAsTokenEndpointUrl":true,"type":"hybrid","websubHostname":"websub.wso2.com","wsHostname":"websocket.wso2.com"}]` | APIM Gateway environments | -| wso2.apim.configurations.iskm.enabled | bool | `false` | If Identity Server is used as the Resident KM | -| wso2.apim.configurations.iskm.serviceName | string | `""` | Kubernetes service name exposing Identity Server | -| wso2.apim.configurations.iskm.servicePort | int | `9443` | Kubernetes service port exposing Identity Serve | -| wso2.apim.configurations.oauth_config.allowedScopes | list | `["^device_.*,openid"]` | List of allow-listed scopes | -| wso2.apim.configurations.oauth_config.enableTokenEncryption | bool | `false` | Enable token encryption | -| wso2.apim.configurations.oauth_config.enableTokenHashing | bool | `false` | Enable token hashing | -| wso2.apim.configurations.openTelemetry.enabled | bool | `false` | Open Telemetry enabled | -| wso2.apim.configurations.openTelemetry.hostname | string | `""` | Remote tracer hostname | -| wso2.apim.configurations.openTelemetry.name | string | `""` | Remote tracer name. e.g. jaeger, zipkin, OTLP | -| wso2.apim.configurations.openTelemetry.port | string | `""` | Remote tracer port | -| wso2.apim.configurations.openTracer.enabled | bool | `false` | Open Tracing enabled | -| wso2.apim.configurations.openTracer.name | string | `""` | Remote tracer name. e.g. jaeger, zipkin | -| wso2.apim.configurations.openTracer.properties.hostname | string | `""` | Remote tracer hostname | -| wso2.apim.configurations.openTracer.properties.port | string | `""` | Remote tracer port | -| wso2.apim.configurations.publisher.supportedDocumentTypes | string | `""` | Supported document types in Publisher. This should be used only if there are additional document types to be supported. | -| wso2.apim.configurations.security.jksSecretName | string | `"apim-keystore-secret"` | Kubernetes secret containing the keystores and truststore | -| wso2.apim.configurations.security.keystores.internal.alias | string | `"wso2carbon"` | Internal keystore alias | -| wso2.apim.configurations.security.keystores.internal.enabled | bool | `false` | Internal keystore enabled | -| wso2.apim.configurations.security.keystores.internal.keyPassword | string | `""` | Internal keystore key password | -| wso2.apim.configurations.security.keystores.internal.name | string | `"wso2carbon.jks"` | Internal keystore name | -| wso2.apim.configurations.security.keystores.internal.password | string | `""` | Internal keystore password | -| wso2.apim.configurations.security.keystores.primary.alias | string | `"wso2carbon"` | Primary keystore alias | -| wso2.apim.configurations.security.keystores.primary.enabled | bool | `false` | Primary keystore enabled | -| wso2.apim.configurations.security.keystores.primary.keyPassword | string | `""` | Primary keystore key password | -| wso2.apim.configurations.security.keystores.primary.name | string | `"wso2carbon.jks"` | Primary keystore name | -| wso2.apim.configurations.security.keystores.primary.password | string | `""` | Primary keystore password | -| wso2.apim.configurations.security.keystores.tls.alias | string | `"wso2carbon"` | TLS keystore alias | -| wso2.apim.configurations.security.keystores.tls.enabled | bool | `true` | TLS keystore enabled | -| wso2.apim.configurations.security.keystores.tls.keyPassword | string | `""` | TLS keystore key password | -| wso2.apim.configurations.security.keystores.tls.name | string | `"wso2carbon.jks"` | TLS keystore name | -| wso2.apim.configurations.security.keystores.tls.password | string | `""` | TLS keystore password | -| wso2.apim.configurations.security.truststore.name | string | `"client-truststore.jks"` | Truststore name | -| wso2.apim.configurations.security.truststore.password | string | `""` | Truststore password | -| wso2.apim.configurations.userStore.properties | object | `{"key":"value"}` | User store properties | -| wso2.apim.configurations.userStore.type | string | `"database_unique_id"` | User store type. https://apim.docs.wso2.com/en/latest/administer/managing-users-and-roles/managing-user-stores/configure-primary-user-store/configuring-the-primary-user-store/ | -| wso2.apim.log4j2.appenders | string | `""` | Appenders | -| wso2.apim.log4j2.loggers | string | `""` | Console loggers that can be enabled. Allowed values are AUDIT_LOG_CONSOLE, HTTP_ACCESS_CONSOLE, TRANSACTION_CONSOLE, CORRELATION_CONSOLE | -| wso2.apim.portOffset | int | `0` | Port Offset for APIM deployment | -| wso2.apim.secureVaultEnabled | bool | `false` | Secure vauld enabled | -| wso2.apim.startupArgs | string | `""` | Startup arguments for APIM | -| wso2.apim.version | string | `"4.2.0"` | APIM version | -| wso2.deployment.highAvailability | bool | `true` | Enable high availability for traffic manager. If this is enabled, two traffic manager instances will be deployed. This is not relavant to HA in Kubernetes. Multiple replicas of the same instance will not count as HA for TM. | -| wso2.deployment.image.digest | string | `""` | Docker image digest | -| wso2.deployment.image.imagePullPolicy | string | `"Always"` | Refer to the Kubernetes documentation on updating images (https://kubernetes.io/docs/concepts/containers/images/#updating-images) | -| wso2.deployment.image.registry | string | `""` | Container registry hostname | -| wso2.deployment.image.repository | string | `""` | Azure ACR repository name consisting the image | -| wso2.deployment.lifecycle.preStopHook.sleepSeconds | int | `10` | Number of seconds to sleep before sending SIGTERM to the pod | -| wso2.deployment.livenessProbe.failureThreshold | int | `3` | Minimum consecutive successes for the probe to be considered successful after having failed | -| wso2.deployment.livenessProbe.initialDelaySeconds | int | `60` | Number of seconds after the container has started before liveness probes are initiated | -| wso2.deployment.livenessProbe.periodSeconds | int | `10` | How often (in seconds) to perform the probe | -| wso2.deployment.minAvailable | string | `"50%"` | Minimum available pod counts for PDB | -| wso2.deployment.nodeSelector | string | `nil` | Node selector to deploy pod in selected node. Add label to the node and specify the label here. | -| wso2.deployment.persistence.solrIndexing | object | `{"capacity":{"carbonDatabase":"50M","solrIndexedData":"50M"},"enabled":false}` | Persistent runtime artifacts for Apache Solr-based indexing | -| wso2.deployment.persistence.solrIndexing.capacity.carbonDatabase | string | `"50M"` | For persisting the H2 based local Carbon database file | -| wso2.deployment.persistence.solrIndexing.capacity.solrIndexedData | string | `"50M"` | For persisting the indexed solr data | -| wso2.deployment.persistence.solrIndexing.enabled | bool | `false` | Indicates if persistence of the runtime artifacts for Apache Solr-based indexing is enabled By default, this is disabled | -| wso2.deployment.readinessProbe.failureThreshold | int | `3` | Minimum consecutive successes for the probe to be considered successful after having failed | -| wso2.deployment.readinessProbe.initialDelaySeconds | int | `60` | Number of seconds after the container has started before readiness probes are initiated | -| wso2.deployment.readinessProbe.periodSeconds | int | `10` | How often (in seconds) to perform the probe | -| wso2.deployment.replicas | int | `1` | | -| wso2.deployment.resources.jvm.memory.xms | string | `"2048m"` | JVM heap memory Xms | -| wso2.deployment.resources.jvm.memory.xmx | string | `"2048m"` | JVM heap memory Xmx | -| wso2.deployment.resources.limits.cpu | string | `"3000m"` | CPU limit for API Manager | -| wso2.deployment.resources.limits.memory | string | `"3Gi"` | Memory limit for API Manager | -| wso2.deployment.resources.requests.cpu | string | `"2000m"` | CPU request for API Manager | -| wso2.deployment.resources.requests.memory | string | `"2Gi"` | Memory request for API Manager | -| wso2.deployment.startupProbe.failureThreshold | int | `3` | Minimum consecutive successes for the probe to be considered successful after having failed | -| wso2.deployment.startupProbe.initialDelaySeconds | int | `60` | Number of seconds after the container has started before startup probes are initiated | -| wso2.deployment.startupProbe.periodSeconds | int | `10` | How often (in seconds) to perform the probe | - ----------------------------------------------- -Autogenerated from chart metadata using [helm-docs v1.11.2](https://github.com/norwoodj/helm-docs/releases/v1.11.2) diff --git a/test/apim-apk-agent-test/apim-cp-helm-chart/confs/api-manager.sh b/test/apim-apk-agent-test/apim-cp-helm-chart/confs/api-manager.sh deleted file mode 100755 index b1328c3eb..000000000 --- a/test/apim-apk-agent-test/apim-cp-helm-chart/confs/api-manager.sh +++ /dev/null @@ -1,362 +0,0 @@ -#!/bin/sh -# ---------------------------------------------------------------------------- -# Copyright 2005-2012 WSO2, Inc. http://www.wso2.org -# -# 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. - -# ---------------------------------------------------------------------------- -# Main Script for the WSO2 Carbon Server -# -# Environment Variable Prequisites -# -# CARBON_HOME Home of WSO2 Carbon installation. If not set I will try -# to figure it out. -# -# JAVA_HOME Must point at your Java Development Kit installation. -# -# JAVA_OPTS (Optional) Java runtime options used when the commands -# is executed. -# -# NOTE: Borrowed generously from Apache Tomcat startup scripts. -# ----------------------------------------------------------------------------- - -# OS specific support. $var _must_ be set to either true or false. -#ulimit -n 100000 - -cygwin=false; -darwin=false; -os400=false; -mingw=false; -case "`uname`" in -CYGWIN*) cygwin=true;; -MINGW*) mingw=true;; -OS400*) os400=true;; -Darwin*) darwin=true - if [ -z "$JAVA_VERSION" ] ; then - JAVA_VERSION="CurrentJDK" - else - echo "Using Java version: $JAVA_VERSION" - fi - if [ -z "$JAVA_HOME" ] ; then - JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home - fi - ;; -esac - -# resolve links - $0 may be a softlink -PRG="$0" - -while [ -h "$PRG" ]; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '.*/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`/"$link" - fi -done - -# Get standard environment variables -PRGDIR=`dirname "$PRG"` - -# Only set CARBON_HOME if not already set -[ -z "$CARBON_HOME" ] && CARBON_HOME=`cd "$PRGDIR/.." ; pwd` - -# Set AXIS2_HOME. Needed for One Click JAR Download -AXIS2_HOME="$CARBON_HOME" - -# For Cygwin, ensure paths are in UNIX format before anything is touched -if $cygwin; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` - [ -n "$CARBON_HOME" ] && CARBON_HOME=`cygpath --unix "$CARBON_HOME"` - [ -n "$AXIS2_HOME" ] && CARBON_HOME=`cygpath --unix "$CARBON_HOME"` -fi - -# For OS400 -if $os400; then - # Set job priority to standard for interactive (interactive - 6) by using - # the interactive priority - 6, the helper threads that respond to requests - # will be running at the same priority as interactive jobs. - COMMAND='chgjob job('$JOBNAME') runpty(6)' - system $COMMAND - - # Enable multi threading - QIBM_MULTI_THREADED=Y - export QIBM_MULTI_THREADED -fi - -# For Migwn, ensure paths are in UNIX format before anything is touched -if $mingw ; then - [ -n "$CARBON_HOME" ] && - CARBON_HOME="`(cd "$CARBON_HOME"; pwd)`" - [ -n "$JAVA_HOME" ] && - JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" - [ -n "$AXIS2_HOME" ] && - CARBON_HOME="`(cd "$CARBON_HOME"; pwd)`" - # TODO classpath? -fi - -if [ -z "$JAVACMD" ] ; then - if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - else - JAVACMD=java - fi -fi - -if [ ! -x "$JAVACMD" ] ; then - echo "Error: JAVA_HOME is not defined correctly." - echo " CARBON cannot execute $JAVACMD" - exit 1 -fi - -# if JAVA_HOME is not set we're not happy -if [ -z "$JAVA_HOME" ]; then - echo "You must set the JAVA_HOME variable before running CARBON." - exit 1 -fi - -if [ -e "$CARBON_HOME/wso2carbon.pid" ]; then - PID=`cat "$CARBON_HOME"/wso2carbon.pid` -fi - -# ----- Process the input command ---------------------------------------------- -args="" -for c in $* -do - if [ "$c" = "--debug" ] || [ "$c" = "-debug" ] || [ "$c" = "debug" ]; then - CMD="--debug" - continue - elif [ "$CMD" = "--debug" ]; then - if [ -z "$PORT" ]; then - PORT=$c - fi - elif [ "$c" = "--stop" ] || [ "$c" = "-stop" ] || [ "$c" = "stop" ]; then - CMD="stop" - elif [ "$c" = "--start" ] || [ "$c" = "-start" ] || [ "$c" = "start" ]; then - CMD="start" - elif [ "$c" = "--version" ] || [ "$c" = "-version" ] || [ "$c" = "version" ]; then - CMD="version" - elif [ "$c" = "--restart" ] || [ "$c" = "-restart" ] || [ "$c" = "restart" ]; then - CMD="restart" - elif [ "$c" = "--test" ] || [ "$c" = "-test" ] || [ "$c" = "test" ]; then - CMD="test" - elif [ "$c" = "--optimize" ] || [ "$c" = "-optimize" ] || [ "$c" = "optimize" ]; then - for option in $*; do - if [ "$option" = "--skipConfigOptimization" ] || [ "$option" = "-skipConfigOptimization" ] || - [ "$option" = "skipConfigOptimization" ]; then - passedSkipConfigOptimizationOption=true - echo "Passed skipConfigOptimization Option: $passedSkipConfigOptimizationOption" - fi - done - - for profile in $*; do - case "$profile" in - *Dprofile=*) - cd $(dirname "$0") - if [ "$passedSkipConfigOptimizationOption" = true ]; then - sh profileSetup.sh $profile --skipConfigOptimization - else - sh profileSetup.sh $profile - fi - echo "Starting the server..." - ;; - esac - done - else - args="$args $c" - fi -done - -if [ "$CMD" = "--debug" ]; then - if [ "$PORT" = "" ]; then - echo " Please specify the debug port after the --debug option" - exit 1 - fi - if [ -n "$JAVA_OPTS" ]; then - echo "Warning !!!. User specified JAVA_OPTS will be ignored, once you give the --debug option." - fi - CMD="RUN" - JAVA_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=$PORT" - echo "Please start the remote debugging client to continue..." -elif [ "$CMD" = "start" ]; then - if [ -e "$CARBON_HOME/wso2carbon.pid" ]; then - if ps -p $PID > /dev/null ; then - echo "Process is already running" - exit 0 - fi - fi - export CARBON_HOME="$CARBON_HOME" -# using nohup sh to avoid erros in solaris OS.TODO - nohup sh "$CARBON_HOME"/bin/api-manager.sh $args > /dev/null 2>&1 & - exit 0 -elif [ "$CMD" = "stop" ]; then - export CARBON_HOME="$CARBON_HOME" - kill -term `cat "$CARBON_HOME"/wso2carbon.pid` - exit 0 -elif [ "$CMD" = "restart" ]; then - export CARBON_HOME="$CARBON_HOME" - kill -term `cat "$CARBON_HOME"/wso2carbon.pid` - process_status=0 - pid=`cat "$CARBON_HOME"/wso2carbon.pid` - while [ "$process_status" -eq "0" ] - do - sleep 1; - ps -p$pid 2>&1 > /dev/null - process_status=$? - done - -# using nohup sh to avoid erros in solaris OS.TODO - nohup sh "$CARBON_HOME"/bin/api-manager.sh $args > /dev/null 2>&1 & - exit 0 -elif [ "$CMD" = "test" ]; then - JAVACMD="exec "$JAVACMD"" -elif [ "$CMD" = "version" ]; then - cat "$CARBON_HOME"/bin/version.txt - cat "$CARBON_HOME"/bin/wso2carbon-version.txt - exit 0 -fi - -# ---------- Handle the SSL Issue with proper JDK version -------------------- -java_version=$("$JAVACMD" -version 2>&1 | awk -F '"' '/version/ {print $2}') -java_version_formatted=$(echo "$java_version" | awk -F. '{printf("%02d%02d",$1,$2);}') -if [ $java_version_formatted -lt 1100 ] || [ $java_version_formatted -gt 1700 ]; then - echo " Starting WSO2 Carbon (in unsupported JDK)" - echo " [ERROR] CARBON is supported only between JDK 11 and JDK 17" -fi - -CARBON_XBOOTCLASSPATH="" -for f in "$CARBON_HOME"/lib/xboot/*.jar -do - if [ "$f" != "$CARBON_HOME/lib/xboot/*.jar" ];then - CARBON_XBOOTCLASSPATH="$CARBON_XBOOTCLASSPATH":$f - fi -done - - -CARBON_CLASSPATH="" -if [ -e "$JAVA_HOME/lib/tools.jar" ]; then - CARBON_CLASSPATH="$JAVA_HOME/lib/tools.jar" -fi -for f in "$CARBON_HOME"/bin/*.jar -do - if [ "$f" != "$CARBON_HOME/bin/*.jar" ];then - CARBON_CLASSPATH="$CARBON_CLASSPATH":$f - fi -done -for t in "$CARBON_HOME"/lib/*.jar -do - CARBON_CLASSPATH="$CARBON_CLASSPATH":$t -done -for t in "$CARBON_HOME"/lib/endorsed/*.jar -do - CARBON_CLASSPATH="$CARBON_CLASSPATH":$t -done - - - -# For Cygwin, switch paths to Windows format before running java -if $cygwin; then - JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"` - CARBON_HOME=`cygpath --absolute --windows "$CARBON_HOME"` - AXIS2_HOME=`cygpath --absolute --windows "$CARBON_HOME"` - CLASSPATH=`cygpath --path --windows "$CLASSPATH"` - CARBON_CLASSPATH=`cygpath --path --windows "$CARBON_CLASSPATH"` - CARBON_XBOOTCLASSPATH=`cygpath --path --windows "$CARBON_XBOOTCLASSPATH"` -fi - -# ----- Execute The Requested Command ----------------------------------------- - -echo JAVA_HOME environment variable is set to $JAVA_HOME -echo CARBON_HOME environment variable is set to "$CARBON_HOME" - -cd "$CARBON_HOME" - -TMP_DIR="$CARBON_HOME"/tmp -if [ -d "$TMP_DIR" ]; then -rm -rf "$TMP_DIR"/* -fi - -START_EXIT_STATUS=121 -status=$START_EXIT_STATUS - -if [ -z "$JVM_MEM_OPTS" ]; then - java_version=$("$JAVACMD" -version 2>&1 | awk -F '"' '/version/ {print $2}') - JVM_MEM_OPTS="-Xms256m -Xmx1024m" - if [ "$java_version" \< "1.8" ]; then - JVM_MEM_OPTS="$JVM_MEM_OPTS -XX:MaxPermSize=256m" - fi -fi -echo "Using Java memory options: $JVM_MEM_OPTS" - -#To monitor a Carbon server in remote JMX mode on linux host machines, set the below system property. -# -Djava.rmi.server.hostname="your.IP.goes.here" - -JAVA_VER_BASED_OPTS="--add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens java.rmi/sun.rmi.transport=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED" - -if [ $java_version_formatted -ge 1700 ]; then - JAVA_VER_BASED_OPTS="$JAVA_VER_BASED_OPTS --add-opens=java.naming/com.sun.jndi.ldap=ALL-UNNAMED --add-opens=java.base/sun.security.x509=ALL-UNNAMED" -fi - -while [ "$status" = "$START_EXIT_STATUS" ] -do - $JAVACMD \ - -Xbootclasspath/a:"$CARBON_XBOOTCLASSPATH" \ - $JVM_MEM_OPTS \ - -XX:+HeapDumpOnOutOfMemoryError \ - -XX:HeapDumpPath="$CARBON_HOME/repository/logs/heap-dump.hprof" \ - $JAVA_OPTS \ - -Dcom.sun.management.jmxremote \ - -classpath "$CARBON_CLASSPATH" \ - $JAVA_VER_BASED_OPTS \ - -Djava.io.tmpdir="$CARBON_HOME/tmp" \ - -Dcatalina.base="$CARBON_HOME/lib/tomcat" \ - -Dwso2.server.standalone=true \ - -Dcarbon.registry.root=/ \ - -Djava.command="$JAVACMD" \ - -Dcarbon.home="$CARBON_HOME" \ - -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \ - -Dcarbon.config.dir.path="$CARBON_HOME/repository/conf" \ - -Djava.util.logging.config.file="$CARBON_HOME/repository/conf/etc/logging-bridge.properties" \ - -Dcomponents.repo="$CARBON_HOME/repository/components/plugins" \ - -Dconf.location="$CARBON_HOME/repository/conf"\ - -Dcom.atomikos.icatch.file="$CARBON_HOME/lib/transactions.properties" \ - -Dcom.atomikos.icatch.hide_init_file_path=true \ - -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false \ - -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true \ - -Dcom.sun.jndi.ldap.connect.pool.authentication=simple \ - -Dcom.sun.jndi.ldap.connect.pool.timeout=3000 \ - -Dorg.terracotta.quartz.skipUpdateCheck=true \ - -Djava.security.egd=file:/dev/./urandom \ - -Dfile.encoding=UTF8 \ - -Djava.net.preferIPv4Stack=true \ - -Dcom.ibm.cacheLocalHost=true \ - -Dorg.opensaml.httpclient.https.disableHostnameVerification=true \ - -Dhttpclient.hostnameVerifier=AllowAll \ - -DworkerNode=false \ - -DenableCorrelationLogs=false \ - -Dcarbon.new.config.dir.path="$CARBON_HOME/repository/resources/conf" \ - -Djavax.xml.xpath.XPathFactory:http://java.sun.com/jaxp/xpath/dom=net.sf.saxon.xpath.XPathFactoryImpl \ - -Dlog4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector \ - -Dorg.ops4j.pax.logging.logReaderEnabled=false \ - -Dorg.ops4j.pax.logging.eventAdminEnabled=false \ - -Djdk.nio.zipfs.allowDotZipEntry=true \ - -Djdk.util.zip.disableZip64ExtraFieldValidation=true \ - org.wso2.carbon.bootstrap.Bootstrap $* - status=$? -done diff --git a/test/apim-apk-agent-test/apim-cp-helm-chart/confs/instance-1/deployment.toml b/test/apim-apk-agent-test/apim-cp-helm-chart/confs/instance-1/deployment.toml deleted file mode 100644 index 0a19cac9e..000000000 --- a/test/apim-apk-agent-test/apim-cp-helm-chart/confs/instance-1/deployment.toml +++ /dev/null @@ -1,290 +0,0 @@ -[server] -hostname = "{{ .Values.kubernetes.ingress.controlPlane.hostname }}" -#node_ip = "$env{NODE_IP}" -offset = {{ .Values.wso2.apim.portOffset }} -base_path = "${carbon.protocol}://${carbon.host}:${carbon.management.port}" -#discard_empty_caches = false -server_role = "control-plane" - -[user_store] -type = {{ .Values.wso2.apim.configurations.userStore.type | quote }} -{{- range $key, $value := .Values.wso2.apim.configurations.userStore.properties }} -{{ $key }} = {{ $value | quote }} -{{- end }} - -[super_admin] -username = {{ .Values.wso2.apim.configurations.adminUsername | quote }} -{{- if .Values.wso2.apim.secureVaultEnabled }} -password = "$secret{admin_password}" -{{- else }} -password = {{ .Values.wso2.apim.configurations.adminPassword | quote }} -{{- end }} -create_admin_account = true - -[database.apim_db] -type = "{{ .Values.wso2.apim.configurations.databases.type }}" -url = "{{ .Values.wso2.apim.configurations.databases.apim_db.url}}" -username = "{{ .Values.wso2.apim.configurations.databases.apim_db.username }}" -{{- if .Values.wso2.apim.secureVaultEnabled }} -password = "$secret{apim_db_password}" -{{- else }} -password = {{ .Values.wso2.apim.configurations.databases.apim_db.password | quote }} -{{- end }} - -[database.apim_db.pool_options] -{{- range $key, $value := .Values.wso2.apim.configurations.databases.apim_db.poolParameters }} -{{ $key }} = "{{ $value }}" -{{- end }} - -[database.shared_db] -type = "{{ .Values.wso2.apim.configurations.databases.type }}" -url = "{{ .Values.wso2.apim.configurations.databases.shared_db.url}}" -username = "{{ .Values.wso2.apim.configurations.databases.shared_db.username }}" -{{- if .Values.wso2.apim.secureVaultEnabled }} -password = "$secret{shared_db_password}" -{{- else }} -password = {{ .Values.wso2.apim.configurations.databases.shared_db.password | quote }} -{{- end }} - -[database.shared_db.pool_options] -{{- range $key, $value := .Values.wso2.apim.configurations.databases.shared_db.poolParameters }} -{{ $key }} = "{{ $value }}" -{{- end }} - -[apim] -gateway_type = "Regular,APK" - -{{- if .Values.wso2.apim.configurations.security.keystores.primary.enabled }} -[keystore.primary] -type = "JKS" -file_name = "{{ .Values.wso2.apim.configurations.security.keystores.primary.name }}" -alias = "{{ .Values.wso2.apim.configurations.security.keystores.primary.alias }}" -{{- if .Values.wso2.apim.secureVaultEnabled }} -password = "$secret{keystore_password}" -key_password = "$secret{keystore_key_password}" -{{- else }} -password = {{ .Values.wso2.apim.configurations.security.keystores.primary.password | quote }} -key_password = {{ .Values.wso2.apim.configurations.security.keystores.primary.keyPassword | quote }} -{{- end }} -{{- end }} - -{{- if .Values.wso2.apim.configurations.security.keystores.tls.enabled }} -[keystore.tls] -type = "JKS" -file_name = "{{ .Values.wso2.apim.configurations.security.keystores.tls.name }}" -alias = "{{ .Values.wso2.apim.configurations.security.keystores.tls.alias }}" -{{- if .Values.wso2.apim.secureVaultEnabled }} -password = "$secret{ssl_keystore_password}" -key_password = "$secret{ssl_key_password}" -{{- else }} -password = {{ .Values.wso2.apim.configurations.security.keystores.tls.password | quote }} -key_password = {{ .Values.wso2.apim.configurations.security.keystores.tls.keyPassword | quote }} -{{- end }} -{{- end }} - -{{- if .Values.wso2.apim.configurations.security.keystores.internal.enabled }} -[keystore.internal] -type = "JKS" -file_name = "{{ .Values.wso2.apim.configurations.security.keystores.internal.name }}" -alias = "{{ .Values.wso2.apim.configurations.security.keystores.internal.alias }}" -{{- if .Values.wso2.apim.secureVaultEnabled }} -password = "$secret{internal_keystore_password}" -key_password = "$secret{internal_keystore_key_password}" -{{- else }} -password = {{ .Values.wso2.apim.configurations.security.keystores.internal.password | quote }} -key_password = {{ .Values.wso2.apim.configurations.security.keystores.internal.keyPassword | quote }} -{{- end }} -{{- end }} - -[truststore] -type = "JKS" -file_name = "{{ .Values.wso2.apim.configurations.security.truststore.name }}" -{{- if .Values.wso2.apim.secureVaultEnabled }} -password = "$secret{truststore_password}" -{{- else }} -password = {{ .Values.wso2.apim.configurations.security.truststore.password | quote }} -{{- end }} - -{{- range $i, $env := .Values.wso2.apim.configurations.gateway.environments }} -[[apim.gateway.environment]] -name = {{ $env.name | quote }} -type = {{ $env.type | quote }} -gateway_type = "APK" -provider = {{ $env.provider | quote }} -display_in_api_console = {{ $env.displayInApiConsole }} -description = {{ $env.description | quote }} -show_as_token_endpoint_url = {{ $env.showAsTokenEndpointUrl }} -service_url = "https://{{ $env.serviceName }}:{{ $env.servicePort }}/services/" -username= "${admin.username}" -password= "${admin.password}" -ws_endpoint = "ws://{{ $env.wsHostname }}" -wss_endpoint = "wss://{{ $env.wsHostname }}" -http_endpoint = "http://{{ $env.httpHostname }}:9090" -https_endpoint = "https://{{ $env.httpHostname }}:9095" -websub_event_receiver_http_endpoint = "http://{{ $env.websubHostname }}" -websub_event_receiver_https_endpoint = "https://{{ $env.websubHostname }}" - -{{- end }} - -[apim.key_manager] -{{- if .Values.wso2.apim.configurations.iskm.enabled }} -type = "WSO2-IS" -service_url = "https://{{ .Values.wso2.apim.configurations.iskm.serviceName }}:{{ .Values.wso2.apim.configurations.iskm.servicePort }}/services/" -{{- else }} -service_url = "https://{{ template "apim-helm-cp.fullname" . }}-service:{{ add 9443 .Values.wso2.apim.portOffset }}/services/" -{{- end }} -username= "$ref{super_admin.username}" -password= "$ref{super_admin.password}" - -{{ if .Values.wso2.apim.configurations.iskm.enabled }} -[oauth.grant_type.token_exchange] -enable = false -allow_refresh_tokens = true -iat_validity_period = "1h" -{{- end }} - -[oauth.endpoints] -oauth2_jwks_url = "https://apim-wso2am-cp-1-service:9443/oauth2/jwks" - -#[apim.publisher] -#internal_key_issuer = "http://am.wso2.com:443/token" -#{{- if .Values.wso2.apim.configurations.publisher.supportedDocumentTypes }} -#supported_document_types = {{ toJson .Values.wso2.apim.configurations.publisher.supportedDocumentTypes }} -#{{- end }} - -[apim.devportal] -url = "https://{{ .Values.kubernetes.ingress.controlPlane.hostname }}/devportal" -{{- if .Values.wso2.apim.configurations.devportal.enableApplicationSharing }} -enable_application_sharing = {{ .Values.wso2.apim.configurations.devportal.enableApplicationSharing }} -{{- end }} -{{- if .Values.wso2.apim.configurations.devportal.applicationSharingType }} -application_sharing_type = {{ .Values.wso2.apim.configurations.devportal.applicationSharingType | quote }} -{{- end }} -{{- if .Values.wso2.apim.configurations.devportal.applicationSharingImpl }} -application_sharing_impl = {{ .Values.wso2.apim.configurations.devportal.applicationSharingImpl | quote }} -{{- end }} -{{- if .Values.wso2.apim.configurations.devportal.displayMultipleVersions }} -display_multiple_versions = {{ .Values.wso2.apim.configurations.devportal.displayMultipleVersions }} -{{- end }} -{{- if .Values.wso2.apim.configurations.devportal.displayDeprecatedAPIs }} -display_deprecated_apis = {{ .Values.wso2.apim.configurations.devportal.displayDeprecatedAPIs }} -{{- end }} -{{- if .Values.wso2.apim.configurations.devportal.enableComments }} -enable_comments = {{ .Values.wso2.apim.configurations.devportal.enableComments }} -{{- end }} -{{- if .Values.wso2.apim.configurations.devportal.enableRatings }} -enable_ratings = {{ .Values.wso2.apim.configurations.devportal.enableRatings }} -{{- end }} -{{- if .Values.wso2.apim.configurations.devportal.enableForum }} -enable_forum = {{ .Values.wso2.apim.configurations.devportal.enableForum }} -{{- end }} -{{- if .Values.wso2.apim.configurations.devportal.enableAnonymousMode }} -enable_anonymous_mode = {{ .Values.wso2.apim.configurations.devportal.enableAnonymousMode }} -{{- end }} -{{- if .Values.wso2.apim.configurations.devportal.enableCrossTenantSubscriptions }} -enable_cross_tenant_subscriptions = {{ .Values.wso2.apim.configurations.devportal.enableCrossTenantSubscriptions }} -{{- end }} -{{- if .Values.wso2.apim.configurations.devportal.defaultReservedUsername }} -default_reserved_username = {{ .Values.wso2.apim.configurations.devportal.defaultReservedUsername | quote }} -{{- end }} -{{- if .Values.wso2.apim.configurations.devportal.loginUsernameCaseInsensitive }} -login_username_case_insensitive = {{ .Values.wso2.apim.configurations.devportal.loginUsernameCaseInsensitive }} -{{- end }} -{{- if .Values.wso2.apim.configurations.devportal.enableKeyProvisioning }} -enable_key_provisioning = {{ .Values.wso2.apim.configurations.devportal.enableKeyProvisioning }} -{{- end }} - -[apim.event_hub] -enable = true -username = "$ref{super_admin.username}" -password = "$ref{super_admin.password}" -service_url = "https://{{ template "apim-helm-cp.fullname" . }}-service:{{ add 9443 .Values.wso2.apim.portOffset }}/services/" -event_listening_endpoints = ["tcp://localhost:{{ add 5672 .Values.wso2.apim.portOffset }}"] -{{- if .Values.wso2.deployment.highAvailability }} -event_duplicate_url = ["tcp://{{ template "apim-helm-cp.fullname" . }}-2-service:{{ add 5672 .Values.wso2.apim.portOffset }}"] -{{- end }} - -[[apim.event_hub.publish.url_group]] -urls = ["tcp://{{ template "apim-helm-cp.fullname" . }}-1-service:{{ add 9611 .Values.wso2.apim.portOffset }}"] -auth_urls = ["ssl://{{ template "apim-helm-cp.fullname" . }}-1-service:{{ add 9711 .Values.wso2.apim.portOffset }}"] - -{{- if .Values.wso2.deployment.highAvailability }} -[[apim.event_hub.publish.url_group]] -urls = ["tcp://{{ template "apim-helm-cp.fullname" . }}-2-service:{{ add 9611 .Values.wso2.apim.portOffset }}"] -auth_urls = ["ssl://{{ template "apim-helm-cp.fullname" . }}-2-service:{{ add 9711 .Values.wso2.apim.portOffset }}"] -{{- end }} - -[apim.oauth_config] -{{- if .Values.wso2.apim.configurations.iskm.enabled }} -revoke_endpoint = "https://{{ .Values.wso2.apim.configurations.iskm.serviceName }}:{{ .Values.wso2.apim.configurations.iskm.servicePort }}/oauth2/revoke" -{{- else }} -revoke_endpoint = "https://{{ template "apim-helm-cp.fullname" . }}-service:{{ add 9443 .Values.wso2.apim.portOffset }}/oauth2/revoke" -{{- end }} -enable_token_encryption = {{ .Values.wso2.apim.configurations.oauth_config.enableTokenEncryption }} -enable_token_hashing = {{ .Values.wso2.apim.configurations.oauth_config.enableTokenHashing }} -allowed_scopes = {{ toJson .Values.wso2.apim.configurations.oauth_config.allowedScopes }} - -{{- if .Values.wso2.apim.configurations.openTracer.enabled }} -[apim.open_tracer] -remote_tracer.enable = {{ .Values.wso2.apim.configurations.openTracer.enabled }} -remote_tracer.name = {{ .Values.wso2.apim.configurations.openTracer.name | quote }} -remote_tracer.properties.hostname = {{ .Values.wso2.apim.configurations.openTracer.properties.hostname | quote }} -remote_tracer.properties.port = {{ .Values.wso2.apim.configurations.openTracer.properties.port | quote }} -{{- end }} - -{{- if .Values.wso2.apim.configurations.openTelemetry.enabled }} -[apim.open_telemetry] -remote_tracer.enable = {{ .Values.wso2.apim.configurations.openTelemetry.enabled }} -remote_tracer.name = {{ .Values.wso2.apim.configurations.openTelemetry.name | quote }} -remote_tracer.hostname = {{ .Values.wso2.apim.configurations.openTelemetry.hostname | quote }} -remote_tracer.port = {{ .Values.wso2.apim.configurations.openTelemetry.port | quote }} -{{- end }} - -[transport.https.properties] -proxyPort = 443 - -[[event_handler]] -name="userPostSelfRegistration" -subscriptions=["POST_ADD_USER"] - -[service_provider] -sp_name_regex = "^[\\sa-zA-Z0-9._-]*$" - -{{- if not .Values.wso2.apim.configurations.iskm.enabled }} -[[event_listener]] -id = "token_revocation" -type = "org.wso2.carbon.identity.core.handler.AbstractIdentityHandler" -name = "org.wso2.is.notification.ApimOauthEventInterceptor" -order = 1 - -[event_listener.properties] -notification_endpoint = "https://localhost:${mgt.transport.https.port}/internal/data/v1/notify" -username = "${admin.username}" -password = "${admin.password}" -'header.X-WSO2-KEY-MANAGER' = "default" -{{- end }} - -{{- if .Values.wso2.deployment.persistence.solrIndexing.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 }} - -{{- if .Values.wso2.apim.secureVaultEnabled }} -[secrets] -admin_password = {{ .Values.wso2.apim.configurations.adminPassword | quote }} -keystore_password = {{ .Values.wso2.apim.configurations.security.keystores.primary.password | quote }} -keystore_key_password = {{ .Values.wso2.apim.configurations.security.keystores.primary.keyPassword | quote }} -ssl_keystore_password = {{ .Values.wso2.apim.configurations.security.keystores.tls.password | quote }} -ssl_key_password = {{ .Values.wso2.apim.configurations.security.keystores.tls.keyPassword | quote }} -internal_keystore_password = {{ .Values.wso2.apim.configurations.security.keystores.internal.password | quote }} -internal_keystore_key_password = {{ .Values.wso2.apim.configurations.security.keystores.internal.keyPassword | quote }} -truststore_password = {{ .Values.wso2.apim.configurations.security.truststore.password | quote }} -apim_db_password = {{ .Values.wso2.apim.configurations.databases.apim_db.password | quote}} -shared_db_password = {{ .Values.wso2.apim.configurations.databases.shared_db.password | quote}} -{{- end}} \ No newline at end of file diff --git a/test/apim-apk-agent-test/apim-cp-helm-chart/confs/instance-2/deployment.toml b/test/apim-apk-agent-test/apim-cp-helm-chart/confs/instance-2/deployment.toml deleted file mode 100644 index 91c7c77b4..000000000 --- a/test/apim-apk-agent-test/apim-cp-helm-chart/confs/instance-2/deployment.toml +++ /dev/null @@ -1,270 +0,0 @@ -[server] -hostname = "{{ .Values.kubernetes.ingress.controlPlane.hostname }}" -node_ip = "$env{NODE_IP}" -offset = {{ .Values.wso2.apim.portOffset }} -base_path = "${carbon.protocol}://${carbon.host}:${carbon.management.port}" -#discard_empty_caches = false -server_role = "control-plane" - -[user_store] -type = {{ .Values.wso2.apim.configurations.userStore.type | quote }} -{{- range $key, $value := .Values.wso2.apim.configurations.userStore.properties }} -{{ $key }} = {{ $value | quote }} -{{- end }} - -[super_admin] -username = {{ .Values.wso2.apim.configurations.adminUsername | quote }} -{{- if .Values.wso2.apim.secureVaultEnabled }} -password = "$secret{admin_password}" -{{- else }} -password = {{ .Values.wso2.apim.configurations.adminPassword | quote }} -{{- end }} -create_admin_account = true - -[database.apim_db] -type = "{{ .Values.wso2.apim.configurations.databases.type }}" -url = "{{ .Values.wso2.apim.configurations.databases.apim_db.url}}" -username = "{{ .Values.wso2.apim.configurations.databases.apim_db.username }}" -{{- if .Values.wso2.apim.secureVaultEnabled }} -password = "$secret{apim_db_password}" -{{- else }} -password = {{ .Values.wso2.apim.configurations.databases.apim_db.password | quote }} -{{- end }} -driver = "{{ .Values.wso2.apim.configurations.databases.jdbc.driver }}" - -[database.apim_db.pool_options] -{{- range $key, $value := .Values.wso2.apim.configurations.databases.apim_db.poolParameters }} -{{ $key }} = "{{ $value }}" -{{- end }} - -[database.shared_db] -type = "{{ .Values.wso2.apim.configurations.databases.type }}" -url = "{{ .Values.wso2.apim.configurations.databases.shared_db.url}}" -username = "{{ .Values.wso2.apim.configurations.databases.shared_db.username }}" -{{- if .Values.wso2.apim.secureVaultEnabled }} -password = "$secret{shared_db_password}" -{{- else }} -password = {{ .Values.wso2.apim.configurations.databases.shared_db.password | quote }} -{{- end }} -driver = "{{ .Values.wso2.apim.configurations.databases.jdbc.driver }}" - -[database.shared_db.pool_options] -{{- range $key, $value := .Values.wso2.apim.configurations.databases.shared_db.poolParameters }} -{{ $key }} = "{{ $value }}" -{{- end }} - -{{- if .Values.wso2.apim.configurations.security.keystores.primary.enabled }} -[keystore.primary] -type = "JKS" -file_name = "{{ .Values.wso2.apim.configurations.security.keystores.primary.name }}" -alias = "{{ .Values.wso2.apim.configurations.security.keystores.primary.alias }}" -{{- if .Values.wso2.apim.secureVaultEnabled }} -password = "$secret{keystore_password}" -key_password = "$secret{keystore_key_password}" -{{- else }} -password = {{ .Values.wso2.apim.configurations.security.keystores.primary.password | quote }} -key_password = {{ .Values.wso2.apim.configurations.security.keystores.primary.keyPassword | quote }} -{{- end }} -{{- end }} - -{{- if .Values.wso2.apim.configurations.security.keystores.tls.enabled }} -[keystore.tls] -type = "JKS" -file_name = "{{ .Values.wso2.apim.configurations.security.keystores.tls.name }}" -alias = "{{ .Values.wso2.apim.configurations.security.keystores.tls.alias }}" -{{- if .Values.wso2.apim.secureVaultEnabled }} -password = "$secret{ssl_keystore_password}" -key_password = "$secret{ssl_key_password}" -{{- else }} -password = {{ .Values.wso2.apim.configurations.security.keystores.tls.password | quote }} -key_password = {{ .Values.wso2.apim.configurations.security.keystores.tls.keyPassword | quote }} -{{- end }} -{{- end }} - -{{- if .Values.wso2.apim.configurations.security.keystores.internal.enabled }} -[keystore.internal] -type = "JKS" -file_name = "{{ .Values.wso2.apim.configurations.security.keystores.internal.name }}" -alias = "{{ .Values.wso2.apim.configurations.security.keystores.internal.alias }}" -{{- if .Values.wso2.apim.secureVaultEnabled }} -password = "$secret{internal_keystore_password}" -key_password = "$secret{internal_keystore_key_password}" -{{- else }} -password = {{ .Values.wso2.apim.configurations.security.keystores.internal.password | quote }} -key_password = {{ .Values.wso2.apim.configurations.security.keystores.internal.keyPassword | quote }} -{{- end }} -{{- end }} - -{{- range $i, $env := .Values.wso2.apim.configurations.gateway.environments }} -[[apim.gateway.environment]] -name = {{ $env.name | quote }} -type = {{ $env.type | quote }} -provider = {{ $env.provider | quote }} -display_in_api_console = {{ $env.displayInApiConsole }} -description = {{ $env.description | quote }} -show_as_token_endpoint_url = {{ $env.showAsTokenEndpointUrl }} -service_url = "https://{{ $env.serviceName }}:{{ $env.servicePort }}/services/" -username= "${admin.username}" -password= "${admin.password}" -ws_endpoint = "ws://{{ $env.wsHostname }}" -wss_endpoint = "wss://{{ $env.wsHostname }}" -http_endpoint = "http://{{ $env.httpHostname }}" -https_endpoint = "https://{{ $env.httpHostname }}" -websub_event_receiver_http_endpoint = "http://{{ $env.websubHostname }}" -websub_event_receiver_https_endpoint = "https://{{ $env.websubHostname }}" - -{{- end }} - -[apim.key_manager] -{{- if .Values.wso2.apim.configurations.iskm.enabled }} -type = "WSO2-IS" -service_url = "https://{{ .Values.wso2.apim.configurations.iskm.serviceName }}:{{ .Values.wso2.apim.configurations.iskm.servicePort }}/services/" -{{- else }} -service_url = "https://{{ template "apim-helm-cp.fullname" . }}-service:{{ add 9443 .Values.wso2.apim.portOffset }}/services/" -{{- end }} -username= "$ref{super_admin.username}" -password= "$ref{super_admin.password}" - -{{ if .Values.wso2.apim.configurations.iskm.enabled }} -[oauth.grant_type.token_exchange] -enable = false -allow_refresh_tokens = true -iat_validity_period = "1h" -{{- end }} - -[apim.devportal] -url = "https://{{ .Values.kubernetes.ingress.controlPlane.hostname }}/devportal" -{{- if .Values.wso2.apim.configurations.devportal.enableApplicationSharing }} -enable_application_sharing = {{ .Values.wso2.apim.configurations.devportal.enableApplicationSharing }} -{{- end }} -{{- if .Values.wso2.apim.configurations.devportal.applicationSharingType }} -application_sharing_type = {{ .Values.wso2.apim.configurations.devportal.applicationSharingType | quote }} -{{- end }} -{{- if .Values.wso2.apim.configurations.devportal.applicationSharingImpl }} -application_sharing_impl = {{ .Values.wso2.apim.configurations.devportal.applicationSharingImpl | quote }} -{{- end }} -{{- if .Values.wso2.apim.configurations.devportal.displayMultipleVersions }} -display_multiple_versions = {{ .Values.wso2.apim.configurations.devportal.displayMultipleVersions }} -{{- end }} -{{- if .Values.wso2.apim.configurations.devportal.displayDeprecatedAPIs }} -display_deprecated_apis = {{ .Values.wso2.apim.configurations.devportal.displayDeprecatedAPIs }} -{{- end }} -{{- if .Values.wso2.apim.configurations.devportal.enableComments }} -enable_comments = {{ .Values.wso2.apim.configurations.devportal.enableComments }} -{{- end }} -{{- if .Values.wso2.apim.configurations.devportal.enableRatings }} -enable_ratings = {{ .Values.wso2.apim.configurations.devportal.enableRatings }} -{{- end }} -{{- if .Values.wso2.apim.configurations.devportal.enableForum }} -enable_forum = {{ .Values.wso2.apim.configurations.devportal.enableForum }} -{{- end }} -{{- if .Values.wso2.apim.configurations.devportal.enableAnonymousMode }} -enable_anonymous_mode = {{ .Values.wso2.apim.configurations.devportal.enableAnonymousMode }} -{{- end }} -{{- if .Values.wso2.apim.configurations.devportal.enableCrossTenantSubscriptions }} -enable_cross_tenant_subscriptions = {{ .Values.wso2.apim.configurations.devportal.enableCrossTenantSubscriptions }} -{{- end }} -{{- if .Values.wso2.apim.configurations.devportal.defaultReservedUsername }} -default_reserved_username = {{ .Values.wso2.apim.configurations.devportal.defaultReservedUsername | quote }} -{{- end }} -{{- if .Values.wso2.apim.configurations.devportal.loginUsernameCaseInsensitive }} -login_username_case_insensitive = {{ .Values.wso2.apim.configurations.devportal.loginUsernameCaseInsensitive }} -{{- end }} -{{- if .Values.wso2.apim.configurations.devportal.enableKeyProvisioning }} -enable_key_provisioning = {{ .Values.wso2.apim.configurations.devportal.enableKeyProvisioning }} -{{- end }} - -[apim.event_hub] -enable = true -username = "$ref{super_admin.username}" -password = "$ref{super_admin.password}" -service_url = "https://{{ template "apim-helm-cp.fullname" . }}-service:{{ add 9443 .Values.wso2.apim.portOffset }}/services/" -event_listening_endpoints = ["tcp://localhost:{{ add 5672 .Values.wso2.apim.portOffset }}"] -{{- if .Values.wso2.deployment.highAvailability }} -event_duplicate_url = ["tcp://{{ template "apim-helm-cp.fullname" . }}-1-service:{{ add 5672 .Values.wso2.apim.portOffset }}"] -{{- end }} - -[[apim.event_hub.publish.url_group]] -urls = ["tcp://{{ template "apim-helm-cp.fullname" . }}-1-service:{{ add 9611 .Values.wso2.apim.portOffset }}"] -auth_urls = ["ssl://{{ template "apim-helm-cp.fullname" . }}-1-service:{{ add 9711 .Values.wso2.apim.portOffset }}"] - -{{- if .Values.wso2.deployment.highAvailability }} -[[apim.event_hub.publish.url_group]] -urls = ["tcp://{{ template "apim-helm-cp.fullname" . }}-2-service:{{ add 9611 .Values.wso2.apim.portOffset }}"] -auth_urls = ["ssl://{{ template "apim-helm-cp.fullname" . }}-2-service:{{ add 9711 .Values.wso2.apim.portOffset }}"] -{{- end }} - -[apim.oauth_config] -{{- if .Values.wso2.apim.configurations.iskm.enabled }} -revoke_endpoint = "https://{{ .Values.wso2.apim.configurations.iskm.serviceName }}:{{ .Values.wso2.apim.configurations.iskm.servicePort }}/oauth2/revoke" -{{- else }} -revoke_endpoint = "https://{{ template "apim-helm-cp.fullname" . }}-service:{{ add 9443 .Values.wso2.apim.portOffset }}/oauth2/revoke" -{{- end }} -enable_token_encryption = {{ .Values.wso2.apim.configurations.oauth_config.enableTokenEncryption }} -enable_token_hashing = {{ .Values.wso2.apim.configurations.oauth_config.enableTokenHashing }} -allowed_scopes = {{ toJson .Values.wso2.apim.configurations.oauth_config.allowedScopes }} - -{{- if .Values.wso2.apim.configurations.openTracer.enabled }} -[apim.open_tracer] -remote_tracer.enable = {{ .Values.wso2.apim.configurations.openTracer.enabled }} -remote_tracer.name = {{ .Values.wso2.apim.configurations.openTracer.name | quote }} -remote_tracer.properties.hostname = {{ .Values.wso2.apim.configurations.openTracer.properties.hostname | quote }} -remote_tracer.properties.port = {{ .Values.wso2.apim.configurations.openTracer.properties.port | quote }} -{{- end }} - -{{- if .Values.wso2.apim.configurations.openTelemetry.enabled }} -[apim.open_telemetry] -remote_tracer.enable = {{ .Values.wso2.apim.configurations.openTelemetry.enabled }} -remote_tracer.name = {{ .Values.wso2.apim.configurations.openTelemetry.name | quote }} -remote_tracer.hostname = {{ .Values.wso2.apim.configurations.openTelemetry.hostname | quote }} -remote_tracer.port = {{ .Values.wso2.apim.configurations.openTelemetry.port | quote }} -{{- end }} - -[transport.https.properties] -proxyPort = 443 - -[[event_handler]] -name="userPostSelfRegistration" -subscriptions=["POST_ADD_USER"] - -[service_provider] -sp_name_regex = "^[\\sa-zA-Z0-9._-]*$" - -{{- if not .Values.wso2.apim.configurations.iskm.enabled }} -[[event_listener]] -id = "token_revocation" -type = "org.wso2.carbon.identity.core.handler.AbstractIdentityHandler" -name = "org.wso2.is.notification.ApimOauthEventInterceptor" -order = 1 - -[event_listener.properties] -notification_endpoint = "https://localhost:${mgt.transport.https.port}/internal/data/v1/notify" -username = "${admin.username}" -password = "${admin.password}" -'header.X-WSO2-KEY-MANAGER' = "default" -{{- end }} - -{{- if .Values.wso2.deployment.persistence.solrIndexing.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 }} - -{{- if .Values.wso2.apim.secureVaultEnabled }} -[secrets] -admin_password = {{ .Values.wso2.apim.configurations.adminPassword | quote }} -keystore_password = {{ .Values.wso2.apim.configurations.security.keystores.primary.password | quote }} -keystore_key_password = {{ .Values.wso2.apim.configurations.security.keystores.primary.keyPassword | quote }} -ssl_keystore_password = {{ .Values.wso2.apim.configurations.security.keystores.tls.password | quote }} -ssl_key_password = {{ .Values.wso2.apim.configurations.security.keystores.tls.keyPassword | quote }} -internal_keystore_password = {{ .Values.wso2.apim.configurations.security.keystores.internal.password | quote }} -internal_keystore_key_password = {{ .Values.wso2.apim.configurations.security.keystores.internal.keyPassword | quote }} -truststore_password = {{ .Values.wso2.apim.configurations.security.truststore.password | quote }} -apim_db_password = {{ .Values.wso2.apim.configurations.databases.apim_db.password | quote}} -shared_db_password = {{ .Values.wso2.apim.configurations.databases.shared_db.password | quote}} -{{- end}} diff --git a/test/apim-apk-agent-test/apim-cp-helm-chart/confs/log4j2.properties b/test/apim-apk-agent-test/apim-cp-helm-chart/confs/log4j2.properties deleted file mode 100644 index f3f40b696..000000000 --- a/test/apim-apk-agent-test/apim-cp-helm-chart/confs/log4j2.properties +++ /dev/null @@ -1,525 +0,0 @@ -# list of all appenders -#add entry "syslog" to use the syslog appender -{{- if .Values.wso2.apim.log4j2.appenders }} -appenders = {{ .Values.wso2.apim.log4j2.appenders }}, CARBON_CONSOLE,HTTP_ACCESS_CONSOLE,AUDIT_CONSOLE,TRANSACTION_CONSOLE,CORRELATION_CONSOLE,CARBON_LOGFILE,AUDIT_LOGFILE,ATOMIKOS_LOGFILE,CARBON_TRACE_LOGFILE,ERROR_LOGFILE,OPEN_TRACING,SERVICE_APPENDER,TRACE_APPENDER,osgi,CORRELATION,BOTDATA_APPENDER,API_LOGFILE -{{- else }} -appenders = CARBON_CONSOLE,HTTP_ACCESS_CONSOLE,AUDIT_CONSOLE,TRANSACTION_CONSOLE,CORRELATION_CONSOLE,CARBON_LOGFILE,AUDIT_LOGFILE,ATOMIKOS_LOGFILE,CARBON_TRACE_LOGFILE,ERROR_LOGFILE,OPEN_TRACING,SERVICE_APPENDER,TRACE_APPENDER,osgi,CORRELATION,BOTDATA_APPENDER,API_LOGFILE -{{- end }} - -# CARBON_CONSOLE is set to be a ConsoleAppender using a PatternLayout. -appender.CARBON_CONSOLE.type = Console -appender.CARBON_CONSOLE.name = CARBON_CONSOLE -appender.CARBON_CONSOLE.layout.type = PatternLayout -appender.CARBON_CONSOLE.layout.pattern = TID: [%X{tenantId}] Tenant: [%X{tenantDomain}] [%d] [%X{Correlation-ID}] : apim-cp : %5p {%c} - %replace{%mm}{\n}{|}%xThrowable{separator(|)}%n -appender.CARBON_CONSOLE.filter.threshold.type = ThresholdFilter -appender.CARBON_CONSOLE.filter.threshold.level = DEBUG - -appender.HTTP_ACCESS_CONSOLE.type = Console -appender.HTTP_ACCESS_CONSOLE.name = HTTP_ACCESS_CONSOLE -appender.HTTP_ACCESS_CONSOLE.layout.type = PatternLayout -appender.HTTP_ACCESS_CONSOLE.layout.pattern = apim-access [%X{Correlation-ID}] %mm%n -appender.HTTP_ACCESS_CONSOLE.filter.threshold.type = ThresholdFilter -appender.HTTP_ACCESS_CONSOLE.filter.threshold.level = INFO - -# AUDIT_CONSOLE is set to be a ConsoleAppender using a PatternLayout. -appender.AUDIT_CONSOLE.type = Console -appender.AUDIT_CONSOLE.name = AUDIT_CONSOLE -appender.AUDIT_CONSOLE.layout.type = PatternLayout -appender.AUDIT_CONSOLE.layout.pattern = TID: [%X{tenantId}] Tenant: [%X{tenantDomain}] [%d] [%X{Correlation-ID}] : apim-cp-audit : %5p {%c} - %replace{%mm}{\n}{|}%xThrowable{separator(|)}%n -appender.AUDIT_CONSOLE.filter.threshold.type = ThresholdFilter -appender.AUDIT_CONSOLE.filter.threshold.level = DEBUG - -# TRANSACTION_CONSOLE is set to be a ConsoleAppender using a PatternLayout. -appender.TRANSACTION_CONSOLE.type = Console -appender.TRANSACTION_CONSOLE.name = TRANSACTION_CONSOLE -appender.TRANSACTION_CONSOLE.layout.type = PatternLayout -appender.TRANSACTION_CONSOLE.layout.pattern = TID: [%X{tenantId}] [%d] [%X{Correlation-ID}] : apim-cp-transaction : {%c} - %mm %n -appender.TRANSACTION_CONSOLE.filter.threshold.type = ThresholdFilter -appender.TRANSACTION_CONSOLE.filter.threshold.level = DEBUG - -# CORRELATION_CONSOLE is set to be a ConsoleAppender using a PatternLayout. -appender.CORRELATION_CONSOLE.type = Console -appender.CORRELATION_CONSOLE.name = CORRELATION_CONSOLE -appender.CORRELATION_CONSOLE.layout.type = PatternLayout -appender.CORRELATION_CONSOLE.layout.pattern = %d{yyyy-MM-dd HH:mm:ss,SSS}|%X{Correlation-ID} : apim-cp-correlation : |%t|%mm%n -appender.CORRELATION_CONSOLE.filter.threshold.type = ThresholdFilter -appender.CORRELATION_CONSOLE.filter.threshold.level = DEBUG - -# CARBON_LOGFILE is set to be a DailyRollingFileAppender using a PatternLayout. -appender.CARBON_LOGFILE.type = RollingFile -appender.CARBON_LOGFILE.name = CARBON_LOGFILE -appender.CARBON_LOGFILE.fileName = ${sys:carbon.home}/repository/logs/wso2carbon.log -appender.CARBON_LOGFILE.filePattern = ${sys:carbon.home}/repository/logs/wso2carbon-%d{MM-dd-yyyy}-%i.log.gz -appender.CARBON_LOGFILE.layout.type = PatternLayout -appender.CARBON_LOGFILE.layout.pattern = TID: [%tenantId] [%appName] [%d] %5p {%c} - %m%ex%n -appender.CARBON_LOGFILE.policies.type = Policies -appender.CARBON_LOGFILE.policies.time.type = TimeBasedTriggeringPolicy -appender.CARBON_LOGFILE.policies.time.interval = 1 -appender.CARBON_LOGFILE.policies.time.modulate = true -appender.CARBON_LOGFILE.policies.size.type = SizeBasedTriggeringPolicy -appender.CARBON_LOGFILE.policies.size.size=1GB -appender.CARBON_LOGFILE.strategy.type = DefaultRolloverStrategy -appender.CARBON_LOGFILE.strategy.max = 20 -appender.CARBON_LOGFILE.filter.threshold.type = ThresholdFilter -appender.CARBON_LOGFILE.filter.threshold.level = DEBUG - -appender.CARBON_LOGFILE.strategy.action.type = Delete -appender.CARBON_LOGFILE.strategy.action.basepath = ${sys:carbon.home}/repository/logs/ -appender.CARBON_LOGFILE.strategy.action.maxdepth = 1 -appender.CARBON_LOGFILE.strategy.action.condition.type = IfLastModified -appender.CARBON_LOGFILE.strategy.action.condition.age = 14D -appender.CARBON_LOGFILE.strategy.action.PathConditions.type = IfFileName -appender.CARBON_LOGFILE.strategy.action.PathConditions.glob = wso2carbon-* - -# Appender config to AUDIT_LOGFILE -appender.AUDIT_LOGFILE.type = RollingFile -appender.AUDIT_LOGFILE.name = AUDIT_LOGFILE -appender.AUDIT_LOGFILE.fileName = ${sys:carbon.home}/repository/logs/audit.log -appender.AUDIT_LOGFILE.filePattern = ${sys:carbon.home}/repository/logs/audit-%d{MM-dd-yyyy}-%i.log -appender.AUDIT_LOGFILE.layout.type = PatternLayout -appender.AUDIT_LOGFILE.layout.pattern = TID: [%tenantId] [%d] %5p {%c} - %m%ex%n -appender.AUDIT_LOGFILE.policies.type = Policies -appender.AUDIT_LOGFILE.policies.time.type = TimeBasedTriggeringPolicy -appender.AUDIT_LOGFILE.policies.time.interval = 1 -appender.AUDIT_LOGFILE.policies.time.modulate = true -appender.AUDIT_LOGFILE.policies.size.type = SizeBasedTriggeringPolicy -appender.AUDIT_LOGFILE.policies.size.size = 10MB -appender.AUDIT_LOGFILE.strategy.type = DefaultRolloverStrategy -appender.AUDIT_LOGFILE.strategy.max = 20 -appender.AUDIT_LOGFILE.filter.threshold.type = ThresholdFilter -appender.AUDIT_LOGFILE.filter.threshold.level = INFO - -# Appender config API logging -appender.API_LOGFILE.type = RollingFile -appender.API_LOGFILE.name = API_LOGFILE -appender.API_LOGFILE.fileName = ${sys:carbon.home}/repository/logs/api.log -appender.API_LOGFILE.filePattern = ${sys:carbon.home}/repository/logs/api-%d{MM-dd-yyyy}-%i.log -appender.API_LOGFILE.layout.type = PatternLayout -appender.API_LOGFILE.layout.pattern = [%d] %5p {%c} %X{apiName} - %m%ex%n -appender.API_LOGFILE.policies.type = Policies -appender.API_LOGFILE.policies.time.type = TimeBasedTriggeringPolicy -appender.API_LOGFILE.policies.time.interval = 1 -appender.API_LOGFILE.policies.time.modulate = true -appender.API_LOGFILE.policies.size.type = SizeBasedTriggeringPolicy -appender.API_LOGFILE.policies.size.size = 10MB -appender.API_LOGFILE.strategy.type = DefaultRolloverStrategy -appender.API_LOGFILE.strategy.max = 20 -appender.API_LOGFILE.filter.threshold.type = ThresholdFilter -appender.API_LOGFILE.filter.threshold.level = DEBUG - -# Appender config to send Atomikos transaction logs to new log file tm.out. -appender.ATOMIKOS_LOGFILE.type = RollingFile -appender.ATOMIKOS_LOGFILE.name = ATOMIKOS_LOGFILE -appender.ATOMIKOS_LOGFILE.fileName = ${sys:carbon.home}/repository/logs/tm.out -appender.ATOMIKOS_LOGFILE.filePattern = ${sys:carbon.home}/repository/logs/tm-%d{MM-dd-yyyy}.out -appender.ATOMIKOS_LOGFILE.layout.type = PatternLayout -appender.ATOMIKOS_LOGFILE.layout.pattern = [%d] [%tenantId] %5p {%c} - %m%ex%n -appender.ATOMIKOS_LOGFILE.policies.type = Policies -appender.ATOMIKOS_LOGFILE.policies.time.type = TimeBasedTriggeringPolicy -appender.ATOMIKOS_LOGFILE.policies.time.interval = 1 -appender.ATOMIKOS_LOGFILE.policies.time.modulate = true -appender.ATOMIKOS_LOGFILE.strategy.type = DefaultRolloverStrategy -appender.ATOMIKOS_LOGFILE.strategy.max = 20 - -# Appender config to CARBON_TRACE_LOGFILE -appender.CARBON_TRACE_LOGFILE.type = RollingFile -appender.CARBON_TRACE_LOGFILE.name = CARBON_TRACE_LOGFILE -appender.CARBON_TRACE_LOGFILE.fileName = ${sys:carbon.home}/repository/logs/wso2carbon-trace-messages.log -appender.CARBON_TRACE_LOGFILE.filePattern = ${sys:carbon.home}/repository/logs/wso2carbon-trace-messages-%d{MM-dd-yyyy}.log -appender.CARBON_TRACE_LOGFILE.layout.type = PatternLayout -appender.CARBON_TRACE_LOGFILE.layout.pattern = [%d] [%tenantId] %5p {%c} - %m%ex%n -appender.CARBON_TRACE_LOGFILE.policies.type = Policies -appender.CARBON_TRACE_LOGFILE.policies.time.type = TimeBasedTriggeringPolicy -appender.CARBON_TRACE_LOGFILE.policies.time.interval = 1 -appender.CARBON_TRACE_LOGFILE.policies.time.modulate = true -appender.CARBON_TRACE_LOGFILE.policies.size.type = SizeBasedTriggeringPolicy -appender.CARBON_TRACE_LOGFILE.policies.size.size = 10MB -appender.CARBON_TRACE_LOGFILE.strategy.type = DefaultRolloverStrategy -appender.CARBON_TRACE_LOGFILE.strategy.max = 20 - -# Appender config to put correlation Log. -appender.CORRELATION.type = RollingFile -appender.CORRELATION.name = CORRELATION -appender.CORRELATION.fileName = ${sys:carbon.home}/repository/logs/correlation.log -appender.CORRELATION.filePattern =${sys:carbon.home}/repository/logs/correlation-%d{MM-dd-yyyy}-%i.log.gz -appender.CORRELATION.layout.type = PatternLayout -appender.CORRELATION.layout.pattern = %d{yyyy-MM-dd HH:mm:ss,SSS}|%X{Correlation-ID}|%t|%m%n -appender.CORRELATION.policies.type = Policies -appender.CORRELATION.policies.time.type = TimeBasedTriggeringPolicy -appender.CORRELATION.policies.time.interval = 1 -appender.CORRELATION.policies.time.modulate = true -appender.CORRELATION.policies.size.type = SizeBasedTriggeringPolicy -appender.CORRELATION.policies.size.size = 10MB -appender.CORRELATION.strategy.type = DefaultRolloverStrategy -appender.CORRELATION.strategy.max = 20 -appender.CORRELATION.filter.threshold.type = ThresholdFilter -appender.CORRELATION.filter.threshold.level = INFO - -appender.ERROR_LOGFILE.type = RollingFile -appender.ERROR_LOGFILE.name = ERROR_LOGFILE -appender.ERROR_LOGFILE.fileName = ${sys:carbon.home}/repository/logs/wso2-apigw-errors.log -appender.ERROR_LOGFILE.filePattern = ${sys:carbon.home}/repository/logs/wso2-apigw-errors-%d{MM-dd-yyyy}-%i.log.gz -appender.ERROR_LOGFILE.layout.type = PatternLayout -appender.ERROR_LOGFILE.layout.pattern = %d{ISO8601} [%X{ip}-%X{host}] [%t] %5p %c{1} %m%n -appender.ERROR_LOGFILE.policies.type = Policies -appender.ERROR_LOGFILE.policies.time.type = TimeBasedTriggeringPolicy -appender.ERROR_LOGFILE.policies.time.interval = 1 -appender.ERROR_LOGFILE.policies.time.modulate = true -appender.ERROR_LOGFILE.policies.size.type = SizeBasedTriggeringPolicy -appender.ERROR_LOGFILE.policies.size.size = 10MB -appender.ERROR_LOGFILE.strategy.type = DefaultRolloverStrategy -appender.ERROR_LOGFILE.strategy.max = 20 -appender.ERROR_LOGFILE.filter.threshold.type = ThresholdFilter -appender.ERROR_LOGFILE.filter.threshold.level = WARN - -appender.CARBON_SYS_LOG.type = Syslog -appender.CARBON_SYS_LOG.name = CARBON_SYS_LOG -appender.CARBON_SYS_LOG.host = localhost -appender.CARBON_SYS_LOG.facility = USER -appender.CARBON_SYS_LOG.layout.type = PatternLayout -appender.CARBON_SYS_LOG.layout.pattern = [%d] %5p - %x %m {%c}%n -appender.CARBON_SYS_LOG.filter.threshold.type = ThresholdFilter -appender.CARBON_SYS_LOG.filter.threshold.level = DEBUG - -appender.OPEN_TRACING.type = RollingFile -appender.OPEN_TRACING.name = OPEN_TRACING -appender.OPEN_TRACING.fileName = ${sys:carbon.home}/repository/logs/wso2-apimgt-open-tracing.log -appender.OPEN_TRACING.filePattern = ${sys:carbon.home}/repository/logs/wso2-apimgt-open-tracing-%d{MM-dd-yyyy}-%i.log.gz -appender.OPEN_TRACING.layout.type = PatternLayout -appender.OPEN_TRACING.layout.pattern = %d{HH:mm:ss,SSS} [%X{ip}-%X{host}] [%t] %5p %m%nn -appender.OPEN_TRACING.policies.type = Policies -appender.OPEN_TRACING.policies.time.type = TimeBasedTriggeringPolicy -appender.OPEN_TRACING.policies.time.interval = 1 -appender.OPEN_TRACING.policies.time.modulate = true -appender.OPEN_TRACING.policies.size.type = SizeBasedTriggeringPolicy -appender.OPEN_TRACING.policies.size.size = 10MB -appender.OPEN_TRACING.strategy.type = DefaultRolloverStrategy -appender.OPEN_TRACING.strategy.max = 20 -appender.OPEN_TRACING.filter.threshold.type = ThresholdFilter -appender.OPEN_TRACING.filter.threshold.level = TRACE - -appender.TRACE_APPENDER.type = RollingFile -appender.TRACE_APPENDER.name = TRACE_APPENDER -appender.TRACE_APPENDER.fileName = ${sys:carbon.home}/repository/logs/wso2-apigw-trace.log -appender.TRACE_APPENDER.filePattern = ${sys:carbon.home}/repository/logs/wso2-apigw-trace-%d{MM-dd-yyyy}.log -appender.TRACE_APPENDER.layout.type = PatternLayout -appender.TRACE_APPENDER.layout.pattern = %d{HH:mm:ss,SSS} [%X{ip}-%X{host}] [%t] %5p %c{1} %m%n -appender.TRACE_APPENDER.policies.type = Policies -appender.TRACE_APPENDER.policies.time.type = TimeBasedTriggeringPolicy -appender.TRACE_APPENDER.policies.time.interval = 1 -appender.TRACE_APPENDER.policies.time.modulate = true -appender.TRACE_APPENDER.strategy.type = DefaultRolloverStrategy -appender.TRACE_APPENDER.strategy.max = 20 - -appender.SERVICE_APPENDER.type = RollingFile -appender.SERVICE_APPENDER.name = SERVICE_APPENDER -appender.SERVICE_APPENDER.fileName = ${sys:carbon.home}/repository/logs/wso2-apigw-service.log -appender.SERVICE_APPENDER.filePattern = ${sys:carbon.home}/repository/logs/wso2-apigw-service-%i.log -appender.SERVICE_APPENDER.layout.type = PatternLayout -appender.SERVICE_APPENDER.layout.pattern = %d{ISO8601} [%X{ip}-%X{host}] [%t] %5p %c{1} %m%n -appender.SERVICE_APPENDER.policies.type = Policies -appender.SERVICE_APPENDER.policies.size.type = SizeBasedTriggeringPolicy -appender.SERVICE_APPENDER.policies.size.size=1000KB -appender.SERVICE_APPENDER.strategy.type = DefaultRolloverStrategy -appender.SERVICE_APPENDER.strategy.max = 10 - -appender.osgi.type = PaxOsgi -appender.osgi.name = PaxOsgi -appender.osgi.filter = * - -{{- println }} -{{- if .Values.wso2.apim.log4j2.loggers }} -loggers = {{ .Values.wso2.apim.log4j2.loggers }}, AUDIT_LOG, trace-messages, org-apache-coyote, com-hazelcast, Owasp-CsrfGuard, org-apache-axis2-wsdl-codegen-writer-PrettyPrinter, org-apache-axis2-clustering, org-apache-catalina, org-apache-tomcat, org-wso2-carbon-apacheds, org-apache-directory-server-ldap, org-apache-directory-server-core-event, com-atomikos, org-quartz, org-apache-jackrabbit-webdav, org-apache-juddi, org-apache-commons-digester-Digester, org-apache-jasper-compiler-TldLocationsCache, org-apache-qpid, org-apache-qpid-server-Main, qpid-message, qpid-message-broker-listening, org-apache-tiles, org-apache-commons-httpclient, org-apache-solr, me-prettyprint-cassandra-hector-TimingLogger, org-apache-axis-enterprise, org-apache-directory-shared-ldap, org-apache-directory-server-ldap-handlers, org-apache-directory-shared-ldap-entry-DefaultServerAttribute, org-apache-directory-server-core-DefaultDirectoryService, org-apache-directory-shared-ldap-ldif-LdifReader, org-apache-directory-server-ldap-LdapProtocolHandler, org-apache-directory-server-core, org-apache-directory-server-ldap-LdapSession, DataNucleus, Datastore, Datastore-Schema, JPOX-Datastore, JPOX-Plugin, JPOX-MetaData, JPOX-Query, JPOX-General, JPOX-Enhancer, org-apache-hadoop-hive, hive, ExecMapper, ExecReducer, net-sf-ehcache-config-ConfigurationFactory, axis2Deployment, equinox, tomcat2, StAXDialectDetector, trace, synapse, synapse_transport, axis2, axis2_transport, org-wso2-carbon, hunsicker, thrift-publisher, service_logger, trace_logger, org-wso2-carbon-apimgt-gateway-mediators-BotDetectionMediator, wso2-callhome, correlation -{{- else }} -loggers = AUDIT_LOG, trace-messages, org-apache-coyote, com-hazelcast, Owasp-CsrfGuard, org-apache-axis2-wsdl-codegen-writer-PrettyPrinter, org-apache-axis2-clustering, org-apache-catalina, org-apache-tomcat, org-wso2-carbon-apacheds, org-apache-directory-server-ldap, org-apache-directory-server-core-event, com-atomikos, org-quartz, org-apache-jackrabbit-webdav, org-apache-juddi, org-apache-commons-digester-Digester, org-apache-jasper-compiler-TldLocationsCache, org-apache-qpid, org-apache-qpid-server-Main, qpid-message, qpid-message-broker-listening, org-apache-tiles, org-apache-commons-httpclient, org-apache-solr, me-prettyprint-cassandra-hector-TimingLogger, org-apache-axis-enterprise, org-apache-directory-shared-ldap, org-apache-directory-server-ldap-handlers, org-apache-directory-shared-ldap-entry-DefaultServerAttribute, org-apache-directory-server-core-DefaultDirectoryService, org-apache-directory-shared-ldap-ldif-LdifReader, org-apache-directory-server-ldap-LdapProtocolHandler, org-apache-directory-server-core, org-apache-directory-server-ldap-LdapSession, DataNucleus, Datastore, Datastore-Schema, JPOX-Datastore, JPOX-Plugin, JPOX-MetaData, JPOX-Query, JPOX-General, JPOX-Enhancer, org-apache-hadoop-hive, hive, ExecMapper, ExecReducer, net-sf-ehcache-config-ConfigurationFactory, axis2Deployment, equinox, tomcat2, StAXDialectDetector, trace, synapse, synapse_transport, axis2, axis2_transport, org-wso2-carbon, hunsicker, thrift-publisher, service_logger, trace_logger, org-wso2-carbon-apimgt-gateway-mediators-BotDetectionMediator, wso2-callhome, correlation -{{- end }} - -logger.API_LOG.name = API_LOG -logger.API_LOG.level = INFO -logger.API_LOG.appenderRef.API_LOGFILE.ref = API_LOGFILE -logger.API_LOG.additivity = false - -logger.AUDIT_LOG.name = AUDIT_LOG -logger.AUDIT_LOG.level = INFO -logger.AUDIT_LOG.appenderRef.AUDIT_LOGFILE.ref = AUDIT_LOGFILE -logger.AUDIT_LOG.additivity = false - -logger.AUDIT_LOG_CONSOLE.name = AUDIT_LOG_CONSOLE -logger.AUDIT_LOG_CONSOLE.level = INFO -logger.AUDIT_LOG_CONSOLE.appenderRef.AUDIT_CONSOLE.ref = AUDIT_CONSOLE -logger.AUDIT_LOG_CONSOLE.additivity = false - -logger.HTTP_ACCESS_CONSOLE.name = HTTP_ACCESS_CONSOLE -logger.HTTP_ACCESS_CONSOLE.level = INFO -logger.HTTP_ACCESS_CONSOLE.appenderRef.HTTP_ACCESS_CONSOLE.ref = HTTP_ACCESS_CONSOLE -logger.HTTP_ACCESS_CONSOLE.additivity = false - -logger.TRANSACTION_CONSOLE.name = TRANSACTION_CONSOLE -logger.TRANSACTION_CONSOLE.level = INFO -logger.TRANSACTION_CONSOLE.appenderRef.TRANSACTION_CONSOLE.ref = TRANSACTION_CONSOLE -logger.TRANSACTION_CONSOLE.additivity = false - -logger.CORRELATION_CONSOLE.name = CORRELATION_CONSOLE -logger.CORRELATION_CONSOLE.level = INFO -logger.CORRELATION_CONSOLE.appenderRef.CORRELATION_CONSOLE.ref = CORRELATION_CONSOLE -logger.CORRELATION_CONSOLE.additivity = false - -logger.trace-messages.name = trace.messages -logger.trace-messages.level = TRACE -logger.trace-messages.appenderRef.CARBON_TRACE_LOGFILE.ref = CARBON_TRACE_LOGFILE - -logger.org-apache-coyote.name = org.apache.coyote -logger.org-apache-coyote.level = WARN - -logger.com-hazelcast.name = com.hazelcast -logger.com-hazelcast.level = ERROR - -logger.Owasp-CsrfGuard.name = Owasp.CsrfGuard -logger.Owasp-CsrfGuard.level = WARN - -logger.org-apache-axis2-wsdl-codegen-writer-PrettyPrinter.name = org.apache.axis2.wsdl.codegen.writer.PrettyPrinter -logger.org-apache-axis2-wsdl-codegen-writer-PrettyPrinter.level = ERROR -logger.org-apache-axis2-wsdl-codegen-writer-PrettyPrinter.appenderRef.CARBON_LOGFILE.ref = CARBON_LOGFILE - -logger.org-apache-axis2-clustering.name = org.apache.axis2.clustering -logger.org-apache-axis2-clustering.level = INFO -logger.org-apache-axis2-clustering.additivity = false - -logger.org-apache.name = org.apache -logger.org-apache.level = INFO -logger.org-apache.additivity = false -logger.org-apache.appenderRef.CARBON_LOGFILE.ref = CARBON_LOGFILE - -logger.org-apache-catalina.name = org.apache.catalina -logger.org-apache-catalina.level = ERROR - -logger.org-apache-tomcat.name = org.apache.tomcat -logger.org-apache-tomcat.level = INFO - -logger.org-wso2-carbon-apacheds.name = org.wso2.carbon.apacheds -logger.org-wso2-carbon-apacheds.level = WARN - -logger.org-apache-directory-server-ldap.name = org.apache.directory.server.ldap -logger.org-apache-directory-server-ldap.level = ERROR - -logger.org-apache-directory-server-core-event.name = org.apache.directory.server.core.event -logger.org-apache-directory-server-core-event.level = WARN - -logger.com-atomikos.name = com.atomikos -logger.com-atomikos.level = INFO -logger.com-atomikos.additivity = false -logger.com-atomikos.appenderRef.ATOMIKOS_LOGFILE.ref = ATOMIKOS_LOGFILE - -logger.org-quartz.name = org.quartz -logger.org-quartz.level = WARN - -logger.org-apache-jackrabbit-webdav.name = org.apache.jackrabbit.webdav -logger.org-apache-jackrabbit-webdav.level = WARN - -logger.org-apache-juddi.name = org.apache.juddi -logger.org-apache-juddi.level = ERROR - -logger.org-apache-commons-digester-Digester.name = org.apache.commons.digester.Digester -logger.org-apache-commons-digester-Digester.level = WARN - -logger.org-apache-jasper-compiler-TldLocationsCache.name = org.apache.jasper.compiler.TldLocationsCache -logger.org-apache-jasper-compiler-TldLocationsCache.level = WARN - -logger.org-apache-qpid.name = org.apache.qpid -logger.org-apache-qpid.level = WARN - -logger.org-apache-qpid-server-Main.name = org.apache.qpid.server.Main -logger.org-apache-qpid-server-Main.level = INFO - -logger.qpid-message.name = qpid.message -logger.qpid-message.level = WARN - -logger.qpid-message-broker-listening.name = qpid.message.broker.listening -logger.qpid-message-broker-listening.level = INFO - -logger.org-apache-tiles.name = org.apache.tiles -logger.org-apache-tiles.level = WARN - -logger.org-apache-commons-httpclient.name = org.apache.commons.httpclient -logger.org-apache-commons-httpclient.level = ERROR - -logger.org-apache-solr.name = org.apache.solr -logger.org-apache-solr.level = ERROR - -logger.me-prettyprint-cassandra-hector-TimingLogger.name = me.prettyprint.cassandra.hector.TimingLogger -logger.me-prettyprint-cassandra-hector-TimingLogger.level = ERROR - -logger.org-wso2.name = org.wso2 -logger.org-wso2.level = INFO - -logger.org-wso2-carbon.name = org.wso2.carbon -logger.org-wso2-carbon.level = INFO - -logger.org-apache-axis-enterprise.name = org.apache.axis2.enterprise -logger.org-apache-axis-enterprise.level = FATAL -logger.org-apache-axis-enterprise.appenderRef.CARBON_LOGFILE.ref = CARBON_LOGFILE - -logger.org-apache-directory-shared-ldap.name = org.apache.directory.shared.ldap -logger.org-apache-directory-shared-ldap.level = WARN -logger.org-apache-directory-shared-ldap.appenderRef.CARBON_LOGFILE.ref = CARBON_LOGFILE - -logger.org-apache-directory-server-ldap-handlers.name = org.apache.directory.server.ldap.handlers -logger.org-apache-directory-server-ldap-handlers.level = WARN -logger.org-apache-directory-server-ldap-handlers.appenderRef.CARBON_LOGFILE.ref = CARBON_LOGFILE - -# Following are to remove false error messages from startup (IS) -logger.org-apache-directory-shared-ldap-entry-DefaultServerAttribute.name = org.apache.directory.shared.ldap.entry.DefaultServerAttribute -logger.org-apache-directory-shared-ldap-entry-DefaultServerAttribute.level = FATAL -logger.org-apache-directory-shared-ldap-entry-DefaultServerAttribute.appenderRef.CARBON_LOGFILE.ref = CARBON_LOGFILE - -logger.org-apache-directory-server-core-DefaultDirectoryService.name = org.apache.directory.server.core.DefaultDirectoryService -logger.org-apache-directory-server-core-DefaultDirectoryService.level = ERROR -logger.org-apache-directory-server-core-DefaultDirectoryService.appenderRef.CARBON_LOGFILE.ref = CARBON_LOGFILE - -logger.org-apache-directory-shared-ldap-ldif-LdifReader.name = org.apache.directory.shared.ldap.ldif.LdifReader -logger.org-apache-directory-shared-ldap-ldif-LdifReader.level = ERROR -logger.org-apache-directory-shared-ldap-ldif-LdifReader.appenderRef.CARBON_LOGFILE.ref = CARBON_LOGFILE - -logger.org-apache-directory-server-ldap-LdapProtocolHandler.name = org.apache.directory.server.ldap.LdapProtocolHandler -logger.org-apache-directory-server-ldap-LdapProtocolHandler.level = ERROR -logger.org-apache-directory-server-ldap-LdapProtocolHandler.appenderRef.CARBON_LOGFILE.ref = CARBON_LOGFILE - -logger.org-apache-directory-server-core.name = org.apache.directory.server.core -logger.org-apache-directory-server-core.level = ERROR -logger.org-apache-directory-server-core.appenderRef.CARBON_LOGFILE.ref = CARBON_LOGFILE - -logger.org-apache-directory-server-ldap-LdapSession.name = org.apache.directory.server.ldap.LdapSession -logger.org-apache-directory-server-ldap-LdapSession.level = Error -logger.org-apache-directory-server-ldap-LdapSession.appenderRef.CARBON_LOGFILE.ref = CARBON_LOGFILE - -logger.correlation.name = correlation -logger.correlation.level = INFO -logger.correlation.appenderRef.CORRELATION.ref = CORRELATION -logger.correlation.additivity = false - -# Hive Related Log configurations -logger.DataNucleus.name = DataNucleus -logger.DataNucleus.level = ERROR - -logger.Datastore.name = Datastore -logger.Datastore.level = ERROR - -logger.Datastore-Schema.name = Datastore.Schema -logger.Datastore-Schema.level = ERROR - -logger.JPOX-Datastore.name = JPOX.Datastore -logger.JPOX-Datastore.level = ERROR - -logger.JPOX-Plugin.name = JPOX.Plugin -logger.JPOX-Plugin.level = ERROR - -logger.JPOX-MetaData.name = JPOX.MetaData -logger.JPOX-MetaData.level = ERROR - -logger.JPOX-Query.name = JPOX.Query -logger.JPOX-Query.level = ERROR - -logger.JPOX-General.name = JPOX.General -logger.JPOX-General.level = ERROR - -logger.JPOX-Enhancer.name = JPOX.Enhancer -logger.JPOX-Enhancer.level = ERROR - -logger.org-apache-hadoop-hive.name = org.apache.hadoop.hive -logger.org-apache-hadoop-hive.level = WARN - -logger.hive.name = hive -logger.hive.level = WARN - -logger.ExecMapper.name = ExecMapper -logger.ExecMapper.level = WARN - -logger.ExecReducer.name = ExecReducer -logger.ExecReducer.level = WARN - -logger.net-sf-ehcache-config-ConfigurationFactory.name = net.sf.ehcache.config.ConfigurationFactory -logger.net-sf-ehcache-config-ConfigurationFactory.level = ERROR - -logger.axis2Deployment.name = org.apache.axis2.deployment -logger.axis2Deployment.level = WARN - -logger.equinox.name = org.eclipse.equinox -logger.equinox.level = FATAL - -logger.tomcat2.name = tomcat -logger.tomcat2.level = FATAL - -logger.StAXDialectDetector.name = org.apache.axiom.util.stax.dialect.StAXDialectDetector -logger.StAXDialectDetector.level = ERROR - -logger.trace.name = tracer -logger.trace.level = TRACE -logger.trace.appenderRef.OPEN_TRACING.ref = OPEN_TRACING - -logger.synapse.name = org.apache.synapse -logger.synapse.level = INFO - -logger.synapse_transport.name = org.apache.synapse.transport -logger.synapse_transport.level = INFO - -logger.axis2.name = org.apache.axis2 -logger.axis2.level = INFO - -logger.axis2_transport.name = org.apache.axis2.transport -logger.axis2_transport.level = INFO - -logger.hunsicker.name = de.hunsicker.jalopy.io -logger.hunsicker.level = FATAL - -logger.synapse-headers.name = org.apache.synapse.transport.http.headers -logger.synapse-headers.level = DEBUG - -logger.synapse-wire.name = org.apache.synapse.transport.http.wire -logger.synapse-wire.level = DEBUG - -logger.thrift-publisher.name = org.wso2.carbon.databridge.agent.thrift.AsyncDataPublisher -logger.thrift-publisher.level = WARN - -logger.service_logger.name = SERVICE_LOGGER -logger.service_logger.level = INFO -logger.service_logger.additivity = false -logger.service_logger.appenderRef.SERVICE_APPENDER.ref = SERVICE_APPENDER - -logger.wso2-callhome.name = org.wso2.callhome -logger.wso2-callhome.level = INFO - -logger.trace_logger.name = TRACE_LOGGER -logger.trace_logger.level = INFO -logger.trace_logger.appenderRef.TRACE_APPENDER.ref = TRACE_APPENDER - -# root loggers -rootLogger.level = ERROR -rootLogger.appenderRef.CARBON_CONSOLE.ref = CARBON_CONSOLE -rootLogger.appenderRef.CARBON_LOGFILE.ref = CARBON_LOGFILE -rootLogger.appenderRef.ERROR_LOGFILE.ref = ERROR_LOGFILE -rootLogger.appenderRef.PaxOsgi.ref = PaxOsgi -#rootLogger.appenderReg.CARBON_SYS_LOG.ref = CARBON_SYS_LOG -#rootLogger.appenderRef.syslog.ref = syslog - -# bot detection feature appender -appender.BOTDATA_APPENDER.type = RollingFile -appender.BOTDATA_APPENDER.name = BOTDATA_APPENDER -appender.BOTDATA_APPENDER.fileName = ${sys:carbon.home}/repository/logs/wso2-BotDetectedData.log -appender.BOTDATA_APPENDER.filePattern = ${sys:carbon.home}/repository/logs/wso2-BotDetectedData-%d{MM-dd-yyyy}.log -appender.BOTDATA_APPENDER.layout.type = PatternLayout -appender.BOTDATA_APPENDER.layout.pattern = [%d] [%tenantId] %5p {%c} - %m%ex%n -appender.BOTDATA_APPENDER.policies.type = Policies -appender.BOTDATA_APPENDER.policies.time.type = TimeBasedTriggeringPolicy -appender.BOTDATA_APPENDER.policies.time.interval = 1 -appender.BOTDATA_APPENDER.policies.time.modulate = true -appender.BOTDATA_APPENDER.policies.size.type = SizeBasedTriggeringPolicy -appender.BOTDATA_APPENDER.policies.size.size = 10MB -appender.BOTDATA_APPENDER.strategy.type = DefaultRolloverStrategy -appender.BOTDATA_APPENDER.strategy.max = 20 - -logger.org-wso2-carbon-apimgt-gateway-mediators-BotDetectionMediator.name = org.wso2.carbon.apimgt.gateway.mediators.BotDetectionMediator -logger.org-wso2-carbon-apimgt-gateway-mediators-BotDetectionMediator.level = INFO -logger.org-wso2-carbon-apimgt-gateway-mediators-BotDetectionMediator.appenderRef.BOTDATA_APPENDER.ref = BOTDATA_APPENDER -logger.org-wso2-carbon-apimgt-gateway-mediators-BotDetectionMediator.additivity = false - -category.SERVICE_APPENDER._OpenService_ = TRACE_APPENDER, BOTDATA_APPENDER diff --git a/test/apim-apk-agent-test/apim-cp-helm-chart/confs/secret-conf.properties b/test/apim-apk-agent-test/apim-cp-helm-chart/confs/secret-conf.properties deleted file mode 100644 index 645e5539b..000000000 --- a/test/apim-apk-agent-test/apim-cp-helm-chart/confs/secret-conf.properties +++ /dev/null @@ -1,12 +0,0 @@ -keystore.identity.location=/home/wso2carbon/wso2am-{{ .Values.wso2.apim.version }}/repository/resources/security/{{ .Values.wso2.apim.configurations.security.keystores.internal.name }} -keystore.identity.type=JKS -keystore.identity.store.password=identity.store.password -keystore.identity.store.secretProvider=org.wso2.carbon.securevault.DefaultSecretCallbackHandler -secretRepositories.file.provider=org.wso2.securevault.secret.repository.FileBaseSecretRepositoryProvider -secretRepositories.file.location=repository/conf/security/cipher-text.properties -secretRepositories=file -secVault.enabled=true -keystore.identity.key.password=identity.key.password -carbon.secretProvider=org.wso2.securevault.secret.handler.SecretManagerSecretCallbackHandler -keystore.identity.key.secretProvider=org.wso2.carbon.securevault.DefaultSecretCallbackHandler -keystore.identity.alias={{ .Values.wso2.apim.configurations.security.keystores.internal.alias }} diff --git a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/_helpers.tpl b/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/_helpers.tpl deleted file mode 100644 index 704ae2467..000000000 --- a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/_helpers.tpl +++ /dev/null @@ -1,69 +0,0 @@ -{{/* -# ------------------------------------------------------------------------------------- -# -# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. -# -# This software is the property of WSO2 LLC. and its suppliers, if any. -# Dissemination of any information or reproduction of any material contained -# herein is strictly forbidden, unless permitted by WSO2 in accordance with the -# WSO2 Commercial License available at https://wso2.com/licenses/eula/3.2 -# -# --------------------------------------------------------------------------------------s -*/}} - -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "apim-helm-cp.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "apim-helm-cp.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "apim-helm-cp.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "apim-helm-cp.labels" -}} -app.kubernetes.io/name: {{ include "apim-helm-cp.name" . }} -helm.sh/chart: {{ include "apim-helm-cp.chart" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Common prefix prepended to Kubernetes resources of this chart -*/}} -{{- define "apim-helm-cp.resource.prefix" -}} -{{- if eq .Values.kubernetes.resourceSuffix "${RESOURCE_SUFFIX}" }} -{{- "wso2am-cp" }} -{{- else }} -{{- "wso2am-cp-" }}{{ .Values.kubernetes.resourceSuffix }} -{{- end -}} -{{- end -}} \ No newline at end of file diff --git a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/instance-1/wso2am-cp-conf.yaml b/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/instance-1/wso2am-cp-conf.yaml deleted file mode 100644 index 76fbcebb4..000000000 --- a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/instance-1/wso2am-cp-conf.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------------------------- -# -# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. -# -# This software is the property of WSO2 LLC. and its suppliers, if any. -# Dissemination of any information or reproduction of any material contained -# herein is strictly forbidden, unless permitted by WSO2 in accordance with the -# WSO2 Commercial License available at https://wso2.com/licenses/eula/3.2 -# -# -------------------------------------------------------------------------------------- - -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-conf-1 - namespace : {{ .Release.Namespace }} -data: - deployment.toml: {{ tpl (.Files.Get "confs/instance-1/deployment.toml") . | quote }} diff --git a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/instance-1/wso2am-cp-deployment.yaml b/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/instance-1/wso2am-cp-deployment.yaml deleted file mode 100644 index a2462b410..000000000 --- a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/instance-1/wso2am-cp-deployment.yaml +++ /dev/null @@ -1,233 +0,0 @@ -# ------------------------------------------------------------------------------------- -# -# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. -# -# This software is the property of WSO2 LLC. and its suppliers, if any. -# Dissemination of any information or reproduction of any material contained -# herein is strictly forbidden, unless permitted by WSO2 in accordance with the -# WSO2 Commercial License available at https://wso2.com/licenses/eula/3.2 -# -# -------------------------------------------------------------------------------------- - -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-deployment-1 - namespace: {{ .Release.Namespace }} -spec: - replicas: {{ .Values.wso2.deployment.replicas }} - strategy: - type: Recreate - selector: - matchLabels: - deployment: {{ template "apim-helm-cp.fullname" . }} - node: {{ template "apim-helm-cp.fullname" . }}-1 - template: - metadata: - annotations: - {{- if .Values.kubernetes.enableAppArmor }} - container.apparmor.security.beta.kubernetes.io/wso2am-control-plane: runtime/default - {{- end }} - checksum.am.cp.conf: {{ include (print $.Template.BasePath "/control-plane/instance-1/wso2am-cp-conf.yaml") . | sha256sum }} - checksum.am.cp.conf.log4j2: {{ include (print $.Template.BasePath "/control-plane/wso2am-cp-conf-log4j2.yaml") . | sha256sum }} - checksum.am.cp.conf.secret: {{ include (print $.Template.BasePath "/control-plane/wso2am-cp-conf-secret-conf.yaml") . | sha256sum }} - labels: - deployment: {{ template "apim-helm-cp.fullname" . }} - node: {{ template "apim-helm-cp.fullname" . }}-1 - product: apim - spec: - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - podAffinityTerm: - labelSelector: - matchExpressions: - - key: deployment - operator: In - values: - - {{ template "apim-helm-cp.fullname" . }} - topologyKey: "topology.kubernetes.io/zone" - weight: 100 - {{- if .Values.wso2.apim.secureVaultEnabled }} - {{- if .Values.aws.enabled }} - serviceAccount: {{ .Values.aws.serviceAccountName }} - {{- else if .Values.gcp.enabled }} - serviceAccount: {{ .Values.gcp.serviceAccountName }} - {{- else if .Values.azure.enabled }} - serviceAccount: {{ .Values.azure.serviceAccountName }} - {{- end }} - {{- end }} - securityContext: - seccompProfile: - type: RuntimeDefault - containers: - - name: wso2am-control-plane - image: {{ .Values.wso2.deployment.image.registry }}/{{ .Values.wso2.deployment.image.repository }}@{{ .Values.wso2.deployment.image.digest }} - imagePullPolicy: {{ .Values.wso2.deployment.imagePullPolicy }} - env: - - name: PROFILE_NAME - value: control-plane - - name: NODE_IP - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: status.podIP - - name: JVM_MEM_OPTS - value: "-Xms{{ .Values.wso2.deployment.resources.jvm.memory.xms }} -Xmx{{ .Values.wso2.deployment.resources.jvm.memory.xmx }}" - startupProbe: - exec: - command: - - /bin/sh - - -c - - nc -z localhost {{ add 9443 .Values.wso2.apim.portOffset }} - initialDelaySeconds: {{ .Values.wso2.deployment.startupProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.wso2.deployment.startupProbe.periodSeconds }} - failureThreshold: {{ .Values.wso2.deployment.startupProbe.failureThreshold }} - livenessProbe: - httpGet: - path: /services/Version - port: {{ add 9763 .Values.wso2.apim.portOffset }} - initialDelaySeconds: {{ .Values.wso2.deployment.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.wso2.deployment.livenessProbe.periodSeconds }} - failureThreshold: {{ .Values.wso2.deployment.livenessProbe.failureThreshold }} - readinessProbe: - httpGet: - path: /services/Version - port: {{ add 9763 .Values.wso2.apim.portOffset }} - initialDelaySeconds: {{ .Values.wso2.deployment.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.wso2.deployment.readinessProbe.periodSeconds }} - failureThreshold: {{ .Values.wso2.deployment.readinessProbe.failureThreshold }} - lifecycle: - preStop: - exec: - command: - - "sh" - - "-c" - - > - echo "Pre stop hook triggered"; - sleep {{ .Values.wso2.deployment.lifecycle.preStopHook.sleepSeconds }}; - echo "Shutdown APIM Server"; - ${WSO2_SERVER_HOME}/bin/api-manager.sh stop - resources: - requests: - memory: {{ .Values.wso2.deployment.resources.requests.memory }} - cpu: {{ .Values.wso2.deployment.resources.requests.cpu }} - limits: - memory: {{ .Values.wso2.deployment.resources.limits.memory }} - cpu: {{ .Values.wso2.deployment.resources.limits.cpu }} - securityContext: - runAsUser: {{ .Values.kubernetes.securityContext.runAsUser }} - allowPrivilegeEscalation: false - runAsNonRoot: true - capabilities: - drop: - - all - ports: - - containerPort: {{ add 9763 .Values.wso2.apim.portOffset }} - protocol: "TCP" - - containerPort: {{ add 9443 .Values.wso2.apim.portOffset }} - protocol: "TCP" - - containerPort: {{ add 9711 .Values.wso2.apim.portOffset }} - protocol: "TCP" - - containerPort: {{ add 9611 .Values.wso2.apim.portOffset }} - protocol: "TCP" - - containerPort: {{ add 5672 .Values.wso2.apim.portOffset }} - protocol: "TCP" - volumeMounts: - - name: wso2am-control-plane-conf - mountPath: /home/wso2carbon/wso2-config-volume/repository/conf/deployment.toml - subPath: deployment.toml - - name: wso2am-control-plane-entrypoint - mountPath: /home/wso2carbon/docker-entrypoint.sh - subPath: docker-entrypoint.sh - - name: wso2am-control-plane-log4j2 - mountPath: /home/wso2carbon/wso2-config-volume/repository/conf/log4j2.properties - subPath: log4j2.properties - - name: wso2am-sh-conf - mountPath: /home/wso2carbon/wso2-config-volume/bin/api-manager.sh - subPath: api-manager.sh - {{- if .Values.wso2.apim.secureVaultEnabled }} - - name: wso2am-control-plane-secret-conf - mountPath: /home/wso2carbon/wso2-config-volume/repository/conf/security/secret-conf.properties - subPath: secret-conf.properties - - name: wso2am-control-plane-secret-store-csi - mountPath: /mnt/secrets-store - readOnly: true - {{- end }} -# - name: wso2am-control-plane-keystores -# mountPath: /home/wso2carbon/wso2-config-volume/repository/resources/security/{{ .Values.wso2.apim.configurations.security.truststore.name }} -# subPath: {{ .Values.wso2.apim.configurations.security.truststore.name }} -# {{- if .Values.wso2.apim.configurations.security.keystores.primary.enabled }} -# - name: wso2am-control-plane-keystores -# mountPath: /home/wso2carbon/wso2-config-volume/repository/resources/security/{{ .Values.wso2.apim.configurations.security.keystores.primary.name }} -# subPath: {{ .Values.wso2.apim.configurations.security.keystores.primary.name }} -# {{- end }} -# {{- if .Values.wso2.apim.configurations.security.keystores.tls.enabled }} -# - name: wso2am-control-plane-keystores -# mountPath: /home/wso2carbon/wso2-config-volume/repository/resources/security/{{ .Values.wso2.apim.configurations.security.keystores.tls.name }} -# subPath: {{ .Values.wso2.apim.configurations.security.keystores.tls.name }} -# {{- end }} -# {{- if .Values.wso2.apim.configurations.security.keystores.internal.enabled }} -# - name: wso2am-control-plane-keystores -# mountPath: /home/wso2carbon/wso2-config-volume/repository/resources/security/{{ .Values.wso2.apim.configurations.security.keystores.internal.name }} -# subPath: {{ .Values.wso2.apim.configurations.security.keystores.internal.name }} -# {{- end }} - {{ if .Values.wso2.deployment.persistence.solrIndexing.enabled }} - - name: wso2am-control-plane-local-carbondb - mountPath: /home/wso2carbon/solr/database - - name: wso2am-control-plane-solr - mountPath: /home/wso2carbon/solr/indexed-data - {{ end }} - {{- if .Values.wso2.deployment.nodeSelector }} - nodeSelector: - {{- toYaml .Values.wso2.deployment.nodeSelector | nindent 8 }} - {{- end }} - volumes: - - name: wso2am-control-plane-conf - configMap: - name: {{ template "apim-helm-cp.fullname" . }}-conf-1 - defaultMode: 0407 - - name: wso2am-control-plane-entrypoint - configMap: - name: {{ template "apim-helm-cp.fullname" . }}-conf-entrypoint - defaultMode: 0407 - - name: wso2am-control-plane-log4j2 - configMap: - name: {{ template "apim-helm-cp.fullname" . }}-conf-log4j2 - defaultMode: 0407 - - name: wso2am-sh-conf - configMap: - name: {{ template "apim-helm-cp.fullname" . }}-conf-sh - defaultMode: 0407 - {{- if .Values.wso2.apim.secureVaultEnabled }} - - name: wso2am-control-plane-secret-conf - configMap: - name: {{ template "apim-helm-cp.fullname" . }}-conf-secret-conf - - name: wso2am-control-plane-secret-store-csi - csi: - driver: secrets-store.csi.k8s.io - readOnly: true - {{- if .Values.azure.enabled }} - volumeAttributes: - secretProviderClass: {{ .Values.azure.keyVault.secretProviderClass }} - nodePublishSecretRef: - name: {{ .Values.azure.keyVault.activeDirectory.servicePrincipal.credentialsSecretName }} - {{- else if .Values.aws.enabled }} - volumeAttributes: - secretProviderClass: {{ .Values.aws.secretsManager.secretProviderClass }} - {{- else if .Values.gcp.enabled }} - volumeAttributes: - secretProviderClass: {{ .Values.gcp.secretsManager.secretProviderClass }} - {{- end }} - {{- end }} -# - name: wso2am-control-plane-keystores -# secret: -# secretName: {{ .Values.wso2.apim.configurations.security.jksSecretName }} - {{ if .Values.wso2.deployment.persistence.solrIndexing.enabled }} - - name: wso2am-control-plane-local-carbondb - persistentVolumeClaim: - claimName: {{ template "apim-helm-cp.fullname" . }}-local-carbon-database-1 - - name: wso2am-control-plane-solr - persistentVolumeClaim: - claimName: {{ template "apim-helm-cp.fullname" . }}-solr-indexed-data-1 - {{ end }} diff --git a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/instance-1/wso2am-cp-service.yaml b/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/instance-1/wso2am-cp-service.yaml deleted file mode 100644 index f35478553..000000000 --- a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/instance-1/wso2am-cp-service.yaml +++ /dev/null @@ -1,35 +0,0 @@ -# ------------------------------------------------------------------------------------- -# -# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. -# -# This software is the property of WSO2 LLC. and its suppliers, if any. -# Dissemination of any information or reproduction of any material contained -# herein is strictly forbidden, unless permitted by WSO2 in accordance with the -# WSO2 Commercial License available at https://wso2.com/licenses/eula/3.2 -# -# -------------------------------------------------------------------------------------- - -apiVersion: v1 -kind: Service -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-1-service - namespace : {{ .Release.Namespace }} -spec: - # label keys and values that must match in order to receive traffic for this service - selector: - deployment: {{ template "apim-helm-cp.fullname" . }} - node: {{ template "apim-helm-cp.fullname" . }}-1 - ports: - # ports that this service should serve on - - name: binary - protocol: TCP - port: {{ add 9611 .Values.wso2.apim.portOffset }} - - name: binary-secure - protocol: TCP - port: {{ add 9711 .Values.wso2.apim.portOffset }} - - name: jms-tcp - protocol: TCP - port: {{ add 5672 .Values.wso2.apim.portOffset }} - - name: servlet-https - protocol: TCP - port: {{ add 9443 .Values.wso2.apim.portOffset }} diff --git a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/instance-2/wso2am-cp-conf.yaml b/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/instance-2/wso2am-cp-conf.yaml deleted file mode 100644 index 368f29442..000000000 --- a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/instance-2/wso2am-cp-conf.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- if .Values.wso2.deployment.highAvailability}} -# ------------------------------------------------------------------------------------- -# -# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. -# -# This software is the property of WSO2 LLC. and its suppliers, if any. -# Dissemination of any information or reproduction of any material contained -# herein is strictly forbidden, unless permitted by WSO2 in accordance with the -# WSO2 Commercial License available at https://wso2.com/licenses/eula/3.2 -# -# -------------------------------------------------------------------------------------- - -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-conf-2 - namespace : {{ .Release.Namespace }} -data: - deployment.toml: {{ tpl (.Files.Get "confs/instance-2/deployment.toml") . | quote }} -{{- end }} diff --git a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/instance-2/wso2am-cp-deployment.yaml b/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/instance-2/wso2am-cp-deployment.yaml deleted file mode 100644 index a3a3de888..000000000 --- a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/instance-2/wso2am-cp-deployment.yaml +++ /dev/null @@ -1,235 +0,0 @@ -{{- if .Values.wso2.deployment.highAvailability}} -# ------------------------------------------------------------------------------------- -# -# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. -# -# This software is the property of WSO2 LLC. and its suppliers, if any. -# Dissemination of any information or reproduction of any material contained -# herein is strictly forbidden, unless permitted by WSO2 in accordance with the -# WSO2 Commercial License available at https://wso2.com/licenses/eula/3.2 -# -# -------------------------------------------------------------------------------------- - -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-deployment-2 - namespace: {{ .Release.Namespace }} -spec: - replicas: {{ .Values.wso2.deployment.replicas }} - strategy: - type: Recreate - selector: - matchLabels: - deployment: {{ template "apim-helm-cp.fullname" . }} - node: {{ template "apim-helm-cp.fullname" . }}-2 - template: - metadata: - annotations: - {{- if .Values.kubernetes.enableAppArmor }} - container.apparmor.security.beta.kubernetes.io/wso2am-control-plane: runtime/default - {{- end }} - checksum.am.cp.conf: {{ include (print $.Template.BasePath "/control-plane/instance-2/wso2am-cp-conf.yaml") . | sha256sum }} - checksum.am.cp.conf.log4j2: {{ include (print $.Template.BasePath "/control-plane/wso2am-cp-conf-log4j2.yaml") . | sha256sum }} - checksum.am.cp.conf.secret: {{ include (print $.Template.BasePath "/control-plane/wso2am-cp-conf-secret-conf.yaml") . | sha256sum }} - labels: - deployment: {{ template "apim-helm-cp.fullname" . }} - node: {{ template "apim-helm-cp.fullname" . }}-2 - product: apim - spec: - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - podAffinityTerm: - labelSelector: - matchExpressions: - - key: deployment - operator: In - values: - - {{ template "apim-helm-cp.fullname" . }} - topologyKey: "topology.kubernetes.io/zone" - weight: 100 - {{- if .Values.wso2.apim.secureVaultEnabled }} - {{- if .Values.aws.enabled }} - serviceAccount: {{ .Values.aws.serviceAccountName }} - {{- else if .Values.gcp.enabled }} - serviceAccount: {{ .Values.gcp.serviceAccountName }} - {{- else if .Values.azure.enabled }} - serviceAccount: {{ .Values.azure.serviceAccountName }} - {{- end }} - {{- end }} - securityContext: - seccompProfile: - type: RuntimeDefault - containers: - - name: wso2am-control-plane - image: {{ .Values.wso2.deployment.image.registry }}/{{ .Values.wso2.deployment.image.repository }}@{{ .Values.wso2.deployment.image.digest }} - imagePullPolicy: {{ .Values.wso2.deployment.imagePullPolicy }} - env: - - name: PROFILE_NAME - value: control-plane - - name: NODE_IP - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: status.podIP - - name: JVM_MEM_OPTS - value: "-Xms{{ .Values.wso2.deployment.resources.jvm.memory.xms }} -Xmx{{ .Values.wso2.deployment.resources.jvm.memory.xmx }}" - startupProbe: - exec: - command: - - /bin/sh - - -c - - nc -z localhost {{ add 9443 .Values.wso2.apim.portOffset }} - initialDelaySeconds: {{ .Values.wso2.deployment.startupProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.wso2.deployment.startupProbe.periodSeconds }} - failureThreshold: {{ .Values.wso2.deployment.startupProbe.failureThreshold }} - livenessProbe: - httpGet: - path: /services/Version - port: {{ add 9763 .Values.wso2.apim.portOffset }} - initialDelaySeconds: {{ .Values.wso2.deployment.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.wso2.deployment.livenessProbe.periodSeconds }} - failureThreshold: {{ .Values.wso2.deployment.livenessProbe.failureThreshold }} - readinessProbe: - httpGet: - path: /services/Version - port: {{ add 9763 .Values.wso2.apim.portOffset }} - initialDelaySeconds: {{ .Values.wso2.deployment.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.wso2.deployment.readinessProbe.periodSeconds }} - failureThreshold: {{ .Values.wso2.deployment.readinessProbe.failureThreshold }} - lifecycle: - preStop: - exec: - command: - - "sh" - - "-c" - - > - echo "Pre stop hook triggered"; - sleep {{ .Values.wso2.deployment.lifecycle.preStopHook.sleepSeconds }}; - echo "Shutdown APIM Server"; - ${WSO2_SERVER_HOME}/bin/api-manager.sh stop - resources: - requests: - memory: {{ .Values.wso2.deployment.resources.requests.memory }} - cpu: {{ .Values.wso2.deployment.resources.requests.cpu }} - limits: - memory: {{ .Values.wso2.deployment.resources.limits.memory }} - cpu: {{ .Values.wso2.deployment.resources.limits.cpu }} - securityContext: - runAsUser: {{ .Values.kubernetes.securityContext.runAsUser }} - allowPrivilegeEscalation: false - runAsNonRoot: true - capabilities: - drop: - - all - ports: - - containerPort: {{ add 9763 .Values.wso2.apim.portOffset }} - protocol: "TCP" - - containerPort: {{ add 9443 .Values.wso2.apim.portOffset }} - protocol: "TCP" - - containerPort: {{ add 9711 .Values.wso2.apim.portOffset }} - protocol: "TCP" - - containerPort: {{ add 9611 .Values.wso2.apim.portOffset }} - protocol: "TCP" - - containerPort: {{ add 5672 .Values.wso2.apim.portOffset }} - protocol: "TCP" - volumeMounts: - - name: wso2am-control-plane-conf - mountPath: /home/wso2carbon/wso2-config-volume/repository/conf/deployment.toml - subPath: deployment.toml - - name: wso2am-control-plane-entrypoint - mountPath: /home/wso2carbon/docker-entrypoint.sh - subPath: docker-entrypoint.sh - - name: wso2am-control-plane-log4j2 - mountPath: /home/wso2carbon/wso2-config-volume/repository/conf/log4j2.properties - subPath: log4j2.properties - - name: wso2am-sh-conf - mountPath: /home/wso2carbon/wso2-config-volume/bin/api-manager.sh - subPath: api-manager.sh - {{- if .Values.wso2.apim.secureVaultEnabled }} - - name: wso2am-control-plane-secret-conf - mountPath: /home/wso2carbon/wso2-config-volume/repository/conf/security/secret-conf.properties - subPath: secret-conf.properties - - name: wso2am-control-plane-secret-store-csi - mountPath: /mnt/secrets-store - readOnly: true - {{- end }} - - name: wso2am-control-plane-keystores - mountPath: /home/wso2carbon/wso2-config-volume/repository/resources/security/{{ .Values.wso2.apim.configurations.security.truststore.name }} - subPath: {{ .Values.wso2.apim.configurations.security.truststore.name }} - {{- if .Values.wso2.apim.configurations.security.keystores.primary.enabled }} - - name: wso2am-control-plane-keystores - mountPath: /home/wso2carbon/wso2-config-volume/repository/resources/security/{{ .Values.wso2.apim.configurations.security.keystores.primary.name }} - subPath: {{ .Values.wso2.apim.configurations.security.keystores.primary.name }} - {{- end }} - {{- if .Values.wso2.apim.configurations.security.keystores.tls.enabled }} - - name: wso2am-control-plane-keystores - mountPath: /home/wso2carbon/wso2-config-volume/repository/resources/security/{{ .Values.wso2.apim.configurations.security.keystores.tls.name }} - subPath: {{ .Values.wso2.apim.configurations.security.keystores.tls.name }} - {{- end }} - {{- if .Values.wso2.apim.configurations.security.keystores.internal.enabled }} - - name: wso2am-control-plane-keystores - mountPath: /home/wso2carbon/wso2-config-volume/repository/resources/security/{{ .Values.wso2.apim.configurations.security.keystores.internal.name }} - subPath: {{ .Values.wso2.apim.configurations.security.keystores.internal.name }} - {{- end }} - {{ if .Values.wso2.deployment.persistence.solrIndexing.enabled }} - - name: wso2am-control-plane-local-carbondb - mountPath: /home/wso2carbon/solr/database - - name: wso2am-control-plane-solr - mountPath: /home/wso2carbon/solr/indexed-data - {{ end }} - {{- if .Values.wso2.deployment.nodeSelector }} - nodeSelector: - {{- toYaml .Values.wso2.deployment.nodeSelector | nindent 8 }} - {{- end }} - volumes: - - name: wso2am-control-plane-conf - configMap: - name: {{ template "apim-helm-cp.fullname" . }}-conf-2 - defaultMode: 0407 - - name: wso2am-control-plane-entrypoint - configMap: - name: {{ template "apim-helm-cp.fullname" . }}-conf-entrypoint - defaultMode: 0407 - - name: wso2am-control-plane-log4j2 - configMap: - name: {{ template "apim-helm-cp.fullname" . }}-conf-log4j2 - defaultMode: 0407 - - name: wso2am-sh-conf - configMap: - name: {{ template "apim-helm-cp.fullname" . }}-conf-sh - defaultMode: 0407 - {{- if .Values.wso2.apim.secureVaultEnabled }} - - name: wso2am-control-plane-secret-conf - configMap: - name: {{ template "apim-helm-cp.fullname" . }}-conf-secret-conf - - name: wso2am-control-plane-secret-store-csi - csi: - driver: secrets-store.csi.k8s.io - readOnly: true - {{- if .Values.azure.enabled }} - volumeAttributes: - secretProviderClass: {{ .Values.azure.keyVault.secretProviderClass }} - nodePublishSecretRef: - name: {{ .Values.azure.keyVault.activeDirectory.servicePrincipal.credentialsSecretName }} - {{- else if .Values.aws.enabled }} - volumeAttributes: - secretProviderClass: {{ .Values.aws.secretsManager.secretProviderClass }} - {{- else if .Values.gcp.enabled }} - volumeAttributes: - secretProviderClass: {{ .Values.gcp.secretsManager.secretProviderClass }} - {{- end }} - {{- end }} - - name: wso2am-control-plane-keystores - secret: - secretName: {{ .Values.wso2.apim.configurations.security.jksSecretName }} - {{ if .Values.wso2.deployment.persistence.solrIndexing.enabled }} - - name: wso2am-control-plane-local-carbondb - persistentVolumeClaim: - claimName: {{ template "apim-helm-cp.fullname" . }}-local-carbon-database-2 - - name: wso2am-control-plane-solr - persistentVolumeClaim: - claimName: {{ template "apim-helm-cp.fullname" . }}-solr-indexed-data-2 - {{ end }} -{{- end }} \ No newline at end of file diff --git a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/instance-2/wso2am-cp-service.yaml b/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/instance-2/wso2am-cp-service.yaml deleted file mode 100644 index 8a9e8e3a5..000000000 --- a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/instance-2/wso2am-cp-service.yaml +++ /dev/null @@ -1,37 +0,0 @@ -{{- if .Values.wso2.deployment.highAvailability}} -# ------------------------------------------------------------------------------------- -# -# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. -# -# This software is the property of WSO2 LLC. and its suppliers, if any. -# Dissemination of any information or reproduction of any material contained -# herein is strictly forbidden, unless permitted by WSO2 in accordance with the -# WSO2 Commercial License available at https://wso2.com/licenses/eula/3.2 -# -# -------------------------------------------------------------------------------------- - -apiVersion: v1 -kind: Service -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-2-service - namespace : {{ .Release.Namespace }} -spec: - # label keys and values that must match in order to receive traffic for this service - selector: - deployment: {{ template "apim-helm-cp.fullname" . }} - node: {{ template "apim-helm-cp.fullname" . }}-2 - ports: - # ports that this service should serve on - - name: binary - protocol: TCP - port: {{ add 9611 .Values.wso2.apim.portOffset }} - - name: binary-secure - protocol: TCP - port: {{ add 9711 .Values.wso2.apim.portOffset }} - - name: jms-tcp - protocol: TCP - port: {{ add 5672 .Values.wso2.apim.portOffset }} - - name: servlet-https - protocol: TCP - port: {{ add 9443 .Values.wso2.apim.portOffset }} -{{- end }} \ No newline at end of file diff --git a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-conf-script.yaml b/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-conf-script.yaml deleted file mode 100644 index 3c6ea7125..000000000 --- a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-conf-script.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-conf-sh - namespace : {{ .Release.Namespace }} -data: - api-manager.sh: {{ tpl (.Files.Get "confs/api-manager.sh") . | quote}} diff --git a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-conf-entrypoint.yaml b/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-conf-entrypoint.yaml deleted file mode 100644 index e40243972..000000000 --- a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-conf-entrypoint.yaml +++ /dev/null @@ -1,71 +0,0 @@ -# ------------------------------------------------------------------------------------- -# -# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. -# -# This software is the property of WSO2 LLC. and its suppliers, if any. -# Dissemination of any information or reproduction of any material contained -# herein is strictly forbidden, unless permitted by WSO2 in accordance with the -# WSO2 Commercial License available at https://wso2.com/licenses/eula/3.2 -# -# -------------------------------------------------------------------------------------- - -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-conf-entrypoint - namespace: {{ .Release.Namespace }} -data: - docker-entrypoint.sh: | - #!/bin/bash - set -e - - # volume mounts - config_volume=${WORKING_DIRECTORY}/wso2-config-volume - artifact_volume=${WORKING_DIRECTORY}/wso2-artifact-volume - - # check if the WSO2 non-root user home exists - test ! -d ${WORKING_DIRECTORY} && echo "WSO2 Docker non-root user home does not exist" && exit 1 - - # check if the WSO2 product home exists - test ! -d ${WSO2_SERVER_HOME} && echo "WSO2 Docker product home does not exist" && exit 1 - - # Copying carbon_db - if ! test -f /home/wso2carbon/solr/database/WSO2CARBON_DB.mv.db - then - echo "Copying WSO2CARBON_DB.mv.db" >&2 - cp ${WSO2_SERVER_HOME}/repository/database/WSO2CARBON_DB.mv.db /home/wso2carbon/solr/database/ - fi - - # optimize WSO2 Carbon Server, if the profile name is defined as an environment variable - if [[ ! -z "${PROFILE_NAME}" ]] - then - echo "Optimizing WSO2 Carbon Server" >&2 - sh ${WSO2_SERVER_HOME}/bin/profileSetup.sh -Dprofile=${PROFILE_NAME} - fi - - # copy any configuration changes mounted to config_volume - test -d ${config_volume} && [[ "$(ls -A ${config_volume})" ]] && cp -RL ${config_volume}/* ${WSO2_SERVER_HOME}/ - # copy any artifact changes mounted to artifact_volume - test -d ${artifact_volume} && [[ "$(ls -A ${artifact_volume})" ]] && cp -RL ${artifact_volume}/* ${WSO2_SERVER_HOME}/ - - {{- if .Values.wso2.apim.secureVaultEnabled }} - # copy internal keystore credentials to password-tmp file for cipher-tool usage - {{- if .Values.azure.enabled }} - cp /mnt/secrets-store/{{ .Values.azure.keyVault.secretIdentifiers.internalKeystorePassword }} ${WSO2_SERVER_HOME}/password-tmp - {{- else if .Values.aws.enabled }} - cp /mnt/secrets-store/{{ .Values.aws.secretsManager.secretIdentifiers.internalKeystorePassword.secretKey }} ${WSO2_SERVER_HOME}/password-tmp - {{- else if .Values.gcp.enabled }} - cp /mnt/secrets-store/{{ .Values.gcp.secretsManager.secret.secretName }} ${WSO2_SERVER_HOME}/password-tmp - {{- end }} - {{- end }} - - # start WSO2 Carbon server - echo "Start WSO2 Carbon server" >&2 - if [[ -z "${PROFILE_NAME}" ]] - then - # start the server with the provided startup arguments - sh ${WSO2_SERVER_HOME}/bin/api-manager.sh "$@" {{ .Values.wso2.apim.startupArgs }} - else - # start the server with the specified profile and provided startup arguments - sh ${WSO2_SERVER_HOME}/bin/api-manager.sh -Dprofile=${PROFILE_NAME} "$@" {{ .Values.wso2.apim.startupArgs }} - fi diff --git a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-conf-log4j2.yaml b/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-conf-log4j2.yaml deleted file mode 100644 index c86cd0433..000000000 --- a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-conf-log4j2.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# ------------------------------------------------------------------------------------- -# -# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. -# -# This software is the property of WSO2 LLC. and its suppliers, if any. -# Dissemination of any information or reproduction of any material contained -# herein is strictly forbidden, unless permitted by WSO2 in accordance with the -# WSO2 Commercial License available at https://wso2.com/licenses/eula/3.2 -# -# -------------------------------------------------------------------------------------- - -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-conf-log4j2 - namespace : {{ .Release.Namespace }} -data: - log4j2.properties: {{ tpl (.Files.Get "confs/log4j2.properties") . | quote }} diff --git a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-conf-secret-conf.yaml b/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-conf-secret-conf.yaml deleted file mode 100644 index 10e9fffdb..000000000 --- a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-conf-secret-conf.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# ------------------------------------------------------------------------------------- -# -# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. -# -# This software is the property of WSO2 LLC. and its suppliers, if any. -# Dissemination of any information or reproduction of any material contained -# herein is strictly forbidden, unless permitted by WSO2 in accordance with the -# WSO2 Commercial License available at https://wso2.com/licenses/eula/3.2 -# -# -------------------------------------------------------------------------------------- -{{- if .Values.wso2.apim.secureVaultEnabled }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-conf-secret-conf - namespace : {{ .Release.Namespace }} -data: - secret-conf.properties: {{ tpl (.Files.Get "confs/secret-conf.properties") . | quote}} -{{- end }} diff --git a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-ingress.yaml b/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-ingress.yaml deleted file mode 100644 index 6e60304d4..000000000 --- a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-ingress.yaml +++ /dev/null @@ -1,47 +0,0 @@ -# ------------------------------------------------------------------------------------- -# -# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. -# -# This software is the property of WSO2 LLC. and its suppliers, if any. -# Dissemination of any information or reproduction of any material contained -# herein is strictly forbidden, unless permitted by WSO2 in accordance with the -# WSO2 Commercial License available at https://wso2.com/licenses/eula/3.2 -# -# -------------------------------------------------------------------------------------- - -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-ingress - namespace : {{ .Release.Namespace }} -{{- if .Values.kubernetes.ingress.controlPlane.annotations }} - annotations: -{{ toYaml .Values.kubernetes.ingress.controlPlane.annotations | indent 4 }} - {{- if .Values.kubernetes.ingress.ratelimit.enabled }} - nginx.ingress.kubernetes.io/configuration-snippet: | - limit_req zone={{ .Values.kubernetes.ingress.ratelimit.zoneName }} burst={{ .Values.kubernetes.ingress.ratelimit.burstLimit }} nodelay; - limit_req_status 429; - set $rangeheadervalue $http_range; - if ($http_accept_encoding = "gzip") { - set $rangeheadervalue ""; - } - proxy_set_header Range $rangeheadervalue; - {{- end }} -{{- end }} -spec: - ingressClassName: {{ .Values.kubernetes.ingressClass }} - tls: - - hosts: - - {{ .Values.kubernetes.ingress.controlPlane.hostname }} - secretName: {{ .Values.kubernetes.ingress.tlsSecret }} - rules: - - host: {{ .Values.kubernetes.ingress.controlPlane.hostname }} - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: {{ template "apim-helm-cp.fullname" . }}-service - port: - number: {{ add 9443 .Values.wso2.apim.portOffset }} diff --git a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-pdb.yaml b/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-pdb.yaml deleted file mode 100644 index 8f4e9613e..000000000 --- a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-pdb.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# ------------------------------------------------------------------------------------- -# -# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. -# -# This software is the property of WSO2 LLC. and its suppliers, if any. -# Dissemination of any information or reproduction of any material contained -# herein is strictly forbidden, unless permitted by WSO2 in accordance with the -# WSO2 Commercial License available at https://wso2.com/licenses/eula/3.2 -# -# -------------------------------------------------------------------------------------- - -apiVersion: policy/v1 -kind: PodDisruptionBudget -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-pdb -spec: - minAvailable: {{ .Values.wso2.deployment.minAvailable | quote }} - selector: - matchLabels: - deployment: {{ template "apim-helm-cp.fullname" . }}-deployment diff --git a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-secret-store-provider-gcp.yaml b/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-secret-store-provider-gcp.yaml deleted file mode 100644 index 27fa49ecb..000000000 --- a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-secret-store-provider-gcp.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# ------------------------------------------------------------------------------------- -# -# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. -# -# This software is the property of WSO2 LLC. and its suppliers, if any. -# Dissemination of any information or reproduction of any material contained -# herein is strictly forbidden, unless permitted by WSO2 in accordance with the -# WSO2 Commercial License available at https://wso2.com/licenses/eula/3.2 -# -# -------------------------------------------------------------------------------------- - -{{- if and .Values.wso2.apim.secureVaultEnabled .Values.gcp.enabled }} -apiVersion: secrets-store.csi.x-k8s.io/v1 -kind: SecretProviderClass -metadata: - name: {{ .Values.gcp.secretsManager.secretProviderClass }} - namespace: {{ .Release.Namespace }} -spec: - provider: gcp - parameters: - secrets: | - - resourceName: "projects/{{ .Values.gcp.secretsManager.projectId }}/secrets/{{ .Values.gcp.secretsManager.secret.secretName }}/versions/{{ .Values.gcp.secretsManager.secret.secretVersion }}" - path: {{ .Values.gcp.secretsManager.secret.secretName }} -{{- end }} diff --git a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-service.yaml b/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-service.yaml deleted file mode 100644 index 6a6bb2637..000000000 --- a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-service.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# ------------------------------------------------------------------------------------- -# -# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. -# -# This software is the property of WSO2 LLC. and its suppliers, if any. -# Dissemination of any information or reproduction of any material contained -# herein is strictly forbidden, unless permitted by WSO2 in accordance with the -# WSO2 Commercial License available at https://wso2.com/licenses/eula/3.2 -# -# -------------------------------------------------------------------------------------- - -apiVersion: v1 -kind: Service -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-service - namespace : {{ .Release.Namespace }} -spec: - # label keys and values that must match in order to receive traffic for this service - selector: - deployment: {{ template "apim-helm-cp.fullname" . }} - ports: - # ports that this service should serve on - - name: servlet-http - protocol: TCP - port: {{ add 9763 .Values.wso2.apim.portOffset }} - - name: servlet-https - protocol: TCP - port: {{ add 9443 .Values.wso2.apim.portOffset }} diff --git a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-storageclass-aws.yaml b/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-storageclass-aws.yaml deleted file mode 100644 index d70d2bc32..000000000 --- a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-storageclass-aws.yaml +++ /dev/null @@ -1,24 +0,0 @@ -{{ if and .Values.wso2.deployment.persistence.solrIndexing.enabled .Values.aws.enabled }} -# ------------------------------------------------------------------------------------- -# -# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. -# -# This software is the property of WSO2 LLC. and its suppliers, if any. -# Dissemination of any information or reproduction of any material contained -# herein is strictly forbidden, unless permitted by WSO2 in accordance with the -# WSO2 Commercial License available at https://wso2.com/licenses/eula/3.2 -# -# -------------------------------------------------------------------------------------- - -kind: StorageClass -apiVersion: storage.k8s.io/v1 -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-sc -provisioner: efs.csi.aws.com -parameters: - provisioningMode: efs-ap - fileSystemId: {{ .Values.aws.efs.fileSystemId | quote }} - directoryPerms: {{ .Values.aws.efs.directoryPerms | quote }} - uid: {{ .Values.kubernetes.securityContext.runAsUser | quote }} - gid: {{ .Values.kubernetes.securityContext.runAsUser | quote }} -{{- end }} diff --git a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-storageclass-gcp.yaml b/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-storageclass-gcp.yaml deleted file mode 100644 index 8c86b4ad2..000000000 --- a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-storageclass-gcp.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# ------------------------------------------------------------------------------------- -# -# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. -# -# This software is the property of WSO2 LLC. and its suppliers, if any. -# Dissemination of any information or reproduction of any material contained -# herein is strictly forbidden, unless permitted by WSO2 in accordance with the -# WSO2 Commercial License available at https://wso2.com/licenses/eula/3.2 -# -# -------------------------------------------------------------------------------------- - -{{ if and .Values.wso2.deployment.persistence.solrIndexing.enabled .Values.gcp.enabled }} -kind: StorageClass -apiVersion: storage.k8s.io/v1 -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-sc -provisioner: filestore.csi.storage.gke.io -parameters: - tier: {{ .Values.gcp.fs.tier | quote }} - network: {{ .Values.gcp.fs.network | quote }} - uid: {{ .Values.kubernetes.securityContext.runAsUser | quote }} - gid: {{ .Values.kubernetes.securityContext.runAsUser | quote }} -{{- end }} diff --git a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-volume-aws.yaml b/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-volume-aws.yaml deleted file mode 100644 index 60e79f04c..000000000 --- a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-volume-aws.yaml +++ /dev/null @@ -1,92 +0,0 @@ -{{ if and .Values.wso2.deployment.persistence.solrIndexing.enabled .Values.aws.enabled }} -# ------------------------------------------------------------------------------------- -# -# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. -# -# This software is the property of WSO2 LLC. and its suppliers, if any. -# Dissemination of any information or reproduction of any material contained -# herein is strictly forbidden, unless permitted by WSO2 in accordance with the -# WSO2 Commercial License available at https://wso2.com/licenses/eula/3.2 -# -# -------------------------------------------------------------------------------------- - -apiVersion: v1 -kind: PersistentVolume -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-local-carbon-database-1 - labels: - purpose: cp-carbondb-1 -spec: - capacity: - storage: {{ .Values.aws.efs.capacity }} - volumeMode: Filesystem - accessModes: - - ReadWriteMany - storageClassName: {{ template "apim-helm-cp.fullname" . }}-sc - persistentVolumeReclaimPolicy: Retain - csi: - driver: efs.csi.aws.com - volumeHandle: {{ .Values.aws.efs.fileSystemId }}::{{ .Values.aws.efs.accessPoints.carbonDb1 }} - ---- - -apiVersion: v1 -kind: PersistentVolume -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-solr-indexed-data-1 - labels: - purpose: cp-solr-1 -spec: - capacity: - storage: {{ .Values.aws.efs.capacity }} - volumeMode: Filesystem - accessModes: - - ReadWriteMany - storageClassName: {{ template "apim-helm-cp.fullname" . }}-sc - persistentVolumeReclaimPolicy: Retain - csi: - driver: efs.csi.aws.com - volumeHandle: {{ .Values.aws.efs.fileSystemId }}::{{ .Values.aws.efs.accessPoints.solr1 }} - ---- -{{ if .Values.wso2.deployment.highAvailability }} - -apiVersion: v1 -kind: PersistentVolume -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-local-carbon-database-2 - labels: - purpose: cp-carbondb-2 -spec: - capacity: - storage: {{ .Values.aws.efs.capacity }} - volumeMode: Filesystem - accessModes: - - ReadWriteMany - storageClassName: {{ template "apim-helm-cp.fullname" . }}-sc - persistentVolumeReclaimPolicy: Retain - csi: - driver: efs.csi.aws.com - volumeHandle: {{ .Values.aws.efs.fileSystemId }}::{{ .Values.aws.efs.accessPoints.carbonDb2 }} - ---- - -apiVersion: v1 -kind: PersistentVolume -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-solr-indexed-data-2 - labels: - purpose: cp-solr-2 -spec: - capacity: - storage: {{ .Values.aws.efs.capacity }} - volumeMode: Filesystem - accessModes: - - ReadWriteMany - storageClassName: {{ template "apim-helm-cp.fullname" . }}-sc - persistentVolumeReclaimPolicy: Retain - csi: - driver: efs.csi.aws.com - volumeHandle: {{ .Values.aws.efs.fileSystemId }}::{{ .Values.aws.efs.accessPoints.solr2 }} -{{- end }} -{{- end }} diff --git a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-volume-azure.yaml b/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-volume-azure.yaml deleted file mode 100644 index f5da5e681..000000000 --- a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-volume-azure.yaml +++ /dev/null @@ -1,36 +0,0 @@ -{{ if and .Values.wso2.deployment.persistence.solrIndexing.enabled .Values.azure.enabled }} -# ------------------------------------------------------------------------------------- -# -# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. -# -# This software is the property of WSO2 LLC. and its suppliers, if any. -# Dissemination of any information or reproduction of any material contained -# herein is strictly forbidden, unless permitted by WSO2 in accordance with the -# WSO2 Commercial License available at https://wso2.com/licenses/eula/3.2 -# -# -------------------------------------------------------------------------------------- - -apiVersion: v1 -kind: PersistentVolume -metadata: - name: {{ template "apim-helm-cp.fullname" . }} - labels: - purpose: cp-volume -spec: - accessModes: - - ReadWriteMany - capacity: - storage: {{ .Values.azure.persistence.capacity }} - persistentVolumeReclaimPolicy: Retain - volumeMode: Filesystem - azureFile: - secretName: {{ .Values.azure.persistence.secretName }} - secretNamespace: {{ .Release.Namespace }} - shareName: {{ .Values.azure.persistence.fileShare }} - mountOptions: - - dir_mode=0777 - - file_mode=0777 - - uid=10001 - - gid=10001 - - cache=strict -{{- end }} diff --git a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-volume-claims-aws.yaml b/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-volume-claims-aws.yaml deleted file mode 100644 index af8615766..000000000 --- a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-volume-claims-aws.yaml +++ /dev/null @@ -1,87 +0,0 @@ -# ------------------------------------------------------------------------------------- -# -# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. -# -# This software is the property of WSO2 LLC. and its suppliers, if any. -# Dissemination of any information or reproduction of any material contained -# herein is strictly forbidden, unless permitted by WSO2 in accordance with the -# WSO2 Commercial License available at https://wso2.com/licenses/eula/3.2 -# -# -------------------------------------------------------------------------------------- - -{{ if and .Values.wso2.deployment.persistence.solrIndexing.enabled .Values.aws.enabled }} - ---- - -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-local-carbon-database-1 - namespace : {{ .Release.Namespace }} -spec: - accessModes: - - ReadWriteMany - resources: - requests: - storage: {{ .Values.wso2.deployment.persistence.solrIndexing.capacity.carbonDatabase }} - selector: - matchLabels: - purpose: cp-carbondb-1 - storageClassName: {{ template "apim-helm-cp.fullname" . }}-sc - ---- - -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-solr-indexed-data-1 - namespace : {{ .Release.Namespace }} -spec: - accessModes: - - ReadWriteMany - resources: - requests: - storage: {{ .Values.wso2.deployment.persistence.solrIndexing.capacity.solrIndexedData }} - selector: - matchLabels: - purpose: cp-solr-1 - storageClassName: {{ template "apim-helm-cp.fullname" . }}-sc - ---- -{{ if .Values.wso2.deployment.highAvailability }} - -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-local-carbon-database-2 - namespace : {{ .Release.Namespace }} -spec: - accessModes: - - ReadWriteMany - resources: - requests: - storage: {{ .Values.wso2.deployment.persistence.solrIndexing.capacity.carbonDatabase }} - selector: - matchLabels: - purpose: cp-carbondb-2 - storageClassName: {{ template "apim-helm-cp.fullname" . }}-sc - ---- - -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-solr-indexed-data-2 - namespace : {{ .Release.Namespace }} -spec: - accessModes: - - ReadWriteMany - resources: - requests: - storage: {{ .Values.wso2.deployment.persistence.solrIndexing.capacity.solrIndexedData }} - selector: - matchLabels: - purpose: cp-solr-2 - storageClassName: {{ template "apim-helm-cp.fullname" . }}-sc - {{ end }} -{{- end }} diff --git a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-volume-claims-azure.yaml b/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-volume-claims-azure.yaml deleted file mode 100644 index d8595e8a5..000000000 --- a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-volume-claims-azure.yaml +++ /dev/null @@ -1,87 +0,0 @@ -# ------------------------------------------------------------------------------------- -# -# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. -# -# This software is the property of WSO2 LLC. and its suppliers, if any. -# Dissemination of any information or reproduction of any material contained -# herein is strictly forbidden, unless permitted by WSO2 in accordance with the -# WSO2 Commercial License available at https://wso2.com/licenses/eula/3.2 -# -# -------------------------------------------------------------------------------------- - -{{ if and .Values.wso2.deployment.persistence.solrIndexing.enabled .Values.azure.enabled }} - ---- - -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-local-carbon-database-1 - namespace : {{ .Release.Namespace }} -spec: - accessModes: - - ReadWriteMany - resources: - requests: - storage: {{ .Values.wso2.deployment.persistence.solrIndexing.capacity.carbonDatabase }} - selector: - matchLabels: - purpose: cp-volume - storageClassName: {{ .Values.azure.persistence.storageClass | default "" }} - ---- - -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-solr-indexed-data-1 - namespace : {{ .Release.Namespace }} -spec: - accessModes: - - ReadWriteMany - resources: - requests: - storage: {{ .Values.wso2.deployment.persistence.solrIndexing.capacity.solrIndexedData }} - selector: - matchLabels: - purpose: cp-volume - storageClassName: {{ .Values.azure.persistence.storageClass | default "" }} - ---- -{{ if .Values.wso2.deployment.highAvailability }} - -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-local-carbon-database-2 - namespace : {{ .Release.Namespace }} -spec: - accessModes: - - ReadWriteMany - resources: - requests: - storage: {{ .Values.wso2.deployment.persistence.solrIndexing.capacity.carbonDatabase }} - selector: - matchLabels: - purpose: cp-volume - storageClassName: {{ .Values.azure.persistence.storageClass | default "" }} - ---- - -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-solr-indexed-data-2 - namespace : {{ .Release.Namespace }} -spec: - accessModes: - - ReadWriteMany - resources: - requests: - storage: {{ .Values.wso2.deployment.persistence.solrIndexing.capacity.solrIndexedData }} - selector: - matchLabels: - purpose: cp-volume - storageClassName: {{ .Values.azure.persistence.storageClass | default "" }} - {{ end }} -{{- end }} diff --git a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-volume-gcp.yaml b/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-volume-gcp.yaml deleted file mode 100644 index 742229bd8..000000000 --- a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-cp-volume-gcp.yaml +++ /dev/null @@ -1,105 +0,0 @@ -# ------------------------------------------------------------------------------------- -# -# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. -# -# This software is the property of WSO2 LLC. and its suppliers, if any. -# Dissemination of any information or reproduction of any material contained -# herein is strictly forbidden, unless permitted by WSO2 in accordance with the -# WSO2 Commercial License available at https://wso2.com/licenses/eula/3.2 -# -# -------------------------------------------------------------------------------------- - -{{ if and .Values.wso2.deployment.persistence.solrIndexing.enabled .Values.gcp.enabled }} -apiVersion: v1 -kind: PersistentVolume -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-local-carbon-database-1 - labels: - purpose: am-carbondb-1 -spec: - capacity: - storage: {{ .Values.gcp.fs.capacity }} - volumeMode: Filesystem - accessModes: - - ReadWriteMany - storageClassName: {{ template "apim-helm-cp.fullname" . }}-sc - persistentVolumeReclaimPolicy: Retain - csi: - driver: filestore.csi.storage.gke.io - volumeHandle: "modeInstance/{{ .Values.gcp.fs.location }}/{{ .Values.gcp.fs.fileshares.carbonDB1.fileStoreName }}/{{ .Values.gcp.fs.fileshares.carbonDB1.fileShareName }}" - volumeAttributes: - ip: {{ .Values.gcp.fs.fileshares.carbonDB1.ip }} - volume: {{ .Values.gcp.fs.fileshares.carbonDB1.fileShareName }} - ---- - -apiVersion: v1 -kind: PersistentVolume -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-solr-indexed-data-1 - labels: - purpose: am-solr-1 -spec: - capacity: - storage: {{ .Values.gcp.fs.capacity }} - volumeMode: Filesystem - accessModes: - - ReadWriteMany - storageClassName: {{ template "apim-helm-cp.fullname" . }}-sc - persistentVolumeReclaimPolicy: Retain - csi: - driver: filestore.csi.storage.gke.io - volumeHandle: "modeInstance/{{ .Values.gcp.fs.location }}/{{ .Values.gcp.fs.fileshares.solr1.fileStoreName }}/{{ .Values.gcp.fs.fileshares.solr1.fileShareName }}" - volumeAttributes: - ip: {{ .Values.gcp.fs.fileshares.solr1.ip }} - volume: {{ .Values.gcp.fs.fileshares.solr1.fileShareName }} - ---- -{{ if .Values.wso2.deployment.highAvailability }} - -apiVersion: v1 -kind: PersistentVolume -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-local-carbon-database-2 - labels: - purpose: am-carbondb-2 -spec: - capacity: - storage: {{ .Values.gcp.fs.capacity }} - volumeMode: Filesystem - accessModes: - - ReadWriteMany - storageClassName: {{ template "apim-helm-cp.fullname" . }}-sc - persistentVolumeReclaimPolicy: Retain - csi: - driver: filestore.csi.storage.gke.io - volumeHandle: "modeInstance/{{ .Values.gcp.fs.location }}/{{ .Values.gcp.fs.fileshares.carbonDB2.fileStoreName }}/{{ .Values.gcp.fs.fileshares.carbonDB2.fileShareName }}" - volumeAttributes: - ip: {{ .Values.gcp.fs.fileshares.carbonDB2.ip }} - volume: {{ .Values.gcp.fs.fileshares.carbonDB2.fileShareName }} - ---- - -apiVersion: v1 -kind: PersistentVolume -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-solr-indexed-data-2 - labels: - purpose: am-solr-2 -spec: - capacity: - storage: {{ .Values.gcp.fs.capacity }} - volumeMode: Filesystem - accessModes: - - ReadWriteMany - storageClassName: {{ template "apim-helm-cp.fullname" . }}-sc - persistentVolumeReclaimPolicy: Retain - csi: - driver: filestore.csi.storage.gke.io - volumeHandle: "modeInstance/{{ .Values.gcp.fs.location }}/{{ .Values.gcp.fs.fileshares.solr2.fileStoreName }}/{{ .Values.gcp.fs.fileshares.solr2.fileShareName }}" - volumeAttributes: - ip: {{ .Values.gcp.fs.fileshares.solr2.ip }} - volume: {{ .Values.gcp.fs.fileshares.solr2.fileShareName }} - -{{- end }} -{{- end }} diff --git a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-volume-claims-gcp.yaml b/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-volume-claims-gcp.yaml deleted file mode 100644 index a9e9f589e..000000000 --- a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/control-plane/wso2am-volume-claims-gcp.yaml +++ /dev/null @@ -1,85 +0,0 @@ -# ------------------------------------------------------------------------------------- -# -# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. -# -# This software is the property of WSO2 LLC. and its suppliers, if any. -# Dissemination of any information or reproduction of any material contained -# herein is strictly forbidden, unless permitted by WSO2 in accordance with the -# WSO2 Commercial License available at https://wso2.com/licenses/eula/3.2 -# -# -------------------------------------------------------------------------------------- - -{{ if and .Values.wso2.deployment.persistence.solrIndexing.enabled .Values.gcp.enabled }} - ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-local-carbon-database-1 - namespace : {{ .Release.Namespace }} -spec: - accessModes: - - ReadWriteMany - resources: - requests: - storage: {{ .Values.wso2.deployment.persistence.solrIndexing.capacity.carbonDatabase }} - selector: - matchLabels: - purpose: am-carbondb-1 - storageClassName: {{ template "apim-helm-cp.fullname" . }}-sc - ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-solr-indexed-data-1 - namespace : {{ .Release.Namespace }} -spec: - accessModes: - - ReadWriteMany - resources: - requests: - storage: {{ .Values.wso2.deployment.persistence.solrIndexing.capacity.solrIndexedData }} - selector: - matchLabels: - purpose: am-solr-1 - storageClassName: {{ template "apim-helm-cp.fullname" . }}-sc - ---- -{{ if .Values.wso2.deployment.highAvailability }} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-local-carbon-database-2 - namespace : {{ .Release.Namespace }} -spec: - accessModes: - - ReadWriteMany - resources: - requests: - storage: {{ .Values.wso2.deployment.persistence.solrIndexing.capacity.carbonDatabase }} - selector: - matchLabels: - purpose: am-carbondb-2 - storageClassName: {{ template "apim-helm-cp.fullname" . }}-sc - ---- - -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-solr-indexed-data-2 - namespace : {{ .Release.Namespace }} -spec: - accessModes: - - ReadWriteMany - resources: - requests: - storage: {{ .Values.wso2.deployment.persistence.solrIndexing.capacity.solrIndexedData }} - selector: - matchLabels: - purpose: am-solr-2 - storageClassName: {{ template "apim-helm-cp.fullname" . }}-sc - -{{- end }} -{{- end }} diff --git a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/secrets/wso2am-cp-secret-store-csi.yaml b/test/apim-apk-agent-test/apim-cp-helm-chart/templates/secrets/wso2am-cp-secret-store-csi.yaml deleted file mode 100644 index d9b875d31..000000000 --- a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/secrets/wso2am-cp-secret-store-csi.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- if and .Values.wso2.apim.secureVaultEnabled .Values.azure.enabled }} -# ------------------------------------------------------------------------------------- -# -# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. -# -# This software is the property of WSO2 LLC. and its suppliers, if any. -# Dissemination of any information or reproduction of any material contained -# herein is strictly forbidden, unless permitted by WSO2 in accordance with the -# WSO2 Commercial License available at https://wso2.com/licenses/eula/3.2 -# -# -------------------------------------------------------------------------------------- - -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "apim-helm-cp.fullname" . }}-secret-store-csi - namespace: {{ .Release.Namespace }} -type: Opaque -data: - clientid: {{ .Values.azure.keyVault.activeDirectory.servicePrincipal.appId | b64enc }} - clientsecret: {{ .Values.azure.keyVault.activeDirectory.servicePrincipal.clientSecretName | b64enc }} -{{- end }} diff --git a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/secrets/wso2am-cp-secret-store-provider-aws.yaml b/test/apim-apk-agent-test/apim-cp-helm-chart/templates/secrets/wso2am-cp-secret-store-provider-aws.yaml deleted file mode 100644 index 019c9c95d..000000000 --- a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/secrets/wso2am-cp-secret-store-provider-aws.yaml +++ /dev/null @@ -1,29 +0,0 @@ -{{- if and .Values.wso2.apim.secureVaultEnabled .Values.aws.enabled }} - -# ------------------------------------------------------------------------------------- -# -# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. -# -# This software is the property of WSO2 LLC. and its suppliers, if any. -# Dissemination of any information or reproduction of any material contained -# herein is strictly forbidden, unless permitted by WSO2 in accordance with the -# WSO2 Commercial License available at https://wso2.com/licenses/eula/3.2 -# -# -------------------------------------------------------------------------------------- - -apiVersion: secrets-store.csi.x-k8s.io/v1 -kind: SecretProviderClass -metadata: - name: {{ .Values.aws.secretsManager.secretProviderClass }} - namespace: {{ .Release.Namespace }} -spec: - provider: aws - parameters: - region: {{ .Values.aws.region }} - objects: | - - objectName: {{ .Values.aws.secretsManager.secretIdentifiers.internalKeystorePassword.secretName | quote }} - objectType: "secretsmanager" - jmesPath: - - path: {{ .Values.aws.secretsManager.secretIdentifiers.internalKeystorePassword.secretKey }} - objectAlias: {{ .Values.aws.secretsManager.secretIdentifiers.internalKeystorePassword.secretKey }} -{{- end }} diff --git a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/secrets/wso2am-cp-secret-store-provider-azure.yaml b/test/apim-apk-agent-test/apim-cp-helm-chart/templates/secrets/wso2am-cp-secret-store-provider-azure.yaml deleted file mode 100644 index 987d79485..000000000 --- a/test/apim-apk-agent-test/apim-cp-helm-chart/templates/secrets/wso2am-cp-secret-store-provider-azure.yaml +++ /dev/null @@ -1,35 +0,0 @@ -{{- if and .Values.wso2.apim.secureVaultEnabled .Values.azure.enabled }} -# ------------------------------------------------------------------------------------- -# -# Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. -# -# This software is the property of WSO2 LLC. and its suppliers, if any. -# Dissemination of any information or reproduction of any material contained -# herein is strictly forbidden, unless permitted by WSO2 in accordance with the -# WSO2 Commercial License available at https://wso2.com/licenses/eula/3.2 -# -# -------------------------------------------------------------------------------------- - -apiVersion: secrets-store.csi.x-k8s.io/v1 -kind: SecretProviderClass -metadata: - name: {{ .Values.azure.keyVault.secretProviderClass }} -spec: - provider: azure - parameters: - keyvaultName: {{ .Values.azure.keyVault.name }} - userAssignedIdentityID: "{{ .Values.azure.keyVault.activeDirectory.servicePrincipal.appId }}" - objects: | - array: - - | - objectName: {{ .Values.azure.keyVault.secretIdentifiers.internalKeystorePassword }} - objectType: secret - objectVersion: "" - - | - objectName: {{ .Values.azure.keyVault.secretIdentifiers.internalKeystoreKeyPassword }} - objectType: secret - objectVersion: "" - tenantId: {{ .Values.azure.keyVault.activeDirectory.tenantId }} - resourceGroup: {{ .Values.azure.keyVault.resourceManager.resourceGroup }} - subscriptionId: {{ .Values.azure.keyVault.resourceManager.subscriptionId }} -{{- end }} diff --git a/test/apim-apk-agent-test/apim-cp-helm-chart/values.yaml b/test/apim-apk-agent-test/apim-cp-helm-chart/values.yaml deleted file mode 100644 index aa72d3c81..000000000 --- a/test/apim-apk-agent-test/apim-cp-helm-chart/values.yaml +++ /dev/null @@ -1,448 +0,0 @@ -# ------------------------------------------------------------------------------------- -# -# Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). All Rights Reserved. -# -# This software is the property of WSO2 LLC. and its suppliers, if any. -# Dissemination of any information or reproduction of any material contained -# herein is strictly forbidden, unless permitted by WSO2 in accordance with the -# WSO2 Commercial License available at https://wso2.com/licenses/eula/3.2 -# -# -------------------------------------------------------------------------------------- - -aws: - # -- If AWS is used as the cloud provider - enabled: false - efs: - # -- EFS capacity - capacity: "" - # -- EFS directory permissions - directoryPerms: "0777" - # -- EFS file system ID for mounting the persistent volume - fileSystemId: "" - # -- EFS Access Points for static provisioning - accessPoints: - carbonDb1: "" - solr1: "" - carbonDb2: "" - solr2: "" - # -- AWS region - region: "" - secretsManager: - # -- AWS Secrets Manager secret provider class name - secretProviderClass: "wso2am-cp-secret-provider-class" - secretIdentifiers: - # -- Internal keystore password identifier in secrets manager - internalKeystorePassword: - # -- AWS Secrets Manager secret name - secretName: "" - # -- AWS Secrets Manager secret key - secretKey: "" - serviceAccountName: "" -azure: - # -- If Azure is used as the cloud provider - enabled: false - keyVault: - # -- Azure Key vault used for credential management - name: "" - # -- Azure Key vault secret provider class name - secretProviderClass: "wso2am-cp-secret-provider-class" - secretIdentifiers: - # -- Internal keystore password identifier in keyvault - internalKeystorePassword: "" - # -- Internal keystore key password identifier in keyvault - internalKeystoreKeyPassword: "" - activeDirectory: - # -- Service Principal created for transacting with the target Azure Key Vault - # For advanced details refer to official documentation (https://github.com/Azure/secrets-store-csi-driver-provider-azure/blob/master/docs/service-principal-mode.md) - servicePrincipal: - # -- Application ID of the service principal used in secret-store-csi - appId: "" - # -- Client secret name of the service principal used in secret-store-csi - clientSecretName: "" - # -- Credentials secret name of the service principal used as nodePublisherRef - credentialsSecretName: "" - # -- Azure Active Directory tenant ID of the target Key Vault - tenantId: "" - resourceManager: - # -- Subscription ID of the target Azure Key Vault - subscriptionId: "" - # -- Name of the Azure Resource Group to which the target Azure Key Vault belongs - resourceGroup: "" - persistence: - # Needed for persisting indexing related data - # -- Persistent volume capacity - capacity: "" - # -- Persistent volume storage class - storageClass: "" - # -- Azure file secret name - secretName: "" - # -- Azure fileshare name - fileShare: "" - -# Google Cloud Platform (GCP) integration status -gcp: - # -- If GCP is used as the cloud provider - enabled: false - # -- File Store configuration parameters - fs: - # -- Storage capacity of the file system (in GB or other appropriate units) - capacity: "" - # -- FileStore configuration for specific services - fileshares: - # -- FileShare configs for CarbonDB persistent storage for instance 1 - carbonDB1: - # -- FileStore of the CarbonDB persistent storage for instance 1 - fileStoreName: "" - # -- FileShare of the CarbonDB persistent storage for instance 1 - fileShareName: "" - # -- IP of the CarbonDB persistent storage for instance 1 - ip: "" - # -- FileShare configs for Solr persistent storage for instance 1 - solr1: - # -- FileStore of the Solr persistent storage for instance 1 - fileStoreName: "" - # -- FileShare of the Solr persistent storage for instance 1 - fileShareName: "" - # -- IP of the Solr persistent storage for instance 1 - ip: "" - # -- FileShare configs for CarbonDB2 persistent storage for instance 2 - carbonDB2: - # -- FileStore of the CarbonDB persistent storage for instance 2 - fileStoreName: "" - # -- FileShare of the CarbonDB persistent storage for instance 2 - fileShareName: "" - # -- IP of the CarbonDB persistent storage for instance 2 - ip: "" - # -- FileShare configs for Solr persistent storage for instance 2 - solr2: - # -- FileStore of the Solr persistent storage for instance 2 - fileStoreName: "" - # -- FileShare of the Solr persistent storage for instance 2 - fileShareName: "" - # -- IP of the Solr persistent storage for instance 2 - ip: "" - # -- Tier of the FileStore - tier: "" - # -- Network of the FileStore - network: "" - # -- Region of the FileStore - location: "" - - # -- Secrets Manager configuration parameters - secretsManager: - # -- Project ID - projectId: "" - # -- Secret provider class - secretProviderClass: "" - secret: - # -- Name of the secret - secretName: "" - # -- Version of the secret - secretVersion: "" - # -- Service Account with access to read secrets - serviceAccountName: "" - -kubernetes: - # -- Ingress class to be used for the ingress resource - ingressClass: "nginx" - ingress: - # -- Kubernetes secret created for Ingress TLS - tlsSecret: "" - ratelimit: - # -- Ingress rate limit - enabled: false - # -- Ingress ratelimit zone name - zoneName: "" - # -- Ingress ratelimit burst limit - burstLimit: "" - controlPlane: - # -- Ingress hostname - hostname: "am.wso2.com" - # -- Ingress annotations - annotations: - nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" - nginx.ingress.kubernetes.io/affinity: "cookie" - nginx.ingress.kubernetes.io/session-cookie-name: "route" - nginx.ingress.kubernetes.io/session-cookie-hash: "sha1" - - securityContext: - # -- User ID of the container - runAsUser: 10001 - # -- Enable AppArmor profiles for the deployment - enableAppArmor: false - -wso2: - apim: - # -- APIM version - version: "4.3.0" - # -- Secure vauld enabled - secureVaultEnabled: false - # Logging related configurations - log4j2: - # -- Console loggers that can be enabled. Allowed values are AUDIT_LOG_CONSOLE, HTTP_ACCESS_CONSOLE, TRANSACTION_CONSOLE, CORRELATION_CONSOLE - loggers: "" - # -- Appenders - appenders: "" - # -- Startup arguments for APIM - startupArgs: "" - # -- Port Offset for APIM deployment - portOffset: 0 - # TOML configurations - configurations: - userStore: - # -- User store type. - # https://apim.docs.wso2.com/en/latest/administer/managing-users-and-roles/managing-user-stores/configure-primary-user-store/configuring-the-primary-user-store/ - type: "database_unique_id" - # -- User store properties - properties: - key: value - # -- Super admin username - adminUsername: "admin" - # -- Super admin password - adminPassword: "admin" - databases: - # -- Database type. eg: mysql, oracle, mssql, postgres - type: "h2" - jdbc: - # -- JDBC driver class name - driver: "" - # -- APIM AM_DB configurations. - apim_db: - # -- APIM AM_DB URL - url: "jdbc:h2:./repository/database/WSO2AM_DB;DB_CLOSE_ON_EXIT=FALSE" - # -- APIM AM_DB username - username: "wso2carbon" - # -- APIM AM_DB password - password: "wso2carbon" - # -- APIM database JDBC pool parameters - poolParameters: - defaultAutoCommit: false - testOnBorrow: true - testWhileIdle: true - validationInterval: 30000 - maxActive: 100 - maxWait: 60000 - minIdle: 5 - # -- APIM SharedDB configurations. - shared_db: - # -- APIM SharedDB URL - url: "jdbc:h2:./repository/database/WSO2SHARED_DB;DB_CLOSE_ON_EXIT=FALSE" - # -- APIM SharedDB username - username: "wso2carbon" - # -- APIM SharedDB password - password: "wso2carbon" - # -- APIM shared database JDBC pool parameters - poolParameters: - defaultAutoCommit: false - testOnBorrow: true - testWhileIdle: true - validationInterval: 30000 - maxActive: 100 - maxWait: 60000 - minIdle: 5 - - security: - # -- Kubernetes secret containing the keystores and truststore - #jksSecretName: "apim-keystore-secret" - keystores: - primary: - # -- Primary keystore enabled - enabled: false - # -- Primary keystore name - name: "wso2carbon.jks" - # -- Primary keystore alias - alias: "wso2carbon" - # -- Primary keystore password - password: "wso2carbon" - # -- Primary keystore key password - keyPassword: "wso2carbon" - tls: - # -- TLS keystore enabled - enabled: true - # -- TLS keystore name - name: "wso2carbon.jks" - # -- TLS keystore alias - alias: "wso2carbon" - # -- TLS keystore password - password: "wso2carbon" - # -- TLS keystore key password - keyPassword: "wso2carbon" - internal: - # -- Internal keystore enabled - enabled: false - # -- Internal keystore name - name: "wso2carbon.jks" - # -- Internal keystore alias - alias: "wso2carbon" - # -- Internal keystore password - password: "wso2carbon" - # -- Internal keystore key password - keyPassword: "wso2carbon" - truststore: - # -- Truststore name - name: "client-truststore.jks" - # -- Truststore password - password: "wso2carbon" - - gateway: - # -- APIM Gateway environments - environments: - - name: "Default" - type: "hybrid" - provider: "wso2" - displayInApiConsole: true - description: "This is a hybrid gateway that handles both production and sandbox token traffic." - showAsTokenEndpointUrl: true - serviceName: "wso2am-gateway-service" - servicePort: 9443 - wsHostname: "websocket.wso2.com" - httpHostname: "default.gw.wso2.com" - websubHostname: "websub.wso2.com" - - iskm: - # -- If Identity Server is used as the Resident KM - enabled: false - # -- Kubernetes service name exposing Identity Server - serviceName: "" - # -- Kubernetes service port exposing Identity Serve - servicePort: 9443 - - publisher: - # -- Supported document types in Publisher. - # This should be used only if there are additional document types to be supported. - supportedDocumentTypes: "" - - devportal: - enableApplicationSharing: - applicationSharingType: - applicationSharingImpl: - displayMutipleVersions: - displayDeprecatedAPIs: - enableComments: - enableRatings: - enableForum: - enableAnonymousMode: - enableCrossTenantSubscriptions: - defaultReservedUsername: - loginUsernameCaseInsensitive: - enableKeyProvisioning: - - # APIM OAuth configurations - oauth_config: - # -- Enable token encryption - enableTokenEncryption: false - # -- Enable token hashing - enableTokenHashing: false - # -- List of allow-listed scopes - allowedScopes: ["^device_.*,openid"] - - # APIM Open Tracing configurations - # https://apim.docs.wso2.com/en/latest/observe/api-manager/traces/monitoring-with-opentracing/ - openTracer: - # -- Open Tracing enabled - enabled: false - # -- Remote tracer name. e.g. jaeger, zipkin - name: "" - properties: - # -- Remote tracer hostname - hostname: "" - # -- Remote tracer port - port: "" - # APIM Open Telemetry configurations - openTelemetry: - # -- Open Telemetry enabled - enabled: false - # -- Remote tracer name. e.g. jaeger, zipkin, OTLP - name: "" - # -- Remote tracer hostname - hostname: "" - # -- Remote tracer port - port: "" - - deployment: - # Container image configurations - image: - # -- Container registry hostname - registry: "docker.io" - # -- Azure ACR repository name consisting the image - repository: "rakhitharr/wso2am" - # -- Docker image digest - digest: "sha256:56c6625d60a01cba73cd8836d25f1469f6fec1e933e530d954064eeab4ef70b3" - # -- Refer to the Kubernetes documentation on updating images (https://kubernetes.io/docs/concepts/containers/images/#updating-images) - imagePullPolicy: Always - - resources: - # These are the resource recommendations for running WSO2 API Management product profiles with profile optimization - # Resource configurations defined here are applicable for all API Manager product profiles of this deployment - requests: - # -- Memory request for API Manager - memory: "2Gi" - # -- CPU request for API Manager - cpu: "2000m" - limits: - # -- Memory limit for API Manager - memory: "3Gi" - # -- CPU limit for API Manager - cpu: "3000m" - jvm: - memory: - # -- JVM heap memory Xms - xms: "2048m" - # -- JVM heap memory Xmx - xmx: "2048m" - - # Kubernetes Probes - # Indicates whether the container starting - startupProbe: - # -- Number of seconds after the container has started before startup probes are initiated - initialDelaySeconds: 60 - # -- How often (in seconds) to perform the probe - periodSeconds: 10 - # -- Minimum consecutive successes for the probe to be considered successful after having failed - failureThreshold: 3 - # Indicates whether the container is running - livenessProbe: - # -- Number of seconds after the container has started before liveness probes are initiated - initialDelaySeconds: 60 - # -- How often (in seconds) to perform the probe - periodSeconds: 10 - # -- Minimum consecutive successes for the probe to be considered successful after having failed - failureThreshold: 3 - # Indicates whether the container is ready to service requests - readinessProbe: - # -- Number of seconds after the container has started before readiness probes are initiated - initialDelaySeconds: 60 - # -- How often (in seconds) to perform the probe - periodSeconds: 10 - # -- Minimum consecutive successes for the probe to be considered successful after having failed - failureThreshold: 3 - - lifecycle: - preStopHook: - # -- Number of seconds to sleep before sending SIGTERM to the pod - sleepSeconds: 10 - - # Number of deployment replicas - replicas: 1 - # -- Minimum available pod counts for PDB - minAvailable: "50%" - - # -- Node selector to deploy pod in selected node. Add label to the node and specify the label here. - nodeSelector: - - # -- Enable high availability for traffic manager. If this is enabled, two traffic manager instances will be deployed. - # This is not relavant to HA in Kubernetes. Multiple replicas of the same instance will not count as HA for TM. - highAvailability: false - - persistence: - # -- Persistent runtime artifacts for Apache Solr-based indexing - solrIndexing: - # -- Indicates if persistence of the runtime artifacts for Apache Solr-based indexing is enabled - # By default, this is disabled - enabled: false - # Define capacities for persistent runtime artifact directories - capacity: - # -- For persisting the H2 based local Carbon database file - carbonDatabase: 50M - # -- For persisting the indexed solr data - solrIndexedData: 50M \ No newline at end of file diff --git a/test/apim-apk-agent-test/cucumber-tests/README.md b/test/apim-apk-agent-test/cucumber-tests/README.md index 22a70b5e6..c0166a963 100644 --- a/test/apim-apk-agent-test/cucumber-tests/README.md +++ b/test/apim-apk-agent-test/cucumber-tests/README.md @@ -40,13 +40,13 @@ To create a new feature, follow these steps: helm repo add bitnami https://charts.bitnami.com/bitnami helm repo add jetstack https://charts.jetstack.io helm dependency build - helm install apk-test-setup . -n apk + helm install apk . -n apk ``` 3. Port forward router-service to use localhost. ```bash - kubectl port-forward svc/apk-test-setup-wso2-apk-router-service -n apk 9095:9095 + kubectl port-forward svc/apk-wso2-apk-router-service -n apk 9095:9095 ``` 4. Add the following DNS mappings to `/etc/hosts` file. diff --git a/test/apim-apk-agent-test/cucumber-tests/scripts/setup-hosts.sh b/test/apim-apk-agent-test/cucumber-tests/scripts/setup-hosts.sh index 37f11f29b..6e5a9d9d6 100644 --- a/test/apim-apk-agent-test/cucumber-tests/scripts/setup-hosts.sh +++ b/test/apim-apk-agent-test/cucumber-tests/scripts/setup-hosts.sh @@ -2,14 +2,14 @@ kubectl apply -f ./CRs/artifacts.yaml kubectl wait deployment/apim-wso2am-cp-deployment-1 -n apk --for=condition=available --timeout=600s -kubectl wait --timeout=5m -n apk deployment/apk-test-setup-wso2-apk-adapter-deployment --for=condition=Available -kubectl wait --timeout=15m -n apk deployment/apk-test-setup-wso2-apk-gateway-runtime-deployment --for=condition=Available +kubectl wait --timeout=5m -n apk deployment/apk-wso2-apk-adapter-deployment --for=condition=Available +kubectl wait --timeout=15m -n apk deployment/apk-wso2-apk-gateway-runtime-deployment --for=condition=Available kubectl wait --timeout=5m -n apk deployment/apim-apk-agent --for=condition=Available -IP=$(kubectl get svc apk-test-setup-wso2-apk-gateway-service -n apk --output jsonpath='{.status.loadBalancer.ingress[0].ip}') -CC_IP=$(kubectl get svc apk-test-setup-wso2-apk-common-controller-web-server-service -n apk --output jsonpath='{.status.loadBalancer.ingress[0].ip}') +IP=$(kubectl get svc apk-wso2-apk-gateway-service -n apk --output jsonpath='{.status.loadBalancer.ingress[0].ip}') +CC_IP=$(kubectl get svc apk-wso2-apk-common-controller-web-server-service -n apk --output jsonpath='{.status.loadBalancer.ingress[0].ip}') sudo echo "$IP localhost" | sudo tee -a /etc/hosts sudo echo "$IP idp.am.wso2.com" | sudo tee -a /etc/hosts -sudo echo "$CC_IP apk-test-setup-wso2-apk-common-controller-service.apk.svc" | sudo tee -a /etc/hosts +sudo echo "$CC_IP apk-wso2-apk-common-controller-service.apk.svc" | sudo tee -a /etc/hosts sudo echo "127.0.0.1 am.wso2.com" | sudo tee -a /etc/hosts sudo echo "$IP api.am.wso2.com" | sudo tee -a /etc/hosts sudo echo "$IP default.gw.wso2.com" | sudo tee -a /etc/hosts