-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add kiegroup/kogito-serverless-operator
Signed-off-by: Sebastian Hoß <[email protected]>
- Loading branch information
Showing
11 changed files
with
2,876 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
279 changes: 279 additions & 0 deletions
279
...atalog/kiegroup/kogito-serverless-operator/sonataflow.org/v1alpha08/sonataflowbuilds.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
365 changes: 365 additions & 0 deletions
365
...log/kiegroup/kogito-serverless-operator/sonataflow.org/v1alpha08/sonataflowplatforms.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
Empty file.
1,639 changes: 1,639 additions & 0 deletions
1,639
crd-catalog/kiegroup/kogito-serverless-operator/sonataflow.org/v1alpha08/sonataflows.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pub mod sonataflowbuilds; | ||
pub mod sonataflowplatforms; |
233 changes: 233 additions & 0 deletions
233
kube-custom-resources-rs/src/sonataflow_org_v1alpha08/sonataflowbuilds.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,233 @@ | ||
// WARNING: generated by kopium - manual changes will be overwritten | ||
// kopium command: kopium --docs --filename=./crd-catalog/kiegroup/kogito-serverless-operator/sonataflow.org/v1alpha08/sonataflowbuilds.yaml --derive=Default --derive=PartialEq | ||
// kopium version: 0.16.2 | ||
|
||
use kube::CustomResource; | ||
use serde::{Serialize, Deserialize}; | ||
use std::collections::BTreeMap; | ||
use k8s_openapi::apimachinery::pkg::util::intstr::IntOrString; | ||
|
||
/// SonataFlowBuildSpec an abstraction over the actual build process performed by the platform. | ||
#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)] | ||
#[kube(group = "sonataflow.org", version = "v1alpha08", kind = "SonataFlowBuild", plural = "sonataflowbuilds")] | ||
#[kube(namespaced)] | ||
#[kube(status = "SonataFlowBuildStatus")] | ||
#[kube(schema = "disabled")] | ||
pub struct SonataFlowBuildSpec { | ||
/// Arguments lists the command line arguments to send to the internal builder command. Depending on the build method you might set this attribute instead of BuildArgs. For example: ".spec.arguments=verbose=3". Please see the SonataFlow guides. | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub arguments: Option<Vec<String>>, | ||
/// Optional build arguments that can be set to the internal build (e.g. Docker ARG) | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "buildArgs")] | ||
pub build_args: Option<Vec<SonataFlowBuildBuildArgs>>, | ||
/// Optional environment variables to add to the internal build | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub envs: Option<Vec<SonataFlowBuildEnvs>>, | ||
/// Resources optional compute resource requirements for the builder | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub resources: Option<SonataFlowBuildResources>, | ||
/// Timeout defines the Build maximum execution duration. The Build deadline is set to the Build start time plus the Timeout duration. If the Build deadline is exceeded, the Build context is canceled, and its phase set to BuildPhaseFailed. | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub timeout: Option<String>, | ||
} | ||
|
||
/// EnvVar represents an environment variable present in a Container. | ||
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] | ||
pub struct SonataFlowBuildBuildArgs { | ||
/// Name of the environment variable. Must be a C_IDENTIFIER. | ||
pub name: String, | ||
/// Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub value: Option<String>, | ||
/// Source for the environment variable's value. Cannot be used if value is not empty. | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "valueFrom")] | ||
pub value_from: Option<SonataFlowBuildBuildArgsValueFrom>, | ||
} | ||
|
||
/// Source for the environment variable's value. Cannot be used if value is not empty. | ||
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] | ||
pub struct SonataFlowBuildBuildArgsValueFrom { | ||
/// Selects a key of a ConfigMap. | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "configMapKeyRef")] | ||
pub config_map_key_ref: Option<SonataFlowBuildBuildArgsValueFromConfigMapKeyRef>, | ||
/// Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "fieldRef")] | ||
pub field_ref: Option<SonataFlowBuildBuildArgsValueFromFieldRef>, | ||
/// Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "resourceFieldRef")] | ||
pub resource_field_ref: Option<SonataFlowBuildBuildArgsValueFromResourceFieldRef>, | ||
/// Selects a key of a secret in the pod's namespace | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "secretKeyRef")] | ||
pub secret_key_ref: Option<SonataFlowBuildBuildArgsValueFromSecretKeyRef>, | ||
} | ||
|
||
/// Selects a key of a ConfigMap. | ||
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] | ||
pub struct SonataFlowBuildBuildArgsValueFromConfigMapKeyRef { | ||
/// The key to select. | ||
pub key: String, | ||
/// Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub name: Option<String>, | ||
/// Specify whether the ConfigMap or its key must be defined | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub optional: Option<bool>, | ||
} | ||
|
||
/// Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. | ||
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] | ||
pub struct SonataFlowBuildBuildArgsValueFromFieldRef { | ||
/// Version of the schema the FieldPath is written in terms of, defaults to "v1". | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "apiVersion")] | ||
pub api_version: Option<String>, | ||
/// Path of the field to select in the specified API version. | ||
#[serde(rename = "fieldPath")] | ||
pub field_path: String, | ||
} | ||
|
||
/// Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. | ||
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] | ||
pub struct SonataFlowBuildBuildArgsValueFromResourceFieldRef { | ||
/// Container name: required for volumes, optional for env vars | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "containerName")] | ||
pub container_name: Option<String>, | ||
/// Specifies the output format of the exposed resources, defaults to "1" | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub divisor: Option<IntOrString>, | ||
/// Required: resource to select | ||
pub resource: String, | ||
} | ||
|
||
/// Selects a key of a secret in the pod's namespace | ||
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] | ||
pub struct SonataFlowBuildBuildArgsValueFromSecretKeyRef { | ||
/// The key of the secret to select from. Must be a valid secret key. | ||
pub key: String, | ||
/// Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub name: Option<String>, | ||
/// Specify whether the Secret or its key must be defined | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub optional: Option<bool>, | ||
} | ||
|
||
/// EnvVar represents an environment variable present in a Container. | ||
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] | ||
pub struct SonataFlowBuildEnvs { | ||
/// Name of the environment variable. Must be a C_IDENTIFIER. | ||
pub name: String, | ||
/// Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub value: Option<String>, | ||
/// Source for the environment variable's value. Cannot be used if value is not empty. | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "valueFrom")] | ||
pub value_from: Option<SonataFlowBuildEnvsValueFrom>, | ||
} | ||
|
||
/// Source for the environment variable's value. Cannot be used if value is not empty. | ||
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] | ||
pub struct SonataFlowBuildEnvsValueFrom { | ||
/// Selects a key of a ConfigMap. | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "configMapKeyRef")] | ||
pub config_map_key_ref: Option<SonataFlowBuildEnvsValueFromConfigMapKeyRef>, | ||
/// Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "fieldRef")] | ||
pub field_ref: Option<SonataFlowBuildEnvsValueFromFieldRef>, | ||
/// Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "resourceFieldRef")] | ||
pub resource_field_ref: Option<SonataFlowBuildEnvsValueFromResourceFieldRef>, | ||
/// Selects a key of a secret in the pod's namespace | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "secretKeyRef")] | ||
pub secret_key_ref: Option<SonataFlowBuildEnvsValueFromSecretKeyRef>, | ||
} | ||
|
||
/// Selects a key of a ConfigMap. | ||
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] | ||
pub struct SonataFlowBuildEnvsValueFromConfigMapKeyRef { | ||
/// The key to select. | ||
pub key: String, | ||
/// Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub name: Option<String>, | ||
/// Specify whether the ConfigMap or its key must be defined | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub optional: Option<bool>, | ||
} | ||
|
||
/// Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. | ||
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] | ||
pub struct SonataFlowBuildEnvsValueFromFieldRef { | ||
/// Version of the schema the FieldPath is written in terms of, defaults to "v1". | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "apiVersion")] | ||
pub api_version: Option<String>, | ||
/// Path of the field to select in the specified API version. | ||
#[serde(rename = "fieldPath")] | ||
pub field_path: String, | ||
} | ||
|
||
/// Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. | ||
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] | ||
pub struct SonataFlowBuildEnvsValueFromResourceFieldRef { | ||
/// Container name: required for volumes, optional for env vars | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "containerName")] | ||
pub container_name: Option<String>, | ||
/// Specifies the output format of the exposed resources, defaults to "1" | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub divisor: Option<IntOrString>, | ||
/// Required: resource to select | ||
pub resource: String, | ||
} | ||
|
||
/// Selects a key of a secret in the pod's namespace | ||
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] | ||
pub struct SonataFlowBuildEnvsValueFromSecretKeyRef { | ||
/// The key of the secret to select from. Must be a valid secret key. | ||
pub key: String, | ||
/// Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub name: Option<String>, | ||
/// Specify whether the Secret or its key must be defined | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub optional: Option<bool>, | ||
} | ||
|
||
/// Resources optional compute resource requirements for the builder | ||
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] | ||
pub struct SonataFlowBuildResources { | ||
/// Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. | ||
/// This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. | ||
/// This field is immutable. It can only be set for containers. | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub claims: Option<Vec<SonataFlowBuildResourcesClaims>>, | ||
/// Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub limits: Option<BTreeMap<String, IntOrString>>, | ||
/// Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub requests: Option<BTreeMap<String, IntOrString>>, | ||
} | ||
|
||
/// ResourceClaim references one entry in PodSpec.ResourceClaims. | ||
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] | ||
pub struct SonataFlowBuildResourcesClaims { | ||
/// Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container. | ||
pub name: String, | ||
} | ||
|
||
/// SonataFlowBuildStatus defines the observed state of SonataFlowBuild | ||
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] | ||
pub struct SonataFlowBuildStatus { | ||
/// Current phase of the build | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "buildPhase")] | ||
pub build_phase: Option<String>, | ||
/// Last error found during build | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub error: Option<String>, | ||
/// The final image tag produced by this build instance | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "imageTag")] | ||
pub image_tag: Option<String>, | ||
/// InnerBuild is a reference to an internal build object, which can be anything known only to internal builders. | ||
#[serde(default, skip_serializing_if = "Option::is_none", rename = "innerBuild")] | ||
pub inner_build: Option<BTreeMap<String, serde_json::Value>>, | ||
} | ||
|
Oops, something went wrong.