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

Support IngressClassName in OpenSearch and OpenSearch Dashboards charts. #66

Closed
mprimeaux opened this issue Sep 26, 2021 · 5 comments · Fixed by #149
Closed

Support IngressClassName in OpenSearch and OpenSearch Dashboards charts. #66

mprimeaux opened this issue Sep 26, 2021 · 5 comments · Fixed by #149
Labels
enhancement New feature or request

Comments

@mprimeaux
Copy link
Contributor

mprimeaux commented Sep 26, 2021

Is your feature request related to a problem? Please describe.
Kubernetes 1.18 and greater support the IngressClassName spec stanza as part of the Ingress kind.

Describe the solution you'd like
If defined in the chart values file, the Ingress spec stanza should use the IngressClassName value.

Describe alternatives you've considered
While we may be able to also leverage an ingress class name annotation, this is not always accepted.

Additional context

Ingress

{{- if .Values.ingress.enabled -}}
{{- $fullName := include "opensearch.uname" . -}}
{{- $servicePort := .Values.httpPort -}}
{{- $ingressPath := .Values.ingress.path -}}
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: {{ $fullName }}
  labels:
    app: {{ .Chart.Name }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
{{- with .Values.ingress.annotations }}
  annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
+  {{- if .Values.ingress.ingressClassName }}
+  ingressClassName: {{ .Values.ingress.ingressClassName | quote }}
+  {{- end }}
{{- if .Values.ingress.tls }}
  tls:
  {{- range .Values.ingress.tls }}
    - hosts:
      {{- range .hosts }}
        - {{ . }}
      {{- end }}
      secretName: {{ .secretName }}
  {{- end }}
{{- end }}
  rules:
  {{- range .Values.ingress.hosts }}
    - host: {{ . }}
      http:
        paths:
          - path: {{ $ingressPath }}
            backend:
              serviceName: {{ $fullName }}
              servicePort: {{ $servicePort }}
  {{- end }}
{{- end }}

@mprimeaux mprimeaux added enhancement New feature or request untriaged Issues that have not yet been triaged labels Sep 26, 2021
@peterzhuamazon
Copy link
Member

@mprimeaux could you please change the title to reflect this issue? Thanks.

@mprimeaux mprimeaux changed the title [Enhancement][OpenSearch and OpenSearch-Dashboards] Support IngressClassName in OpenSearch and OpenSearch Dashboards charts. Sep 30, 2021
@peterzhuamazon peterzhuamazon removed the untriaged Issues that have not yet been triaged label Oct 20, 2021
@aschi1
Copy link

aschi1 commented Nov 26, 2021

Hi, is there any update for this? IngressClassName is blocking us to migrate to this helm chart (which we would very much like to)

Thank you!

@mprimeaux
Copy link
Contributor Author

I'll review and update today.

@mprimeaux
Copy link
Contributor Author

mprimeaux commented Nov 26, 2021

@aschi1 PR #149 has been submitted for community review.

@peterzhuamazon @TheAlgo @DandyDeveloper @smlx FYI and thanks for your continued support. Note that I synchronized the CI values files to match the values.yaml file in the OpenSearch chart as they had gotten out of sync over the past weeks.

@peterzhuamazon peterzhuamazon linked a pull request Nov 29, 2021 that will close this issue
@aschi1
Copy link

aschi1 commented Dec 3, 2021

@mprimeaux Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants