operator/pkg/operator/manifests/oapserver/templates/ingress.yaml (33 lines of code) (raw):

# Licensed to Apache Software Foundation (ASF) under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Apache Software Foundation (ASF) licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. {{- $ingress := .Spec.Service.Ingress }} {{ if $ingress.Host }} apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: {{ .Name }}-ui namespace: {{ .Namespace }} labels: app: ui operator.skywalking.apache.org/ui-name: {{ .Name }} operator.skywalking.apache.org/application: ui operator.skywalking.apache.org/component: deployment annotations: {{- range $key, $value := $ingress.Annotations }} {{ $key }}: {{ $value | quote }} {{- end }} spec: rules: - host: {{ $ingress.Host }} http: paths: - path: /* backend: serviceName: {{ .Name }}-oap servicePort: 12800 {{- if $ingress.IngressClassName }} ingressClassName: {{ $ingress.IngressClassName }} {{end}} {{- if $ingress.TLS }} tls: {{ toYAML $ingress.TLS | indent 4 }} {{end}} {{end}}