Compare commits
	
		
			1 Commits
		
	
	
		
			master
			...
			60941aba9a
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 60941aba9a | 
							
								
								
									
										34
									
								
								.drone.yml
									
									
									
									
									
								
							
							
						
						
									
										34
									
								
								.drone.yml
									
									
									
									
									
								
							@@ -4,39 +4,17 @@ type: docker
 | 
				
			|||||||
name: default
 | 
					name: default
 | 
				
			||||||
 | 
					
 | 
				
			||||||
steps:
 | 
					steps:
 | 
				
			||||||
- name: fetch_dependencies
 | 
					- name: cargo_check
 | 
				
			||||||
  image: rust
 | 
					  image: rust
 | 
				
			||||||
  volumes:
 | 
					 | 
				
			||||||
    - name: rust_registry
 | 
					 | 
				
			||||||
      path: /usr/local/cargo/registry
 | 
					 | 
				
			||||||
  commands:
 | 
					 | 
				
			||||||
    - cargo fetch
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
- name: code_quality
 | 
					 | 
				
			||||||
  image: rust
 | 
					 | 
				
			||||||
  volumes:
 | 
					 | 
				
			||||||
    - name: rust_registry
 | 
					 | 
				
			||||||
      path: /usr/local/cargo/registry
 | 
					 | 
				
			||||||
  depends_on:
 | 
					 | 
				
			||||||
    - fetch_dependencies
 | 
					 | 
				
			||||||
  commands:
 | 
					 | 
				
			||||||
    - rustup component add clippy
 | 
					 | 
				
			||||||
    - cargo clippy -- -D warnings
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
- name: test
 | 
					 | 
				
			||||||
  image: rust
 | 
					 | 
				
			||||||
  depends_on:
 | 
					 | 
				
			||||||
      - code_quality
 | 
					 | 
				
			||||||
  volumes:
 | 
					 | 
				
			||||||
      - name: rust_registry
 | 
					 | 
				
			||||||
        path: /usr/local/cargo/registry
 | 
					 | 
				
			||||||
  commands:
 | 
					  commands:
 | 
				
			||||||
  - wget -O /usr/bin/minio https://dl.min.io/server/minio/release/linux-amd64/minio
 | 
					  - wget -O /usr/bin/minio https://dl.min.io/server/minio/release/linux-amd64/minio
 | 
				
			||||||
  - wget -O /usr/bin/mc https://dl.min.io/client/mc/release/linux-amd64/mc
 | 
					  - wget -O /usr/bin/mc https://dl.min.io/client/mc/release/linux-amd64/mc
 | 
				
			||||||
  - chmod +x /usr/bin/minio /usr/bin/mc
 | 
					  - chmod +x /usr/bin/minio /usr/bin/mc
 | 
				
			||||||
 | 
					  - rustup component add clippy
 | 
				
			||||||
 | 
					  - cargo clippy -- -D warnings
 | 
				
			||||||
  - cargo test
 | 
					  - cargo test
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- name: build_doc
 | 
					- name: doc
 | 
				
			||||||
  image: python
 | 
					  image: python
 | 
				
			||||||
  environment:
 | 
					  environment:
 | 
				
			||||||
    AWS_ACCESS_KEY_ID:
 | 
					    AWS_ACCESS_KEY_ID:
 | 
				
			||||||
@@ -61,7 +39,3 @@ steps:
 | 
				
			|||||||
  - aws configure set default.s3.signature_version s3v4
 | 
					  - aws configure set default.s3.signature_version s3v4
 | 
				
			||||||
  # Upload to bucket
 | 
					  # Upload to bucket
 | 
				
			||||||
  - cd public && aws --endpoint-url https://s3.communiquons.org s3 sync . s3://miniok8sbucketsoperator-website
 | 
					  - cd public && aws --endpoint-url https://s3.communiquons.org s3 sync . s3://miniok8sbucketsoperator-website
 | 
				
			||||||
 | 
					 | 
				
			||||||
volumes:
 | 
					 | 
				
			||||||
  - name: rust_registry
 | 
					 | 
				
			||||||
    temp: {}
 | 
					 | 
				
			||||||
							
								
								
									
										1091
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										1091
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										22
									
								
								Cargo.toml
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								Cargo.toml
									
									
									
									
									
								
							@@ -6,17 +6,17 @@ edition = "2021"
 | 
				
			|||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
 | 
					# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[dependencies]
 | 
					[dependencies]
 | 
				
			||||||
log = "0.4.28"
 | 
					log = "0.4.27"
 | 
				
			||||||
env_logger = "0.11.8"
 | 
					env_logger = "0.11.8"
 | 
				
			||||||
