Skip to content

Commit 22be6bc

Browse files
committed
fixed the yaml format issues ipam
1 parent 13aac48 commit 22be6bc

File tree

1 file changed

+93
-95
lines changed

1 file changed

+93
-95
lines changed

docs/configure/ipam-for-ingress.md

Lines changed: 93 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -39,53 +39,54 @@ Perform the following steps to deploy the Citrix ingress controller with the IPA
3939

4040
- Specify the IPAM controller as an argument using the following:
4141

42-
args:
43-
- --ipam
44-
citrix-ipam-controller
45-
46-
Here is a snippet of a sample Citrix ingress controller YAML file with the IPAM controller argument:
47-
48-
**Note:** This YAML is for demonstration purpose only and not the full version. Always, use the latest version of the YAML and edit as per your requirements. For the latest version see the [citrix-k8s-ingress-controller.yaml](https://github.com/citrix/citrix-k8s-ingress-controller/blob/master/deployment/baremetal/citrix-k8s-ingress-controller.yaml) file.
49-
50-
```yml
51-
apiVersion: v1
52-
kind: Pod
53-
metadata:
54-
name: cic-k8s-ingress-controller
55-
spec:
56-
serviceAccountName: cic-k8s-role
57-
containers:
58-
- name: cic-k8s-ingress-controller
59-
image: "quay.io/citrix/citrix-k8s-ingress-controller:1.14.17"
60-
env:
61-
- name: "NS_IP"
62-
value: "x.x.x.x"
63-
- name: "NS_USER"
64-
valueFrom:
65-
secretKeyRef:
66-
name: nslogin
67-
key: username
68-
- name: "NS_PASSWORD"
69-
valueFrom:
70-
secretKeyRef:
71-
name: nslogin
72-
key: password
73-
- name: "EULA"
74-
value: "yes"
75-
- name: POD_NAME
76-
valueFrom:
77-
fieldRef:
78-
apiVersion: v1
79-
fieldPath: metadata.name
80-
- name: POD_NAMESPACE
81-
valueFrom:
82-
fieldRef:
83-
apiVersion: v1
84-
fieldPath: metadata.namespace
85-
args:
86-
- --ipam citrix-ipam-controller
87-
imagePullPolicy: Always
88-
```
42+
args:
43+
- --ipam
44+
citrix-ipam-controller
45+
46+
Here is a snippet of a sample Citrix ingress controller YAML file with the IPAM controller argument:
47+
48+
**Note:** This YAML is for demonstration purpose only and not the full version. Always, use the latest version of the YAML and edit as per your requirements. For the latest version see the [citrix-k8s-ingress-controller.yaml](https://github.com/citrix/citrix-k8s-ingress-controller/blob/master/deployment/baremetal/citrix-k8s-ingress-controller.yaml) file.
49+
50+
51+
52+
apiVersion: v1
53+
kind: Pod
54+
metadata:
55+
name: cic-k8s-ingress-controller
56+
spec:
57+
serviceAccountName: cic-k8s-role
58+
containers:
59+
- name: cic-k8s-ingress-controller
60+
image: "quay.io/citrix/citrix-k8s-ingress-controller:1.14.17"
61+
env:
62+
- name: "NS_IP"
63+
value: "x.x.x.x"
64+
- name: "NS_USER"
65+
valueFrom:
66+
secretKeyRef:
67+
name: nslogin
68+
key: username
69+
- name: "NS_PASSWORD"
70+
valueFrom:
71+
secretKeyRef:
72+
name: nslogin
73+
key: password
74+
- name: "EULA"
75+
value: "yes"
76+
- name: POD_NAME
77+
valueFrom:
78+
fieldRef:
79+
apiVersion: v1
80+
fieldPath: metadata.name
81+
- name: POD_NAMESPACE
82+
valueFrom:
83+
fieldRef:
84+
apiVersion: v1
85+
fieldPath: metadata.namespace
86+
args:
87+
- --ipam citrix-ipam-controller
88+
imagePullPolicy: Always
89+
8990

9091
3. Deploy the Citrix ingress controller using the edited YAML file with the following command:
9192

@@ -99,36 +100,35 @@ Perform the following steps to deploy the Citrix ingress controller with the IPA
99100

100101
1. Create a file named `citrix-ipam-controller.yaml` with the following configuration:
101102

102-
```yml
103-
104-
apiVersion: apps/v1
105-
kind: Deployment
106-
metadata:
107-
name: citrix-ipam-controller
108-
namespace: kube-system
109-
spec:
110-
replicas: 1
111-
selector:
112-
matchLabels:
113-
app: citrix-ipam-controller
114-
template:
115-
metadata:
116-
labels:
103+
104+
apiVersion: apps/v1
105+
kind: Deployment
106+
metadata:
107+
name: citrix-ipam-controller
108+
namespace: kube-system
109+
spec:
110+
replicas: 1
111+
selector:
112+
matchLabels:
117113
app: citrix-ipam-controller
118-
spec:
119-
serviceAccountName: citrix-ipam-controller
120-
containers:
121-
- name: citrix-ipam-controller
122-
image: quay.io/citrix/citrix-ipam-controller:1.0.3
123-
env:
124-
# This IPAM controller takes envirnment variable VIP_RANGE. IPs in this range are used to assign values for IP range
125-
- name: "VIP_RANGE"
126-
value: '[["10.217.6.115-10.217.6.117"], {"one-ip": ["5.5.5.5"]}, {"two-ip": ["6.6.6.6", "7.7.7.7"]}]'
127-
# The IPAM controller can also be configured with name spaces for which it would work through the environment variable
128-
# VIP_NAMESPACES, This expects a set of namespaces passed as space separated string
129-
imagePullPolicy: Always
114+
template:
115+
metadata:
116+
labels:
117+
app: citrix-ipam-controller
118+
spec:
119+
serviceAccountName: citrix-ipam-controller
120+
containers:
121+
- name: citrix-ipam-controller
122+
image: quay.io/citrix/citrix-ipam-controller:1.0.3
123+
env:
124+
# This IPAM controller takes envirnment variable VIP_RANGE. IPs in this range are used to assign values for IP range
125+
- name: "VIP_RANGE"
126+
value: '[["10.217.6.115-10.217.6.117"], {"one-ip": ["5.5.5.5"]}, {"two-ip": ["6.6.6.6", "7.7.7.7"]}]'
127+
# The IPAM controller can also be configured with name spaces for which it would work through the environment variable
128+
# VIP_NAMESPACES, This expects a set of namespaces passed as space separated string
129+
imagePullPolicy: Always
130130
131-
```
131+
132132
The manifest contains two environment variables, `VIP_RANGE` and `VIP_NAMESPACES`. You can specify the appropriate routable IP range with a valid CIDR under the `VIP_RANGE`. If necessary, you can also specify a set of namespaces under `VIP_NAMESPACES` so that the IPAM controller allocates addresses only for services or Ingress resources from specific namespaces.
133133

134134
2. Deploy the IPAM controller using the following command:
@@ -147,27 +147,25 @@ Perform the following steps to deploy a sample application and Ingress resource.
147147

148148
The following is a sample YAML:
149149

150-
```yml
151-
152-
apiVersion: networking.k8s.io/v1
153-
kind: Ingress
154-
metadata:
155-
name: guestbook-ingress
150+
151+
apiVersion: networking.k8s.io/v1
152+
kind: Ingress
153+
metadata:
154+
name: guestbook-ingress
155+
annotations:
156156
annotations:
157-
annotations:
158-
ingress.citrix.com/ipam-range: "two-ip"
159-
#ingress.citrix.com/frontend-ip: "5.5.5.5"
160-
kubernetes.io/ingress.class: "cic-vpx"
161-
spec:
162-
rules:
163-
- host: www.guestbook.com
164-
http:
165-
paths:
166-
- path: /
167-
backend:
168-
serviceName: frontend
169-
servicePort: 80
170-
```
157+
ingress.citrix.com/ipam-range: "two-ip"
158+
#ingress.citrix.com/frontend-ip: "5.5.5.5"
159+
kubernetes.io/ingress.class: "cic-vpx"
160+
spec:
161+
rules:
162+
- host: www.guestbook.com
163+
http:
164+
paths:
165+
- path: /
166+
backend:
167+
serviceName: frontend
168+
servicePort: 80
171169

172170
3. Deploy the Ingress resource.
173171

0 commit comments

Comments
 (0)