Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

init fleet api to install flagger and testloader #519

Merged
merged 2 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions docs/content/en/references/fleet_v1alpha1_types.html
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ <h3 id="fleet.kurator.dev/v1alpha1.ChartConfig">ChartConfig
(<em>Appears on:</em>
<a href="#fleet.kurator.dev/v1alpha1.BackupConfig">BackupConfig</a>,
<a href="#fleet.kurator.dev/v1alpha1.DistributedStorageConfig">DistributedStorageConfig</a>,
<a href="#fleet.kurator.dev/v1alpha1.FlaggerConfig">FlaggerConfig</a>,
<a href="#fleet.kurator.dev/v1alpha1.GrafanaConfig">GrafanaConfig</a>,
<a href="#fleet.kurator.dev/v1alpha1.KyvernoConfig">KyvernoConfig</a>,
<a href="#fleet.kurator.dev/v1alpha1.PrometheusConfig">PrometheusConfig</a>,
Expand Down Expand Up @@ -594,6 +595,76 @@ <h3 id="fleet.kurator.dev/v1alpha1.Endpoints">Endpoints
(<em>Appears on:</em>
<a href="#fleet.kurator.dev/v1alpha1.FleetStatus">FleetStatus</a>)
</p>
<h3 id="fleet.kurator.dev/v1alpha1.FlaggerConfig">FlaggerConfig
</h3>
<p>
(<em>Appears on:</em>
<a href="#fleet.kurator.dev/v1alpha1.PluginConfig">PluginConfig</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>chart</code><br>
<em>
<a href="#fleet.kurator.dev/v1alpha1.ChartConfig">
ChartConfig
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>Chart defines the helm chart config of the flagger.
default values is</p>
<p>chart:
repository: oci://ghcr.io/fluxcd/charts
name: flagger
version: 1.x</p>
</td>
</tr>
<tr>
<td>
<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
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>ExtraArgs is the set of extra arguments for flagger chart.</p>
<p>For Example, using following configuration to change replica count.
extraArgs:
flagger:
replicaCount: 2</p>
</td>
</tr>
<tr>
<td>
<code>publicTestloader</code><br>
<em>
bool
</em>
</td>
<td>
<p>PublicTestloader defines whether to install the publictestloader or not.
In addition to the public testloader you can configure here,
you can also specify a private testloader in the Application.Spec.SyncPolicies.Rollout.TestLoader</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<h3 id="fleet.kurator.dev/v1alpha1.FleetPhase">FleetPhase
(<code>string</code> alias)</h3>
<p>
Expand Down Expand Up @@ -1322,6 +1393,19 @@ <h3 id="fleet.kurator.dev/v1alpha1.PluginConfig">PluginConfig
<p>DistributedStorage define the configuration for the distributed storage(Implemented with Rook)</p>
</td>
</tr>
<tr>
<td>
<code>flagger</code><br>
<em>
<a href="#fleet.kurator.dev/v1alpha1.FlaggerConfig">
FlaggerConfig
</a>
</em>
</td>
<td>
<p>Flagger defines the configuretion for the kurator rollout engine.</p>
</td>
</tr>
</tbody>
</table>
</div>
Expand Down
35 changes: 35 additions & 0 deletions manifests/charts/fleet-manager/crds/fleet.kurator.dev_fleet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2999,6 +2999,41 @@ spec:
required:
- storage
type: object
flagger:
description: Flagger defines the configuretion for the kurator
rollout engine.
properties:
chart:
description: "Chart defines the helm chart config of the flagger.
default values is \n chart: repository: oci://ghcr.io/fluxcd/charts
name: flagger version: 1.x"
properties:
name:
description: Name defines the name of the chart. Default
value depends on the kind of the component.
type: string
repository:
description: Repository defines the repository of chart.
Default value depends on the kind of the component.
type: string
version:
description: Version defines the version of the chart.
Default value depends on the kind of the component.
type: string
type: object
extraArgs:
description: "ExtraArgs is the set of extra arguments for
flagger chart. \n For Example, using following configuration
to change replica count. extraArgs: flagger: replicaCount:
2"
x-kubernetes-preserve-unknown-fields: true
publicTestloader:
description: PublicTestloader defines whether to install the
publictestloader or not. In addition to the public testloader
you can configure here, you can also specify a private testloader
in the Application.Spec.SyncPolicies.Rollout.TestLoader
type: boolean
type: object
grafana:
description: Grafana defines the configuration for the grafana
installation and observation.
Expand Down
28 changes: 28 additions & 0 deletions pkg/apis/fleet/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ type PluginConfig struct {
Backup *BackupConfig `json:"backup,omitempty"`
// DistributedStorage define the configuration for the distributed storage(Implemented with Rook)
DistributedStorage *DistributedStorageConfig `json:"distributedStorage,omitempty"`
// Flagger defines the configuretion for the kurator rollout engine.
Flagger *FlaggerConfig `json:"flagger,omitempty"`
}

type MetricConfig struct {
Expand Down Expand Up @@ -507,6 +509,32 @@ type Device struct {
Config map[string]string `json:"config,omitempty"`
}

type FlaggerConfig struct {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you forget to add it to plugin

// Chart defines the helm chart config of the flagger.
// default values is
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// default values is
// default value is

//
// chart:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrap with

// repository: oci://ghcr.io/fluxcd/charts
// name: flagger
// version: 1.x
//
// +optional
Chart *ChartConfig `json:"chart,omitempty"`
// ExtraArgs is the set of extra arguments for flagger chart.
//
// For Example, using following configuration to change replica count.
// extraArgs:
// flagger:
// replicaCount: 2
//
// +optional
ExtraArgs apiextensionsv1.JSON `json:"extraArgs,omitempty"`
// PublicTestloader defines whether to install the publictestloader or not.
// In addition to the public testloader you can configure here,
// you can also specify a private testloader in the Application.Spec.SyncPolicies.Rollout.TestLoader
PublicTestloader bool `json:"publicTestloader,omitempty"`
}

// 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
27 changes: 27 additions & 0 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.

Loading