Skip to content

Commit

Permalink
Add docs
Browse files Browse the repository at this point in the history
Signed-off-by: kouki <[email protected]>
  • Loading branch information
kmdkuk committed Oct 20, 2023
1 parent 9d05370 commit 19bb6c6
Show file tree
Hide file tree
Showing 18 changed files with 47 additions and 25 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Added
- Add tls settings for BackupPolicy [#580](https://github.com/cybozu-go/moco/pull/580)

## [0.17.0] - 2023-09-11

### Breaking Changes
Expand Down
3 changes: 2 additions & 1 deletion api/v1beta1/job_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ type BucketConfig struct {
// +optional
BackendType string `json:"backendType,omitempty"`

// Path to SSL CA certificate file instead of system default.
// +optional
CaCertFilePath string `json:"caCertFilePath,omitempty"`
CaCerts string `json:"caCerts,omitempty"`
}
4 changes: 2 additions & 2 deletions api/v1beta1/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion api/v1beta2/job_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,9 @@ type BucketConfig struct {
// +optional
BackendType string `json:"backendType,omitempty"`

// Path to SSL CA certificate file instead of system default.
// +optional
CaCertFilePath string `json:"caCertFilePath,omitempty"`
CaCerts string `json:"caCerts,omitempty"`
}

// AffinityApplyConfiguration is the type defined to implement the DeepCopy method.
Expand Down
12 changes: 8 additions & 4 deletions charts/moco/templates/generated/crds/moco_crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,8 @@ spec:
description: The name of the bucket
minLength: 1
type: string
caCertFilePath:
caCerts:
description: 'Path to SSL CA certificate file instead of system '
type: string
endpointURL:
description: The API endpoint URL.
Expand Down Expand Up @@ -2436,7 +2437,8 @@ spec:
description: The name of the bucket
minLength: 1
type: string
caCertFilePath:
caCerts:
description: 'Path to SSL CA certificate file instead of system '
type: string
endpointURL:
description: The API endpoint URL.
Expand Down Expand Up @@ -7690,7 +7692,8 @@ spec:
description: The name of the bucket
minLength: 1
type: string
caCertFilePath:
caCerts:
description: 'Path to SSL CA certificate file instead of system '
type: string
endpointURL:
description: The API endpoint URL.
Expand Down Expand Up @@ -13559,7 +13562,8 @@ spec:
description: The name of the bucket
minLength: 1
type: string
caCertFilePath:
caCerts:
description: 'Path to SSL CA certificate file instead of system '
type: string
endpointURL:
description: The API endpoint URL.
Expand Down
2 changes: 1 addition & 1 deletion cmd/moco-backup/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,5 @@ func init() {
pf.StringVar(&commonArgs.endpointURL, "endpoint", "", "Object storage API endpoint URL")
pf.BoolVar(&commonArgs.usePathStyle, "use-path-style", false, "Use path-style S3 API")
pf.StringVar(&commonArgs.backendType, "backend-type", "s3", "The identifier for the object storage to be used.")
pf.StringVar(&commonArgs.caCertFilePath, "ca-cert-file-path", "", "The file path using ca-certs")
pf.StringVar(&commonArgs.caCertFilePath, "ca-certs", "", "Path to SSL CA certificate file instead of system default")
}
6 changes: 4 additions & 2 deletions config/crd/bases/moco.cybozu.com_backuppolicies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,8 @@ spec:
description: The name of the bucket
minLength: 1
type: string
caCertFilePath:
caCerts:
description: 'Path to SSL CA certificate file instead of system '
type: string
endpointURL:
description: The API endpoint URL.
Expand Down Expand Up @@ -2633,7 +2634,8 @@ spec:
description: The name of the bucket
minLength: 1
type: string
caCertFilePath:
caCerts:
description: 'Path to SSL CA certificate file instead of system '
type: string
endpointURL:
description: The API endpoint URL.
Expand Down
8 changes: 6 additions & 2 deletions config/crd/bases/moco.cybozu.com_mysqlclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3998,7 +3998,9 @@ spec:
description: The name of the bucket
minLength: 1
type: string
caCertFilePath:
caCerts:
description: 'Path to SSL CA certificate file instead
of system '
type: string
endpointURL:
description: The API endpoint URL.
Expand Down Expand Up @@ -10414,7 +10416,9 @@ spec:
description: The name of the bucket
minLength: 1
type: string
caCertFilePath:
caCerts:
description: 'Path to SSL CA certificate file instead
of system '
type: string
endpointURL:
description: The API endpoint URL.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,8 @@ spec:
description: The name of the bucket
minLength: 1
type: string
caCertFilePath:
caCerts:
description: 'Path to SSL CA certificate file instead of system '
type: string
endpointURL:
description: The API endpoint URL.
Expand Down Expand Up @@ -2632,7 +2633,8 @@ spec:
description: The name of the bucket
minLength: 1
type: string
caCertFilePath:
caCerts:
description: 'Path to SSL CA certificate file instead of system '
type: string
endpointURL:
description: The API endpoint URL.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4008,7 +4008,9 @@ spec:
description: The name of the bucket
minLength: 1
type: string
caCertFilePath:
caCerts:
description: 'Path to SSL CA certificate file instead
of system '
type: string
endpointURL:
description: The API endpoint URL.
Expand Down Expand Up @@ -10424,7 +10426,9 @@ spec:
description: The name of the bucket
minLength: 1
type: string
caCertFilePath:
caCerts:
description: 'Path to SSL CA certificate file instead
of system '
type: string
endpointURL:
description: The API endpoint URL.
Expand Down
4 changes: 2 additions & 2 deletions controllers/mysqlcluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1112,8 +1112,8 @@ func bucketArgs(bc mocov1beta2.BucketConfig) []string {
if bc.BackendType != "" {
args = append(args, "--backend-type="+bc.BackendType)
}
if bc.CaCertFilePath != "" {
args = append(args, "--ca-cert-file-path="+bc.CaCertFilePath)
if bc.CaCerts != "" {
args = append(args, "--ca-certs="+bc.CaCerts)
}

return append(args, bc.BucketName)
Expand Down
2 changes: 1 addition & 1 deletion docs/crd_backuppolicy_v1beta1.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ BucketConfig is a set of parameter to access an object storage bucket.
| endpointURL | The API endpoint URL. Set this for non-S3 object storages. | string | false |
| usePathStyle | Allows you to enable the client to use path-style addressing, i.e., https?://ENDPOINT/BUCKET/KEY. By default, a virtual-host addressing is used (https?://BUCKET.ENDPOINT/KEY). | bool | false |
| backendType | BackendType is an identifier for the object storage to be used. | string | false |
| caCertFilePath | | string | false |
| caCerts | Path to SSL CA certificate file instead of system default. | string | false |

[Back to Custom Resources](#custom-resources)

Expand Down
2 changes: 1 addition & 1 deletion docs/crd_backuppolicy_v1beta2.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ BucketConfig is a set of parameter to access an object storage bucket.
| endpointURL | The API endpoint URL. Set this for non-S3 object storages. | string | false |
| usePathStyle | Allows you to enable the client to use path-style addressing, i.e., https?://ENDPOINT/BUCKET/KEY. By default, a virtual-host addressing is used (https?://BUCKET.ENDPOINT/KEY). | bool | false |
| backendType | BackendType is an identifier for the object storage to be used. | string | false |
| caCertFilePath | | string | false |
| caCerts | Path to SSL CA certificate file instead of system default. | string | false |

[Back to Custom Resources](#custom-resources)

Expand Down
2 changes: 1 addition & 1 deletion docs/crd_mysqlcluster_v1beta1.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ BucketConfig is a set of parameter to access an object storage bucket.
| endpointURL | The API endpoint URL. Set this for non-S3 object storages. | string | false |
| usePathStyle | Allows you to enable the client to use path-style addressing, i.e., https?://ENDPOINT/BUCKET/KEY. By default, a virtual-host addressing is used (https?://BUCKET.ENDPOINT/KEY). | bool | false |
| backendType | BackendType is an identifier for the object storage to be used. | string | false |
| caCertFilePath | | string | false |
| caCerts | Path to SSL CA certificate file instead of system default. | string | false |

[Back to Custom Resources](#custom-resources)

Expand Down
2 changes: 1 addition & 1 deletion docs/crd_mysqlcluster_v1beta2.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ BucketConfig is a set of parameter to access an object storage bucket.
| endpointURL | The API endpoint URL. Set this for non-S3 object storages. | string | false |
| usePathStyle | Allows you to enable the client to use path-style addressing, i.e., https?://ENDPOINT/BUCKET/KEY. By default, a virtual-host addressing is used (https?://BUCKET.ENDPOINT/KEY). | bool | false |
| backendType | BackendType is an identifier for the object storage to be used. | string | false |
| caCertFilePath | | string | false |
| caCerts | Path to SSL CA certificate file instead of system default. | string | false |

[Back to Custom Resources](#custom-resources)

Expand Down
1 change: 1 addition & 0 deletions docs/moco-backup.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Global Flags:
--threads int The number of threads to be used (default 4)
--use-path-style Use path-style S3 API
--work-dir string The writable working directory (default "/work")
--ca-certs string Path to SSL CA certificate file instead of system default.
```

## Subcommands
Expand Down
2 changes: 1 addition & 1 deletion e2e/testdata/backup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
bucketName: moco
endpointURL: https://minio.default.svc:9000
usePathStyle: true
caCertFilePath: /minio-cert/ca.crt
caCerts: /minio-cert/ca.crt
workVolume:
emptyDir: {}
---
Expand Down
2 changes: 1 addition & 1 deletion e2e/testdata/restore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
bucketName: moco
endpointURL: https://minio.default.svc:9000
usePathStyle: true
caCertFilePath: /minio-cert/ca.crt
caCerts: /minio-cert/ca.crt
workVolume:
emptyDir: {}
podTemplate:
Expand Down

0 comments on commit 19bb6c6

Please sign in to comment.