diff --git a/docs/minio-job.md b/docs/minio-job.md index 1864b648e0e..02b3761f3ef 100644 --- a/docs/minio-job.md +++ b/docs/minio-job.md @@ -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: @@ -191,7 +191,8 @@ 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: @@ -199,6 +200,13 @@ command: - "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 diff --git a/helm/operator/templates/job.min.io_jobs.yaml b/helm/operator/templates/job.min.io_jobs.yaml index de7ecf4ef04..fcbff8679e3 100644 --- a/helm/operator/templates/job.min.io_jobs.yaml +++ b/helm/operator/templates/job.min.io_jobs.yaml @@ -982,8 +982,6 @@ spec: - name type: object type: array - required: - - op type: object type: array containerSecurityContext: diff --git a/pkg/apis/job.min.io/v1alpha1/types.go b/pkg/apis/job.min.io/v1alpha1/types.go index 25277da60ab..d8066837f94 100644 --- a/pkg/apis/job.min.io/v1alpha1/types.go +++ b/pkg/apis/job.min.io/v1alpha1/types.go @@ -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"` diff --git a/resources/base/crds/job.min.io_miniojobs.yaml b/resources/base/crds/job.min.io_miniojobs.yaml index de7ecf4ef04..fcbff8679e3 100644 --- a/resources/base/crds/job.min.io_miniojobs.yaml +++ b/resources/base/crds/job.min.io_miniojobs.yaml @@ -982,8 +982,6 @@ spec: - name type: object type: array - required: - - op type: object type: array containerSecurityContext: