Skip to content

Commit

Permalink
fix: allow exposing other ports than 4770
Browse files Browse the repository at this point in the history
  • Loading branch information
MarceloAplanalp committed Aug 9, 2023
1 parent 9426b9b commit 613d51e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion stable/gripmock/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: |
>
> Version v1.11.1-beta release is available by overriding the `image.tag` in your `values.yaml` file. This version supports **NO** declaration of `go_package`.
type: application
version: 1.1.0
version: 1.1.1
appVersion: "1.10.1"
maintainers:
- name: MarceloAplanalp
Expand Down
6 changes: 5 additions & 1 deletion stable/gripmock/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# gripmock

![Version: 1.1.0](https://img.shields.io/badge/Version-1.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.10.1](https://img.shields.io/badge/AppVersion-1.10.1-informational?style=flat-square)
![Version: 1.1.1](https://img.shields.io/badge/Version-1.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.10.1](https://img.shields.io/badge/AppVersion-1.10.1-informational?style=flat-square)

A chart to install [gripmock](https://github.com/tokopedia/gripmock). A mock server for GRPC services. It uses `.proto` file(s) to generate the implementation of gRPC service(s) for you.

Expand Down Expand Up @@ -65,6 +65,10 @@ helm install my-release deliveryhero/gripmock -f values.yaml
| ingress.hosts[0].host | string | `"chart-example.local"` | |
| ingress.hosts[0].paths[0].path | string | `"/"` | |
| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | |
| ingress.hosts[0].paths[0].port | int | `4770` | |
| ingress.hosts[0].paths[1].path | string | `"/"` | |
| ingress.hosts[0].paths[1].pathType | string | `"ImplementationSpecific"` | |
| ingress.hosts[0].paths[1].port | int | `4471` | |
| ingress.tls | list | `[]` | |
| labels | object | `{}` | Any extra label to apply to all resources |
| nameOverride | string | `""` | |
Expand Down
5 changes: 2 additions & 3 deletions stable/gripmock/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "gripmock.fullname" . -}}
{{- $svcPort := 4770 -}}
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
Expand Down Expand Up @@ -51,10 +50,10 @@ spec:
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
number: {{ .port | default 4770 }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
servicePort: {{ .port | default 4770 }}
{{- end }}
{{- end }}
{{- end }}
Expand Down
4 changes: 4 additions & 0 deletions stable/gripmock/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ ingress:
paths:
- path: /
pathType: ImplementationSpecific
port: 4770
- path: /
pathType: ImplementationSpecific
port: 4471
tls: []
# - secretName: chart-example-tls
# hosts:
Expand Down

0 comments on commit 613d51e

Please sign in to comment.