diff --git a/charts/webapp/Chart.yaml b/charts/webapp/Chart.yaml index c0b10c8..b8115ff 100644 --- a/charts/webapp/Chart.yaml +++ b/charts/webapp/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: webapp description: basic webapp workload type: application -version: 0.1.7 +version: 0.1.8 appVersion: "1.16.0" diff --git a/charts/webapp/templates/ingress.yaml b/charts/webapp/templates/ingress.yaml new file mode 100644 index 0000000..c1892d5 --- /dev/null +++ b/charts/webapp/templates/ingress.yaml @@ -0,0 +1,29 @@ +{{ if .Values.ingress.enabled }} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ include "webapp.fullname" . }} + labels: +{{ include "webapp.labels" . | indent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + ingressClassName: {{ .Values.ingress.ingressClass }} + tls: + - hosts: + - {{ .Values.ingress.hostname | quote }} + secretName: console-tls + rules: + - host: {{ .Values.ingress.hostname | quote }} + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: console + port: + name: http +{{ end }} \ No newline at end of file diff --git a/charts/webapp/templates/service.yaml b/charts/webapp/templates/service.yaml new file mode 100644 index 0000000..ae4f260 --- /dev/null +++ b/charts/webapp/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "webapp.fullname" . }} + labels: +{{ include "webapp.labels" . | indent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + {{- include "webapp.selectorLabels" . | nindent 4 }} \ No newline at end of file diff --git a/charts/webapp/values.yaml b/charts/webapp/values.yaml index 99411be..522fc98 100644 --- a/charts/webapp/values.yaml +++ b/charts/webapp/values.yaml @@ -48,10 +48,11 @@ service: ingress: enabled: false - className: "" - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" + ingressClass: nginx + annotations: + kubernetes.io/tls-acme: "true" + cert-manager.io/cluster-issuer: plural + nginx.ingress.kubernetes.io/force-ssl-redirect: 'true' hosts: - host: chart-example.local paths: