Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions charts/site-manager/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
{{/*
Return the appropriate host for ingress.
*/}}
{{- define "site-manager.ingress.host" -}}
{{- if .Values.ingress.name }}
{{- .Values.ingress.name }}
{{- else -}}
{{- printf "site-manager-%s.%s" .Release.Namespace .Values.CLOUD_PUBLIC_HOST }}
{{- end -}}
{{- end -}}

{{/*
Return the appropriate apiVersion for ingress.
*/}}
Expand All @@ -15,9 +26,7 @@ DNS names used to generate SSL certificate with "Subject Alternative Name" field
*/}}
{{- define "site-manager.certDnsNames" -}}
{{- $dnsNames := list "localhost" "site-manager" (printf "%s.%s" "site-manager" .Release.Namespace) (printf "%s.%s.svc" "site-manager" .Release.Namespace) -}}
{{- if .Values.ingress.name -}}
{{- $dnsNames = append $dnsNames .Values.ingress.name -}}
{{- end -}}
{{- $dnsNames = append $dnsNames (include "site-manager.ingress.host" .) -}}
{{- $dnsNames = concat $dnsNames .Values.tls.generateCerts.subjectAlternativeName.additionalDnsNames -}}
{{- $dnsNames | toYaml -}}
{{- end -}}
Expand Down
10 changes: 3 additions & 7 deletions charts/site-manager/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,17 @@ spec:
{{- end }}
{{- if .Values.tls.enabled }}
tls:
{{- if and (.Values.ingress.name) (not .Values.tls.defaultIngressTls ) }}
{{- if not .Values.tls.defaultIngressTls }}
- hosts:
- {{ .Values.ingress.name }}
- {{ include "site-manager.ingress.host" . }}
secretName: sm-certs
{{- else }}
- {}
{{- end }}
{{- end }}
rules:
{{- if .Values.ingress.name }}
- host: {{ .Values.ingress.name }}
- host: {{ include "site-manager.ingress.host" . }}
http:
{{- else }}
- http:
{{- end }}
paths:
- pathType: ImplementationSpecific
backend:
Expand Down
1 change: 1 addition & 0 deletions charts/site-manager/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ tls:
additionalIpAddresses: []

PAAS_PLATFORM: KUBERNETES
CLOUD_PUBLIC_HOST: "example.com"

crd:
install: true
Expand Down
2 changes: 1 addition & 1 deletion documentation/internal/HowToWorkWithSmDummy.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ The examples, how it can be run, can be found [here](../../ci/cloud-tests/cluste
| env.SMA_SM_SA | site-manager service account name (for authorization checking) | "site-manager-sa" if `smSecureAuth` is enabled. Otherwise `sm-auth-sa` |
| env.SMA_CUSTOM_AUDIENCE | site-manager custom audience for rest API token. Used only is `smSecureAuth` is enabled | "" |
| image | sm-dummy image | |
| ingressName | define URL for ingress | |
| ingressName | define URL for ingress | `site-manager-${.Release.Namespace}.${.Values.CLOUD_PUBLIC_HOST}` |
| serviceAccount.create | enable/disable Service Account creation | true |
| serviceAccount.name | name of Service Account for sm-dummy | "sm-dummy-sa" |
| siteManager.installCR | enable sitemanager-cr | True |
Expand Down
3 changes: 2 additions & 1 deletion documentation/public/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,15 @@ you can do one of following solutions:
| image.pullPolicy | The docker image pull policy. | Always |
| image.tag | The docker image tag. | v1.0 |
| ingress.create | Enable/disable ingress creation. | true |
| ingress.name | Define URL for `site-manager` ingress. | "" |
| ingress.name | Define URL for `site-manager` ingress. | `site-manager-${.Release.Namespace}.${.Values.CLOUD_PUBLIC_HOST}` |
| ingress.className | Define class name for ingress. | "" |
| limits.cpu | CPU limits per pod. | 200m |
| limits.memory | Memory limits per pod. | 160Mi |
| requests.cpu | CPU requests per pod. | 100m |
| requests.memory | Memory requests per pod. | 75Mi |
| affinity | Define affinity rules. | {} |
| PAAS_PLATFORM | Define PAAS type. It can be "KUBERNETES" or "OPENSHIFT". | "KUBERNETES" |
| CLOUD_PUBLIC_HOST | Pulic DNS of K8S cluster, Used to construct public available Ingress | `example.com`, or as provided by deployment tool |
| paasGeoMonitor | Refer to [paas-geo-monitor documentation](#paas-geo-monitor). | |
| priorityClassName | The Priority Class Name for site-manager and paas-geo-monitor deployments | "" |
| smSecureAuth | The mode for SM authorization with dr-services. See [API Security Model](architecture.md#api-security-model) for details | false |
Expand Down
Loading