kcr_edp_epam_com 3.20260531.121040

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/epam/edp-nexus-operator/edp.epam.com/v1alpha1/nexusblobstores.yaml
// kopium version: 0.23.0

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

use self::prelude::*;

/// NexusBlobStoreSpec defines the desired state of NexusBlobStore.
#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
#[kube(group = "edp.epam.com", version = "v1alpha1", kind = "NexusBlobStore", plural = "nexusblobstores")]
#[kube(namespaced)]
#[kube(status = "NexusBlobStoreStatus")]
#[kube(schema = "disabled")]
#[kube(derive="Default")]
#[kube(derive="PartialEq")]
pub struct NexusBlobStoreSpec {
    /// File type blobstore.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub file: Option<NexusBlobStoreFile>,
    /// Name of the BlobStore.
    /// Name should be unique across all BlobStores.
    pub name: String,
    /// NexusRef is a reference to Nexus custom resource.
    #[serde(rename = "nexusRef")]
    pub nexus_ref: NexusBlobStoreNexusRef,
    /// S3 type blobstore.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub s3: Option<NexusBlobStoreS3>,
    /// Settings to control the soft quota.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "softQuota")]
    pub soft_quota: Option<NexusBlobStoreSoftQuota>,
}

/// File type blobstore.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct NexusBlobStoreFile {
    /// The path to the blobstore contents.
    /// This can be an absolute path to anywhere on the system Nexus Repository Manager has access to it or can be a path relative to the sonatype-work directory.
    pub path: String,
}

/// NexusRef is a reference to Nexus custom resource.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct NexusBlobStoreNexusRef {
    /// Kind specifies the kind of the Nexus resource.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub kind: Option<String>,
    /// Name specifies the name of the Nexus resource.
    pub name: String,
}

/// S3 type blobstore.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct NexusBlobStoreS3 {
    /// A custom endpoint URL, signer type and whether path style access is enabled.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "advancedBucketConnection")]
    pub advanced_bucket_connection: Option<NexusBlobStoreS3AdvancedBucketConnection>,
    /// Details of the S3 bucket such as name and region.
    pub bucket: NexusBlobStoreS3Bucket,
    /// Security details for granting access the S3 API.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "bucketSecurity")]
    pub bucket_security: Option<NexusBlobStoreS3BucketSecurity>,
    /// The type of encryption to use if any.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub encryption: Option<NexusBlobStoreS3Encryption>,
}

/// A custom endpoint URL, signer type and whether path style access is enabled.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct NexusBlobStoreS3AdvancedBucketConnection {
    /// A custom endpoint URL for third party object stores using the S3 API.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub endpoint: Option<String>,
    /// Setting this flag will result in path-style access being used for all requests.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "forcePathStyle")]
    pub force_path_style: Option<bool>,
    /// Setting this value will override the default connection pool size of Nexus of the s3 client for this blobstore.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "maxConnectionPoolSize")]
    pub max_connection_pool_size: Option<i32>,
    /// An API signature version which may be required for third party object stores using the S3 API.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "signerType")]
    pub signer_type: Option<NexusBlobStoreS3AdvancedBucketConnectionSignerType>,
}

/// A custom endpoint URL, signer type and whether path style access is enabled.
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum NexusBlobStoreS3AdvancedBucketConnectionSignerType {
    #[serde(rename = "DEFAULT")]
    Default,
    S3SignerType,
    #[serde(rename = "AWSS3V4SignerType")]
    Awss3v4SignerType,
}

/// Details of the S3 bucket such as name and region.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct NexusBlobStoreS3Bucket {
    /// How many days until deleted blobs are finally removed from the S3 bucket (-1 to disable).
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub expiration: Option<i32>,
    /// The name of the S3 bucket.
    pub name: String,
    /// The S3 blob store (i.e. S3 object) key prefix.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub prefix: Option<String>,
    /// The AWS region to create a new S3 bucket in or an existing S3 bucket's region.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub region: Option<String>,
}

/// Security details for granting access the S3 API.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct NexusBlobStoreS3BucketSecurity {
    /// An IAM access key ID for granting access to the S3 bucket.
    #[serde(rename = "accessKeyId")]
    pub access_key_id: NexusBlobStoreS3BucketSecurityAccessKeyId,
    /// An IAM role to assume in order to access the S3 bucket.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub role: Option<String>,
    /// The secret access key associated with the specified IAM access key ID.
    #[serde(rename = "secretAccessKey")]
    pub secret_access_key: NexusBlobStoreS3BucketSecuritySecretAccessKey,
    /// An AWS STS session token associated with temporary security credentials which grant access to the S3 bucket.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "sessionToken")]
    pub session_token: Option<NexusBlobStoreS3BucketSecuritySessionToken>,
}

/// An IAM access key ID for granting access to the S3 bucket.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct NexusBlobStoreS3BucketSecurityAccessKeyId {
    /// Selects a key of a ConfigMap.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configMapKeyRef")]
    pub config_map_key_ref: Option<NexusBlobStoreS3BucketSecurityAccessKeyIdConfigMapKeyRef>,
    /// Selects a key of a secret.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretKeyRef")]
    pub secret_key_ref: Option<NexusBlobStoreS3BucketSecurityAccessKeyIdSecretKeyRef>,
}

