Skip to content

Commit

Permalink
Add caCertFilePath field for BackupPolicy
Browse files Browse the repository at this point in the history
Signed-off-by: kouki <[email protected]>
  • Loading branch information
kmdkuk committed Oct 19, 2023
1 parent 054ca9c commit cd0042d
Show file tree
Hide file tree
Showing 13 changed files with 39 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/v1beta1/job_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,4 +207,7 @@ type BucketConfig struct {
// +kubebuilder:default=s3
// +optional
BackendType string `json:"backendType,omitempty"`

// +optional
CaCertFilePath string `json:"caCertFilePath,omitempty"`
}
2 changes: 2 additions & 0 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: 3 additions & 0 deletions api/v1beta2/job_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ type BucketConfig struct {
// +kubebuilder:default=s3
// +optional
BackendType string `json:"backendType,omitempty"`

// +optional
CaCertFilePath string `json:"caCertFilePath,omitempty"`
}

// AffinityApplyConfiguration is the type defined to implement the DeepCopy method.
Expand Down
8 changes: 8 additions & 0 deletions charts/moco/templates/generated/crds/moco_crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,8 @@ spec:
description: The name of the bucket
minLength: 1
type: string
caCertFilePath:
type: string
endpointURL:
description: The API endpoint URL.
pattern: ^https?://.*
Expand Down Expand Up @@ -2434,6 +2436,8 @@ spec:
description: The name of the bucket
minLength: 1
type: string
caCertFilePath:
type: string
endpointURL:
description: The API endpoint URL.
pattern: ^https?://.*
Expand Down Expand Up @@ -7686,6 +7690,8 @@ spec:
description: The name of the bucket
minLength: 1
type: string
caCertFilePath:
type: string
endpointURL:
description: The API endpoint URL.
pattern: ^https?://.*
Expand Down Expand Up @@ -13553,6 +13559,8 @@ spec:
description: The name of the bucket
minLength: 1
type: string
caCertFilePath:
type: string
endpointURL:
description: The API endpoint URL.
pattern: ^https?://.*
Expand Down
4 changes: 4 additions & 0 deletions config/crd/bases/moco.cybozu.com_backuppolicies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,8 @@ spec:
description: The name of the bucket
minLength: 1
type: string
caCertFilePath:
type: string
endpointURL:
description: The API endpoint URL.
pattern: ^https?://.*
Expand Down Expand Up @@ -2631,6 +2633,8 @@ spec:
description: The name of the bucket
minLength: 1
type: string
caCertFilePath:
type: string
endpointURL:
description: The API endpoint URL.
pattern: ^https?://.*
Expand Down
4 changes: 4 additions & 0 deletions config/crd/bases/moco.cybozu.com_mysqlclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3998,6 +3998,8 @@ spec:
description: The name of the bucket
minLength: 1
type: string
caCertFilePath:
type: string
endpointURL:
description: The API endpoint URL.
pattern: ^https?://.*
Expand Down Expand Up @@ -10412,6 +10414,8 @@ spec:
description: The name of the bucket
minLength: 1
type: string
caCertFilePath:
type: string
endpointURL:
description: The API endpoint URL.
pattern: ^https?://.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,8 @@ spec:
description: The name of the bucket
minLength: 1
type: string
caCertFilePath:
type: string
endpointURL:
description: The API endpoint URL.
pattern: ^https?://.*
Expand Down Expand Up @@ -2630,6 +2632,8 @@ spec:
description: The name of the bucket
minLength: 1
type: string
caCertFilePath:
type: string
endpointURL:
description: The API endpoint URL.
pattern: ^https?://.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4008,6 +4008,8 @@ spec:
description: The name of the bucket
minLength: 1
type: string
caCertFilePath:
type: string
endpointURL:
description: The API endpoint URL.
pattern: ^https?://.*
Expand Down Expand Up @@ -10422,6 +10424,8 @@ spec:
description: The name of the bucket
minLength: 1
type: string
caCertFilePath:
type: string
endpointURL:
description: The API endpoint URL.
pattern: ^https?://.*
Expand Down
3 changes: 3 additions & 0 deletions controllers/mysqlcluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1112,6 +1112,9 @@ 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)
}

return append(args, bc.BucketName)
}
Expand Down
1 change: 1 addition & 0 deletions docs/crd_backuppolicy_v1beta1.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +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 |

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

Expand Down
1 change: 1 addition & 0 deletions docs/crd_backuppolicy_v1beta2.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +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 |

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

Expand Down
1 change: 1 addition & 0 deletions docs/crd_mysqlcluster_v1beta1.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +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 |

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

Expand Down
1 change: 1 addition & 0 deletions docs/crd_mysqlcluster_v1beta2.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +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 |

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

Expand Down

0 comments on commit cd0042d

Please sign in to comment.