Skip to content

Commit

Permalink
TT-12112 Add the value annotations to tyk-stack and component helm ch…
Browse files Browse the repository at this point in the history
…arts (#291)

* Add the value annotations to tyk-stack and component helm charts

To support an automated reloading of the gateway or other components
of the tyk stack a common approach is to utilize tools like reloader.
Currently the helm charts don't support any kind of annotations
on the deployment level.

* Bump Version of helm charts to 1.4.1

* Bump Version of helm chart tyk-dev-portal to 1.4.1

* Update Chart.lock for tyk-data-plane

* Rebase to main branch

* Remove test annotations for tyk developer portal

* Update Chart.lock in tyk-oss

* Bump versions to 1.4.1, fix ct pipeline

* revert changes for version change

* revert changes for Chart.lock
  • Loading branch information
mgnisia authored Jun 17, 2024
1 parent e2174ab commit 95a321d
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 2 deletions.
4 changes: 4 additions & 0 deletions components/tyk-dashboard/templates/deployment-dashboard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: dashboard-{{ include "tyk-dashboard.fullname" . }}
{{- if .Values.dashboard.annotations }}
annotations:
{{- toYaml .Values.dashboard.annotations | nindent 4 }}
{{- end }}
labels:
app: dashboard-{{ include "tyk-dashboard.fullname" . }}
chart: {{ include "tyk-dashboard.chart" . }}
Expand Down
3 changes: 3 additions & 0 deletions components/tyk-dashboard/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,9 @@ dashboard:
# replicaCount specifies number of replicas to be created if kind is Deployment.
replicaCount: 1

# annotations be added to the Deployment / Statefulset of Tyk Dashboard
annotations: {}

# podAnnotations is annotations to be added to Tyk Dashboard pod.
# It takes key-value pairs.
# There are no required annotation field for Tyk Dashboard.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ apiVersion: apps/v1
kind: {{ .Values.kind }}
metadata:
name: portal-{{ include "tyk-dev-portal.fullname" . }}
{{- if .Values.annotations }}
annotations:
{{- toYaml .Values.annotations | nindent 4 }}
{{- end }}
labels:
app: {{ include "tyk-dev-portal.fullname" . }}
chart: {{ include "tyk-dev-portal.chart" . }}
Expand Down
3 changes: 3 additions & 0 deletions components/tyk-dev-portal/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ image:
# image pull secrets to use when pulling images from repository
imagePullSecrets: []

# annotations be added to the Deployment / Statefulset of Tyk Developer Portal
annotations: {}

# podAnnotations specifies annotations to be added in Tyk Developer Portal Pod
podAnnotations: {}

Expand Down
4 changes: 4 additions & 0 deletions components/tyk-gateway/templates/deployment-gw-repset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ apiVersion: apps/v1
kind: {{ .Values.gateway.kind }}
metadata:
name: gateway-{{ include "tyk-gateway.fullname" . }}
{{- if .Values.gateway.annotations }}
annotations:
{{- toYaml .Values.gateway.annotations | nindent 4 }}
{{- end }}
labels:
app: gateway-{{ include "tyk-gateway.fullname" . }}
chart: {{ include "tyk-gateway.chart" . }}
Expand Down
3 changes: 3 additions & 0 deletions components/tyk-gateway/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ gateway:
# kind is type of k8s object to be created for gateway.
kind: Deployment

# annotations be added to the Deployment / Statefulset of Tyk Gateway
annotations: {}

# podAnnotations is annotations to be added to Tyk Gateway pod.
# It takes key-value pairs.
# There are no required annotation field for Tyk Gateway.
Expand Down
1 change: 0 additions & 1 deletion components/tyk-mdcb/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ icon: https://tyk.io/wp-content/uploads/2023/11/Tyk-helm-icon-02.png
home: https://tyk.io/
sources:
- https://github.com/TykTechnologies/tyk-charts/tree/main/components/tyk-mdcb

annotations:
artifacthub.io/category: networking
artifacthub.io/links: |
Expand Down
4 changes: 4 additions & 0 deletions components/tyk-mdcb/templates/deployment-mdcb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: mdcb-{{ include "tyk-mdcb.fullname" . }}
{{- if .Values.mdcb.annotations }}
annotations:
{{- toYaml .Values.mdcb.annotations | nindent 4 }}
{{- end }}
labels:
{{- include "tyk-mdcb.labels" . | nindent 4 }}
spec:
Expand Down
3 changes: 3 additions & 0 deletions components/tyk-mdcb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,9 @@ mdcb:
# image pull secrets to use when pulling images from repository
imagePullSecrets: []

# annotations be added to the Deployment / Statefulset of MDCB
annotations: {}

# podAnnotations specifies annotations to be added in MDCB Pod
podAnnotations: {}
# podLabels specifies labels to be added in MDCB Pod
Expand Down
4 changes: 4 additions & 0 deletions components/tyk-pump/templates/deployment-pmp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: pump-{{ include "tyk-pump.fullname" . }}
{{- if .Values.pump.annotations }}
annotations:
{{- toYaml .Values.pump.annotations | nindent 4 }}
{{- end }}
labels:
app: pump-{{ include "tyk-pump.fullname" . }}
chart: {{ include "tyk-pump.chart" . }}
Expand Down
3 changes: 3 additions & 0 deletions components/tyk-pump/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ pump:
# number for replicas for pump deployment
replicaCount: 1

# annotations be added to the Deployment of Tyk Pump
annotations: {}

# podAnnotations is annotations to be added to Tyk Pump pod.
# It takes key-value pairs.
# There are no required annotation field for Tyk Pump.
Expand Down
2 changes: 1 addition & 1 deletion ct.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ chart-dirs:
target-branch: master
helm-extra-args: --timeout 8m
check-version-increment: false
validate-maintainers: false
validate-maintainers: false
11 changes: 11 additions & 0 deletions tyk-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@ tyk-gateway:
# It is used to set TYK_GW_POLICIES_POLICYCONNECTIONSTRING
policyConnectionString: ""


# annotations be added to the Deployment of Tyk Gateway
annotations: {}
# podAnnotations is annotations to be added to Tyk Gateway pod.
# It takes key-value pairs.
# There are no required annotation field for Tyk Gateway.
Expand Down Expand Up @@ -632,6 +635,9 @@ tyk-pump:
# number for replicas for pump deployment
replicaCount: 1

# annotations be added to the Deployment of Tyk Gateway
annotations: {}

# podAnnotations is annotations to be added to Tyk Pump pod.
# It takes key-value pairs.
# There are no required annotation field for Tyk Pump.
Expand Down Expand Up @@ -998,6 +1004,9 @@ tyk-dashboard:
# replicaCount specifies number of replicas to be created if kind is Deployment.
replicaCount: 1

# annotations be added to the Deployment of Tyk Dashboard
annotations: {}

# podAnnotations is annotations to be added to Tyk Dashboard pod.
# It takes key-value pairs.
# There are no required annotation field for Tyk Dashboard.
Expand Down Expand Up @@ -1304,6 +1313,8 @@ tyk-dev-portal:
# initialDelaySeconds specifies the seconds used in readiness probe as initial delay.
initialDelaySeconds: 60

# annotations be added to the Deployment of Tyk Developer Portal
annotations: {}
# podAnnotations specifies annotations to be added in Tyk Developer Portal Pod.
# It takes key-value pairs.
# There are no required annotation field for Tyk Developer Portal Pod.
Expand Down

0 comments on commit 95a321d

Please sign in to comment.