Skip to content

Commit

Permalink
apply suggestion
Browse files Browse the repository at this point in the history
apply suggestion
  • Loading branch information
jiuker committed Jun 26, 2024
1 parent c2c8483 commit 3fce527
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
12 changes: 10 additions & 2 deletions docs/minio-job.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ The target tenant that the job will run against.
### args
if you set this field, the `mc` command will be executed with the arguments.
`op` must be one of these:
`make-bucket`, `admin/user/add`,`admin/policy/create`,`admin/policy/attach`, `admin/config/set`, `support/callhome`,`license/register`
`mb`,`make-bucket`, `admin/user/add`,`admin/policy/create`,`admin/policy/attach`, `admin/config/set`, `support/callhome`,`license/register`
```yaml
op: make-bucket
args:
Expand Down Expand Up @@ -191,14 +191,22 @@ volumes:
Will do a job like `mc admin policy create myminio memes-access /temp/policy.json`
### command
The `command` field specifies the command that will be executed by the `mc` command.
`args` must be empty. And `op` can be set to the main command name.
`args` must be empty.
`op` optional, can be set to the main command name.
```
op: stat
command:
- "mc"
- "stat"
- "myminio/memes"
```
or
```
command:
- "mc"
- "stat"
- "myminio/memes"
```
Will do a job like `mc stat myminio/memes`
### env/envFrom/volumeMounts/volumes
The `env/envFrom/volumeMounts/volumes` fields specify the environment variables/volumes that will be used by the `mc` command
Expand Down
2 changes: 0 additions & 2 deletions helm/operator/templates/job.min.io_jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -982,8 +982,6 @@ spec:
- name
type: object
type: array
required:
- op
type: object
type: array
containerSecurityContext:
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/job.min.io/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ type MinIOJobSpec struct {

// CommandSpec (`spec`) defines the configuration of a MinioClient Command.
type CommandSpec struct {
// *Required* +
// +optional
//
// Operation is the MinioClient Action
Operation string `json:"op"`
Expand Down
2 changes: 0 additions & 2 deletions resources/base/crds/job.min.io_miniojobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -982,8 +982,6 @@ spec:
- name
type: object
type: array
required:
- op
type: object
type: array
containerSecurityContext:
Expand Down

0 comments on commit 3fce527

Please sign in to comment.