Skip to content

Commit

Permalink
fleet: update velero plugin api
Browse files Browse the repository at this point in the history
Signed-off-by: Xieql <[email protected]>
  • Loading branch information
Xieql committed Sep 4, 2023
1 parent 8b6a06d commit 112e907
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 165 deletions.
95 changes: 15 additions & 80 deletions docs/content/en/references/fleet_v1alpha1_types.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ <h3 id="fleet.kurator.dev/v1alpha1.BackupConfig">BackupConfig
(<em>Appears on:</em>
<a href="#fleet.kurator.dev/v1alpha1.PluginConfig">PluginConfig</a>)
</p>
<p>BackupConfig defines the configuration for the Velero backup engine.</p>
<p>BackupConfig defines the configuration for backups.</p>
<div class="md-typeset__scrollwrap">
<div class="md-typeset__table td-content">
<table>
Expand All @@ -139,8 +139,8 @@ <h3 id="fleet.kurator.dev/v1alpha1.BackupConfig">BackupConfig
</td>
<td>
<em>(Optional)</em>
<p>Chart defines the helm chart config of the velero.
default values is</p>
<p>Chart defines the helm chart configuration of the backup engine.
The default value is:</p>
<p>chart:
repository: <a href="https://vmware-tanzu.github.io/helm-charts">https://vmware-tanzu.github.io/helm-charts</a>
name: velero
Expand All @@ -157,12 +157,12 @@ <h3 id="fleet.kurator.dev/v1alpha1.BackupConfig">BackupConfig
</em>
</td>
<td>
<p>Storage details where the backup data should be stored.</p>
<p>Storage provides details on where the backup data should be stored.</p>
</td>
</tr>
<tr>
<td>
<code>veleroImage</code><br>
<code>extraArgs</code><br>
<em>
<a href="https://pkg.go.dev/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1?tab=doc#JSON">
Kubernetes /apiextensions/v1.JSON
Expand All @@ -171,80 +171,15 @@ <h3 id="fleet.kurator.dev/v1alpha1.BackupConfig">BackupConfig
</td>
<td>
<em>(Optional)</em>
<p>VeleroImage Details of the container image to use in the Velero deployment &amp; daemonset
default values is</p>
<p>repository: velero/velero
<p>ExtraArgs provides the extra chart values for the backup engine chart.
For example, use the following configuration to change the image tag or pull policy:</p>
<p>extraArgs:
image:
repository: velero/velero
tag: v1.11.1
pullPolicy: IfNotPresent</p>
</td>
</tr>
<tr>
<td>
<code>initContainers</code><br>
<em>
<a href="https://pkg.go.dev/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1?tab=doc#JSON">
Kubernetes /apiextensions/v1.JSON
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>InitContainers to add to the Velero deployment&rsquo;s pod spec.
default values is</p>
<ul>
<li>name: velero-plugin-for-aws
image: velero/velero-plugin-for-aws:v1.7.1
imagePullPolicy: IfNotPresent
volumeMounts:
<ul>
<li>mountPath: /target
name: plugins</li>
</ul></li>
</ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<h3 id="fleet.kurator.dev/v1alpha1.BackupCredentials">BackupCredentials
</h3>
<p>
(<em>Appears on:</em>
<a href="#fleet.kurator.dev/v1alpha1.BackupStorage">BackupStorage</a>)
</p>
<div class="md-typeset__scrollwrap">
<div class="md-typeset__table td-content">
<table>
<thead>
<tr>
<th>Field</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code>accessKeyID</code><br>
<em>
string
</em>
</td>
<td>
<p>AccessKeyID is the identifier for the access key.</p>
</td>
</tr>
<tr>
<td>
<code>secretAccessKey</code><br>
<em>
string
</em>
</td>
<td>
<p>SecretAccessKey is the secret access key associated with AccessKeyID</p>
</td>
</tr>
</tbody>
</table>
</div>
Expand Down Expand Up @@ -275,20 +210,20 @@ <h3 id="fleet.kurator.dev/v1alpha1.BackupStorage">BackupStorage
</em>
</td>
<td>
<p>Location specifies the location where the backup data will be stored.</p>
<p>Location specifies where the backup data will be stored.</p>
</td>
</tr>
<tr>
<td>
<code>credentials</code><br>
<em>
<a href="#fleet.kurator.dev/v1alpha1.BackupCredentials">
BackupCredentials
</a>
string
</em>
</td>
<td>
<p>Credentials to access the backup storage location.</p>
<p>Credentials refers to the Kubernetes secret containing the AccessKeyID and SecretAccessKey
required to access the backup storage location. The secret might, for example,
contain fields such as <code>accessKeyID</code> and <code>secretAccessKey</code> to store the credentials.</p>
</td>
</tr>
</tbody>
Expand Down
53 changes: 20 additions & 33 deletions manifests/charts/fleet-manager/crds/fleet.kurator.dev_fleet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,10 @@ spec:
description: Backup defines the configuration for the backup engine(Velero).
properties:
chart:
description: "Chart defines the helm chart config of the velero.
default values is \n chart: repository: https://vmware-tanzu.github.io/helm-charts
name: velero version: 5.0.2"
description: "Chart defines the helm chart configuration of
the backup engine. The default value is: \n chart: repository:
https://vmware-tanzu.github.io/helm-charts name: velero
version: 5.0.2"
properties:
name:
description: Name defines the name of the chart. Default
Expand All @@ -132,35 +133,27 @@ spec:
Default value depends on the kind of the component.
type: string
type: object
initContainers:
description: "InitContainers to add to the Velero deployment's
pod spec. default values is \n - name: velero-plugin-for-aws
image: velero/velero-plugin-for-aws:v1.7.1 imagePullPolicy:
IfNotPresent volumeMounts: - mountPath: /target name: plugins"
extraArgs:
description: "ExtraArgs provides the extra chart values for
the backup engine chart. For example, use the following
configuration to change the image tag or pull policy: \n
extraArgs: image: repository: velero/velero tag: v1.11.1
pullPolicy: IfNotPresent"
x-kubernetes-preserve-unknown-fields: true
storage:
description: Storage details where the backup data should
be stored.
description: Storage provides details on where the backup
data should be stored.
properties:
credentials:
description: Credentials to access the backup storage
location.
properties:
accessKeyID:
description: AccessKeyID is the identifier for the
access key.
type: string
secretAccessKey:
description: SecretAccessKey is the secret access
key associated with AccessKeyID
type: string
required:
- accessKeyID
- secretAccessKey
type: object
description: Credentials refers to the Kubernetes secret
containing the AccessKeyID and SecretAccessKey required
to access the backup storage location. The secret might,
for example, contain fields such as `accessKeyID` and
`secretAccessKey` to store the credentials.
type: string
location:
description: Location specifies the location where the
backup data will be stored.
description: Location specifies where the backup data
will be stored.
properties:
bucket:
description: Bucket specifies the storage bucket name.
Expand All @@ -186,12 +179,6 @@ spec:
- credentials
- location
type: object
veleroImage:
description: "VeleroImage Details of the container image to
use in the Velero deployment & daemonset default values
is \n repository: velero/velero tag: v1.11.1 pullPolicy:
IfNotPresent"
x-kubernetes-preserve-unknown-fields: true
required:
- storage
type: object
Expand Down
51 changes: 18 additions & 33 deletions pkg/apis/fleet/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,10 @@ type PodSecurityPolicy struct {
ValidationFailureAction string `json:"validationFailureAction,omitempty"`
}

