-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from kuzzleio/feat/webapp-ingress
feat(webapp): add ingress resource
- Loading branch information
Showing
4 changed files
with
113 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,44 @@ | ||
# webapp | ||
|
||
![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.25.1](https://img.shields.io/badge/AppVersion-1.25.1-informational?style=flat-square) | ||
![Version: 1.2.0](https://img.shields.io/badge/Version-1.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.25.1](https://img.shields.io/badge/AppVersion-1.25.1-informational?style=flat-square) | ||
|
||
A web application | ||
|
||
## Values | ||
|
||
| Key | Type | Default | Description | | ||
|-----|------|---------|-------------| | ||
| affinity | object | `{}` | | | ||
| args | list | `[]` | | | ||
| command | list | `[]` | | | ||
| extraEnvs | list | `[]` | | | ||
| fullnameOverride | string | `""` | | | ||
| image.name | string | `"nginx"` | | | ||
| image.pullPolicy | string | `"Always"` | | | ||
| image.tag | string | `"1.25.1"` | | | ||
| imagePullSecrets | list | `[]` | | | ||
| nameOverride | string | `""` | | | ||
| nodeSelector | object | `{}` | | | ||
| podSecurityContext.fsGroup | int | `1000` | | | ||
| probes.liveness.config.httpGet.path | string | `"/"` | | | ||
| probes.liveness.config.httpGet.port | string | `"http"` | | | ||
| probes.liveness.enable | bool | `true` | | | ||
| probes.readiness.config.httpGet.path | string | `"/"` | | | ||
| probes.readiness.config.httpGet.port | string | `"http"` | | | ||
| probes.readiness.enable | bool | `true` | | | ||
| replicaCount | int | `1` | | | ||
| resources | object | `{}` | | | ||
| securityContext | object | `{}` | | | ||
| service.port | int | `80` | | | ||
| service.targetPort | int | `80` | | | ||
| tolerations | list | `[]` | | | ||
| updateStrategy | string | `"RollingUpdate"` | | | ||
| Key | Type | Default | Description | | ||
| ------------------------------------ | ------ | ----------------- | ----------- | | ||
| affinity | object | `{}` | | | ||
| args | list | `[]` | | | ||
| command | list | `[]` | | | ||
| extraEnvs | list | `[]` | | | ||
| fullnameOverride | string | `""` | | | ||
| image.name | string | `"nginx"` | | | ||
| image.pullPolicy | string | `"Always"` | | | ||
| image.tag | string | `"1.25.1"` | | | ||
| imagePullSecrets | list | `[]` | | | ||
| ingress.annotations | object | `{}` | | | ||
| ingress.className | string | `""` | | | ||
| ingress.enabled | bool | `false` | | | ||
| ingress.hosts | list | `[]` | | | ||
| ingress.tls | list | `[]` | | | ||
| nameOverride | string | `""` | | | ||
| nodeSelector | object | `{}` | | | ||
| podSecurityContext.fsGroup | int | `1000` | | | ||
| probes.liveness.config.httpGet.path | string | `"/"` | | | ||
| probes.liveness.config.httpGet.port | string | `"http"` | | | ||
| probes.liveness.enable | bool | `true` | | | ||
| probes.readiness.config.httpGet.path | string | `"/"` | | | ||
| probes.readiness.config.httpGet.port | string | `"http"` | | | ||
| probes.readiness.enable | bool | `true` | | | ||
| replicaCount | int | `1` | | | ||
| resources | object | `{}` | | | ||
| securityContext | object | `{}` | | | ||
| service.port | int | `80` | | | ||
| service.targetPort | int | `80` | | | ||
| tolerations | list | `[]` | | | ||
| updateStrategy | string | `"RollingUpdate"` | | | ||
|
||
---------------------------------------------- | ||
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0) | ||
______________________________________________________________________ | ||
|
||
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{{- if .Values.ingress.enabled -}} | ||
{{- $fullName := include "webapp.fullname" . -}} | ||
{{- $httpPort := .Values.service.port -}} | ||
{{- 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}} | ||
{{- end }} | ||
{{- end }} | ||
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} | ||
apiVersion: networking.k8s.io/v1 | ||
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} | ||
apiVersion: networking.k8s.io/v1beta1 | ||
{{- else -}} | ||
apiVersion: extensions/v1beta1 | ||
{{- end }} | ||
kind: Ingress | ||
metadata: | ||
name: {{ $fullName }} | ||
labels: | ||
{{- include "webapp.labels" . | nindent 4 }} | ||
{{- with .Values.ingress.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} | ||
ingressClassName: {{ .Values.ingress.className }} | ||
{{- end }} | ||
{{- if .Values.ingress.tls }} | ||
tls: | ||
{{- range .Values.ingress.tls }} | ||
- hosts: | ||
{{- range .hosts }} | ||
- {{ . | quote }} | ||
{{- end }} | ||
secretName: {{ .secretName }} | ||
{{- end }} | ||
{{- end }} | ||
rules: | ||
{{- range .Values.ingress.hosts }} | ||
- host: {{ .host | quote }} | ||
http: | ||
paths: | ||
{{- range .paths }} | ||
- path: {{ .path }} | ||
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} | ||
pathType: {{ .pathType }} | ||
{{- end }} | ||
backend: | ||
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} | ||
service: | ||
name: {{ $fullName }} | ||
port: | ||
number: {{ $httpPort }} | ||
{{- else }} | ||
serviceName: {{ $fullName }} | ||
servicePort: {{ $httpPort }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters