From a2d3a751a23851169f7b598ac4a077796366aac2 Mon Sep 17 00:00:00 2001 From: Liam McNulty <59540366+LiamMcNulty@users.noreply.github.com> Date: Mon, 12 Oct 2020 11:46:48 +0100 Subject: [PATCH 1/8] Create ibm-mq.md --- content/docs/2.0/scalers/ibm-mq.md | 96 ++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 content/docs/2.0/scalers/ibm-mq.md diff --git a/content/docs/2.0/scalers/ibm-mq.md b/content/docs/2.0/scalers/ibm-mq.md new file mode 100644 index 000000000..3cc54a0db --- /dev/null +++ b/content/docs/2.0/scalers/ibm-mq.md @@ -0,0 +1,96 @@ +> © Copyright IBM Corporation 2020 +> +> 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. + + ++++ +title = "IBM MQ" +layout = "scaler" +availability = "v2.0+" +maintainer = "Community" +description = "Scale applications based on IBM MQ Queue" +go_file = "ibmmq_scaler" ++++ + +### Trigger Specification + +This specification describes the `ibmmq` trigger for IBM MQ Queue. + +```yaml +triggers: + - type: ibmmq + metadata: + queueLength: '5' # Queue length target for HPA. Default: 5 messages + host: IBMMQ_HOST # IBM MQ Queue Manager Admin REST Endpoint + queueName: QUEUE_NAME + authenticationRef: + name: ibmmq-consumer-trigger +``` + +**Parameter list:** + +- `queueLength`: OPTIONAL - Queue Length Target for HPA. Will be set to Default Value of 5 if not Provided. +- `host`: REQUIRED - IBM MQ Queue Manager Admin REST Endpoint. Example URI endpoint structure on IBM cloud `https://example.mq.appdomain.cloud/ibmmq/rest/v2/admin/action/qmgr/QM/mqsc` +- `queueName`: REQUIRED - Name of the Queue within the Queue Manager defined from which messages will be consumed + +### Authentication Parameters + +TriggerAuthentication CRD is used to connect and authenticate to IBM MQ: + +### Example + +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: keda-ibmmq-secret +data: + ADMIN_USER: + ADMIN_PASSWORD: +--- +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: ibmmq-scaledobject + namespace: default + labels: + deploymentName: ibmmq-deployment +spec: + scaleTargetRef: + name: ibmmq-deployment + pollingInterval: 5 # OPTIONAL - Default: 30 seconds + cooldownPeriod: 30 # OPTIONAL - Default: 300 seconds + maxReplicaCount: 18 # OPTIONAL - Default: 100 + triggers: + - type: ibmmq + metadata: + queueLength: '5' + host: IBMMQ_HOST + queueName: QUEUE_NAME + authenticationRef: + name: keda-ibmmq-trigger-auth +--- +apiVersion: keda.sh/v1alpha1 +kind: TriggerAuthentication +metadata: + name: keda-ibmmq-trigger-auth + namespace: default +spec: + secretTargetRef: + - parameter: username + name: keda-ibmmq-secret + key: ADMIN_USER + - parameter: password + name: keda-ibmmq-secret + key: ADMIN_PASSWORD +``` \ No newline at end of file From 81b706ca051cfd51cc9f8ea9695557d00dda0af1 Mon Sep 17 00:00:00 2001 From: Liam McNulty <59540366+LiamMcNulty@users.noreply.github.com> Date: Mon, 12 Oct 2020 11:59:42 +0100 Subject: [PATCH 2/8] Update ibm-mq.md --- content/docs/2.0/scalers/ibm-mq.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/content/docs/2.0/scalers/ibm-mq.md b/content/docs/2.0/scalers/ibm-mq.md index 3cc54a0db..7f8cab3eb 100644 --- a/content/docs/2.0/scalers/ibm-mq.md +++ b/content/docs/2.0/scalers/ibm-mq.md @@ -30,9 +30,9 @@ This specification describes the `ibmmq` trigger for IBM MQ Queue. triggers: - type: ibmmq metadata: - queueLength: '5' # Queue length target for HPA. Default: 5 messages - host: IBMMQ_HOST # IBM MQ Queue Manager Admin REST Endpoint - queueName: QUEUE_NAME + queueLength: '5' # OPTIONAL - Queue length target for HPA. Default: 5 messages + host: # REQUIRED - IBM MQ Queue Manager Admin REST Endpoint + queueName: # REQUIRED - Queue Name authenticationRef: name: ibmmq-consumer-trigger ``` @@ -55,8 +55,8 @@ kind: Secret metadata: name: keda-ibmmq-secret data: - ADMIN_USER: - ADMIN_PASSWORD: + ADMIN_USER: # REQUIRED - Admin Username + ADMIN_PASSWORD: # REQUIRED - Admin Password --- apiVersion: keda.sh/v1alpha1 kind: ScaledObject @@ -74,9 +74,9 @@ spec: triggers: - type: ibmmq metadata: - queueLength: '5' - host: IBMMQ_HOST - queueName: QUEUE_NAME + queueLength: '5' # OPTIONAL - Depth of Queue per Replica Pod + host: # REQUIRED - IBM MQ Queue Manager Admin REST Endpoint + queueName: # REQUIRED - Queue Name authenticationRef: name: keda-ibmmq-trigger-auth --- From fd56b9d8ec90baf381c60706a31c48ee3473cb6c Mon Sep 17 00:00:00 2001 From: cpilton Date: Thu, 15 Oct 2020 15:29:31 +0100 Subject: [PATCH 3/8] Update trigger parameters --- content/docs/2.0/scalers/ibm-mq.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/content/docs/2.0/scalers/ibm-mq.md b/content/docs/2.0/scalers/ibm-mq.md index 7f8cab3eb..47f7a253f 100644 --- a/content/docs/2.0/scalers/ibm-mq.md +++ b/content/docs/2.0/scalers/ibm-mq.md @@ -32,7 +32,9 @@ triggers: metadata: queueLength: '5' # OPTIONAL - Queue length target for HPA. Default: 5 messages host: # REQUIRED - IBM MQ Queue Manager Admin REST Endpoint + queueManager: # REQUIRED - Queue Manager queueName: # REQUIRED - Queue Name + tlsDisabled: # REQUIRED - Set 'true' to disable TLS. authenticationRef: name: ibmmq-consumer-trigger ``` @@ -93,4 +95,4 @@ spec: - parameter: password name: keda-ibmmq-secret key: ADMIN_PASSWORD -``` \ No newline at end of file +``` From b31891741bdd500c47f1193f35c2f6ca31546c02 Mon Sep 17 00:00:00 2001 From: cpilton Date: Fri, 16 Oct 2020 12:42:08 +0100 Subject: [PATCH 4/8] Remove copyright notice Signed-off-by: cpilton --- content/docs/2.0/scalers/ibm-mq.md | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/content/docs/2.0/scalers/ibm-mq.md b/content/docs/2.0/scalers/ibm-mq.md index 47f7a253f..59bd714a1 100644 --- a/content/docs/2.0/scalers/ibm-mq.md +++ b/content/docs/2.0/scalers/ibm-mq.md @@ -1,18 +1,3 @@ -> © Copyright IBM Corporation 2020 -> -> 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. - - +++ title = "IBM MQ" layout = "scaler" From d7bb066b315d86653fe423ca6eddf06e0b68ffef Mon Sep 17 00:00:00 2001 From: cpilton Date: Fri, 16 Oct 2020 13:03:02 +0100 Subject: [PATCH 5/8] Restructure parameters Signed-off-by: cpilton --- content/docs/2.0/scalers/ibm-mq.md | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/content/docs/2.0/scalers/ibm-mq.md b/content/docs/2.0/scalers/ibm-mq.md index 59bd714a1..176e5a3e6 100644 --- a/content/docs/2.0/scalers/ibm-mq.md +++ b/content/docs/2.0/scalers/ibm-mq.md @@ -15,27 +15,33 @@ This specification describes the `ibmmq` trigger for IBM MQ Queue. triggers: - type: ibmmq metadata: - queueLength: '5' # OPTIONAL - Queue length target for HPA. Default: 5 messages host: # REQUIRED - IBM MQ Queue Manager Admin REST Endpoint - queueManager: # REQUIRED - Queue Manager - queueName: # REQUIRED - Queue Name - tlsDisabled: # REQUIRED - Set 'true' to disable TLS. + queueManager: # REQUIRED - Your queue manager + queueName: # REQUIRED - Your queue name + tlsDisabled: # OPTIONAL - Set 'true' to disable TLS. Default: false + queueDepth: # OPTIONAL - Queue length target for HPA. Default: 5 messages authenticationRef: name: ibmmq-consumer-trigger ``` -**Parameter list:** -- `queueLength`: OPTIONAL - Queue Length Target for HPA. Will be set to Default Value of 5 if not Provided. -- `host`: REQUIRED - IBM MQ Queue Manager Admin REST Endpoint. Example URI endpoint structure on IBM cloud `https://example.mq.appdomain.cloud/ibmmq/rest/v2/admin/action/qmgr/QM/mqsc` -- `queueName`: REQUIRED - Name of the Queue within the Queue Manager defined from which messages will be consumed + ### Authentication Parameters TriggerAuthentication CRD is used to connect and authenticate to IBM MQ: + **Parameter list** + - `host`: REQUIRED - IBM MQ Queue Manager Admin REST Endpoint. Example URI endpoint structure on IBM cloud `https://example.mq.appdomain.cloud/ibmmq/rest/v2/admin/action/qmgr/QM/mqsc` + - `queueManager`: REQUIRED - Name of the queue manager from which messages will be consumed + - `queueName`: REQUIRED - Name of the Queue within the Queue Manager defined from which messages will be consumed + - `tlsDisabled`: OPTIONAL - A boolean: Can be set to 'true' to disable TLS. False by default. + - `queueLength`: OPTIONAL - Queue Length Target for HPA. Will be set to Default Value of 5 if not Provided. + + **Authentication Parameters** + - `ADMIN_USER`: REQUIRED - The admin REST endpoint username for your MQ Queue Manager + - `ADMIN_PASSWORD`: REQUIRED - The admin REST endpoint API key for your MQ Queue Manager ### Example - ```yaml apiVersion: v1 kind: Secret @@ -61,9 +67,11 @@ spec: triggers: - type: ibmmq metadata: - queueLength: '5' # OPTIONAL - Depth of Queue per Replica Pod host: # REQUIRED - IBM MQ Queue Manager Admin REST Endpoint - queueName: # REQUIRED - Queue Name + queueManager: # REQUIRED - Your queue manager + queueName: # REQUIRED - Your queue name + tlsDisabled: # OPTIONAL - Set 'true' to disable TLS. Default: false + queueDepth: # OPTIONAL - Queue length target for HPA. Default: 5 messages authenticationRef: name: keda-ibmmq-trigger-auth --- From 104972d7745fb4ee731229c026ccdb8bd447fa7d Mon Sep 17 00:00:00 2001 From: cpilton Date: Fri, 16 Oct 2020 15:37:18 +0100 Subject: [PATCH 6/8] Convert 'length' to 'depth' Signed-off-by: cpilton --- content/docs/2.0/scalers/ibm-mq.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/docs/2.0/scalers/ibm-mq.md b/content/docs/2.0/scalers/ibm-mq.md index 176e5a3e6..4c159fa12 100644 --- a/content/docs/2.0/scalers/ibm-mq.md +++ b/content/docs/2.0/scalers/ibm-mq.md @@ -19,7 +19,7 @@ triggers: queueManager: # REQUIRED - Your queue manager queueName: # REQUIRED - Your queue name tlsDisabled: # OPTIONAL - Set 'true' to disable TLS. Default: false - queueDepth: # OPTIONAL - Queue length target for HPA. Default: 5 messages + queueDepth: # OPTIONAL - Queue depth target for HPA. Default: 5 messages authenticationRef: name: ibmmq-consumer-trigger ``` @@ -35,7 +35,7 @@ TriggerAuthentication CRD is used to connect and authenticate to IBM MQ: - `queueManager`: REQUIRED - Name of the queue manager from which messages will be consumed - `queueName`: REQUIRED - Name of the Queue within the Queue Manager defined from which messages will be consumed - `tlsDisabled`: OPTIONAL - A boolean: Can be set to 'true' to disable TLS. False by default. - - `queueLength`: OPTIONAL - Queue Length Target for HPA. Will be set to Default Value of 5 if not Provided. + - `queueDepth`: OPTIONAL - Queue depth Target for HPA. Will be set to Default Value of 5 if not Provided. **Authentication Parameters** - `ADMIN_USER`: REQUIRED - The admin REST endpoint username for your MQ Queue Manager @@ -71,7 +71,7 @@ spec: queueManager: # REQUIRED - Your queue manager queueName: # REQUIRED - Your queue name tlsDisabled: # OPTIONAL - Set 'true' to disable TLS. Default: false - queueDepth: # OPTIONAL - Queue length target for HPA. Default: 5 messages + queueDepth: # OPTIONAL - Queue depth target for HPA. Default: 5 messages authenticationRef: name: keda-ibmmq-trigger-auth --- From a7b08c3368a41ccdb8f4f9123f2f9e2eda0a8c29 Mon Sep 17 00:00:00 2001 From: cpilton Date: Fri, 23 Oct 2020 14:06:58 +0100 Subject: [PATCH 7/8] Allow username/password from env --- content/docs/2.0/scalers/ibm-mq.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/content/docs/2.0/scalers/ibm-mq.md b/content/docs/2.0/scalers/ibm-mq.md index 4c159fa12..2cb84dfeb 100644 --- a/content/docs/2.0/scalers/ibm-mq.md +++ b/content/docs/2.0/scalers/ibm-mq.md @@ -20,13 +20,12 @@ triggers: queueName: # REQUIRED - Your queue name tlsDisabled: # OPTIONAL - Set 'true' to disable TLS. Default: false queueDepth: # OPTIONAL - Queue depth target for HPA. Default: 5 messages + usernameFromEnv: # Optional: Provide admin username from env instead of as a secret + passwordFromEnv: # Optional: Provide admin password from env instead of as a secret authenticationRef: name: ibmmq-consumer-trigger ``` - - - ### Authentication Parameters TriggerAuthentication CRD is used to connect and authenticate to IBM MQ: @@ -36,11 +35,15 @@ TriggerAuthentication CRD is used to connect and authenticate to IBM MQ: - `queueName`: REQUIRED - Name of the Queue within the Queue Manager defined from which messages will be consumed - `tlsDisabled`: OPTIONAL - A boolean: Can be set to 'true' to disable TLS. False by default. - `queueDepth`: OPTIONAL - Queue depth Target for HPA. Will be set to Default Value of 5 if not Provided. - + - `usernameFromEnv`: OPTIONAL: Provide admin username from env instead of as a secret + - `passwordFromEnv`: OPTIONAL: Provide admin password from env instead of as a secret + **Authentication Parameters** - `ADMIN_USER`: REQUIRED - The admin REST endpoint username for your MQ Queue Manager - `ADMIN_PASSWORD`: REQUIRED - The admin REST endpoint API key for your MQ Queue Manager - + - `usernameFromEnv`: OPTIONAL: Provide admin username from env instead of as a secret + - `passwordFromEnv`: OPTIONAL: Provide admin password from env instead of as a secret + ### Example ```yaml apiVersion: v1 @@ -72,6 +75,8 @@ spec: queueName: # REQUIRED - Your queue name tlsDisabled: # OPTIONAL - Set 'true' to disable TLS. Default: false queueDepth: # OPTIONAL - Queue depth target for HPA. Default: 5 messages + usernameFromEnv: # Optional: Provide admin username from env instead of as a secret + passwordFromEnv: # Optional: Provide admin password from env instead of as a secret authenticationRef: name: keda-ibmmq-trigger-auth --- From c2a0be21a5fb71573a98a7479b1e3621ef236cce Mon Sep 17 00:00:00 2001 From: cpilton Date: Fri, 23 Oct 2020 14:09:26 +0100 Subject: [PATCH 8/8] Move parameter list --- content/docs/2.0/scalers/ibm-mq.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/docs/2.0/scalers/ibm-mq.md b/content/docs/2.0/scalers/ibm-mq.md index 2cb84dfeb..5d51d644f 100644 --- a/content/docs/2.0/scalers/ibm-mq.md +++ b/content/docs/2.0/scalers/ibm-mq.md @@ -26,9 +26,6 @@ triggers: name: ibmmq-consumer-trigger ``` -### Authentication Parameters - -TriggerAuthentication CRD is used to connect and authenticate to IBM MQ: **Parameter list** - `host`: REQUIRED - IBM MQ Queue Manager Admin REST Endpoint. Example URI endpoint structure on IBM cloud `https://example.mq.appdomain.cloud/ibmmq/rest/v2/admin/action/qmgr/QM/mqsc` - `queueManager`: REQUIRED - Name of the queue manager from which messages will be consumed @@ -37,7 +34,10 @@ TriggerAuthentication CRD is used to connect and authenticate to IBM MQ: - `queueDepth`: OPTIONAL - Queue depth Target for HPA. Will be set to Default Value of 5 if not Provided. - `usernameFromEnv`: OPTIONAL: Provide admin username from env instead of as a secret - `passwordFromEnv`: OPTIONAL: Provide admin password from env instead of as a secret - + +### Authentication Parameters + +TriggerAuthentication CRD is used to connect and authenticate to IBM MQ: **Authentication Parameters** - `ADMIN_USER`: REQUIRED - The admin REST endpoint username for your MQ Queue Manager - `ADMIN_PASSWORD`: REQUIRED - The admin REST endpoint API key for your MQ Queue Manager