Commit 2f636ec3 authored by Hossein Pursultani's avatar Hossein Pursultani

Optimize CRD prefix comparisons

parent 368fc32c
Pipeline #59699090 passed with stages
in 42 minutes and 41 seconds
......@@ -28,7 +28,7 @@ spec:
env:
- name: GITLAB_CLASS
value: {{ .Release.Name }}
{{- if not (eq (default "" .Values.crdPrefix) "") }}
{{- if .Values.crdPrefix }}
- name: CRD_PREFIX
value: {{ .Values.crdPrefix }}
{{- end }}
......
......@@ -34,4 +34,4 @@ resources:
# A prefix for group name of GitLab CRD. It can be used for distinguishing
# different CRDs in a cluster, e.g. for development purposes such GitLab CI.
# crdPrefix:
\ No newline at end of file
#crdPrefix:
\ No newline at end of file
......@@ -52,9 +52,9 @@ Returns the operator group name. A subgroup with the release name is chosen
*/}}
{{- define "gitlab.operator.groupName" -}}
{{- if eq (default "" .Values.crdPrefix) "" -}}
gitlab.com
{{- else -}}
{{- if .Values.crdPrefix -}}
{{ printf "%s.gitlab.com" .Values.crdPrefix }}
{{- else -}}
gitlab.com
{{- end -}}
{{- end -}}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment