Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ingress class implementation and documentation #113

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions docs/pages/configuration/ingress.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ ingress:
serviceName: my-custom-k8s-service
servicePort: 8000
```
**Explanation:**
**Explanation:**
This example configuration would only create an ingress for a service called `my-custom-k8s-service` and forward the traffic from `my-static-host.tld` to port `8000` of this service.


Expand Down Expand Up @@ -176,12 +176,12 @@ ingress:
- host: my-static-host2.tld
```

## `ingressClass`
The `ingressClass` option expects a string with a Kubernetes ingress class used for a cert-manager annotation.
## `ingressClassName`
The `ingressClassName` option expects a string with a Kubernetes ingress class used for a cert-manager annotation.

#### Default Value For `ingressClass`
#### Default Value For `ingressClassName`
```yaml
ingressClass: nginx
ingressClassName: nginx
```

#### Example: Custom Ingress Class
Expand All @@ -192,7 +192,7 @@ service:
ports:
- port: 3000
ingress:
ingressClass: traefik
ingressClassName: traefik
tls: true
rules:
- host: my-static-host.tld
Expand All @@ -217,12 +217,12 @@ ingress:
- host: my-static-host.tld
- host: my-static-host2.tld
```
**Explanation:**
**Explanation:**
Instead of the default name `frontend`, the ingress of this component would be named `custom-ingress-name`.


## `labels`
The `labels` option expects a map with Kubernetes labels.
The `labels` option expects a map with Kubernetes labels.

By default, the component chart sets a couple of labels following the best practices described in the Kubernetes documentation:
- `app.kubernetes.io/name: devspace-app`
Expand Down Expand Up @@ -258,7 +258,7 @@ ingress:


## `annotations`
The `annotations` option expects a map with Kubernetes annotations.
The `annotations` option expects a map with Kubernetes annotations.

By default, the component chart sets a couple of annotations following the best practices described in the Kubernetes documentation:
- `helm.sh/chart: component-chart-vX.Y.Z`
Expand Down Expand Up @@ -290,4 +290,3 @@ ingress:
annotation1: annotation-value-1
annotation2: annotation-value-2
```

4 changes: 2 additions & 2 deletions docs/pages/configuration/reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ ingress: # struct | Ingress for component
rules: # struct[] | Array of ingress rules for component
- host: my-hostname.tld # string | Hostname for ingress rule
path: / # string | Host path for ingress rule (default: /)
servicePort:
servicePort:
serviceName:
tls: true # boolean OR string | True (for auto-generated secert name) or name of secret with SSL certificate (default: false)
tlsClusterIssuer: lets-encrypt-http-issuer # string | Name of tls cluster issuer (letsencrypt, cert-manager)
ingressClass: nginx # string | Ingress class for certificate provisioning
ingressClassName: nginx # string | Ingress class for certificate provisioning
name: my-ingress # string | Name of the ingress (optional, default: name of component release)
labels: # map | Map of additional labels (optional)
labelName1: labelValue1
Expand Down
8 changes: 4 additions & 4 deletions templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ metadata:
certmanager.k8s.io/cluster-issuer: {{ $.Values.ingress.tlsClusterIssuer | default "lets-encrypt-http-issuer" | quote }}
{{- end }}
{{- if $addIngressClass }}
acme.cert-manager.io/http01-ingress-class: {{ $.Values.ingress.ingressClass | default "nginx" | quote }}
certmanager.k8s.io/http01-ingress-class: {{ $.Values.ingress.ingressClass | default "nginx" | quote }}
acme.cert-manager.io/http01-ingress-class: {{ $.Values.ingress.ingressClassName | default "nginx" | quote }}
certmanager.k8s.io/http01-ingress-class: {{ $.Values.ingress.ingressClassName | default "nginx" | quote }}
{{- end }}
{{- end }}
{{- else }}
Expand Down Expand Up @@ -116,7 +116,7 @@ spec:
{{- else }}
pathType: ImplementationSpecific
{{- end }}

{{- end }}
{{- if ne (printf "%s" $tlsSecretName) "" }}
tls:
Expand All @@ -131,4 +131,4 @@ spec:

{{- end }}
{{- end }}
{{- end }}
{{- end }}