Add chart flink kubernetes operator 1.13.0
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
{{- /*
|
||||
Licensed to the 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. The 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.
|
||||
*/ -}}
|
||||
|
||||
{{/*
|
||||
Create the name of the job service account to use
|
||||
*/}}
|
||||
{{- define "flink-operator.jobServiceAccountName" -}}
|
||||
{{- if .Values.jobServiceAccount.create }}
|
||||
{{- default (include "flink-operator.fullname" .) .Values.jobServiceAccount.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.jobServiceAccount.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the job role to use
|
||||
*/}}
|
||||
{{- define "flink-operator.jobRoleName" -}}
|
||||
{{- if .Values.rbac.jobRoleBinding.create }}
|
||||
{{- default (include "flink-operator.fullname" .) .Values.rbac.jobRole.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.rbac.jobRole.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the job role to use
|
||||
*/}}
|
||||
{{- define "flink-operator.jobRoleBindingName" -}}
|
||||
{{- if .Values.rbac.jobRole.create }}
|
||||
{{- default (include "flink-operator.fullname" .) .Values.rbac.jobRoleBinding.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.rbac.jobRoleBinding.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,46 @@
|
||||
{{- /*
|
||||
Licensed to the 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. The 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.
|
||||
*/ -}}
|
||||
|
||||
{{- if and .Values.rbac.create .Values.rbac.jobRole.create }}
|
||||
{{- if .Values.watchNamespaces }}
|
||||
{{- range .Values.watchNamespaces }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: {{ include "flink-operator.jobRoleName" $ }}
|
||||
namespace: {{ . }}
|
||||
labels:
|
||||
{{- include "flink-operator.labels" $ | nindent 4 }}
|
||||
annotations:
|
||||
"helm.sh/resource-policy": keep
|
||||
{{- template "flink-operator.jobRbacRules" $ }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: {{ include "flink-operator.jobRoleName" $ }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "flink-operator.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
"helm.sh/resource-policy": keep
|
||||
{{- template "flink-operator.jobRbacRules" $ }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,60 @@
|
||||
{{- /*
|
||||
Licensed to the 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. The 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.
|
||||
*/ -}}
|
||||
|
||||
{{- if and .Values.rbac.create .Values.rbac.jobRoleBinding.create }}
|
||||
{{- if .Values.watchNamespaces }}
|
||||
{{- range .Values.watchNamespaces }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: {{ include "flink-operator.jobRoleBindingName" $ }}
|
||||
namespace: {{ . }}
|
||||
labels:
|
||||
{{- include "flink-operator.labels" $ | nindent 4 }}
|
||||
annotations:
|
||||
"helm.sh/resource-policy": keep
|
||||
roleRef:
|
||||
kind: {{ $role := include "flink-operator.jobRoleName" $ }}{{ include "flink-operator.roleScope" (dict "role" $role)}}
|
||||
name: {{ include "flink-operator.jobRoleName" $ }}
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "flink-operator.jobServiceAccountName" $ }}
|
||||
namespace: {{ . }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: {{ include "flink-operator.jobRoleBindingName" $ }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "flink-operator.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
"helm.sh/resource-policy": keep
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: {{ include "flink-operator.jobRoleName" $ }}
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "flink-operator.jobServiceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,53 @@
|
||||
{{- /*
|
||||
Licensed to the 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. The 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.
|
||||
*/ -}}
|
||||
|
||||
{{- if .Values.jobServiceAccount.create -}}
|
||||
{{- /* Create job service accounts for all watched namespaces. */ -}}
|
||||
{{- if .Values.watchNamespaces }}
|
||||
{{- range .Values.watchNamespaces }}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "flink-operator.jobServiceAccountName" $ }}
|
||||
namespace: {{ . }}
|
||||
labels:
|
||||
{{- include "flink-operator.labels" $ | nindent 4 }}
|
||||
{{- with $.Values.jobServiceAccount.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
---
|
||||
{{- end }}
|
||||
{{- /*
|
||||
Create the job service account for the operator namespace, it is to be added for other namespaces manually
|
||||
(or via specifying them in watchNamespaces).
|
||||
*/ -}}
|
||||
{{- else }}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "flink-operator.jobServiceAccountName" $ }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "flink-operator.labels" $ | nindent 4 }}
|
||||
{{- with .Values.jobServiceAccount.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user