anyhow = "1.0.100"
 | 
					anyhow = "1.0.98"
 | 
				
			||||||
serde = { version = "1.0.228", features = ["derive"] }
 | 
					serde = { version = "1.0.219", features = ["derive"] }
 | 
				
			||||||
serde_json = "1.0.145"
 | 
					serde_json = "1.0.140"
 | 
				
			||||||
schemars = "1.0.5"
 | 
					schemars = "0.8.22"
 | 
				
			||||||
tokio = { version = "1.48.0", features = ["full"] }
 | 
					tokio = { version = "1.45.1", features = ["full"] }
 | 
				
			||||||
kube = { version = "2.0.1", features = ["runtime", "derive"] }
 | 
					kube = { version = "1.1.0", features = ["runtime", "derive"] }
 | 
				
			||||||
k8s-openapi = { version = "0.26.0", features = ["v1_31"] }
 | 
					k8s-openapi = { version = "0.24.0", features = ["v1_31"] }
 | 
				
			||||||
futures = "0.3.31"
 | 
					futures = "0.3.31"
 | 
				
			||||||
thiserror = "2.0.17"
 | 
					thiserror = "2.0.12"
 | 
				
			||||||
rand = "0.9.2"
 | 
					rand = "0.9.1"
 | 
				
			||||||
mktemp = "0.5.1"
 | 
					mktemp = "0.5.1"
 | 
				
			||||||
reqwest = "0.12.24"
 | 
					reqwest = "0.12.15"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -62,7 +62,7 @@ spec:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Create a bucket
 | 
					## Create a bucket
 | 
				
			||||||
You are now ready to create your first bucket!
 | 
					You are not ready to create your first bucket!
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Here is a basic bucket example:
 | 
					Here is a basic bucket example:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -164,7 +164,7 @@ impl MinioService {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    /// Get bucket name prefixed by mc alias name
 | 
					    /// Get bucket name prefixed by mc alias name
 | 
				
			||||||
    fn absolute_bucket_name(&self, name: &str) -> String {
 | 
					    fn absolute_bucket_name(&self, name: &str) -> String {
 | 
				
			||||||
        format!("{MC_ALIAS_NAME}/{name}")
 | 
					        format!("{}/{name}", MC_ALIAS_NAME)
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /// Execute a minio mc command
 | 
					    /// Execute a minio mc command
 | 
				
			||||||
@@ -172,7 +172,7 @@ impl MinioService {
 | 
				
			|||||||
    where
 | 
					    where
 | 
				
			||||||
        A: DeserializeOwned,
 | 
					        A: DeserializeOwned,
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        log::debug!("exec_mc_cmd with args {args:?}");
 | 
					        log::debug!("exec_mc_cmd with args {:?}", args);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        let conf_dir = temp::create_temp_dir()?;
 | 
					        let conf_dir = temp::create_temp_dir()?;
 | 
				
			||||||
        let global_flags = ["--config-dir", conf_dir.to_str().unwrap(), "--json"];
 | 
					        let global_flags = ["--config-dir", conf_dir.to_str().unwrap(), "--json"];
 | 
				
			||||||
@@ -354,7 +354,7 @@ impl MinioService {
 | 
				
			|||||||
        let bucket_name = self.absolute_bucket_name(bucket);
 | 
					        let bucket_name = self.absolute_bucket_name(bucket);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        let res = if let Some(quota) = "a {
 | 
					        let res = if let Some(quota) = "a {
 | 
				
			||||||
            let quota = format!("{quota}B");
 | 
					            let quota = format!("{}B", quota);
 | 
				
			||||||
            self.exec_mc_cmd::<BasicMinioResult>(&[
 | 
					            self.exec_mc_cmd::<BasicMinioResult>(&[
 | 
				
			||||||
                "quota",
 | 
					                "quota",
 | 
				
			||||||
                "set",
 | 
					                "set",
 | 
				
			||||||
@@ -447,7 +447,7 @@ impl MinioService {
 | 
				
			|||||||
                        "governance" => RetentionType::Governance,
 | 
					                        "governance" => RetentionType::Governance,
 | 
				
			||||||
                        "compliance" => RetentionType::Compliance,
 | 
					                        "compliance" => RetentionType::Compliance,
 | 
				
			||||||
                        o => {
 | 
					                        o => {
 | 
				
			||||||
                            log::error!("Unknown retention type: {o}");
 | 
					                            log::error!("Unknown retention type: {}", o);
 | 
				
			||||||
                            return Ok(None);
 | 
					                            return Ok(None);
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
                    },
 | 
					                    },
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user