Skip to content

Commit dfad3ef

Browse files
authored
Update CRD docs (#411)
1 parent b9ee319 commit dfad3ef

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

apis/flinkcluster/v1beta1/flinkcluster_types.go

+2-4
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ const (
308308

309309
// TaskManagerSpec defines properties of TaskManager.
310310
type TaskManagerSpec struct {
311-
// _(Optional)_ Defines the replica workload's type. If not specified, the default value is `StatefulSet`.
311+
// _(Optional)_ Defines the replica workload's type: `StatefulSet` or `Deployment`. If not specified, the default value is `StatefulSet`.
312312
DeploymentType DeploymentType `json:"deploymentType,omitempty"`
313313

314314
// The number of replicas. default: `3`
@@ -347,13 +347,11 @@ type TaskManagerSpec struct {
347347
// [More info](https://kubernetes.io/docs/concepts/storage/volumes/)
348348
VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`
349349

350-
// _(Optional)_ A template for persistent volume claim each requested and mounted to JobManager pod,
350+
// _(Optional)_ A template for persistent volume claim each requested and mounted to TaskManager pod,
351351
// This can be used to mount an external volume with a specific storageClass or larger captivity (for larger/faster state backend).
352352
// [More info](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims)
353-
354353
// If deploymentType: StatefulSet is used, these templates will be added to the taskManager statefulset template,
355354
// hence mounting persistent-pvcs to the indexed statefulset pods.
356-
//
357355
// If deploymentType: Deployment is used, these templates are appended to the Ephemeral Volumes in the PodSpec,
358356
// hence mounting ephemeral-pvcs to the replicaset pods.
359357
VolumeClaimTemplates []corev1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"`

docs/crd.md

+12-3
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ _Appears in:_
9292
| `jobManagerService` _[JobManagerServiceStatus](#jobmanagerservicestatus)_ | The state of JobManager service. |
9393
| `jobManagerIngress` _[JobManagerIngressStatus](#jobmanageringressstatus)_ | The state of JobManager ingress. |
9494
| `taskManagerStatefulSet` _[FlinkClusterComponentState](#flinkclustercomponentstate)_ | The state of TaskManager StatefulSet. |
95+
| `taskManagerDeployment` _[FlinkClusterComponentState](#flinkclustercomponentstate)_ | The state of TaskManager Deployment. |
9596
| `job` _[JobStatus](#jobstatus)_ | The status of the job, available only when JobSpec is provided. |
9697

9798

@@ -285,6 +286,8 @@ _Appears in:_
285286
| --- | --- |
286287
| `replicas` _integer_ | The number of JobManager replicas, default: `1` |
287288
| `accessScope` _string_ | Access scope, default: `Cluster`. `Cluster`: accessible from within the same cluster. `VPC`: accessible from within the same VPC. `External`: accessible from the internet. `NodePort`: accessible through node port. `Headless`: pod IPs assumed to be routable and advertised directly with `clusterIP: None``. Currently `VPC, External` are only available for GKE. |
289+
| `ServiceAnnotations` _object (keys:string, values:string)_ | _(Optional)_ Define JobManager Service annotations for configuration. |
290+
| `ServiceLabels` _object (keys:string, values:string)_ | _(Optional)_ Define JobManager Service labels for configuration. |
288291
| `ingress` _[JobManagerIngressSpec](#jobmanageringressspec)_ | _(Optional)_ Provide external access to JobManager UI/API. |
289292
| `ports` _[JobManagerPorts](#jobmanagerports)_ | Ports that JobManager listening on. |
290293
| `extraPorts` _[NamedPort](#namedport) array_ | _(Optional)_ Extra ports to be exposed. For example, Flink metrics reporter ports: Prometheus, JMX and so on. Each port number and name must be unique among ports and extraPorts. |
@@ -304,8 +307,6 @@ _Appears in:_
304307
| `podLabels` _object (keys:string, values:string)_ | _(Optional)_ JobManager StatefulSet pod template labels. [More info](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) |
305308
| `livenessProbe` _[Probe](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#probe-v1-core)_ | Container liveness probe If omitted, a [default value](https://github.com/spotify/flink-on-k8s-operator/blob/a88ed2b/api/v1beta1/flinkcluster_default.go#L113-L123) will be used. [More info](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) |
306309
| `readinessProbe` _[Probe](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#probe-v1-core)_ | Container readiness probe If omitted, a [default value](https://github.com/spotify/flink-on-k8s-operator/blob/a88ed2b/api/v1beta1/flinkcluster_default.go#L129-L139) will be used. [More info](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) |
307-
| `ServiceAnnotations` _object (keys:string, values:string)_ | _(Optional)_ JobManager Service annotations. [More info](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) |
308-
| `ServiceLabels` _object (keys:string, values:string)_ | _(Optional)_ JobManager Service labels. [More info](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) |
309310

310311

311312
#### JobSpec
@@ -319,6 +320,7 @@ _Appears in:_
319320

320321
| Field | Description |
321322
| --- | --- |
323+
| `classPath` _string array_ | _(Optional)_ Adds URLs to each user code classloader on all nodes in the cluster. The paths must specify a protocol (e.g. file://) and be accessible on all nodes (e.g. by means of a NFS share). The protocol must be supported by the {@link java.net.URLClassLoader}. You may add support to more protocol by setting the `java.protocol.handler.pkgs` java option |
322324
| `jarFile` _string_ | _(Optional)_ JAR file of the job. It could be a local file or remote URI, depending on which protocols (e.g., `https://, gs://`) are supported by the Flink image. |
323325
| `className` _string_ | _(Optional)_ Fully qualified Java class name of the job. |
324326
| `pyFile` _string_ | _(Optional)_ Python file of the job. It could be a local file or remote URI (e.g.,`https://`, `gs://`). |
@@ -456,6 +458,7 @@ _Appears in:_
456458

457459
| Field | Description |
458460
| --- | --- |
461+
| `deploymentType` _DeploymentType_ | _(Optional)_ Defines the replica workload's type: `StatefulSet` or `Deployment`. If not specified, the default value is `StatefulSet`. |
459462
| `replicas` _integer_ | The number of replicas. default: `3` |
460463
| `ports` _[TaskManagerPorts](#taskmanagerports)_ | Ports that TaskManager listening on. |
461464
| `extraPorts` _[NamedPort](#namedport) array_ | _(Optional)_ Extra ports to be exposed. For example, Flink metrics reporter ports: Prometheus, JMX and so on. |
@@ -465,7 +468,7 @@ _Appears in:_
465468
| `memoryProcessRatio` _integer_ | For Flink 1.10+. Percentage of process memory, as a safety margin to avoid OOM kill, default: `20` |
466469
| `volumes` _[Volume](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#volume-v1-core) array_ | _(Optional)_ Volumes in the TaskManager pods. [More info](https://kubernetes.io/docs/concepts/storage/volumes/) |
467470
| `volumeMounts` _[VolumeMount](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#volumemount-v1-core) array_ | _(Optional)_ Volume mounts in the TaskManager containers. [More info](https://kubernetes.io/docs/concepts/storage/volumes/) |
468-
| `volumeClaimTemplates` _[PersistentVolumeClaim](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#persistentvolumeclaim-v1-core) array_ | _(Optional)_ A template for persistent volume claim each requested and mounted to JobManager pod, This can be used to mount an external volume with a specific storageClass or larger captivity (for larger/faster state backend). [More info](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims) |
471+
| `volumeClaimTemplates` _[PersistentVolumeClaim](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#persistentvolumeclaim-v1-core) array_ | _(Optional)_ A template for persistent volume claim each requested and mounted to TaskManager pod, This can be used to mount an external volume with a specific storageClass or larger captivity (for larger/faster state backend). [More info](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims) If deploymentType: StatefulSet is used, these templates will be added to the taskManager statefulset template, hence mounting persistent-pvcs to the indexed statefulset pods. If deploymentType: Deployment is used, these templates are appended to the Ephemeral Volumes in the PodSpec, hence mounting ephemeral-pvcs to the replicaset pods. |
469472
| `initContainers` _[Container](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core) array_ | _(Optional)_ Init containers of the Task Manager pod. [More info](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) |
470473
| `nodeSelector` _object (keys:string, values:string)_ | _(Optional)_ Selector which must match a node's labels for the TaskManager pod to be scheduled on that node. [More info](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/) |
471474
| `tolerations` _[Toleration](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#toleration-v1-core) array_ | _(Optional)_ Defines the node affinity of the pod [More info](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) |
@@ -475,3 +478,9 @@ _Appears in:_
475478
| `podLabels` _object (keys:string, values:string)_ | _(Optional)_ TaskManager StatefulSet pod template labels. [More info](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) |
476479
| `livenessProbe` _[Probe](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#probe-v1-core)_ | Container liveness probe If omitted, a [default value](https://github.com/spotify/flink-on-k8s-operator/blob/a88ed2b/api/v1beta1/flinkcluster_default.go#L177-L187) will be used. [More info](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) |
477480
| `readinessProbe` _[Probe](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#probe-v1-core)_ | Container readiness probe If omitted, a [default value](https://github.com/spotify/flink-on-k8s-operator/blob/a88ed2b/api/v1beta1/flinkcluster_default.go#L193-L203) will be used. [More info](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) |
481+
482+
483+
484+
485+
486+

0 commit comments

Comments
 (0)