// BackupConfig defines the configuration for the Velero backup engine.
// BackupConfig defines the configuration for backups.
type BackupConfig struct {
// Chart defines the helm chart config of the velero.
// default values is
// Chart defines the helm chart configuration of the backup engine.
// The default value is:
//
// chart:
// repository: https://vmware-tanzu.github.io/helm-charts
Expand All @@ -263,41 +263,33 @@ type BackupConfig struct {
// +optional
Chart *ChartConfig `json:"chart,omitempty"`

// Storage details where the backup data should be stored.
// Storage provides details on where the backup data should be stored.
Storage BackupStorage `json:"storage"`

// VeleroImage Details of the container image to use in the Velero deployment & daemonset
// default values is
//
// repository: velero/velero
// tag: v1.11.1
// pullPolicy: IfNotPresent
//
// +optional
VeleroImage apiextensionsv1.JSON `json:"veleroImage,omitempty"`

// InitContainers to add to the Velero deployment's pod spec.
// default values is
// ExtraArgs provides the extra chart values for the backup engine chart.
// For example, use the following configuration to change the image tag or pull policy:
//
// - name: velero-plugin-for-aws
// image: velero/velero-plugin-for-aws:v1.7.1
// imagePullPolicy: IfNotPresent
// volumeMounts:
// - mountPath: /target
// name: plugins
// extraArgs:
// image:
// repository: velero/velero
// tag: v1.11.1
// pullPolicy: IfNotPresent
//
// +optional
InitContainers apiextensionsv1.JSON `json:"initContainers,omitempty"`
ExtraArgs apiextensionsv1.JSON `json:"extraArgs,omitempty"`
}

type BackupStorage struct {
// Location specifies the location where the backup data will be stored.
// Location specifies where the backup data will be stored.
Location BackupStorageLocation `json:"location"`

// Credentials to access the backup storage location.
Credentials BackupCredentials `json:"credentials"`
// Credentials refers to the Kubernetes secret containing the AccessKeyID and SecretAccessKey
// required to access the backup storage location. The secret might, for example,
// contain fields such as `accessKeyID` and `secretAccessKey` to store the credentials.
Credentials string `json:"credentials"`
}


type BackupStorageLocation struct {
// Bucket specifies the storage bucket name.
Bucket string `json:"bucket"`
Expand All @@ -309,13 +301,6 @@ type BackupStorageLocation struct {
Region string `json:"region"`
}

type BackupCredentials struct {
// AccessKeyID is the identifier for the access key.
AccessKeyID string `json:"accessKeyID"`
// SecretAccessKey is the secret access key associated with AccessKeyID
SecretAccessKey string `json:"secretAccessKey"`
}

// FleetStatus defines the observed state of the fleet
type FleetStatus struct {
// CredentialSecret is the secret name that holds credentials used for accessing the fleet control plane.
Expand Down
20 changes: 1 addition & 19 deletions pkg/apis/fleet/v1alpha1/zz_generated.deepcopy.go

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

0 comments on commit 112e907

Please sign in to comment.