Skip to content

Commit 0d55921

Browse files
Merge pull request #22 from TykTechnologies/openshift-support
Added supporting config for openshift
2 parents c435384 + b0e45af commit 0d55921

4 files changed

Lines changed: 194 additions & 3 deletions

File tree

kubernetes/helm-hybrid/README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ kubectl get pods -n tyk-dp -w
164164

165165
### 6. Access Services
166166

167-
There are three ways to access your Tyk Gateway, ordered from quickest to most production-ready:
167+
There are four ways to access your Tyk Gateway, ordered from quickest to most production-ready:
168168

169169
#### Option 1: LoadBalancer Service (Quickest for Cloud Deployments)
170170

@@ -395,6 +395,30 @@ ingress:
395395

396396
---
397397

398+
#### Option 4: OpenShift Routes (RedHat OpenShift)
399+
400+
OpenShift uses Routes rather than Ingress or LoadBalancer for external access. Routes are created using the `oc` CLI and are automatically assigned a hostname under your cluster's `*.apps` domain.
401+
402+
> **For local testing on OpenShift Local (CRC), port-forwarding (Option 2) is recommended** as it avoids DNS configuration.
403+
404+
**Expose the Gateway via a Route:**
405+
406+
```bash
407+
# Expose Gateway
408+
oc expose svc gateway-svc-tyk-dp-tyk-gateway -n tyk-dp --port=8080
409+
410+
# Get the assigned Route URL
411+
oc get routes -n tyk-dp
412+
```
413+
414+
The Gateway Route will be available at a URL such as:
415+
416+
```text
417+
http://gateway-svc-tyk-dp-tyk-gateway-tyk-dp.apps.<cluster-domain>
418+
```
419+
420+
---
421+
398422
### 7. Verify Data Plane Connection
399423

400424
```bash

kubernetes/helm-hybrid/values.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,25 @@ tyk-gateway:
205205
externalTrafficPolicy: Local
206206
# annotations: {}
207207

208+
# -------------------------------------------------------------------------
209+
# Required for deploying on RedHat OpenShift
210+
# -------------------------------------------------------------------------
211+
# securityContext:
212+
# runAsUser: null
213+
# fsGroup: null
214+
# runAsNonRoot: true
215+
# containerSecurityContext:
216+
# runAsNonRoot: true
217+
# runAsUser: null
218+
# allowPrivilegeEscalation: false
219+
# privileged: false
220+
# readOnlyRootFilesystem: true
221+
# seccompProfile:
222+
# type: RuntimeDefault
223+
# capabilities:
224+
# drop:
225+
# - ALL
226+
208227
# PUMP (Optional but recommended)
209228
tyk-pump:
210229
pump:
@@ -223,3 +242,22 @@ tyk-pump:
223242
enableAggregateAnalytics: false
224243

225244
purgeDelay: 2
245+
246+
# -------------------------------------------------------------------------
247+
# Required for deploying on RedHat OpenShift
248+
# -------------------------------------------------------------------------
249+
# securityContext:
250+
# runAsUser: null
251+
# fsGroup: null
252+
# runAsNonRoot: true
253+
# containerSecurityContext:
254+
# runAsNonRoot: true
255+
# runAsUser: null
256+
# allowPrivilegeEscalation: false
257+
# privileged: false
258+
# readOnlyRootFilesystem: true
259+
# seccompProfile:
260+
# type: RuntimeDefault
261+
# capabilities:
262+
# drop:
263+
# - ALL

kubernetes/helm-self-managed/README.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ helm install tyk-postgres bitnami/postgresql \
110110
--set primary.initdb.scripts."init\.sql"="CREATE DATABASE portal;" \
111111
--set primary.persistence.size=20Gi \
112112
--version 12.12.10
113+
# Required for installing on RedHat OpenShift - add the following flags:
114+
# --set primary.podSecurityContext.runAsUser=null \
115+
# --set primary.podSecurityContext.fsGroup=null \
116+
# --set primary.containerSecurityContext.runAsUser=null \
117+
# --set volumePermissions.enabled=false
113118

114119
# Install Redis
115120
helm install tyk-redis oci://registry-1.docker.io/bitnamicharts/redis \
@@ -123,6 +128,7 @@ kubectl wait --for=condition=ready pod -l app.kubernetes.io/name=postgresql -n t
123128
kubectl wait --for=condition=ready pod -l app.kubernetes.io/name=redis -n tyk
124129

125130
# Install cert-manager (required for Tyk Operator)
131+
# Cluster admin privileges required for installing on RedHat OpenShift
126132
helm install \
127133
cert-manager oci://quay.io/jetstack/charts/cert-manager \
128134
--version v1.17.4 \
@@ -164,7 +170,7 @@ kubectl get pods -n tyk -w
164170

165171
### 6. Access Services
166172

167-
There are three ways to access your Tyk services, ordered from quickest to most production-ready:
173+
There are four ways to access your Tyk services, ordered from quickest to most production-ready:
168174

169175
#### Option 1: LoadBalancer Service (Quickest for Cloud Deployments)
170176

@@ -483,6 +489,34 @@ tyk-dashboard:
483489

484490
---
485491

492+
#### Option 4: OpenShift Routes (RedHat OpenShift)
493+
494+
OpenShift uses Routes rather than Ingress or LoadBalancer for external access. Routes are created using the `oc` CLI and are automatically assigned a hostname under your cluster's `*.apps` domain.
495+
496+
> **For local testing on OpenShift Local (CRC), port-forwarding (Option 2) is recommended** as it avoids DNS configuration.
497+
498+
**Expose services via Routes:**
499+
500+
```bash
501+
# Expose Dashboard, Gateway, and Portal
502+
oc expose svc dashboard-svc-tyk-tyk-dashboard -n tyk --port=3000
503+
oc expose svc gateway-svc-tyk-tyk-gateway -n tyk --port=8080
504+
oc expose svc dev-portal-svc-tyk-tyk-dev-portal -n tyk --port=3001
505+
506+
# Get the assigned Route URLs
507+
oc get routes -n tyk
508+
```
509+
510+
Routes will be available at URLs such as:
511+
512+
```text
513+
http://dashboard-svc-tyk-tyk-dashboard-tyk.apps.<cluster-domain>
514+
http://gateway-svc-tyk-tyk-gateway-tyk.apps.<cluster-domain>
515+
http://dev-portal-svc-tyk-tyk-dev-portal-tyk.apps.<cluster-domain>
516+
```
517+
518+
---
519+
486520
### 7. Get Admin Credentials
487521

488522
```bash

