Skip to content

Commit

Permalink
Merge pull request #23 from apoorva-05/master
Browse files Browse the repository at this point in the history
CNC_ROUTER_IMAGE env variable support
  • Loading branch information
subashd authored May 13, 2021
2 parents c19170a + 6a9aa83 commit 28a0c54
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
25 changes: 25 additions & 0 deletions deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Perform the following:
| CNI_TYPE | Mandatory | The CNI used in kubernetes cluster. Valid values: flannel,calico,canal,weave,cilium|
| DSR_IP_RANGE | Optional | This IP address range is used for DSR Iptable configuration on nodes. Both IP and subnet must be specified in format : "xx.xx.xx.xx/xx" |
| CLUSTER_NAME | Optional | Unique identifier for the kubernetes cluster on which CNC is deployed. If Provided CNC will configure PolicyBasedRoutes instead of static Routes. For details, see [CNC-PBR-SUPPORT](https://github.com/citrix/citrix-k8s-ingress-controller/tree/master/docs/how-to/pbr.md#configure-pbr-using-the-citrix-node-controller) |
| CNC_ROUTER_IMAGE | Optional | Specifies the internal repository image to be used for `kube-cnc-router` helper pods when Internet access is disabled on cluster nodes. For more details, see [running-cnc-without-internet-access](#running-citrix-node-controller-without-internet-access) |
1. After you have updated the Citrix k8s node controller deployment YAML file, deploy it using the following command:
Expand Down Expand Up @@ -88,3 +89,27 @@ On each of the worker nodes, a interface "cncvxlan<hash-of-namespace>" and iptab
1. Delete the Citrix node controller using the following command:
kubectl delete -f citrix-k8s-node-controller.yaml
## Running Citrix Node Controller without Internet access
Citrix node controller internally creates helper pods (`kube-cnc-router` pods) on each Kubernetes cluster node. The image used by default is `quay.io/citrix/cnc-router:1.1.0` which requires Internet access. If the Kubernetes nodes do not have internet access, creation of `kube-cnc-router` pods fails.
However, Citrix provides a way to access the image from your internal repository so that you can run the Citrix node controller without internet access. Using the `CNC_ROUTER_IMAGE` environment variable, you can point to the internal repository image of `quay.io/citrix/cnc-router:1.1.0`.
### Configuring Citrix node controller to use an image from the internal repository
When you deploy Citrix node controller specify the ` CNC_ROUTER_IMAGE` environment variable and set the value of the variable as your internal repository path for the image `quay.io/citrix/cnc-router:1.1.0`.
When you specify this environment variable, Citrix node controller uses the internal repository image provided via the `CNC_ROUTER_IMAGE` environment variable to create the `kube-cnc-router` helper pods. If the environment variable is not provided, it uses the default image ` quay.io/citrix/cnc-router:1.1.0` which requires internet access.
Following example shows how to specify the `CNC_ROUTER_IMAGE` environment variable while deploying Citrix node controller.
- While deploying Citrix node controller using the YAML file, set the value of the environment variable in the YAML file as follows:
- name: CNC_ROUTER_IMAGE
value: "docker.xyz.com/adc/citrix/cnc-router:1.1.0"
- While deploying Citrix node controller using Helm charts, provide the following in values.yaml:
cncRouterImage: "docker.xyz.com/adc/citrix/cnc-router:1.1.0"
2 changes: 1 addition & 1 deletion deploy/citrix-k8s-node-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ spec:
serviceAccountName: citrix-node-controller
containers:
- name: citrix-node-controller
image: "quay.io/citrix/citrix-k8s-node-controller:2.2.3"
image: "quay.io/citrix/citrix-k8s-node-controller:2.2.4"
imagePullPolicy: Always
env:
- name: NS_IP
Expand Down

0 comments on commit 28a0c54

Please sign in to comment.