Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TT-10659 feat: Allow disabling scratch volume #108

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion components/tyk-gateway/templates/deployment-gw-repset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ spec:
{{- with .Values.gateway.imagePullSecrets }}
imagePullSecrets: {{ toYaml . | nindent 8 }}
{{- end }}
{{- if not .Values.gateway.disableInitContainer }}
initContainers:
- name: "setup-directories"
image: busybox:1.32
Expand All @@ -64,6 +65,7 @@ spec:
volumeMounts:
- name: tyk-scratch
mountPath: /mnt/tyk-gateway
{{- end }}
containers:
- name: gateway-{{ .Chart.Name }}
image: "{{ .Values.gateway.image.repository }}:{{ .Values.gateway.image.tag }}"
Expand Down Expand Up @@ -135,12 +137,19 @@ spec:
value: "/opt/tyk-gateway/templates"
- name: TYK_GW_TYKJSPATH
value: "/opt/tyk-gateway/js/tyk.js"
{{- if not .Values.gateway.disableInitContainer }}
- name: TYK_GW_MIDDLEWAREPATH
value: "/mnt/tyk-gateway/middleware"
- name: TYK_GW_APPPATH
value: "/mnt/tyk-gateway/apps"
- name: TYK_GW_POLICIES_POLICYPATH
value: "/mnt/tyk-gateway/policies"
{{- else}}
jakub-bochenski marked this conversation as resolved.
Show resolved Hide resolved
- name: TYK_GW_MIDDLEWAREPATH
value: "/opt/tyk-gateway/middleware"
- name: TYK_GW_APPPATH
value: "/opt/tyk-gateway/apps"
{{- end}}
jakub-bochenski marked this conversation as resolved.
Show resolved Hide resolved
- name: TYK_GW_STORAGE_MAXIDLE
value: "1000"
- name: TYK_GW_OPTIMISATIONSUSEASYNCSESSIONWRITE
Expand Down Expand Up @@ -202,7 +211,11 @@ spec:
{{- if .Values.global.remoteControlPlane.enabled }}
value: "tyk_policies"
{{- else}}
{{- if not .Values.gateway.disableInitContainer }}
value: "/mnt/tyk-gateway/policies/policies.json"
{{- else}}
value: "/opt/tyk-gateway/policies/policies.json"
{{- end}}
{{- end}}
- name: TYK_GW_HASHKEYS
value: "true"
Expand All @@ -226,7 +239,6 @@ spec:
value: "true"
- name: TYK_GW_PIDFILELOCATION
value: "/mnt/tyk-gateway/tyk.pid"

- name: TYK_GW_DBAPPCONFOPTIONS_CONNECTIONSTRING
value: "{{ include "tyk-gateway.dash_proto" . }}://dashboard-svc-{{ .Release.Name }}-tyk-dashboard.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.global.servicePorts.dashboard}}"
- name: TYK_GW_POLICIES_POLICYCONNECTIONSTRING
Expand Down
5 changes: 5 additions & 0 deletions components/tyk-gateway/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,11 @@ gateway:
# The port which will be exposed on the container for tyk-gateway
containerPort: 8080

# By default, APIs, policies, and middleware are stored on a volume mount,
jakub-bochenski marked this conversation as resolved.
Show resolved Hide resolved
# enable to instead store them in the container's filesystem
# (policies will be stored in a single json file)
disableInitContainer: false

service:
# type of service
type: NodePort
Expand Down
5 changes: 5 additions & 0 deletions tyk-mdcb-data-plane/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@ tyk-gateway:
# The port which will be exposed on the container for tyk-gateway
containerPort: 8080

# By default, APIs, policies, and middleware are stored on a volume mount,
# set to true to instead store them in the container's filesystem
# (policies will be stored in a single json file)
disableInitContainer: false

service:
# type of service
type: NodePort
Expand Down
5 changes: 5 additions & 0 deletions tyk-oss/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ tyk-gateway:
# The port which will be exposed on the container for tyk-gateway
containerPort: 8080

# By default, APIs, policies, and middleware are stored on a volume mount,
# set to true to instead store them in the container's filesystem
# (policies will be stored in a single json file)
disableInitContainer: false

service:
# type of service
type: NodePort
Expand Down
5 changes: 5 additions & 0 deletions tyk-single-dc/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,11 @@ tyk-gateway:
# The port which will be exposed on the container for tyk-gateway
containerPort: 8080

# By default, APIs, policies, and middleware are stored on a volume mount,
# set to true to instead store them in the container's filesystem
# (policies will be stored in a single json file)
disableInitContainer: false

service:
# type of service
type: NodePort
Expand Down
Loading