Skip to content

Commit

Permalink
ingress route
Browse files Browse the repository at this point in the history
  • Loading branch information
joy2fun committed Jan 8, 2024
1 parent 5b456cb commit 159b5f1
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 31 deletions.
4 changes: 2 additions & 2 deletions app/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.5
version: 0.1.6

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.1.5"
appVersion: "0.1.6"
13 changes: 2 additions & 11 deletions app/templates/ingressroute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,10 @@ spec:
{{- toYaml . | nindent 4 }}
{{- end }}

{{- with .Values.ingressRoute.routes }}
routes:
- match: Host(`{{ .Values.ingressRoute.host }}`)
kind: Rule
middlewares:
{{- with .Values.ingressRoute.middlewares }}
{{- toYaml . | nindent 6 }}
{{- end }}
services:
- name: {{ include "app.fullname" . }}
port: {{ .Values.service.port }}
{{- with .Values.ingressRoute.additionalRoutes }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}

{{- if .Values.ingressRoute.tlsName }}
tls:
Expand Down
41 changes: 23 additions & 18 deletions app/values.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
replicaCount: 1
fullnameOverride: example-app

image:
repository: nginx
pullPolicy: Always
# IfNotPresent
tag: alpine

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

volumes: []
# - name: config
# configMap:
Expand Down Expand Up @@ -46,12 +42,6 @@ envFrom: []
# - secretRef:
# name: test

podAnnotations: {}

podSecurityContext: {}

securityContext: {}

service:
type: ClusterIP
port: 80
Expand All @@ -64,19 +54,24 @@ service:
ingressRoute:
enabled: true
entryPoints:
- websecure
- web
host: ""
tlsName: ""
middlewares: []
additionalRoutes: []
- websecure
routes:
- kind: Rule
match: Host(`example-app`)
middlewares:
- name: log-request
services:
- name: service-name
port: 80
# - kind: Rule
# match: Host(`host`) && PathPrefix(`/api`)
# match: Host(`example-app`) && PathPrefix(`/api`)
# middlewares:
# - name: stripprefix-api
# services:
# - name: service-name
# port: 80
# tlsName:

job:
enabled: false
Expand All @@ -103,17 +98,27 @@ startupProbe:
initialDelaySeconds: 5
periodSeconds: 5

resources: {}
imagePullSecrets: []
nameOverride: ""

replicaCount: 1
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80

podAnnotations: {}

podSecurityContext: {}

securityContext: {}

nodeSelector: {}

resources: {}

tolerations: []

affinity: {}

0 comments on commit 159b5f1

Please sign in to comment.