Skip to content

Commit

Permalink
Extend StreamsBootstrap model
Browse files Browse the repository at this point in the history
  • Loading branch information
raminqaf committed Oct 22, 2024
1 parent 697a2e8 commit c6df335
Show file tree
Hide file tree
Showing 7 changed files with 437 additions and 22 deletions.
163 changes: 152 additions & 11 deletions docs/docs/schema/defaults.json
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,30 @@
"title": "InputTopicTypes",
"type": "string"
},
"JMXConfig": {
"description": "JMX configuration options.",
"properties": {
"metricRules": {
"default": [
".*"
],
"description": "List of JMX metric rules.",
"items": {
"type": "string"
},
"title": "Metricrules",
"type": "array"
},
"port": {
"default": 5555,
"description": "The jmx port which JMX style metrics are exposed.",
"title": "Port",
"type": "integer"
}
},
"title": "JMXConfig",
"type": "object"
},
"JavaOptions": {
"description": "JVM configuration options.",
"properties": {
Expand Down Expand Up @@ -1135,6 +1159,17 @@
"additionalProperties": true,
"description": "Settings specific to producers.",
"properties": {
"affinity": {
"description": "Map to configure pod affinities https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity.",
"title": "Affinity",
"type": "object"
},
"backoffLimit": {
"default": 6,
"description": "The number of times to restart an unsuccessful job.",
"title": "Backofflimit",
"type": "integer"
},
"commandLine": {
"description": "Map of command line arguments passed to the streams app.",
"title": "Commandline",
Expand All @@ -1146,6 +1181,12 @@
"title": "Configurationenvprefix",
"type": "string"
},
"deployment": {
"default": false,
"description": "Deploy the producer as a Kubernetes Deployment (thereby ignoring Job-related configurations)",
"title": "Deployment",
"type": "boolean"
},
"env": {
"additionalProperties": {
"type": "string"
Expand All @@ -1154,6 +1195,12 @@
"title": "Env",
"type": "object"
},
"failedJobsHistoryLimit": {
"default": 1,
"description": "The number of unsuccessful jobs to retain.",
"title": "Failedjobshistorylimit",
"type": "integer"
},
"files": {
"additionalProperties": {
"type": "string"
Expand Down Expand Up @@ -1199,6 +1246,11 @@
],
"description": "Kafka Streams settings"
},
"livenessProbe": {
"description": "See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#probe-v1-core",
"title": "Livenessprobe",
"type": "object"
},
"nameOverride": {
"anyOf": [
{
Expand Down Expand Up @@ -1237,6 +1289,11 @@
"title": "Ports",
"type": "array"
},
"readinessProbe": {
"description": "See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#probe-v1-core",
"title": "Readinessprobe",
"type": "object"
},
"resources": {
"allOf": [
{
Expand All @@ -1255,6 +1312,28 @@
},
"description": "See https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/"
},
"restartPolicy": {
"allOf": [
{
"$ref": "#/$defs/RestartPolicy"
}
],
"default": "OnFailure",
"description": "See https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy"
},
"schedule": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Cron expression to denote a schedule this producer app should be run on. It will then be deployed as a CronJob instead of a Job.",
"title": "Schedule"
},
"secretFilesRefs": {
"description": "Mount existing secrets as volumes",
"items": {
Expand All @@ -1264,9 +1343,6 @@
"type": "array"
},
"secretRefs": {
"additionalProperties": {
"type": "string"
},
"description": "Inject existing secrets as environment variables. Map key is used as environment variable name. Value consists of secret name and key.",
"title": "Secretrefs",
"type": "object"
Expand All @@ -1286,6 +1362,24 @@
}
],
"description": ""
},
"successfulJobsHistoryLimit": {
"default": 1,
"description": "The number of successful jobs to retain.",
"title": "Successfuljobshistorylimit",
"type": "integer"
},
"suspend": {
"default": false,
"description": "Whether to suspend the execution of the cron job.",
"title": "Suspend",
"type": "boolean"
},
"ttlSecondsAfterFinished": {
"default": 100,
"description": "See https://kubernetes.io/docs/concepts/workloads/controllers/ttlafterfinished/#ttl-after-finished-controller",
"title": "Ttlsecondsafterfinished",
"type": "integer"
}
},
"required": [
Expand Down Expand Up @@ -1618,6 +1712,15 @@
"title": "Resources",
"type": "object"
},
"RestartPolicy": {
"enum": [
"Always",
"OnFailure",
"Never"
],
"title": "RestartPolicy",
"type": "string"
},
"ServiceConfig": {
"description": "Base model for configuring a service for the Kafka Streams application.",
"properties": {
Expand Down Expand Up @@ -1926,6 +2029,11 @@
"additionalProperties": true,
"description": "streams-bootstrap app configurations.\nThe attributes correspond to keys and values that are used as values for the streams bootstrap helm chart.",
"properties": {
"affinity": {
"description": "Map to configure pod affinities https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity.",
"title": "Affinity",
"type": "object"
},
"autoscaling": {
"anyOf": [
{
Expand Down Expand Up @@ -1994,6 +2102,14 @@
],
"description": ""
},
"jmx": {
"allOf": [
{
"$ref": "#/$defs/JMXConfig"
}
],
"description": "Configuration for JMX Exporter."
},
"kafka": {
"allOf": [
{
Expand All @@ -2002,6 +2118,11 @@
],
"description": "streams-bootstrap kafka section"
},
"livenessProbe": {
"description": "See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#probe-v1-core",
"title": "Livenessprobe",
"type": "object"
},
"nameOverride": {
"anyOf": [
{
Expand All @@ -2027,7 +2148,7 @@
"size": null,
"storage_class": null
},
"description": ""
"description": "Configuration for persistent volume to store the state of the streams app."
},
"podAnnotations": {
"additionalProperties": {
Expand Down Expand Up @@ -2059,7 +2180,12 @@
"$ref": "#/$defs/PrometheusConfig"
}
],
"description": ""
"description": "Configuration for Prometheus JMX Exporter."
},
"readinessProbe": {
"description": "See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#probe-v1-core",
"title": "Readinessprobe",
"type": "object"
},
"resources": {
"allOf": [
Expand Down Expand Up @@ -2088,9 +2214,6 @@
"type": "array"
},
"secretRefs": {
"additionalProperties": {
"type": "string"
},
"description": "Inject existing secrets as environment variables. Map key is used as environment variable name. Value consists of secret name and key.",
"title": "Secretrefs",
"type": "object"
Expand All @@ -2116,6 +2239,12 @@
"description": "Whether to use a Statefulset instead of a Deployment to deploy the streams app.",
"title": "Statefulset",
"type": "boolean"
},
"terminationGracePeriodSeconds": {
"default": 300,
"description": "Delay for graceful application shutdown in seconds: https://pracucci.com/graceful-shutdown-of-kubernetes-pods.html",
"title": "Terminationgraceperiodseconds",
"type": "integer"
}
},
"required": [
Expand Down Expand Up @@ -2351,6 +2480,11 @@
"additionalProperties": true,
"description": "Base value class for all streams bootstrap related components.",
"properties": {
"affinity": {
"description": "Map to configure pod affinities https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity.",
"title": "Affinity",
"type": "object"
},
"commandLine": {
"description": "Map of command line arguments passed to the streams app.",
"title": "Commandline",
Expand Down Expand Up @@ -2415,6 +2549,11 @@
],
"description": "Kafka configuration for the streams-bootstrap app."
},
"livenessProbe": {
"description": "See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#probe-v1-core",
"title": "Livenessprobe",
"type": "object"
},
"nameOverride": {
"anyOf": [
{
Expand Down Expand Up @@ -2453,6 +2592,11 @@
"title": "Ports",
"type": "array"
},
"readinessProbe": {
"description": "See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#probe-v1-core",
"title": "Readinessprobe",
"type": "object"
},
"resources": {
"allOf": [
{
Expand Down Expand Up @@ -2480,9 +2624,6 @@
"type": "array"
},
"secretRefs": {
"additionalProperties": {
"type": "string"
},
"description": "Inject existing secrets as environment variables. Map key is used as environment variable name. Value consists of secret name and key.",
"title": "Secretrefs",
"type": "object"
Expand Down
Loading

0 comments on commit c6df335

Please sign in to comment.