kcr_radapp_io 3.20260529.210306

Kubernetes Custom Resource Bindings
Documentation
// WARNING: generated by kopium - manual changes will be overwritten
// kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/radius-project/radius/radapp.io/v1alpha3/recipes.yaml
// kopium version: 0.23.0

#[allow(unused_imports)]
mod prelude {
    pub use kube::CustomResource;
    pub use serde::{Serialize, Deserialize};
    pub use k8s_openapi::api::core::v1::ObjectReference;
}

use self::prelude::*;

/// RecipeSpec defines the desired state of Recipe
#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
#[kube(group = "radapp.io", version = "v1alpha3", kind = "Recipe", plural = "recipes")]
#[kube(namespaced)]
#[kube(status = "RecipeStatus")]
#[kube(schema = "disabled")]
#[kube(derive="Default")]
#[kube(derive="PartialEq")]
pub struct RecipeSpec {
    /// Application is the name of the Radius application to use. If unset the namespace of the
    /// Recipe will be used as the application name.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub application: Option<String>,
    /// Environment is the name of the Radius environment to use. If unset the value 'default' will be
    /// used as the environment name.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub environment: Option<String>,
    /// SecretName is the name of a Kubernetes secret to create once the resource is created.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretName")]
    pub secret_name: Option<String>,
    /// Type is the type of resource to create. eg: 'Applications.Datastores/redisCaches'.
    #[serde(rename = "type")]
    pub r#type: String,
}

/// RecipeStatus defines the observed state of Recipe
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RecipeStatus {
    /// Application is the resource ID of the application.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub application: Option<String>,
    /// Environment is the resource ID of the environment.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub environment: Option<String>,
    /// ObservedGeneration is the most recent generation observed for this Recipe. It corresponds to the
    /// Recipe's generation, which is updated on mutation by the API Server.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "observedGeneration")]
    pub observed_generation: Option<i64>,
    /// Operation tracks the status of an in-progress provisioning operation.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub operation: Option<RecipeStatusOperation>,
    /// Phrase indicates the current status of the Recipe.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub phrase: Option<String>,
    /// Resource is the resource ID of the resource.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub resource: Option<String>,
    /// Scope is the resource ID of the scope.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub scope: Option<String>,
    /// Secret specifies a reference to the secret being managed by this Recipe.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub secret: Option<ObjectReference>,
}

/// Operation tracks the status of an in-progress provisioning operation.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RecipeStatusOperation {
    /// OperationKind describes the type of operation being performed.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "operationKind")]
    pub operation_kind: Option<String>,
    /// ResumeToken is a token that can be used to resume an in-progress provisioning operation.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "resumeToken")]
    pub resume_token: Option<String>,
}

/// Secret specifies a reference to the secret being managed by this Recipe.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct RecipeStatusSecret {
    /// API version of the referent.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "apiVersion")]
    pub api_version: Option<String>,
    /// If referring to a piece of an object instead of an entire object, this string
    /// should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
    /// For example, if the object reference is to a container within a pod, this would take on a value like:
    /// "spec.containers{name}" (where "name" refers to the name of the container that triggered
    /// the event) or if no container name is specified "spec.containers[2]" (container with
    /// index 2 in this pod). This syntax is chosen only to have some well-defined way of
    /// referencing a part of an object.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "fieldPath")]
    pub field_path: Option<String>,
    /// Kind of the referent.
    /// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub kind: Option<String>,
    /// Name of the referent.
    /// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Namespace of the referent.
    /// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub namespace: Option<String>,
    /// Specific resourceVersion to which this reference is made, if any.
    /// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency>
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "resourceVersion")]
    pub resource_version: Option<String>,
    /// UID of the referent.
    /// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids>
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub uid: Option<String>,
}