-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
772 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,170 @@ | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
metadata: | ||
name: cpx-ingress-k8s-role | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["endpoints", "ingresses", "pods", "secrets", "nodes", "routes", "namespaces", "configmaps"] | ||
verbs: ["get", "list", "watch"] | ||
# services/status is needed to update the loadbalancer IP in service status for integrating | ||
# service of type LoadBalancer with external-dns | ||
- apiGroups: [""] | ||
resources: ["services/status"] | ||
verbs: ["patch"] | ||
- apiGroups: [""] | ||
resources: ["services"] | ||
verbs: ["get", "list", "watch", "patch"] | ||
- apiGroups: [""] | ||
resources: ["events"] | ||
verbs: ["create"] | ||
- apiGroups: ["extensions", "networking.k8s.io"] | ||
resources: ["ingresses"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: ["extensions", "networking.k8s.io"] | ||
resources: ["ingresses/status"] | ||
verbs: ["patch"] | ||
- apiGroups: ["apiextensions.k8s.io"] | ||
resources: ["customresourcedefinitions"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: ["apps"] | ||
resources: ["deployments"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: ["citrix.com"] | ||
resources: ["rewritepolicies", "authpolicies", "ratelimits", "listeners", "httproutes", "continuousdeployments", "apigatewaypolicies", "wafs", "bots"] | ||
verbs: ["get", "list", "watch", "create", "delete", "patch"] | ||
- apiGroups: ["citrix.com"] | ||
resources: ["rewritepolicies/status", "continuousdeployments/status", "authpolicies/status", "ratelimits/status", "listeners/status", "httproutes/status", "wafs/status", "apigatewaypolicies/status", "bots/status"] | ||
verbs: ["get", "list", "patch"] | ||
- apiGroups: ["citrix.com"] | ||
resources: ["vips"] | ||
verbs: ["get", "list", "watch", "create", "delete"] | ||
- apiGroups: ["route.openshift.io"] | ||
resources: ["routes"] | ||
verbs: ["get", "list", "watch"] | ||
|
||
--- | ||
|
||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
metadata: | ||
name: cpx-ingress-k8s-role | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: cpx-ingress-k8s-role | ||
subjects: | ||
- kind: ServiceAccount | ||
name: cpx-ingress-k8s-role | ||
namespace: default | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
|
||
--- | ||
|
||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: cpx-ingress-k8s-role | ||
namespace: default | ||
|
||
--- | ||
|
||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: citrix101-lab04-demo01-cpx-ingress | ||
labels: | ||
name: citrix101-lab04-demo01-cpx-ingress | ||
app: citrix101-lab04-demo01-cpx-ingress | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: citrix101-lab04-demo01-cpx-ingress | ||
replicas: 1 | ||
template: | ||
metadata: | ||
name: citrix101-lab04-demo01-cpx-ingress | ||
labels: | ||
app: citrix101-lab04-demo01-cpx-ingress | ||
annotations: null | ||
spec: | ||
serviceAccountName: cpx-ingress-k8s-role | ||
containers: | ||
- name: citrix101-lab04-demo01-cpx-ingress | ||
image: quay.io/citrix/citrix-k8s-cpx-ingress:13.0-71.40 | ||
securityContext: | ||
privileged: true | ||
env: | ||
- name: "EULA" | ||
value: "yes" | ||
- name: "KUBERNETES_TASK_ID" | ||
value: "" | ||
imagePullPolicy: Always | ||
volumeMounts: | ||
- mountPath: /var/deviceinfo | ||
name: shared-data | ||
- mountPath: /cpx/conf/ | ||
name: cpx-volume1 | ||
- mountPath: /cpx/crash/ | ||
name: cpx-volume2 | ||
# Add cic as a sidecar | ||
- name: citrix101-lab04-demo01-cic | ||
image: quay.io/citrix/citrix-k8s-ingress-controller:1.12.2 | ||
volumeMounts: | ||
- mountPath: /var/deviceinfo | ||
name: shared-data | ||
args: | ||
- --ingress-classes | ||
cpx | ||
env: | ||
- name: "EULA" | ||
value: "yes" | ||
- name: "NS_IP" | ||
value: "127.0.0.1" | ||
- name: "NS_PROTOCOL" | ||
value: "HTTP" | ||
- name: "NS_PORT" | ||
value: "80" | ||
- name: "NS_DEPLOYMENT_MODE" | ||
value: "SIDECAR" | ||
- name: "NS_ENABLE_MONITORING" | ||
value: "YES" | ||
- name: "LOGLEVEL" | ||
value: "INFO" | ||
- name: POD_NAME | ||
valueFrom: | ||
fieldRef: | ||
apiVersion: v1 | ||
fieldPath: metadata.name | ||
- name: POD_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
apiVersion: v1 | ||
fieldPath: metadata.namespace | ||
imagePullPolicy: Always | ||
volumes: | ||
- name: shared-data | ||
emptyDir: {} | ||
- name: cpx-volume1 | ||
emptyDir: {} | ||
- name: cpx-volume2 | ||
emptyDir: {} | ||
|
||
--- | ||
|
||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: citrix101-lab04-demo01-cpx-service | ||
labels: | ||
app: citrix101-lab04-demo01-cpx-service | ||
spec: | ||
type: NodePort | ||
ports: | ||
- port: 80 | ||
protocol: TCP | ||
name: http | ||
- port: 443 | ||
protocol: TCP | ||
name: https | ||
selector: | ||
app: citrix101-lab04-demo01-cpx-ingress |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
118 changes: 118 additions & 0 deletions
118
citrix101-lab03-demo05-cic-k8s-ingress-controller-vpx.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: cic-k8s-role | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["endpoints", "ingresses", "pods", "secrets", "nodes", "routes", "namespaces", "configmaps"] | ||
verbs: ["get", "list", "watch"] | ||
# services/status is needed to update the loadbalancer IP in service status for integrating | ||
# service of type LoadBalancer with external-dns | ||
- apiGroups: [""] | ||
resources: ["services/status"] | ||
verbs: ["patch"] | ||
- apiGroups: [""] | ||
resources: ["services"] | ||
verbs: ["get", "list", "watch", "patch"] | ||
- apiGroups: [""] | ||
resources: ["events"] | ||
verbs: ["create"] | ||
- apiGroups: ["extensions", "networking.k8s.io"] | ||
resources: ["ingresses"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: ["extensions", "networking.k8s.io"] | ||
resources: ["ingresses/status"] | ||
verbs: ["patch"] | ||
- apiGroups: ["apiextensions.k8s.io"] | ||
resources: ["customresourcedefinitions"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: ["apps"] | ||
resources: ["deployments"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: ["citrix.com"] | ||
resources: ["rewritepolicies", "authpolicies", "ratelimits", "listeners", "httproutes", "continuousdeployments", "apigatewaypolicies", "wafs", "bots"] | ||
verbs: ["get", "list", "watch", "create", "delete", "patch"] | ||
- apiGroups: ["citrix.com"] | ||
resources: ["rewritepolicies/status", "continuousdeployments/status", "authpolicies/status", "ratelimits/status", "listeners/status", "httproutes/status", "wafs/status", "apigatewaypolicies/status", "bots/status"] | ||
verbs: ["get", "list", "patch"] | ||
- apiGroups: ["citrix.com"] | ||
resources: ["vips"] | ||
verbs: ["get", "list", "watch", "create", "delete"] | ||
- apiGroups: ["route.openshift.io"] | ||
resources: ["routes"] | ||
verbs: ["get", "list", "watch"] | ||
|
||
--- | ||
|
||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: cic-k8s-role | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: cic-k8s-role | ||
subjects: | ||
- kind: ServiceAccount | ||
name: cic-k8s-role | ||
namespace: default | ||
|
||
--- | ||
|
||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: cic-k8s-role | ||
namespace: default | ||
|
||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: cic-k8s-ingress-controller-vpx | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: cic-k8s-ingress-controller-vpx | ||
replicas: 1 | ||
template: | ||
metadata: | ||
name: cic-k8s-ingress-controller-vpx | ||
labels: | ||
app: cic-k8s-ingress-controller-vpx | ||
annotations: | ||
spec: | ||
serviceAccountName: cic-k8s-role | ||
containers: | ||
- name: cic-k8s-ingress-controller-vpx | ||
image: "quay.io/citrix/citrix-k8s-ingress-controller:1.12.2" | ||
env: | ||
# Set NetScaler NSIP/SNIP, SNIP in case of HA (mgmt has to be enabled) | ||
- name: "NS_IP" | ||
value: "192.168.204.202" | ||
# Set username for Nitro | ||
- name: "NS_USER" | ||
valueFrom: | ||
secretKeyRef: | ||
name: nslogin | ||
key: username | ||
- name: "LOGLEVEL" | ||
value: "INFO" | ||
# Set user password for Nitro | ||
- name: "NS_PASSWORD" | ||
valueFrom: | ||
secretKeyRef: | ||
name: nslogin | ||
key: password | ||
# Set log level | ||
- name: "EULA" | ||
value: "yes" | ||
# Set Prefix of LB and CS configuration on VPX | ||
- name: "NS_APPS_NAME_PREFIX" | ||
value: "stu01" | ||
args: | ||
- --ingress-classes | ||
citrix-cic-vpx | ||
- --feature-node-watch | ||
false | ||
imagePullPolicy: Always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.