From 8cd299368f2160b4643ac116b28c947d0e23d8e8 Mon Sep 17 00:00:00 2001 From: NisheekaNynan1 <71078202+NisheekaNynan1@users.noreply.github.com> Date: Fri, 23 Oct 2020 15:02:11 +0100 Subject: [PATCH] IBM MQ scaler doc (#283) Signed-off-by: Nisheeka Nynan Co-authored-by: Liam McNulty <59540366+LiamMcNulty@users.noreply.github.com> Co-authored-by: Richard Coppen <30902631+rcoppen@users.noreply.github.com> Co-authored-by: cpilton Co-authored-by: Jess McCreery Co-authored-by: Bimsara Pilapitiya Co-authored-by: Rory Jackson Co-authored-by: Soheel Chughtai --- 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 00000000000..5d51d644f0e --- /dev/null +++ b/content/docs/2.0/scalers/ibm-mq.md @@ -0,0 +1,96 @@ ++++ +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: + host: # REQUIRED - IBM MQ Queue Manager Admin REST Endpoint + queueManager: # REQUIRED - Your queue manager + 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 +``` + + **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. + - `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 + - `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 +kind: Secret +metadata: + name: keda-ibmmq-secret +data: + ADMIN_USER: # REQUIRED - Admin Username + ADMIN_PASSWORD: # REQUIRED - 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: + host: # REQUIRED - IBM MQ Queue Manager Admin REST Endpoint + queueManager: # REQUIRED - Your queue manager + 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 +--- +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 +```