1- ################################################################################
2- # Licensed to the Apache Software Foundation (ASF) under one
3- # or more contributor license agreements. See the NOTICE file
4- # distributed with this work for additional information
5- # regarding copyright ownership. The ASF licenses this file
6- # to you under the Apache License, Version 2.0 (the
7- # " License" ); you may not use this file except in compliance
8- # with the License. You may obtain a copy of the License at
9- #
10- # http://www.apache.org /licenses/LICENSE-2.0
11- #
12- # Unless required by applicable law or agreed to in writing, software
13- # distributed under the License is distributed on an " AS IS" BASIS,
14- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15- # See the License for the specific language governing permissions and
16- # limitations under the License.
17- ################################################################################
1+ {{- /*
2+ Licensed to the Apache Software Foundation (ASF) under one
3+ or more contributor license agreements. See the NOTICE file
4+ distributed with this work for additional information
5+ regarding copyright ownership. The ASF licenses this file
6+ to you under the Apache License, Version 2.0 (the
7+ "License"); you may not use this file except in compliance
8+ with the License. You may obtain a copy of the License at
9+
10+ http://www.apache.org/licenses/LICENSE-2.0
11+
12+ Unless required by applicable law or agreed to in writing, software
13+ distributed under the License is distributed on an "AS IS" BASIS,
14+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+ See the License for the specific language governing permissions and
16+ limitations under the License.
17+ */ -}}
1818
1919{{/*
2020Expand the name of the chart.
@@ -78,73 +78,6 @@ Create the path of the operator image to use
7878{{- end }}
7979{{- end }}
8080
81- {{/*
82- Create the name of the operator role to use
83- */ }}
84- {{- define " flink-operator.roleName" -}}
85- {{- if .Values.rbac.operatorRole.create }}
86- {{- default (include " flink-operator.fullname" . ) .Values.rbac.operatorRole.name }}
87- {{- else }}
88- {{- default " default" .Values.rbac.operatorRole.name }}
89- {{- end }}
90- {{- end }}
91-
92- {{/*
93- Create the name of the operator role binding to use
94- */ }}
95- {{- define " flink-operator.roleBindingName" -}}
96- {{- if .Values.rbac.operatorRoleBinding.create }}
97- {{- default (include " flink-operator.fullname" . ) .Values.rbac.operatorRoleBinding.name }}
98- {{- else }}
99- {{- default " default" .Values.rbac.operatorRoleBinding.name }}
100- {{- end }}
101- {{- end }}
102-
103- {{/*
104- Create the name of the job role to use
105- */ }}
106- {{- define " flink-operator.jobRoleName" -}}
107- {{- if .Values.rbac.jobRoleBinding.create }}
108- {{- default (include " flink-operator.fullname" . ) .Values.rbac.jobRole.name }}
109- {{- else }}
110- {{- default " default" .Values.rbac.jobRole.name }}
111- {{- end }}
112- {{- end }}
113-
114- {{/*
115- Create the name of the job role to use
116- */ }}
117- {{- define " flink-operator.jobRoleBindingName" -}}
118- {{- if .Values.rbac.jobRole.create }}
119- {{- default (include " flink-operator.fullname" . ) .Values.rbac.jobRoleBinding.name }}
120- {{- else }}
121- {{- default " default" .Values.rbac.jobRoleBinding.name }}
122- {{- end }}
123- {{- end }}
124-
125-
126- {{/*
127- Create the name of the operator service account to use
128- */ }}
129- {{- define " flink-operator.serviceAccountName" -}}
130- {{- if .Values.operatorServiceAccount.create }}
131- {{- default (include " flink-operator.fullname" . ) .Values.operatorServiceAccount.name }}
132- {{- else }}
133- {{- default " default" .Values.operatorServiceAccount.name }}
134- {{- end }}
135- {{- end }}
136-
137- {{/*
138- Create the name of the job service account to use
139- */ }}
140- {{- define " flink-operator.jobServiceAccountName" -}}
141- {{- if .Values.jobServiceAccount.create }}
142- {{- default (include " flink-operator.fullname" . ) .Values.jobServiceAccount.name }}
143- {{- else }}
144- {{- default " default" .Values.jobServiceAccount.name }}
145- {{- end }}
146- {{- end }}
147-
14881{{/*
14982Determine role scope based on name
15083*/ }}
@@ -155,43 +88,3 @@ Determine role scope based on name
15588{{- printf " Role" }}
15689{{- end }}
15790{{- end }}
158-
159- {{- define " flink-operator.validating-webhook-enabled" -}}
160- {{- if hasKey .Values.webhook " validator" }}
161- {{- if .Values.webhook.validator.create }}
162- {{- printf " true" }}
163- {{- else }}
164- {{- printf " false" }}
165- {{- end }}
166- {{- else }}
167- {{- if or (.Values.webhook.create ) }}
168- {{- printf " true" }}
169- {{- else }}
170- {{- printf " false" }}
171- {{- end }}
172- {{- end }}
173- {{- end }}
174-
175- {{- define " flink-operator.mutating-webhook-enabled" -}}
176- {{- if hasKey .Values.webhook " mutator" }}
177- {{- if .Values.webhook.mutator.create }}
178- {{- printf " true" }}
179- {{- else }}
180- {{- printf " false" }}
181- {{- end }}
182- {{- else }}
183- {{- if or (.Values.webhook.create ) }}
184- {{- printf " true" }}
185- {{- else }}
186- {{- printf " false" }}
187- {{- end }}
188- {{- end }}
189- {{- end }}
190-
191- {{- define " flink-operator.webhook-enabled" -}}
192- {{- if or (eq (include " flink-operator.validating-webhook-enabled" . ) " true" ) (eq (include " flink-operator.mutating-webhook-enabled" . ) " true" ) }}
193- {{- printf " true" }}
194- {{- else }}
195- {{- printf " false" }}
196- {{- end }}
197- {{- end }}
0 commit comments