Skip to content

Commit

Permalink
refactor: abstract pod template (#296)
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Wang <whynowy@gmail.com>
  • Loading branch information
whynowy committed Nov 7, 2022
1 parent 2408946 commit afbe255
Show file tree
Hide file tree
Showing 19 changed files with 2,327 additions and 4,187 deletions.
64 changes: 59 additions & 5 deletions api/json-schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -17253,6 +17253,60 @@
},
"type": "object"
},
"io.numaproj.numaflow.v1alpha1.AbstractPodTemplate": {
"description": "AbstractPodTemplate provides a template for pod customization in vertices, daemon deployments and so on.",
"properties": {
"affinity": {
"$ref": "#/definitions/io.k8s.api.core.v1.Affinity",
"description": "The pod's scheduling constraints More info: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/"
},
"imagePullSecrets": {
"description": "ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod",
"items": {
"$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference"
},
"type": "array",
"x-kubernetes-patch-merge-key": "name",
"x-kubernetes-patch-strategy": "merge"
},
"metadata": {
"$ref": "#/definitions/io.numaproj.numaflow.v1alpha1.Metadata",
"description": "Metadata sets the pods's metadata, i.e. annotations and labels"
},
"nodeSelector": {
"additionalProperties": {
"type": "string"
},
"description": "NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/",
"type": "object"
},
"priority": {
"description": "The priority value. Various system components use this field to find the priority of the Redis pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. More info: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/",
"format": "int32",
"type": "integer"
},
"priorityClassName": {
"description": "If specified, indicates the Redis pod's priority. \"system-node-critical\" and \"system-cluster-critical\" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. More info: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/",
"type": "string"
},
"securityContext": {
"$ref": "#/definitions/io.k8s.api.core.v1.PodSecurityContext",
"description": "SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field."
},
"serviceAccountName": {
"description": "ServiceAccountName applied to the pod",
"type": "string"
},
"tolerations": {
"description": "If specified, the pod's tolerations.",
"items": {
"$ref": "#/definitions/io.k8s.api.core.v1.Toleration"
},
"type": "array"
}
},
"type": "object"
},
"io.numaproj.numaflow.v1alpha1.AbstractVertex": {
"properties": {
"affinity": {
Expand Down Expand Up @@ -17314,7 +17368,7 @@
"description": "SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field."
},
"serviceAccountName": {
"description": "ServiceAccountName to apply to the StatefulSet",
"description": "ServiceAccountName applied to the pod",
"type": "string"
},
"sink": {
Expand Down Expand Up @@ -17486,7 +17540,7 @@
"description": "SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field."
},
"serviceAccountName": {
"description": "ServiceAccountName to apply to the Deployment",
"description": "ServiceAccountName applied to the pod",
"type": "string"
},
"tolerations": {
Expand Down Expand Up @@ -18056,7 +18110,7 @@
"description": "SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field."
},
"serviceAccountName": {
"description": "ServiceAccountName to apply to the StatefulSet",
"description": "ServiceAccountName applied to the pod",
"type": "string"
},
"settings": {
Expand Down Expand Up @@ -18265,7 +18319,7 @@
"description": "SentinelContainerTemplate contains customized spec for Redis container"
},
"serviceAccountName": {
"description": "ServiceAccountName to apply to the StatefulSet",
"description": "ServiceAccountName applied to the pod",
"type": "string"
},
"settings": {
Expand Down Expand Up @@ -18850,7 +18904,7 @@
"description": "SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field."
},
"serviceAccountName": {
"description": "ServiceAccountName to apply to the StatefulSet",
"description": "ServiceAccountName applied to the pod",
"type": "string"
},
"sink": {
Expand Down
64 changes: 59 additions & 5 deletions api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -17257,6 +17257,60 @@
}
}
},
"io.numaproj.numaflow.v1alpha1.AbstractPodTemplate": {
"description": "AbstractPodTemplate provides a template for pod customization in vertices, daemon deployments and so on.",
"type": "object",
"properties": {
"affinity": {
"description": "The pod's scheduling constraints More info: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/",
"$ref": "#/definitions/io.k8s.api.core.v1.Affinity"
},
"imagePullSecrets": {
"description": "ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod",
"type": "array",
"items": {
"$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference"
},
"x-kubernetes-patch-merge-key": "name",
"x-kubernetes-patch-strategy": "merge"
},
"metadata": {
"description": "Metadata sets the pods's metadata, i.e. annotations and labels",
"$ref": "#/definitions/io.numaproj.numaflow.v1alpha1.Metadata"
},
"nodeSelector": {
"description": "NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"priority": {
"description": "The priority value. Various system components use this field to find the priority of the Redis pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. More info: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/",
"type": "integer",
"format": "int32"
},
"priorityClassName": {
"description": "If specified, indicates the Redis pod's priority. \"system-node-critical\" and \"system-cluster-critical\" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. More info: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/",
"type": "string"
},
"securityContext": {
"description": "SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field.",
"$ref": "#/definitions/io.k8s.api.core.v1.PodSecurityContext"
},
"serviceAccountName": {
"description": "ServiceAccountName applied to the pod",
"type": "string"
},
"tolerations": {
"description": "If specified, the pod's tolerations.",
"type": "array",
"items": {
"$ref": "#/definitions/io.k8s.api.core.v1.Toleration"
}
}
}
},
"io.numaproj.numaflow.v1alpha1.AbstractVertex": {
"type": "object",
"required": [
Expand Down Expand Up @@ -17322,7 +17376,7 @@
"$ref": "#/definitions/io.k8s.api.core.v1.PodSecurityContext"
},
"serviceAccountName": {
"description": "ServiceAccountName to apply to the StatefulSet",
"description": "ServiceAccountName applied to the pod",
"type": "string"
},
"sink": {
Expand Down Expand Up @@ -17491,7 +17545,7 @@
"$ref": "#/definitions/io.k8s.api.core.v1.PodSecurityContext"
},
"serviceAccountName": {
"description": "ServiceAccountName to apply to the Deployment",
"description": "ServiceAccountName applied to the pod",
"type": "string"
},
"tolerations": {
Expand Down Expand Up @@ -18052,7 +18106,7 @@
"$ref": "#/definitions/io.k8s.api.core.v1.PodSecurityContext"
},
"serviceAccountName": {
"description": "ServiceAccountName to apply to the StatefulSet",
"description": "ServiceAccountName applied to the pod",
"type": "string"
},
"settings": {
Expand Down Expand Up @@ -18261,7 +18315,7 @@
"$ref": "#/definitions/io.numaproj.numaflow.v1alpha1.ContainerTemplate"
},
"serviceAccountName": {
"description": "ServiceAccountName to apply to the StatefulSet",
"description": "ServiceAccountName applied to the pod",
"type": "string"
},
"settings": {
Expand Down Expand Up @@ -18832,7 +18886,7 @@
"$ref": "#/definitions/io.k8s.api.core.v1.PodSecurityContext"
},
"serviceAccountName": {
"description": "ServiceAccountName to apply to the StatefulSet",
"description": "ServiceAccountName applied to the pod",
"type": "string"
},
"sink": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2170,7 +2170,7 @@ spec:
type: object
type: object
serviceAccountName:
description: ServiceAccountName to apply to the StatefulSet
description: ServiceAccountName applied to the pod
type: string
settings:
description: JetStream configuration, if not specified, global
Expand Down Expand Up @@ -4457,7 +4457,7 @@ spec:
type: object
type: object
serviceAccountName:
description: ServiceAccountName to apply to the StatefulSet
description: ServiceAccountName applied to the pod
type: string
settings:
description: Redis configuration, if not specified, global
Expand Down
4 changes: 2 additions & 2 deletions config/base/crds/full/numaflow.numaproj.io_pipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1661,7 +1661,7 @@ spec:
type: object
type: object
serviceAccountName:
description: ServiceAccountName to apply to the Deployment
description: ServiceAccountName applied to the pod
type: string
tolerations:
description: If specified, the pod's tolerations.
Expand Down Expand Up @@ -4495,7 +4495,7 @@ spec:
type: object
type: object
serviceAccountName:
description: ServiceAccountName to apply to the StatefulSet
description: ServiceAccountName applied to the pod
type: string
sink:
properties:
Expand Down
2 changes: 1 addition & 1 deletion config/base/crds/full/numaflow.numaproj.io_vertices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2753,7 +2753,7 @@ spec:
type: object
type: object
serviceAccountName:
description: ServiceAccountName to apply to the StatefulSet
description: ServiceAccountName applied to the pod
type: string
sink:
properties:
Expand Down
10 changes: 5 additions & 5 deletions config/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2169,7 +2169,7 @@ spec:
type: object
type: object
serviceAccountName:
description: ServiceAccountName to apply to the StatefulSet
description: ServiceAccountName applied to the pod
type: string
settings:
description: JetStream configuration, if not specified, global
Expand Down Expand Up @@ -4456,7 +4456,7 @@ spec:
type: object
type: object
serviceAccountName:
description: ServiceAccountName to apply to the StatefulSet
description: ServiceAccountName applied to the pod
type: string
settings:
description: Redis configuration, if not specified, global
Expand Down Expand Up @@ -6395,7 +6395,7 @@ spec:
type: object
type: object
serviceAccountName:
description: ServiceAccountName to apply to the Deployment
description: ServiceAccountName applied to the pod
type: string
tolerations:
description: If specified, the pod's tolerations.
Expand Down Expand Up @@ -9229,7 +9229,7 @@ spec:
type: object
type: object
serviceAccountName:
description: ServiceAccountName to apply to the StatefulSet
description: ServiceAccountName applied to the pod
type: string
sink:
properties:
Expand Down Expand Up @@ -14425,7 +14425,7 @@ spec:
type: object
type: object
serviceAccountName:
description: ServiceAccountName to apply to the StatefulSet
description: ServiceAccountName applied to the pod
type: string
sink:
properties:
Expand Down
10 changes: 5 additions & 5 deletions config/namespace-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2169,7 +2169,7 @@ spec:
type: object
type: object
serviceAccountName:
description: ServiceAccountName to apply to the StatefulSet
description: ServiceAccountName applied to the pod
type: string
settings:
description: JetStream configuration, if not specified, global
Expand Down Expand Up @@ -4456,7 +4456,7 @@ spec:
type: object
type: object
serviceAccountName:
description: ServiceAccountName to apply to the StatefulSet
description: ServiceAccountName applied to the pod
type: string
settings:
description: Redis configuration, if not specified, global
Expand Down Expand Up @@ -6395,7 +6395,7 @@ spec:
type: object
type: object
serviceAccountName:
description: ServiceAccountName to apply to the Deployment
description: ServiceAccountName applied to the pod
type: string
tolerations:
description: If specified, the pod's tolerations.
Expand Down Expand Up @@ -9229,7 +9229,7 @@ spec:
type: object
type: object
serviceAccountName:
description: ServiceAccountName to apply to the StatefulSet
description: ServiceAccountName applied to the pod
type: string
sink:
properties:
Expand Down Expand Up @@ -14425,7 +14425,7 @@ spec:
type: object
type: object
serviceAccountName:
description: ServiceAccountName to apply to the StatefulSet
description: ServiceAccountName applied to the pod
type: string
sink:
properties:
Expand Down

0 comments on commit afbe255

Please sign in to comment.