gateway-api 0.21.0

Kubernetes Gateway API bindings in Rust
Documentation
// WARNING: generated by kopium - manual changes will be overwritten
// kopium command: kopium --schema=derived --derive=JsonSchema --derive=Default --derive=PartialEq --docs -f -
// kopium version: 0.22.5

#[allow(unused_imports)]
mod prelude {
    pub use k8s_openapi::apimachinery::pkg::apis::meta::v1::Condition;
    pub use kube::CustomResource;
    pub use schemars::JsonSchema;
    pub use serde::{Deserialize, Serialize};
}
use self::prelude::*;

/// Spec defines the desired state of XMesh.
#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)]
#[kube(
    group = "gateway.networking.x-k8s.io",
    version = "v1alpha1",
    kind = "XMesh",
    plural = "xmeshes"
)]
#[kube(status = "XMeshStatus")]
#[kube(derive = "Default")]
#[kube(derive = "PartialEq")]
pub struct XMeshSpec {
    /// ControllerName is the name of a controller that is managing Gateway API
    /// resources for mesh traffic management. The value of this field MUST be a
    /// domain prefixed path.
    ///
    /// Example: "example.com/awesome-mesh".
    ///
    /// This field is not mutable and cannot be empty.
    ///
    /// Support: Core
    #[serde(rename = "controllerName")]
    pub controller_name: String,
    /// Description optionally provides a human-readable description of a Mesh.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// ParametersRef is an optional reference to a resource that contains
    /// implementation-specific configuration for this Mesh. If no
    /// implementation-specific parameters are needed, this field MUST be
    /// omitted.
    ///
    /// ParametersRef can reference a standard Kubernetes resource, i.e.
    /// ConfigMap, or an implementation-specific custom resource. The resource
    /// can be cluster-scoped or namespace-scoped.
    ///
    /// If the referent cannot be found, refers to an unsupported kind, or when
    /// the data within that resource is malformed, the Mesh MUST be rejected
    /// with the "Accepted" status condition set to "False" and an
    /// "InvalidParameters" reason.
    ///
    /// Support: Implementation-specific
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "parametersRef")]
    pub parameters_ref: Option<XMeshParametersRef>,
}

/// ParametersRef is an optional reference to a resource that contains
/// implementation-specific configuration for this Mesh. If no
/// implementation-specific parameters are needed, this field MUST be
/// omitted.
///
/// ParametersRef can reference a standard Kubernetes resource, i.e.
/// ConfigMap, or an implementation-specific custom resource. The resource
/// can be cluster-scoped or namespace-scoped.
///
/// If the referent cannot be found, refers to an unsupported kind, or when
/// the data within that resource is malformed, the Mesh MUST be rejected
/// with the "Accepted" status condition set to "False" and an
/// "InvalidParameters" reason.
///
/// Support: Implementation-specific
#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)]
pub struct XMeshParametersRef {
    /// Group is the group of the referent.
    pub group: String,
    /// Kind is kind of the referent.
    pub kind: String,
    /// Name is the name of the referent.
    pub name: String,
    /// Namespace is the namespace of the referent.
    /// This field is required when referring to a Namespace-scoped resource and
    /// MUST be unset when referring to a Cluster-scoped resource.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub namespace: Option<String>,
}

/// Status defines the current state of XMesh.
#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)]
pub struct XMeshStatus {
    /// Conditions is the current status from the controller for
    /// this Mesh.
    ///
    /// Controllers should prefer to publish conditions using values
    /// of MeshConditionType for the type of each Condition.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub conditions: Option<Vec<Condition>>,
    /// SupportedFeatures is the set of features the Mesh support.
    /// It MUST be sorted in ascending alphabetical order by the Name key.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "supportedFeatures")]
    pub supported_features: Option<Vec<XMeshStatusSupportedFeatures>>,
}

#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, Default, PartialEq)]
pub struct XMeshStatusSupportedFeatures {
    /// FeatureName is used to describe distinct features that are covered by
    /// conformance tests.
    pub name: String,
}