kubernetes/helm-self-managed/values.yaml

Lines changed: 96 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ global:
3737
bootstrap: true
3838
pump: true
3939
devPortal: true
40-
operator: true
40+
operator: true # Cluster admin rights required to install Operator (installs CRDs)
4141

4242
servicePorts:
4343
dashboard: 3000
@@ -244,6 +244,25 @@ tyk-gateway:
244244
type: LoadBalancer
245245
externalTrafficPolicy: Local
246246

247+
# -------------------------------------------------------------------------
248+
# Required for deploying on RedHat OpenShift
249+
# -------------------------------------------------------------------------
250+
# securityContext:
251+
# runAsUser: null
252+
# fsGroup: null
253+
# runAsNonRoot: true
254+
# containerSecurityContext:
255+
# runAsNonRoot: true
256+
# runAsUser: null
257+
# allowPrivilegeEscalation: false
258+
# privileged: false
259+
# readOnlyRootFilesystem: true
260+
# seccompProfile:
261+
# type: RuntimeDefault
262+
# capabilities:
263+
# drop:
264+
# - ALL
265+
247266
# ============================================================================
248267
# DASHBOARD CONFIGURATION
249268
# ============================================================================
@@ -373,6 +392,25 @@ tyk-dashboard:
373392
# Cloud-specific annotations
374393
# annotations: {}
375394

395+
# -------------------------------------------------------------------------
396+
# Required for deploying on RedHat OpenShift
397+
# -------------------------------------------------------------------------
398+
# securityContext:
399+
# runAsUser: null
400+
# fsGroup: null
401+
# runAsNonRoot: true
402+
# containerSecurityContext:
403+
# runAsNonRoot: true
404+
# runAsUser: null
405+
# allowPrivilegeEscalation: false
406+
# privileged: false
407+
# readOnlyRootFilesystem: true
408+
# seccompProfile:
409+
# type: RuntimeDefault
410+
# capabilities:
411+
# drop:
412+
# - ALL
413+
376414
tib: # Enables SSO integration
377415
enabled: true
378416

@@ -408,6 +446,25 @@ tyk-pump:
408446
# - name: TYK_PMP_UPTIMEPUMPCONFIG_TABLESHARDING
409447
# value: "true" # PROD/PERFORMANCE: Enable table sharding
410448

449+
# -------------------------------------------------------------------------
450+
# Required for deploying on RedHat OpenShift
451+
# -------------------------------------------------------------------------
452+
# securityContext:
453+
# runAsUser: null
454+
# fsGroup: null
455+
# runAsNonRoot: true
456+
# containerSecurityContext:
457+
# runAsNonRoot: true
458+
# runAsUser: null
459+
# allowPrivilegeEscalation: false
460+
# privileged: false
461+
# readOnlyRootFilesystem: true
462+
# seccompProfile:
463+
# type: RuntimeDefault
464+
# capabilities:
465+
# drop:
466+
# - ALL
467+
411468
# ============================================================================
412469
# DEVELOPER PORTAL CONFIGURATION
413470
# ============================================================================
@@ -492,6 +549,25 @@ tyk-dev-portal:
492549
type: LoadBalancer
493550
port: 3001
494551

552+
# -------------------------------------------------------------------------
553+
# Required for deploying on RedHat OpenShift
554+
# -------------------------------------------------------------------------
555+
# securityContext:
556+
# runAsUser: null
557+
# fsGroup: null
558+
# runAsNonRoot: true
559+
# containerSecurityContext:
560+
# runAsNonRoot: true
561+
# runAsUser: null
562+
# allowPrivilegeEscalation: false
563+
# privileged: false
564+
# readOnlyRootFilesystem: true
565+
# seccompProfile:
566+
# type: RuntimeDefault
567+
# capabilities:
568+
# drop:
569+
# - ALL
570+
495571
# ============================================================================
496572
# BOOTSTRAP CONFIGURATION
497573
# ============================================================================
@@ -503,3 +579,22 @@ tyk-bootstrap:
503579

504580
org:
505581
name: "Install Organization"
582+
583+
# -------------------------------------------------------------------------
584+
# Required for deploying on RedHat OpenShift
585+
# -------------------------------------------------------------------------
586+
# securityContext:
587+
# runAsUser: null
588+
# fsGroup: null
589+
# runAsNonRoot: true
590+
# containerSecurityContext:
591+
# runAsNonRoot: true
592+
# runAsUser: null
593+
# allowPrivilegeEscalation: false
594+
# privileged: false
595+
# readOnlyRootFilesystem: true
596+
# seccompProfile:
597+
# type: RuntimeDefault
598+
# capabilities:
599+
# drop:
600+
# - ALL

0 commit comments

Comments
 (0)