Skip to content

Commit

Permalink
chore: support Prefix type in ingress path. (#35)
Browse files Browse the repository at this point in the history
* chore: support Prefix type in ingress path.

Use pathType as Prefix to work with Application Load Balancer.

* chore: defaults to implementspecific

* chore: update ingress

* bump: chart version up to 3.7.0

Signed-off-by: Federico Luna Agüero <[email protected]>

* chore: pathType default in values.yaml

Co-authored-by: Casey Buto <[email protected]>

* chore: pathType default in values.yaml

Co-authored-by: Casey Buto <[email protected]>

* chore: pathType default in values.yaml

Co-authored-by: Casey Buto <[email protected]>

* fix: maintainers url

Co-authored-by: Casey Buto <[email protected]>

* fix: chart.yaml eof

* docs: add support for ingress path type

Co-authored-by: nerdeveloper <[email protected]>
Co-authored-by: Federico Luna Agüero <[email protected]>
Co-authored-by: feder1c0 <[email protected]>
Co-authored-by: Casey Buto <[email protected]>
  • Loading branch information
5 people authored Apr 5, 2022
1 parent 760ff59 commit 96352ce
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/chartmuseum/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
description: Host your own Helm Chart Repository
name: chartmuseum
version: 3.6.3
version: 3.7.0
appVersion: 0.14.0
home: https://github.com/helm/chartmuseum
icon: https://raw.githubusercontent.com/chartmuseum/charts/main/logo.jpg
Expand Down
18 changes: 16 additions & 2 deletions src/chartmuseum/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Please also see https://github.com/helm/chartmuseum
- [Bearer/Token auth](#bearertoken-auth)
- [Ingress](#ingress)
- [Hosts](#hosts)
- [Path Types](#path-types)
- [Extra Paths](#extra-paths)
- [Annotations](#annotations)
- [Example Ingress configuration](#example-ingress-configuration)
Expand Down Expand Up @@ -203,6 +204,7 @@ their default values. See values.yaml for all available options.
| `deployment.extraVolumeMounts` | Additional volumes to mount in container for deployment | `[]` |
| `podAnnotations` | Annotations for pods | `{}` |
| `ingress.enabled` | Enable ingress controller resource | `false` |
| `ingress.pathType` | Ingress pathType for Kubernetes 1.18 and above | `ImplementationSpecific` |
| `ingress.annotations` | Ingress annotations | `{}` |
| `ingress.labels` | Ingress labels | `{}` |
| `ingress.ingressClassName` | Ingress class name for Kubernetes 1.18 and above | `<nil>` |
Expand Down Expand Up @@ -735,6 +737,17 @@ Most likely you will only want to have one hostname that maps to this Chartmuseu

In most cases, you should not specify values for `ingress.hosts[0].serviceName` and `ingress.hosts[0].servicePort`. However, some ingress controllers support advanced scenarios requiring you to specify these values. For example, [setting up an SSL redirect using the AWS ALB Ingress Controller](https://kubernetes-sigs.github.io/aws-alb-ingress-controller/guide/tasks/ssl_redirect/).

#### Path Types

Each path in an Ingress is required to have a corresponding path type. Paths that do not include an explicit pathType will fail validation. For more about Ingress pathTypes please see [this documentation](https://kubernetes.io/docs/concepts/services-networking/ingress/#path-types).

```shell
helm install --name my-chartmuseum chartmuseum/chartmuseum \
--set ingress.enabled=true \
--set ingress.hosts[0].name=chartmuseum.domain.com \
--set ingress.pathType=ImplementationSpecific
```

#### Extra Paths

Specifying extra paths to prepend to every host configuration is especially useful when configuring [custom actions with AWS ALB Ingress Controller](https://kubernetes-sigs.github.io/aws-alb-ingress-controller/guide/ingress/annotation/#actions).
Expand All @@ -758,8 +771,9 @@ For annotations, please see [this document for nginx](https://github.com/kuberne
helm install --name my-chartmuseum chartmuseum/chartmuseum \
--set ingress.enabled=true \
--set ingress.hosts[0].name=chartmuseum.domain.com \
--set ingress.hosts[0].path=/
--set ingress.hosts[0].tls=true
--set ingress.pathType=ImplementationSpecific \
--set ingress.hosts[0].path=/ \
--set ingress.hosts[0].tls=true \
--set ingress.hosts[0].tlsSecret=chartmuseum.tls-secret
```

Expand Down
4 changes: 2 additions & 2 deletions src/chartmuseum/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ spec:
{{- end }}
port:
number: {{ default $servicePort .port }}
pathType: ImplementationSpecific
pathType: {{ default $.Values.ingress.pathType .pathType }}
{{- end }}
{{- end }}
- path: {{ default "/" .path | quote }}
Expand All @@ -71,7 +71,7 @@ spec:
{{- end }}
port:
number: {{ default $servicePort .port }}
pathType: ImplementationSpecific
pathType: {{ $.Values.ingress.pathType }}
{{- end }}
{{- end }}
tls:
Expand Down
1 change: 1 addition & 0 deletions src/chartmuseum/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ volumePermissions:
## Ingress for load balancer
ingress:
enabled: false
pathType: "ImplementationSpecific"
## Chartmuseum Ingress labels
##
labels: {}
Expand Down

0 comments on commit 96352ce

Please sign in to comment.