Skip to content

Commit 5a076b7

Browse files
authored
Merge pull request #538 from citrix/cic-1.25-6
updates for cic release 1.25-6
2 parents fc94f48 + 752c120 commit 5a076b7

5 files changed

Lines changed: 238 additions & 4 deletions

File tree

crd/appqoe/README.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Enable request retry feature using AppQoE for Citrix ingress controller
2+
3+
When a Citrix ADC appliance receives an HTTP request and forwards it to a back-end server, sometimes there may be connection failures with the back-end server. You can configure the request-retry feature on Citrix ADC to forward the request to the next available server, instead of sending the reset to the client. Hence, the client saves round trip time when Citrix ADC initiates the same request to the next available service. For more information request retry feature, see the [Citrix ADC documentation](https://docs.citrix.com/en-us/citrix-adc/current-release/system/request-retry/request_retry_if_back-end_server_resets_tcp_connection.html)
4+
5+
Now, you can configure request retry on Citrix ADC with Citrix ingress controller.
6+
Custom Resource Definitions (CRDs) are the primary way of configuring policies in cloud native deployments. Using the AppQoE CRD provided by Citrix, you can configure request-retry policies on Citrix ADC with the Citrix ingress controller. The AppQoE CRD enables communication between the Citrix ingress controller and Citrix ADC for enforcing AppQoE policies.
7+
8+
## AppQoE CRD definition
9+
10+
The AppQoE CRD is available in the Citrix ingress controller GitHub repo at: [appqoe-crd.yaml](https://raw.githubusercontent.com/citrix/citrix-k8s-ingress-controller/master/crd/appqoe/appqoe-crd.yaml). The AppQoE CRD provides attributes for the various options that are required to define the AppQoE policy on Citrix ADC.
11+
12+
The following are the attributes provided in the AppQoE CRD:
13+
14+
| Attribute | Description |
15+
| --------- | ----------- |
16+
| `servicenames` | Specifies the list of Kubernetes services to which you want to apply the AppQoE policies.|
17+
| `on-reset`| Specifies whether to set retry on connection Reset or Not|
18+
| `on-timeout` | Specifies the time in milliseconds for retry |
19+
| `number-of-retries`| Specifies the number of retries |
20+
| `appqoe-criteria`|Specifies the expression for evaluating traffic. |
21+
| `direction`| Specifies the bind point for binding the AppQoE policy. |
22+
23+
## Deploy the AppQoE CRD
24+
25+
Perform the following to deploy the AppQoE CRD:
26+
27+
1. Download the [AppQoE CRD](https://github.com/citrix/citrix-k8s-ingress-controller/blob/master/crd/appqoe/appqoe-crd.yaml).
28+
29+
2. Deploy the AppQoE CRD using the following command:
30+
31+
kubectl create -f appqoe-crd.yaml
32+
33+
### How to write a AppQoE policy configuration
34+
35+
After you have deployed the AppQoE CRD provided by Citrix in the Kubernetes cluster, you can define the AppQoE policy configuration in a `.yaml` file. In the `.yaml` file, use `appqoepolicy` in the kind field and in the `spec` section add the AppQoE CRD attributes based on your requirement for the policy configuration.
36+
37+
The following YAML file applies the AppQoE policy to the services listed in the servicenames field. You must configure the AppQoE action to retry on timeout and define the number of retry attempts.
38+
39+
```yml
40+
apiVersion: citrix.com/v1
41+
kind: appqoepolicy
42+
metadata:
43+
name: targeturlappqoe
44+
spec:
45+
appqoe-policies:
46+
- servicenames:
47+
- apache
48+
appqoe-policy:
49+
operation-retry:
50+
onReset: 'YES'
51+
onTimeout: 33
52+
number-of-retries: 2
53+
appqoe-criteria: 'HTTP.REQ.HEADER("User-Agent").CONTAINS("Android")'
54+
direction: REQUEST
55+
```
56+
57+
After you have defined the policy configuration, deploy the `.yaml` file using the following commands:
58+
59+
$ kubectl create -f appqoe-example.yaml

crd/appqoe/appqoe-crd.yaml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
apiVersion: apiextensions.k8s.io/v1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
name: appqoepolicies.citrix.com
5+
spec:
6+
group: citrix.com
7+
names:
8+
kind: appqoepolicy
9+
plural: appqoepolicies
10+
singular: appqoepolicy
11+
scope: Namespaced
12+
versions:
13+
- name: v1
14+
served: true
15+
storage: true
16+
subresources:
17+
status: {}
18+
additionalPrinterColumns:
19+
- name: Status
20+
type: string
21+
description: "Current Status of the CRD"
22+
jsonPath: .status.state
23+
- name: Message
24+
type: string
25+
description: "Status Message"
26+
jsonPath: .status.status_message
27+
schema:
28+
openAPIV3Schema:
29+
type: object
30+
properties:
31+
status:
32+
type: object
33+
properties:
34+
state:
35+
type: string
36+
status_message:
37+
type: string
38+
spec:
39+
type: object
40+
properties:
41+
appqoe-policies:
42+
type: array
43+
items:
44+
type: object
45+
properties:
46+
servicenames:
47+
description: 'Name of the services that needs to be binded to appqoe policy.'
48+
type: array
49+
items:
50+
type: string
51+
maxLength: 127
52+
appqoe-policy:
53+
type: object
54+
properties:
55+
operation-retry:
56+
type: object
57+
properties:
58+
on-reset:
59+
description: "To set Retry on Connection Reset or Not"
60+
type: string
61+
enum: ['YES','NO']
62+
on-timeout:
63+
description: "Time in milliseconds for retry"
64+
type: integer
65+
minimum: 30
66+
maximum: 2000
67+
number-of-retries:
68+
description: "To set number of retries"
69+
type: integer
70+
minimum: 1
71+
maximum: 7
72+
required: [operation-retry]
73+
appqoe-criteria:
74+
description: 'Expression against which traffic is evaluated.'
75+
type: string
76+
maxLength: 1299
77+
direction:
78+
description: 'Bind point to which to bind the policy.'
79+
type: string
80+
enum: ["REQUEST","RESPONSE"]
81+
required: [appqoe-criteria, operation-retry]
82+
required: [appqoe-policy]

docs/configure/config-map-coe.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@ You can configure the following parameters under `NS_ANALYTICS_CONFIG` using a C
1212
- `samplingrate`: Specifies the OpenTracing sampling rate in percentage. The default value is 100.
1313

1414
- `endpoint`: Specifies the IP address or DNS address of the analytics server.
15-
15+
1616
- `server`: Set this value as the IP address or DNS address of the server.
17-
17+
- `service`: Specifies the IP address or service name of the Citrix ADC observability exporter service depending on whether the service is running on a virtual machine or as a Kubernetes service.
18+
If the Citrix ADC observability exporter instance is running on a virtual machine this parameter specifies the IP address. If the Citrix ADC observability exporter instance is running as a service in the Kubernetes cluster, this parameter specifies the instance as namespace/service name.
1819
- `timeseries`: Enables exporting time series data from Citrix ADC. You can specify the following attributes for time series configuration.
1920

20-
- `port`: Specifies the port number of time series end point of the analytics server. The default value is 5563.
21+
- `port`: Specifies the port number of the time series end point of the analytics server. The default value is 5563.
2122
- `metrics`: Enables exporting metrics from Citrix ADC.
2223

2324
- `enable`: Set this value to `true` to enable sending metrics. The default value is `false`.
@@ -31,7 +32,7 @@ You can configure the following parameters under `NS_ANALYTICS_CONFIG` using a C
3132
- `transactions`: Enables exporting transactions from Citrix ADC.
3233

3334
- `enable`: Set this value to `true` to enable sending transactions. The default value is `false`.
34-
- `port`: Specifies the port number of transactional endpoint of analytics server. The default value is 5557.
35+
- `port`: Specifies the port number of the transactional endpoint of the analytics server. The default value is 5557.
3536

3637
The following configurations cannot be changed while the Citrix ingress controller is running and you need to reboot the Citrix ingress controller to apply these settings.
3738

@@ -41,6 +42,9 @@ The following configurations cannot be changed while the Citrix ingress controll
4142

4243
You can change other ConfigMap settings at runtime while the Citrix ingress controller is running.
4344

45+
**Note:**
46+
When the user specifies value for a service as `namespace/service name`, Citrix ingress controller derives the endpoint associated to that service and dynamically bind them to the transactional service group in Citrix tier-1 ADC . If a user specifies the value for a service as IP address, the IP address is direclty bound to the transactional service group. Citrix ingress controller is enhanced to create default web or TCP based analytics profiles and bind them to the logging virtual server. The default analytics profiles are bound to all load balancing virtual servers of applications if the Citrix ADC observability exporter is enabled in the cluster. If the user wants to change the analytics profile, they can use the `analyticsprofile` annotation.
47+
4448
The attributes of `NS_ANALYTICS_CONFIG` should follow a well-defined schema. If any value provided does not confirm with the schema, then the entire configuration is rejected. For reference, see the schema file [ns_analytics_config_schema.yaml](#Schema-for-NSANALYTICSCONFIG).
4549

4650
## Creating a ConfigMap for analytics configuration
@@ -67,6 +71,7 @@ data:
6771
samplingrate: 100
6872
endpoint:
6973
server: '1.1.1.1'
74+
service: 'default/coe-kafka'
7075
timeseries:
7176
port: 5563
7277
metrics:
@@ -79,6 +84,7 @@ data:
7984
transactions:
8085
enable: 'true'
8186
port: 5557
87+
8288
```
8389
8490
For more information on how to configure ConfigMap support on the Citrix ingress controller, [see configuring ConfigMap support for the Citrix ingress controller](https://developer-docs.citrix.com/projects/citrix-k8s-ingress-controller/en/latest/configure/config-map/#configuring-configmap-support-for-the-citrix-ingress-controller).
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Configuring consistent hashing algorithm using Citrix ingress controller
2+
3+
Load balancing algorithms define the criteria that the Citrix ADC appliance uses to select the service to which to redirect each client request. Different load balancing algorithms use different criteria and consistent hashing is one the load balancing algorithms supported by Citrix ADC.
4+
Consistent hashing algorithms are often used to load balance when the back-end is a caching server to achieve stateless persistency.
5+
Consistent hashing can ensure that when a cache server is removed, only the requests cached in that specific server is rehashed and the rest of the requests are not affected. For more information on the consistent hashing algorithm, see the [Citrix ADC documentation](https://docs.citrix.com/en-us/citrix-adc/current-release/load-balancing/load-balancing-customizing-algorithms/hashing-methods.html#consistent-hashing-algorithms).
6+
7+
You can now configure the consistent hashing algorithm on Citrix ADC using Citrix ingress controller. This configuration is enabled with in the Citrix ingress controller using a ConfigMap.
8+
9+
## Configure hashing algorithm
10+
11+
A new parameter `NS_LB_HASH_ALGO` is introduced in the Citrix ingress controller ConfigMap for hashing algorithm support.
12+
Supported environment variables for consistent hashing algorithm using ConfigMap under the `NS_LB_HASH_ALGO` parameter:
13+
14+
- `hashFingers`: Specifies the number of fingers to be used for the hashing algorithm. Possible values are from 1 to 1024. Increasing the number of fingers provides better distribution of traffic at the expense of extra memory.
15+
- `hashAlgorithm`: Specifies the supported algorithm. Supported algorithms are `default`, `jarh`, `prac`.
16+
17+
The following example shows a sample ConfigMap for configuring consistent hashing algorithm using Citrix ingress controller. In this example, the hashing algorithm is used as Prime Re-Shuffled Assisted CARP (PRAC) and the number of fingers to be used in PRAC is set as 50.
18+
19+
apiVersion: v1
20+
kind: ConfigMap
21+
metadata:
22+
name: cic-configmap
23+
labels:
24+
app: citrix-ingress-controller
25+
data:
26+
NS_LB_HASH_ALGO: |
27+
hashFingers: 50
28+
hashAlgorithm: 'prac'

docs/crds/appqoe.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Enable request retry feature using AppQoE for Citrix ingress controller
2+
3+
When a Citrix ADC appliance receives an HTTP request and forwards it to a back-end server, sometimes there may be connection failures with the back-end server. You can configure the request-retry feature on Citrix ADC to forward the request to the next available server, instead of sending the reset to the client. Hence, the client saves round trip time when Citrix ADC initiates the same request to the next available service. For more information request retry feature, see the [Citrix ADC documentation](https://docs.citrix.com/en-us/citrix-adc/current-release/system/request-retry/request_retry_if_back-end_server_resets_tcp_connection.html)
4+
5+
Now, you can configure request retry on Citrix ADC with Citrix ingress controller.
6+
Custom Resource Definitions (CRDs) are the primary way of configuring policies in cloud native deployments. Using the AppQoE CRD provided by Citrix, you can configure request-retry policies on Citrix ADC with the Citrix ingress controller. The AppQoE CRD enables communication between the Citrix ingress controller and Citrix ADC for enforcing AppQoE policies.
7+
8+
## AppQoE CRD definition
9+
10+
The AppQoE CRD is available in the Citrix ingress controller GitHub repo at: [appqoe-crd.yaml](https://raw.githubusercontent.com/citrix/citrix-k8s-ingress-controller/master/crd/appqoe/appqoe-crd.yaml). The AppQoE CRD provides attributes for the various options that are required to define the AppQoE policy on Citrix ADC.
11+
12+
The following are the attributes provided in the AppQoE CRD:
13+
14+
| Attribute | Description |
15+
| --------- | ----------- |
16+
| `servicenames` | Specifies the list of Kubernetes services to which you want to apply the AppQoE policies.|
17+
| `on-reset`| Specifies whether to set retry on connection Reset or Not|
18+
| `on-timeout` | Specifies the time in milliseconds for retry |
19+
| `number-of-retries`| Specifies the number of retries |
20+
| `appqoe-criteria`|Specifies the expression for evaluating traffic. |
21+
| `direction`| Specifies the bind point for binding the AppQoE policy. |
22+
23+
## Deploy the AppQoE CRD
24+
25+
Perform the following to deploy the AppQoE CRD:
26+
27+
1. Download the [AppQoE CRD](https://github.com/citrix/citrix-k8s-ingress-controller/blob/master/crd/appqoe/appqoe-crd.yaml).
28+
29+
2. Deploy the AppQoE CRD using the following command:
30+
31+
kubectl create -f appqoe-crd.yaml
32+
33+
### How to write a AppQoE policy configuration
34+
35+
After you have deployed the AppQoE CRD provided by Citrix in the Kubernetes cluster, you can define the AppQoE policy configuration in a `.yaml` file. In the `.yaml` file, use `appqoepolicy` in the kind field and in the `spec` section add the AppQoE CRD attributes based on your requirement for the policy configuration.
36+
37+
The following YAML file applies the AppQoE policy to the services listed in the servicenames field. You must configure the AppQoE action to retry on timeout and define the number of retry attempts.
38+
39+
```yml
40+
apiVersion: citrix.com/v1
41+
kind: appqoepolicy
42+
metadata:
43+
name: targeturlappqoe
44+
spec:
45+
appqoe-policies:
46+
- servicenames:
47+
- apache
48+
appqoe-policy:
49+
operation-retry:
50+
onReset: 'YES'
51+
onTimeout: 33
52+
number-of-retries: 2
53+
appqoe-criteria: 'HTTP.REQ.HEADER("User-Agent").CONTAINS("Android")'
54+
direction: REQUEST
55+
```
56+
57+
After you have defined the policy configuration, deploy the `.yaml` file using the following commands:
58+
59+
$ kubectl create -f appqoe-example.yaml

0 commit comments

Comments
 (0)