diff --git a/helm/githubapp/templates/ingress.yaml b/helm/githubapp/templates/ingress.yaml new file mode 100644 index 0000000..9d0c88c --- /dev/null +++ b/helm/githubapp/templates/ingress.yaml @@ -0,0 +1,41 @@ +{{- if .Values.ingress.enabled -}} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ include "githubapp.fullname" . }} + labels: + {{- include "githubapp.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.ingress.className }} + ingressClassName: {{ . }} + {{- 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 }} + pathType: {{ .pathType | default "Prefix" }} + backend: + service: + name: {{ include "githubapp.fullname" $ }} + port: + number: {{ $.Values.service.port }} + {{- end }} + {{- end }} +{{- end }} diff --git a/helm/githubapp/values.yaml b/helm/githubapp/values.yaml index 7c5e32b..1d11802 100644 --- a/helm/githubapp/values.yaml +++ b/helm/githubapp/values.yaml @@ -24,6 +24,17 @@ service: port: 80 targetPort: 8080 +ingress: + enabled: false + className: nginx + annotations: {} + hosts: + - host: "" + paths: + - path: / + pathType: Prefix + tls: [] + # External secrets configuration secrets: secretName: "githubapp-secrets"