Skip to content

Commit

Permalink
moved flink k8s operator config to enterprise section
Browse files Browse the repository at this point in the history
  • Loading branch information
pielas committed Jul 30, 2024
1 parent 7988f9c commit da68b9c
Show file tree
Hide file tree
Showing 10 changed files with 64 additions and 60 deletions.
54 changes: 27 additions & 27 deletions src/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,43 +27,43 @@ data:
deploymentConfig: {
type: "flink-k8s-operator"
k8sNamespace: {{ template "nussknacker.namespace" . }}
{{- if .Values.flinkK8sOperatorDeploymentManager.limitOfRunningScenarios }}
limitOfRunningScenarios: {{ .Values.flinkK8sOperatorDeploymentManager.limitOfRunningScenarios }}
{{- if .Values.enterprise.flinkK8sOperatorDeploymentManager.limitOfRunningScenarios }}
limitOfRunningScenarios: {{ .Values.enterprise.flinkK8sOperatorDeploymentManager.limitOfRunningScenarios }}
{{- end }}
{{- if .Values.flinkK8sOperatorDeploymentManager.customLimitOfRunningScenarioExceededMessage }}
customLimitOfRunningScenarioExceededMessage: {{ .Values.flinkK8sOperatorDeploymentManager.customLimitOfRunningScenarioExceededMessage | quote }}
{{- if .Values.enterprise.flinkK8sOperatorDeploymentManager.customLimitOfRunningScenarioExceededMessage }}
customLimitOfRunningScenarioExceededMessage: {{ .Values.enterprise.flinkK8sOperatorDeploymentManager.customLimitOfRunningScenarioExceededMessage | quote }}
{{- end }}
flinkVersion: {{ .Values.flinkK8sOperatorDeploymentManager.flinkVersion | quote }}
jobJarStoragePVCName: {{ .Values.flinkK8sOperatorDeploymentManager.jobJarStorage.pvcName | quote }}
jobJarStorageMountPoint: {{ .Values.flinkK8sOperatorDeploymentManager.jobJarStorage.mountPoint | quote }}
jobStateStoragePVCName: {{ .Values.flinkK8sOperatorDeploymentManager.jobStateStorage.pvcName | quote }}
jobStateStorageMountPoint: {{ .Values.flinkK8sOperatorDeploymentManager.jobStateStorage.mountPoint | quote }}
{{- if .Values.flinkK8sOperatorDeploymentManager.numberOfTaskSlotsInTaskManager }}
numberOfTaskSlotsInTaskManager: {{ .Values.flinkK8sOperatorDeploymentManager.numberOfTaskSlotsInTaskManager }}
flinkVersion: {{ .Values.enterprise.flinkK8sOperatorDeploymentManager.flinkVersion | quote }}
jobJarStoragePVCName: {{ .Values.enterprise.flinkK8sOperatorDeploymentManager.jobJarStorage.pvcName | quote }}
jobJarStorageMountPoint: {{ .Values.enterprise.flinkK8sOperatorDeploymentManager.jobJarStorage.mountPoint | quote }}
jobStateStoragePVCName: {{ .Values.enterprise.flinkK8sOperatorDeploymentManager.jobStateStorage.pvcName | quote }}
jobStateStorageMountPoint: {{ .Values.enterprise.flinkK8sOperatorDeploymentManager.jobStateStorage.mountPoint | quote }}
{{- if .Values.enterprise.flinkK8sOperatorDeploymentManager.numberOfTaskSlotsInTaskManager }}
numberOfTaskSlotsInTaskManager: {{ .Values.enterprise.flinkK8sOperatorDeploymentManager.numberOfTaskSlotsInTaskManager }}
{{- end }}
{{- if .Values.flinkK8sOperatorDeploymentManager.jobParallelism }}
jobParallelism: {{ .Values.flinkK8sOperatorDeploymentManager.jobParallelism }}
{{- if .Values.enterprise.flinkK8sOperatorDeploymentManager.jobParallelism }}
jobParallelism: {{ .Values.enterprise.flinkK8sOperatorDeploymentManager.jobParallelism }}
{{- end }}
{{- if .Values.flinkK8sOperatorDeploymentManager.jobUpgradeMode }}
jobUpgradeMode: {{ .Values.flinkK8sOperatorDeploymentManager.jobUpgradeMode | quote }}
{{- if .Values.enterprise.flinkK8sOperatorDeploymentManager.jobUpgradeMode }}
jobUpgradeMode: {{ .Values.enterprise.flinkK8sOperatorDeploymentManager.jobUpgradeMode | quote }}
{{- end }}
{{- if .Values.flinkK8sOperatorDeploymentManager.allowNonRestoredState }}
allowNonRestoredState: {{ .Values.flinkK8sOperatorDeploymentManager.allowNonRestoredState }}
{{- if .Values.enterprise.flinkK8sOperatorDeploymentManager.allowNonRestoredState }}
allowNonRestoredState: {{ .Values.enterprise.flinkK8sOperatorDeploymentManager.allowNonRestoredState }}
{{- end }}
{{- if .Values.flinkK8sOperatorDeploymentManager.jobManagerMemory }}
jobManagerMemory: {{ .Values.flinkK8sOperatorDeploymentManager.jobManagerMemory | quote }}
{{- if .Values.enterprise.flinkK8sOperatorDeploymentManager.jobManagerMemory }}
jobManagerMemory: {{ .Values.enterprise.flinkK8sOperatorDeploymentManager.jobManagerMemory | quote }}
{{- end }}
{{- if .Values.flinkK8sOperatorDeploymentManager.jobManagerCpu }}
jobManagerCpu: {{ .Values.flinkK8sOperatorDeploymentManager.jobManagerCpu }}
{{- if .Values.enterprise.flinkK8sOperatorDeploymentManager.jobManagerCpu }}
jobManagerCpu: {{ .Values.enterprise.flinkK8sOperatorDeploymentManager.jobManagerCpu }}
{{- end }}
{{- if .Values.flinkK8sOperatorDeploymentManager.taskManagerMemory }}
taskManagerMemory: {{ .Values.flinkK8sOperatorDeploymentManager.taskManagerMemory | quote }}
{{- if .Values.enterprise.flinkK8sOperatorDeploymentManager.taskManagerMemory }}
taskManagerMemory: {{ .Values.enterprise.flinkK8sOperatorDeploymentManager.taskManagerMemory | quote }}
{{- end }}
{{- if .Values.flinkK8sOperatorDeploymentManager.taskManagerCpu }}
taskManagerCpu: {{ .Values.flinkK8sOperatorDeploymentManager.taskManagerCpu }}
{{- if .Values.enterprise.flinkK8sOperatorDeploymentManager.taskManagerCpu }}
taskManagerCpu: {{ .Values.enterprise.flinkK8sOperatorDeploymentManager.taskManagerCpu }}
{{- end }}
{{- if .Values.flinkK8sOperatorDeploymentManager.taskManagerReplicas }}
taskManagerReplicas: {{ .Values.flinkK8sOperatorDeploymentManager.taskManagerReplicas | quote }}
{{- if .Values.enterprise.flinkK8sOperatorDeploymentManager.taskManagerReplicas }}
taskManagerReplicas: {{ .Values.enterprise.flinkK8sOperatorDeploymentManager.taskManagerReplicas | quote }}
{{- end }}
}
{{- else if eq .Values.nussknacker.mode "ververica" }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if and (hasKey .Values "flinkK8sOperatorDeploymentManager") .Values.flinkK8sOperatorDeploymentManager.enabled }}
{{- if not (and (hasKey .Values.flinkK8sOperatorDeploymentManager "keepFlinkDeploymentsOnUninstall") (.Values.flinkK8sOperatorDeploymentManager.keepFlinkDeploymentsOnUninstall)) }}
{{- if and (hasKey .Values.enterprise "flinkK8sOperatorDeploymentManager") .Values.enterprise.flinkK8sOperatorDeploymentManager.enabled }}
{{- if not (and (hasKey .Values.enterprise.flinkK8sOperatorDeploymentManager "keepFlinkDeploymentsOnUninstall") (.Values.enterprise.flinkK8sOperatorDeploymentManager.keepFlinkDeploymentsOnUninstall)) }}
apiVersion: batch/v1
kind: Job
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{{- if and (hasKey .Values "flinkK8sOperatorDeploymentManager") .Values.flinkK8sOperatorDeploymentManager.enabled }}
{{- if and (hasKey .Values.enterprise "flinkK8sOperatorDeploymentManager") .Values.enterprise.flinkK8sOperatorDeploymentManager.enabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ default "flink-deployment-creator" .Values.flinkK8sOperatorDeploymentManager.flinkDeploymentCreatorRole }}
name: {{ default "flink-deployment-creator" .Values.enterprise.flinkK8sOperatorDeploymentManager.flinkDeploymentCreatorRole }}
labels:
{{ include "nussknacker.labels" . | nindent 4 }}
rules:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{{- if and (hasKey .Values "flinkK8sOperatorDeploymentManager") .Values.flinkK8sOperatorDeploymentManager.enabled }}
{{- if and (hasKey .Values.enterprise "flinkK8sOperatorDeploymentManager") .Values.enterprise.flinkK8sOperatorDeploymentManager.enabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ default "flink-deployment-creator" .Values.flinkK8sOperatorDeploymentManager.flinkDeploymentCreatorRole }}-rolebinding
name: {{ default "flink-deployment-creator" .Values.enterprise.flinkK8sOperatorDeploymentManager.flinkDeploymentCreatorRole }}-rolebinding
labels:
{{ include "nussknacker.labels" . | nindent 4 }}
subjects:
- kind: ServiceAccount
name: {{ include "nussknacker.serviceAccountName" . }}
roleRef:
kind: Role
name: {{ default "flink-deployment-creator" .Values.flinkK8sOperatorDeploymentManager.flinkDeploymentCreatorRole }}
name: {{ default "flink-deployment-creator" .Values.enterprise.flinkK8sOperatorDeploymentManager.flinkDeploymentCreatorRole }}
apiGroup: rbac.authorization.k8s.io
{{- end }}
4 changes: 2 additions & 2 deletions src/templates/flink-k8s-operator/flink-operator-role.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{{- if and (hasKey .Values "flinkK8sOperatorDeploymentManager") .Values.flinkK8sOperatorDeploymentManager.enabled }}
{{- if and (hasKey .Values.enterprise "flinkK8sOperatorDeploymentManager") .Values.enterprise.flinkK8sOperatorDeploymentManager.enabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ default "flink-operator" .Values.flinkK8sOperatorDeploymentManager.flinkOperatorRole }}
name: {{ default "flink-operator" .Values.enterprise.flinkK8sOperatorDeploymentManager.flinkOperatorRole }}
labels:
{{ include "nussknacker.labels" . | nindent 4 }}
rules:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{{- if and (hasKey .Values "flinkK8sOperatorDeploymentManager") .Values.flinkK8sOperatorDeploymentManager.enabled }}
{{- if and (hasKey .Values.enterprise "flinkK8sOperatorDeploymentManager") .Values.enterprise.flinkK8sOperatorDeploymentManager.enabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ default "flink-operator" .Values.flinkK8sOperatorDeploymentManager.flinkOperatorRole }}-rolebinding
name: {{ default "flink-operator" .Values.enterprise.flinkK8sOperatorDeploymentManager.flinkOperatorRole }}-rolebinding
labels:
{{ include "nussknacker.labels" . | nindent 4 }}
subjects:
- kind: ServiceAccount
name: {{ default "flink-service-account" .Values.flinkK8sOperatorDeploymentManager.flinkServiceAccount }}
name: {{ default "flink-service-account" .Values.enterprise.flinkK8sOperatorDeploymentManager.flinkServiceAccount }}
roleRef:
kind: Role
name: {{ default "flink-operator" .Values.flinkK8sOperatorDeploymentManager.flinkOperatorRole }}
name: {{ default "flink-operator" .Values.enterprise.flinkK8sOperatorDeploymentManager.flinkOperatorRole }}
apiGroup: rbac.authorization.k8s.io
{{- end }}
4 changes: 2 additions & 2 deletions src/templates/flink-k8s-operator/flink-service-account.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{{- if and (hasKey .Values "flinkK8sOperatorDeploymentManager") .Values.flinkK8sOperatorDeploymentManager.enabled }}
{{- if and (hasKey .Values.enterprise "flinkK8sOperatorDeploymentManager") .Values.enterprise.flinkK8sOperatorDeploymentManager.enabled }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ default "flink-service-account" .Values.flinkK8sOperatorDeploymentManager.flinkServiceAccount }}
name: {{ default "flink-service-account" .Values.enterprise.flinkK8sOperatorDeploymentManager.flinkServiceAccount }}
labels:
{{ include "nussknacker.labels" . | nindent 4 }}
{{- end -}}
8 changes: 4 additions & 4 deletions src/templates/flink-k8s-operator/jar-shared-volume-pvc.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{{- if and (hasKey .Values "flinkK8sOperatorDeploymentManager") .Values.flinkK8sOperatorDeploymentManager.enabled }}
{{- if and (hasKey .Values.enterprise "flinkK8sOperatorDeploymentManager") .Values.enterprise.flinkK8sOperatorDeploymentManager.enabled }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ .Values.flinkK8sOperatorDeploymentManager.jobJarStorage.pvcName }}
{{- if and (hasKey .Values.flinkK8sOperatorDeploymentManager.jobJarStorage "keepAfterUninstall") .Values.flinkK8sOperatorDeploymentManager.jobJarStorage.keepAfterUninstall }}
name: {{ .Values.enterprise.flinkK8sOperatorDeploymentManager.jobJarStorage.pvcName }}
{{- if and (hasKey .Values.enterprise.flinkK8sOperatorDeploymentManager.jobJarStorage "keepAfterUninstall") .Values.enterprise.flinkK8sOperatorDeploymentManager.jobJarStorage.keepAfterUninstall }}
annotations:
"helm.sh/resource-policy": keep
{{- end }}
Expand All @@ -14,6 +14,6 @@ spec:
- ReadWriteMany
resources:
requests:
storage: {{ default "1Gi" .Values.flinkK8sOperatorDeploymentManager.jobJarStorage.pvcSize }}
storage: {{ default "1Gi" .Values.enterprise.flinkK8sOperatorDeploymentManager.jobJarStorage.pvcSize }}
storageClassName: nfs
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{{- if and (hasKey .Values "flinkK8sOperatorDeploymentManager") .Values.flinkK8sOperatorDeploymentManager.enabled }}
{{- if and (hasKey .Values.enterprise "flinkK8sOperatorDeploymentManager") .Values.enterprise.flinkK8sOperatorDeploymentManager.enabled }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ .Values.flinkK8sOperatorDeploymentManager.jobStateStorage.pvcName }}
{{- if and (hasKey .Values.flinkK8sOperatorDeploymentManager.jobStateStorage "keepAfterUninstall") .Values.flinkK8sOperatorDeploymentManager.jobStateStorage.keepAfterUninstall }}
name: {{ .Values.enterprise.flinkK8sOperatorDeploymentManager.jobStateStorage.pvcName }}
{{- if and (hasKey .Values.enterprise.flinkK8sOperatorDeploymentManager.jobStateStorage "keepAfterUninstall") .Values.enterprise.flinkK8sOperatorDeploymentManager.jobStateStorage.keepAfterUninstall }}
annotations:
"helm.sh/resource-policy": keep
{{- end }}
Expand All @@ -14,6 +14,6 @@ spec:
- ReadWriteMany
resources:
requests:
storage: {{ default "1Gi" .Values.flinkK8sOperatorDeploymentManager.jobStateStorage.pvcSize }}
storage: {{ default "1Gi" .Values.enterprise.flinkK8sOperatorDeploymentManager.jobStateStorage.pvcSize }}
storageClassName: nfs
{{- end }}
24 changes: 14 additions & 10 deletions src/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -219,16 +219,6 @@ flink:
jobmanager:
statefulset: true

flinkK8sOperatorDeploymentManager:
enabled: false
flinkVersion: "1.17"
jobJarStorage:
pvcName: job-jars-pvc
mountPoint: /mnt/jobjars
jobStateStorage:
pvcName: job-states-pvc
mountPoint: /mnt/jobstates

grafana:
enabled: true
grafana.ini:
Expand Down Expand Up @@ -330,3 +320,17 @@ nussknackerInitContainers: [ ]

#Extra resources to deploy
extraDeploy: []

###########################################################
### Configuration for Nussknacker enterprise components ###
###########################################################
enterprise:
flinkK8sOperatorDeploymentManager:
enabled: false
flinkVersion: "1.17"
jobJarStorage:
pvcName: job-jars-pvc
mountPoint: /mnt/jobjars
jobStateStorage:
pvcName: job-states-pvc
mountPoint: /mnt/jobstates

0 comments on commit da68b9c

Please sign in to comment.