Skip to content

Commit

Permalink
PM-1753 move ingress paths to a helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
simisimis committed Jun 20, 2024
1 parent 6b74987 commit eb6a119
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 18 deletions.
2 changes: 1 addition & 1 deletion delegation-program-leaderboard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ helmfile status
| ingress.annotations | object | `{}` | The Ingress Annotations |
| ingress.className | string | `""` | The Ingress Class Name to use |
| ingress.enabled | bool | `false` | Whether to create an Ingress |
| ingress.hosts | list | `[{"host":"chart-example.local","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}]` | The Ingress Hosts |
| ingress.hosts | list | `[{"host":"chart-example.local"}]` | A list of DNS names to create for leaderboard service |
| ingress.tls | list | `[]` | The TLS configuration |
| leaderboardApi | object | `{"affinity":{},"cacheTimeout":300,"extraEnvVars":{},"image":{"pullPolicy":"IfNotPresent","repository":"673156464838.dkr.ecr.us-west-2.amazonaws.com/delegation-program-leaderboard-api","tag":"2.1.0"},"imagePullSecrets":[],"logFile":"./application.log","nodeSelector":{},"podAnnotations":{},"podSecurityContext":{},"replicaCount":1,"resources":{},"securityContext":{},"service":{"port":5000,"type":"ClusterIP"},"swaggerUrl":"localhost:5000","tolerations":[]}` | configuration options for leaderboard api deployment |
| leaderboardApi.affinity | object | `{}` | Affinity rules |
Expand Down
45 changes: 32 additions & 13 deletions delegation-program-leaderboard/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,40 @@ spec:
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
pathType: {{ .pathType }}
{{- end }}
- path: /apidocs
pathType: Prefix
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ .backend.service.name }}
name: {{ include "delegation-program-leaderboard.fullname" $ }}-api
port:
number: {{ .backend.service.port.number }}
{{- else }}
serviceName: {{ .backend.service.name }}
servicePort: {{ .backend.service.port.number }}
{{- end }}
{{- end }}
number: {{ $.Values.leaderboardApi.service.port }}
- path: /uptimescore
pathType: Prefix
backend:
service:
name: {{ include "delegation-program-leaderboard.fullname" $ }}-api
port:
number: {{ $.Values.leaderboardApi.service.port }}
- path: /flasgger_static
pathType: Prefix
backend:
service:
name: {{ include "delegation-program-leaderboard.fullname" $ }}-api
port:
number: {{ $.Values.leaderboardApi.service.port }}
- path: /apispec_1.json
pathType: Exact
backend:
service:
name: {{ include "delegation-program-leaderboard.fullname" $ }}-api
port:
number: {{ $.Values.leaderboardApi.service.port }}
- path: /
pathType: Prefix
backend:
service:
name: {{ include "delegation-program-leaderboard.fullname" $ }}-web
port:
number: {{ $.Values.leaderboardWeb.service.port }}
{{- end }}
{{- end }}
5 changes: 1 addition & 4 deletions delegation-program-leaderboard/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,9 @@ ingress:
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
# -- The Ingress Hosts
# -- A list of DNS names to create for leaderboard service
hosts:
- host: chart-example.local
paths:
- path: /
pathType: ImplementationSpecific
# -- The TLS configuration
tls: []
# - secretName: chart-example-tls
Expand Down

0 comments on commit eb6a119

Please sign in to comment.