Skip to content

Commit f1adeea

Browse files
authored
Merge pull request #473 from raviganapatp/examples
Examples update
2 parents 92328d7 + 7b1e7ce commit f1adeea

137 files changed

Lines changed: 6290 additions & 6036 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

canary/README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -802,22 +802,25 @@ Perform the following steps to deploy a sample application as a canary release.
802802
803803

804804
```yml
805-
apiVersion: extensions/v1beta1
805+
apiVersion: networking.k8s.io/v1
806806
kind: Ingress
807807
metadata:
808-
name: canary-by-weight
809808
annotations:
810-
kubernetes.io/ingress.class: "citrix"
811809
ingress.citrix.com/canary-weight: "10"
810+
kubernetes.io/ingress.class: citrix
811+
name: canary-by-weight
812812
spec:
813813
rules:
814-
- host: webapp.com
814+
- host: webapp.com
815815
http:
816816
paths:
817-
- path: /
818-
backend:
819-
serviceName: guestbook-canary
820-
servicePort: 80
817+
- backend:
818+
service:
819+
name: guestbook-canary
820+
port:
821+
number: 80
822+
path: /
823+
pathType: Prefix
821824
```
822825

823826
Here, the annotation `ingress.citrix.com/canary-weight: “10”` is the annotation for the weight based canary. This annotation specifies the Citrix ingress controller to configure the Citrix ADC in such a way that 10 percent of the total requests destined to `webapp.com` is sent to the `guestbook-canary` service. This is the service for the canary version of the `Guestbook` application.

canary/manifest/baseline.yaml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,34 @@
1-
apiVersion: extensions/v1beta1
1+
apiVersion: apps/v1
22
kind: Deployment
33
metadata:
4-
name: fronthotdrinksapp-baseline-deployment
54
labels:
6-
name: fronthotdrinksapp
5+
name: fronthotdrinksapp
6+
name: fronthotdrinksapp-baseline-deployment
77
namespace: default
88
spec:
99
replicas: 4
10+
selector:
11+
matchLabels:
12+
dep: cddep
13+
name: fronthotdrinksapp
14+
version: prod_version
1015
strategy:
11-
type: RollingUpdate
1216
rollingUpdate:
1317
maxSurge: 10
1418
maxUnavailable: 10
19+
type: RollingUpdate
1520
template:
1621
metadata:
1722
labels:
18-
name: fronthotdrinksapp
1923
dep: cddep
20-
version: "prod_version"
24+
name: fronthotdrinksapp
25+
version: prod_version
2126
spec:
2227
containers:
23-
- name: fronthotdrinksapp
24-
image: "quay.io/sample-apps/fronthotdrinksapp:v1"
28+
- image: quay.io/sample-apps/fronthotdrinksapp:v1
2529
imagePullPolicy: Always
30+
name: fronthotdrinksapp
2631
ports:
27-
- name: port-8080
28-
containerPort: 8080
32+
- containerPort: 8080
33+
name: port-8080
34+
protocol: TCP
Lines changed: 18 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,26 @@
1-
apiVersion: apiextensions.k8s.io/v1beta1
2-
kind: CustomResourceDefinition
1+
apiVersion: apiextensions.k8s.io/v1
2+
kind: CustomResourceDefinition
33
metadata:
44
# name must match the spec fields below, and be in the form: <plural>.<group>
55
name: continuousdeployments.citrix.com
66
spec:
7-
# group name to use for REST API: /apis/<group>/<version>
87
group: citrix.com
9-
# list of versions supported by this CustomResourceDefinition
10-
version: v1
11-
# - name: v1
12-
# Each version can be enabled/disabled by Served flag.
13-
# served: true
14-
# One and only one version must be marked as the storage version.
15-
#storage: true
16-
# either Namespaced or Cluster
17-
scope: Namespaced
188
names:
19-
# plural name to be used in the URL: /apis/<group>/<version>/<plural>
9+
kind: continuousdeployment
2010
plural: continuousdeployments
21-
# singular name to be used as an alias on the CLI and for display
2211
singular: continuousdeployment
23-
# kind is normally the CamelCased singular type. Your resource manifests use this.
24-
kind: continuousdeployment
25-
# shortNames allow shorter string to match your resource on the CLI
26-
shortNames:
27-
- crd
28-
29-
validation:
30-
# openAPIV3Schema is the schema for validating custom objects.
31-
openAPIV3Schema:
32-
properties:
33-
spec:
34-
properties:
35-
cronSpec:
36-
type: integer
12+
scope: Namespaced
13+
versions:
14+
- name: v1
15+
served: true
16+
storage: true
17+
schema:
18+
openAPIV3Schema:
19+
type: object
20+
properties:
21+
spec:
22+
type: object
23+
x-kubernetes-preserve-unknown-fields: true
24+
properties:
25+
cronSpec:
26+
type: integer

