Skip to content

Commit

Permalink
Skip unknown expose.type
Browse files Browse the repository at this point in the history
This commit adjust the creation of the service of nginx.  It will skip
the creation of the service if the `expose.type` is set to an unknown
value.
One benefit of this change is that user can create the service to expose
Harbor first, and deploy other components using the chart.

Signed-off-by: Daniel Jiang <[email protected]>
  • Loading branch information
reasonerjt committed Aug 5, 2019
1 parent 30af256 commit ceaf710
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ The following table lists the configurable parameters of the Harbor chart and th
| Parameter | Description | Default |
| --------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- |
| **Expose** |
| `expose.type` | The way how to expose the service: `ingress`, `clusterIP`, `nodePort` or `loadBalancer` | `ingress` |
| `expose.type` | The way how to expose the service: `ingress`, `clusterIP`, `nodePort` or `loadBalancer`, other values will be ignored and the creation of service will be skipped. | `ingress` |
| `expose.tls.enabled` | Enable the tls or not | `true` |
| `expose.ingress.controller` | The ingress controller type. Currently supports `default`, `gce` and `ncp` | `default` |
| `expose.tls.secretName` | Fill the name of secret if you want to use your own TLS certificate and private key. The secret must contain keys named `tls.crt` and `tls.key` that contain the certificate and private key to use for TLS. The certificate and private key will be generated automatically if it is not set | |
Expand Down
2 changes: 1 addition & 1 deletion templates/nginx/service.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if ne .Values.expose.type "ingress" }}
{{- if or (eq .Values.expose.type "clusterIP") (eq .Values.expose.type "nodePort") (eq .Values.expose.type "loadBalancer") }}
apiVersion: v1
kind: Service
metadata:
Expand Down

0 comments on commit ceaf710

Please sign in to comment.