/// Selects a key of a ConfigMap.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct NexusBlobStoreS3BucketSecurityAccessKeyIdConfigMapKeyRef {
    /// The key to select.
    pub key: String,
    /// Name of the referent.
    /// This field is effectively required, but due to backwards compatibility is
    /// allowed to be empty. Instances of this type with an empty value here are
    /// almost certainly wrong.
    /// 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>,
}

/// Selects a key of a secret.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct NexusBlobStoreS3BucketSecurityAccessKeyIdSecretKeyRef {
    /// The key of the secret to select from.
    pub key: String,
    /// Name of the referent.
    /// This field is effectively required, but due to backwards compatibility is
    /// allowed to be empty. Instances of this type with an empty value here are
    /// almost certainly wrong.
    /// 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>,
}

/// The secret access key associated with the specified IAM access key ID.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct NexusBlobStoreS3BucketSecuritySecretAccessKey {
    /// Selects a key of a ConfigMap.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configMapKeyRef")]
    pub config_map_key_ref: Option<NexusBlobStoreS3BucketSecuritySecretAccessKeyConfigMapKeyRef>,
    /// Selects a key of a secret.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretKeyRef")]
    pub secret_key_ref: Option<NexusBlobStoreS3BucketSecuritySecretAccessKeySecretKeyRef>,
}

/// Selects a key of a ConfigMap.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct NexusBlobStoreS3BucketSecuritySecretAccessKeyConfigMapKeyRef {
    /// The key to select.
    pub key: String,
    /// Name of the referent.
    /// This field is effectively required, but due to backwards compatibility is
    /// allowed to be empty. Instances of this type with an empty value here are
    /// almost certainly wrong.
    /// 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>,
}

/// Selects a key of a secret.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct NexusBlobStoreS3BucketSecuritySecretAccessKeySecretKeyRef {
    /// The key of the secret to select from.
    pub key: String,
    /// Name of the referent.
    /// This field is effectively required, but due to backwards compatibility is
    /// allowed to be empty. Instances of this type with an empty value here are
    /// almost certainly wrong.
    /// 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>,
}

/// An AWS STS session token associated with temporary security credentials which grant access to the S3 bucket.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct NexusBlobStoreS3BucketSecuritySessionToken {
    /// Selects a key of a ConfigMap.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configMapKeyRef")]
    pub config_map_key_ref: Option<NexusBlobStoreS3BucketSecuritySessionTokenConfigMapKeyRef>,
    /// Selects a key of a secret.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretKeyRef")]
    pub secret_key_ref: Option<NexusBlobStoreS3BucketSecuritySessionTokenSecretKeyRef>,
}

/// Selects a key of a ConfigMap.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct NexusBlobStoreS3BucketSecuritySessionTokenConfigMapKeyRef {
    /// The key to select.
    pub key: String,
    /// Name of the referent.
    /// This field is effectively required, but due to backwards compatibility is
    /// allowed to be empty. Instances of this type with an empty value here are
    /// almost certainly wrong.
    /// 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>,
}

/// Selects a key of a secret.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct NexusBlobStoreS3BucketSecuritySessionTokenSecretKeyRef {
    /// The key of the secret to select from.
    pub key: String,
    /// Name of the referent.
    /// This field is effectively required, but due to backwards compatibility is
    /// allowed to be empty. Instances of this type with an empty value here are
    /// almost certainly wrong.
    /// 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>,
}

/// The type of encryption to use if any.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct NexusBlobStoreS3Encryption {
    /// If using KMS encryption, you can supply a Key ID. If left blank, then the default will be used.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "encryptionKey")]
    pub encryption_key: Option<String>,
    /// The type of S3 server side encryption to use.
    #[serde(default, skip_serializing_if = "Option::is_none", rename = "encryptionType")]
    pub encryption_type: Option<NexusBlobStoreS3EncryptionEncryptionType>,
}

/// The type of encryption to use if any.
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum NexusBlobStoreS3EncryptionEncryptionType {
    #[serde(rename = "none")]
    None,
    #[serde(rename = "s3ManagedEncryption")]
    S3ManagedEncryption,
    #[serde(rename = "kmsManagedEncryption")]
    KmsManagedEncryption,
}

/// Settings to control the soft quota.
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub struct NexusBlobStoreSoftQuota {
    /// The limit in MB.
    pub limit: i64,
    /// Type of the soft quota.
    #[serde(rename = "type")]
    pub r#type: NexusBlobStoreSoftQuotaType,
}

/// Settings to control the soft quota.
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum NexusBlobStoreSoftQuotaType {
    #[serde(rename = "spaceRemainingQuota")]
    SpaceRemainingQuota,
    #[serde(rename = "spaceUsedQuota")]
    SpaceUsedQuota,
}

/// NexusBlobStoreStatus defines the observed state of NexusBlobStore.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct NexusBlobStoreStatus {
    /// Error is an error message if something went wrong.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
    /// Value is a status of the blob store.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub value: Option<String>,
}