canary/manifest/canary.yaml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,33 @@
1-
apiVersion: extensions/v1beta1
1+
apiVersion: apps/v1
22
kind: Deployment
33
metadata:
4-
name: fronthotdrinksapp-canary-deployment
54
labels:
6-
name: fronthotdrinksapp
5+
name: fronthotdrinksapp
6+
name: fronthotdrinksapp-canary-deployment
77
namespace: default
88
spec:
99
replicas: 4
10+
selector:
11+
matchLabels:
12+
dep: cddep
13+
name: fronthotdrinksapp
14+
version: canary_version
1015
strategy:
11-
type: RollingUpdate
1216
rollingUpdate:
1317
maxSurge: 10
1418
maxUnavailable: 10
19+
type: RollingUpdate
1520
template:
1621
metadata:
1722
labels:
18-
name: fronthotdrinksapp
1923
dep: cddep
20-
version: "canary_version"
24+
name: fronthotdrinksapp
25+
version: canary_version
2126
spec:
2227
containers:
23-
- name: fronthotdrinksapp
24-
image: "quay.io/sample-apps/fronthotdrinksapp:v2"
28+
- image: quay.io/sample-apps/fronthotdrinksapp:v2
2529
imagePullPolicy: Always
30+
name: fronthotdrinksapp
2631
ports:
27-
- name: port-8080
28-
containerPort: 8080
32+
- containerPort: 8080
33+
name: port-8080

canary/manifest/cpx-exporter.yaml

Lines changed: 48 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,66 @@
1-
apiVersion: extensions/v1beta1
1+
apiVersion: apps/v1
22
kind: Deployment
33
metadata:
4-
name: cpx-ingress
54
labels:
65
name: cpx-ingress
6+
name: cpx-ingress
77
spec:
88
replicas: 1
99
selector:
1010
matchLabels:
1111
name: cpx-ingress
1212
template:
1313
metadata:
14-
labels:
15-
name: cpx-ingress
1614
annotations:
1715
NETSCALER_AS_APP: "True"
16+
labels:
17+
name: cpx-ingress
1818
spec:
19-
serviceAccountName: cpx
19+
serviceAccountName: cpx
2020
containers:
21-
- name: exporter
22-
image: "quay.io/citrix/citrix-adc-metrics-exporter:1.4.8"
23-
args:
24-
- "--target-nsip=127.0.0.1"
25-
- "--port=8888"
26-
- "--secure=no"
27-
env:
28-
- name: "NS_USER"
29-
value: "nsroot"
30-
- name: "NS_PASSWORD"
31-
value: "nsroot"
32-
securityContext:
33-
readOnlyRootFilesystem: true
34-
imagePullPolicy: Always
35-
- name: cpx-ingress
36-
image: "quay.io/citrix/citrix-k8s-cpx-ingress:13.0-47.103"
37-
securityContext:
38-
privileged: true
39-
env:
40-
- name: "EULA"
41-
value: "YES"
42-
- name: "KUBERNETES_TASK_ID"
43-
value: ""
44-
ports:
45-
- name: http
46-
containerPort: 80
47-
- name: https
48-
containerPort: 443
49-
- name: nitro-http
50-
containerPort: 9080
51-
- name: nitro-https
52-
containerPort: 9443
53-
54-
#This is required for Health check to succeed
55-
readinessProbe:
56-
failureThreshold: 3
57-
httpGet:
58-
path: /
59-
port: 9080
60-
scheme: HTTP
61-
initialDelaySeconds: 60
62-
periodSeconds: 10
63-
successThreshold: 1
64-
timeoutSeconds: 1
65-
imagePullPolicy: Always
21+
- args:
22+
- --target-nsip=127.0.0.1
23+
- --port=8888
24+
- --secure=no
25+
env:
26+
- name: NS_USER
27+
value: nsroot
28+
- name: NS_PASSWORD
29+
value: nsroot
30+
image: quay.io/citrix/citrix-adc-metrics-exporter:1.4.8
31+
imagePullPolicy: Always
32+
name: exporter
33+
securityContext:
34+
readOnlyRootFilesystem: true
35+
- env:
36+
- name: EULA
37+
value: "YES"
38+
- name: KUBERNETES_TASK_ID
39+
image: quay.io/citrix/citrix-k8s-cpx-ingress:13.0-47.103
40+
imagePullPolicy: Always
41+
name: cpx-ingress
42+
ports:
43+
- containerPort: 80
44+
name: http
45+
protocol: TCP
46+
- containerPort: 443
47+
name: https
48+
protocol: TCP
49+
- containerPort: 9080
50+
name: nitro-http
51+
protocol: TCP
52+
- containerPort: 9443
53+
name: nitro-https
54+
protocol: TCP
55+
#This is required for Health check to succeed
56+
readinessProbe:
57+
failureThreshold: 3
58+
httpGet:
59+
path: /
60+
port: 9080
61+
scheme: HTTP
62+
securityContext:
63+
privileged: true
6664
---
6765
kind: Service
6866
apiVersion: v1

0 commit comments

Comments
 (0)