Merge pull request #23 from rancher/update-docs-0.6

Update docs 0.6
This commit is contained in:
Mario Manno 2022-11-28 11:46:20 +01:00 committed by GitHub
commit 0e62386e5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
29 changed files with 8280 additions and 29 deletions

View File

@ -68,7 +68,7 @@ helm -n cattle-fleet-system install --create-namespace --wait \
--values values.yaml \ --values values.yaml \
--set apiServerCA=${API_SERVER_CA} \ --set apiServerCA=${API_SERVER_CA} \
--set apiServerURL=${API_SERVER_URL} \ --set apiServerURL=${API_SERVER_URL} \
fleet-agent https://github.com/rancher/fleet/releases/download/v0.5.0-rc2/fleet-agent-0.5.0-rc2.tgz fleet-agent https://github.com/rancher/fleet/releases/download/v0.6.0-alpha2/fleet-agent-0.6.0-alpha2.tgz
``` ```
The agent should now be deployed. You can check that status of the fleet pods by running the below commands. The agent should now be deployed. You can check that status of the fleet pods by running the below commands.
@ -147,7 +147,7 @@ Finally, install the agent using Helm.
helm -n cattle-fleet-system install --create-namespace --wait \ helm -n cattle-fleet-system install --create-namespace --wait \
--set clientID="${CLUSTER_CLIENT_ID}" \ --set clientID="${CLUSTER_CLIENT_ID}" \
--values values.yaml \ --values values.yaml \
fleet-agent https://github.com/rancher/fleet/releases/download/v0.5.0-rc2/fleet-agent-v0.5.0-rc2.tgz fleet-agent https://github.com/rancher/fleet/releases/download/v0.6.0-alpha2/fleet-agent-v0.6.0-alpha2.tgz
``` ```
The agent should now be deployed. You can check that status of the fleet pods by running the below commands. The agent should now be deployed. You can check that status of the fleet pods by running the below commands.

View File

@ -0,0 +1,25 @@
---
title: ""
sidebar_label: "fleet-agent"
---
## fleet-agent
```
fleet-agent [flags]
```
### Options
```
--agent-scope string An identifier used to scope the agent bundleID names, typically the same as namespace
--checkin-interval string How often to post cluster status
--debug Turn on debug logging
--debug-level int If debugging is enabled, set klog -v=X
-h, --help help for fleet-agent
--kubeconfig string kubeconfig file
--namespace string namespace to watch
--simulators int Numbers of simulators to run
```

View File

@ -0,0 +1,29 @@
---
title: ""
sidebar_label: "fleet"
---
## fleet
```
fleet [flags]
```
### Options
```
--context string kubeconfig context for authentication
--debug Turn on debug logging
--debug-level int If debugging is enabled, set klog -v=X
-h, --help help for fleet
-k, --kubeconfig string kubeconfig for authentication
-n, --namespace string namespace (default "fleet-local")
--system-namespace string System namespace of the controller (default "cattle-fleet-system")
```
### SEE ALSO
* [fleet apply](./fleet_apply) - Render a bundle into a Kubernetes resource and apply it in the Fleet Manager
* [fleet test](./fleet_test) - Match a bundle to a target and render the output

View File

@ -0,0 +1,48 @@
---
title: ""
sidebar_label: "fleet apply"
---
## fleet apply
Render a bundle into a Kubernetes resource and apply it in the Fleet Manager
```
fleet apply [flags] BUNDLE_NAME PATH...
```
### Options
```
-b, --bundle-file string Location of the raw Bundle resource yaml
--cacerts-file string Path of custom cacerts for helm repo
--commit string Commit to assign to the bundle
-c, --compress Force all resources to be compress
--debug Turn on debug logging
--debug-level int If debugging is enabled, set klog -v=X
-f, --file string Location of the fleet.yaml
-h, --help help for apply
-l, --label strings Labels to apply to created bundles
-o, --output string Output contents to file or - for stdout
--password-file string Path of file containing basic auth password for helm repo
--paused Create bundles in a paused state
-a, --service-account string Service account to assign to bundle created
--ssh-privatekey-file string Path of ssh-private-key for helm repo
--sync-generation int Generation number used to force sync the deployment
--target-namespace string Ensure this bundle goes to this target namespace
--targets-file string Addition source of targets and restrictions to be append
--username string Basic auth username for helm repo
```
### Options inherited from parent commands
```
--context string kubeconfig context for authentication
-k, --kubeconfig string kubeconfig for authentication
-n, --namespace string namespace (default "fleet-local")
--system-namespace string System namespace of the controller (default "cattle-fleet-system")
```
### SEE ALSO
* [fleet](./fleet) -

View File

@ -0,0 +1,41 @@
---
title: ""
sidebar_label: "fleet test"
---
## fleet test
Match a bundle to a target and render the output
```
fleet test [flags]
```
### Options
```
-b, --bundle-file string Location of the raw Bundle resource yaml
--debug Turn on debug logging
--debug-level int If debugging is enabled, set klog -v=X
-f, --file string Location of the fleet.yaml
-g, --group string Cluster group to match against
-L, --group-label strings Cluster group labels to match against
-h, --help help for test
-l, --label strings Cluster labels to match against
-N, --name string Cluster name to match against
-q, --quiet Just print the match and don't print the resources
-t, --target string Explicit target to match
```
### Options inherited from parent commands
```
--context string kubeconfig context for authentication
-k, --kubeconfig string kubeconfig for authentication
-n, --namespace string namespace (default "fleet-local")
--system-namespace string System namespace of the controller (default "cattle-fleet-system")
```
### SEE ALSO
* [fleet](./fleet) -

View File

@ -0,0 +1,23 @@
---
title: ""
sidebar_label: "fleet-manager"
---
## fleet-manager
```
fleet-manager [flags]
```
### Options
```
--debug Turn on debug logging
--debug-level int If debugging is enabled, set klog -v=X
--disable-gitops disable gitops components
-h, --help help for fleet-manager
--kubeconfig string Kubeconfig file
--namespace string namespace to watch (default "cattle-fleet-system")
```

View File

@ -1,5 +1,7 @@
# Expected Repo Structure # Expected Repo Structure
Fleet will create bundles from a git repository. This happens either explicitly by specifying paths, or when a `fleet.yaml` is found.
**The git repository has no explicitly required structure.** It is important **The git repository has no explicitly required structure.** It is important
to realize the scanned resources will be saved as a resource in Kubernetes so to realize the scanned resources will be saved as a resource in Kubernetes so
you want to make sure the directories you are scanning in git do not contain you want to make sure the directories you are scanning in git do not contain

View File

@ -135,7 +135,7 @@ Helm charts.
First install the Fleet CustomResourcesDefintions. First install the Fleet CustomResourcesDefintions.
```shell ```shell
helm -n cattle-fleet-system install --create-namespace --wait fleet-crd https://github.com/rancher/fleet/releases/download/v0.5.0-rc2/fleet-crd-0.5.0-rc2.tgz helm -n cattle-fleet-system install --create-namespace --wait fleet-crd https://github.com/rancher/fleet/releases/download/v0.6.0-alpha2/fleet-crd-0.6.0-alpha2.tgz
``` ```
Second install the Fleet controllers. Second install the Fleet controllers.
@ -143,7 +143,7 @@ Second install the Fleet controllers.
helm -n cattle-fleet-system install --create-namespace --wait \ helm -n cattle-fleet-system install --create-namespace --wait \
--set apiServerURL="${API_SERVER_URL}" \ --set apiServerURL="${API_SERVER_URL}" \
--set-file apiServerCA="${API_SERVER_CA}" \ --set-file apiServerCA="${API_SERVER_CA}" \
fleet https://github.com/rancher/fleet/releases/download/v0.5.0-rc2/fleet-0.5.0-rc2.tgz fleet https://github.com/rancher/fleet/releases/download/v0.6.0-alpha2/fleet-0.6.0-alpha2.tgz
``` ```
Fleet should be ready to use. You can check the status of the Fleet controller pods by running the below commands. Fleet should be ready to use. You can check the status of the Fleet controller pods by running the below commands.

View File

@ -15,9 +15,9 @@ Install the Fleet Helm charts (there's two because we separate out CRDs for ulti
```shell ```shell
helm -n cattle-fleet-system install --create-namespace --wait \ helm -n cattle-fleet-system install --create-namespace --wait \
fleet-crd https://github.com/rancher/fleet/releases/download/v0.5.0-rc2/fleet-crd-v0.5.0-rc2.tgz fleet-crd https://github.com/rancher/fleet/releases/download/v0.6.0-alpha2/fleet-crd-v0.6.0-alpha2.tgz
helm -n cattle-fleet-system install --create-namespace --wait \ helm -n cattle-fleet-system install --create-namespace --wait \
fleet https://github.com/rancher/fleet/releases/download/v0.5.0-rc2/fleet-v0.5.0-rc2.tgz fleet https://github.com/rancher/fleet/releases/download/v0.6.0-alpha2/fleet-v0.6.0-alpha2.tgz
``` ```
## Add a Git Repo to watch ## Add a Git Repo to watch

View File

@ -0,0 +1,5 @@
# Bundle Rendering Stages
The different stages a bundle goes through until deployed.
![Bundle Stages](/img/FleetBundleStages.svg)

0
docs/ref-cli.md Normal file
View File

5
docs/ref-components.md Normal file
View File

@ -0,0 +1,5 @@
# Components
An overview of the components and how they interact on a high level.
![Components](/img/FleetComponents.svg)

0
docs/ref-crd.md Normal file
View File

954
docs/ref-crds.md Normal file
View File

@ -0,0 +1,954 @@
# Custom Resources
* [GitRepo](#gitrepo)
* [GitRepoRestriction](#gitreporestriction)
* [Bundle](#bundle)
* [BundleDeployment](#bundledeployment)
* [BundleNamespaceMapping](#bundlenamespacemapping)
* [Content](#content)
* [ImageScan](#imagescan)
* [Cluster](#cluster)
* [ClusterGroup](#clustergroup)
* [ClusterRegistration](#clusterregistration)
* [ClusterRegistrationToken](#clusterregistrationtoken)
# Sub Resources
* [GitRepoDisplay](#gitrepodisplay)
* [GitRepoResource](#gitreporesource)
* [GitRepoResourceCounts](#gitreporesourcecounts)
* [GitRepoSpec](#gitrepospec)
* [GitRepoStatus](#gitrepostatus)
* [GitTarget](#gittarget)
* [ResourcePerClusterState](#resourceperclusterstate)
* [BundleDeploymentDisplay](#bundledeploymentdisplay)
* [BundleDeploymentOptions](#bundledeploymentoptions)
* [BundleDeploymentSpec](#bundledeploymentspec)
* [BundleDeploymentStatus](#bundledeploymentstatus)
* [BundleDisplay](#bundledisplay)
* [BundleRef](#bundleref)
* [BundleResource](#bundleresource)
* [BundleSpec](#bundlespec)
* [BundleStatus](#bundlestatus)
* [BundleSummary](#bundlesummary)
* [BundleTarget](#bundletarget)
* [BundleTargetRestriction](#bundletargetrestriction)
* [ComparePatch](#comparepatch)
* [ConfigMapKeySelector](#configmapkeyselector)
* [DiffOptions](#diffoptions)
* [HelmOptions](#helmoptions)
* [KustomizeOptions](#kustomizeoptions)
* [LocalObjectReference](#localobjectreference)
* [ModifiedStatus](#modifiedstatus)
* [NonReadyResource](#nonreadyresource)
* [NonReadyStatus](#nonreadystatus)
* [Operation](#operation)
* [Partition](#partition)
* [PartitionStatus](#partitionstatus)
* [ResourceKey](#resourcekey)
* [RolloutStrategy](#rolloutstrategy)
* [SecretKeySelector](#secretkeyselector)
* [ValuesFrom](#valuesfrom)
* [YAMLOptions](#yamloptions)
* [AlphabeticalPolicy](#alphabeticalpolicy)
* [CommitSpec](#commitspec)
* [ImagePolicyChoice](#imagepolicychoice)
* [ImageScanSpec](#imagescanspec)
* [ImageScanStatus](#imagescanstatus)
* [SemVerPolicy](#semverpolicy)
* [AgentStatus](#agentstatus)
* [ClusterDisplay](#clusterdisplay)
* [ClusterGroupDisplay](#clustergroupdisplay)
* [ClusterGroupSpec](#clustergroupspec)
* [ClusterGroupStatus](#clustergroupstatus)
* [ClusterRegistrationSpec](#clusterregistrationspec)
* [ClusterRegistrationStatus](#clusterregistrationstatus)
* [ClusterRegistrationTokenSpec](#clusterregistrationtokenspec)
* [ClusterRegistrationTokenStatus](#clusterregistrationtokenstatus)
* [ClusterSpec](#clusterspec)
* [ClusterStatus](#clusterstatus)
#### GitRepo
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| metadata | | metav1.ObjectMeta | false |
| spec | | [GitRepoSpec](#gitrepospec) | false |
| status | | [GitRepoStatus](#gitrepostatus) | false |
[Back to Custom Resources](#custom-resources)
#### GitRepoDisplay
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| readyBundleDeployments | | string | false |
| state | | string | false |
| message | | string | false |
| error | | bool | false |
[Back to Custom Resources](#custom-resources)
#### GitRepoResource
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| apiVersion | | string | false |
| kind | | string | false |
| type | | string | false |
| id | | string | false |
| namespace | | string | false |
| name | | string | false |
| incompleteState | | bool | false |
| state | | string | false |
| error | | bool | false |
| transitioning | | bool | false |
| message | | string | false |
| perClusterState | | [][ResourcePerClusterState](#resourceperclusterstate) | false |
[Back to Custom Resources](#custom-resources)
#### GitRepoResourceCounts
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| ready | | int | true |
| desiredReady | | int | true |
| waitApplied | | int | true |
| modified | | int | true |
| orphaned | | int | true |
| missing | | int | true |
| unknown | | int | true |
| notReady | | int | true |
[Back to Custom Resources](#custom-resources)
#### GitRepoRestriction
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| metadata | | metav1.ObjectMeta | false |
| defaultServiceAccount | | string | false |
| allowedServiceAccounts | | []string | false |
| allowedRepoPatterns | | []string | false |
| defaultClientSecretName | | string | false |
| allowedClientSecretNames | | []string | false |
| allowedTargetNamespaces | | []string | false |
[Back to Custom Resources](#custom-resources)
#### GitRepoSpec
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| repo | Repo is a URL to a git repo to clone and index | string | false |
| branch | Branch The git branch to follow | string | false |
| revision | Revision A specific commit or tag to operate on | string | false |
| targetNamespace | Ensure that all resources are created in this namespace Any cluster scoped resource will be rejected if this is set Additionally this namespace will be created on demand | string | false |
| clientSecretName | ClientSecretName is the client secret to be used to connect to the repo It is expected the secret be of type \"kubernetes.io/basic-auth\" or \"kubernetes.io/ssh-auth\". | string | false |
| helmSecretName | HelmSecretName contains the auth secret for private helm repository | string | false |
| caBundle | CABundle is a PEM encoded CA bundle which will be used to validate the repo's certificate. | []byte | false |
| insecureSkipTLSVerify | InsecureSkipTLSverify will use insecure HTTPS to clone the repo. | bool | false |
| paths | Paths is the directories relative to the git repo root that contain resources to be applied. Path globbing is support, for example [\"charts/*\"] will match all folders as a subdirectory of charts/ If empty, \"/\" is the default | []string | false |
| paused | Paused this cause changes in Git to not be propagated down to the clusters but instead mark resources as OutOfSync | bool | false |
| serviceAccount | ServiceAccount used in the downstream cluster for deployment | string | false |
| targets | Targets is a list of target this repo will deploy to | [][GitTarget](#gittarget) | false |
| pollingInterval | PollingInterval is how often to check git for new updates | *metav1.Duration | false |
| forceSyncGeneration | Increment this number to force a redeployment of contents from Git | int64 | false |
| imageScanInterval | ImageScanInterval is the interval of syncing scanned images and writing back to git repo | *metav1.Duration | false |
| imageScanCommit | Commit specifies how to commit to the git repo when new image is scanned and write back to git repo | [CommitSpec](#commitspec) | false |
[Back to Custom Resources](#custom-resources)
#### GitRepoStatus
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| observedGeneration | | int64 | true |
| commit | | string | false |
| readyClusters | | int | true |
| desiredReadyClusters | | int | true |
| gitJobStatus | | string | false |
| summary | | [BundleSummary](#bundlesummary) | false |
| display | | [GitRepoDisplay](#gitrepodisplay) | false |
| conditions | | []genericcondition.GenericCondition | false |
| resources | | [][GitRepoResource](#gitreporesource) | false |
| resourceCounts | | [GitRepoResourceCounts](#gitreporesourcecounts) | false |
| resourceErrors | | []string | false |
| lastSyncedImageScanTime | | metav1.Time | false |
[Back to Custom Resources](#custom-resources)
#### GitTarget
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| name | | string | false |
| clusterName | | string | false |
| clusterSelector | | *metav1.LabelSelector | false |
| clusterGroup | | string | false |
| clusterGroupSelector | | *metav1.LabelSelector | false |
[Back to Custom Resources](#custom-resources)
#### ResourcePerClusterState
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| state | | string | false |
| error | | bool | false |
| transitioning | | bool | false |
| message | | string | false |
| patch | | *GenericMap | false |
| clusterId | | string | false |
[Back to Custom Resources](#custom-resources)
#### Bundle
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| metadata | | metav1.ObjectMeta | false |
| spec | | [BundleSpec](#bundlespec) | true |
| status | | [BundleStatus](#bundlestatus) | true |
[Back to Custom Resources](#custom-resources)
#### BundleDeployment
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| metadata | | metav1.ObjectMeta | false |
| spec | | [BundleDeploymentSpec](#bundledeploymentspec) | false |
| status | | [BundleDeploymentStatus](#bundledeploymentstatus) | false |
[Back to Custom Resources](#custom-resources)
#### BundleDeploymentDisplay
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| deployed | | string | false |
| monitored | | string | false |
| state | | string | false |
[Back to Custom Resources](#custom-resources)
#### BundleDeploymentOptions
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| defaultNamespace | | string | false |
| namespace | | string | false |
| kustomize | | *[KustomizeOptions](#kustomizeoptions) | false |
| helm | | *[HelmOptions](#helmoptions) | false |
| serviceAccount | | string | false |
| forceSyncGeneration | | int64 | false |
| yaml | | *[YAMLOptions](#yamloptions) | false |
| diff | | *[DiffOptions](#diffoptions) | false |
[Back to Custom Resources](#custom-resources)
#### BundleDeploymentSpec
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| stagedOptions | | [BundleDeploymentOptions](#bundledeploymentoptions) | false |
| stagedDeploymentID | | string | false |
| options | | [BundleDeploymentOptions](#bundledeploymentoptions) | false |
| deploymentID | | string | false |
| dependsOn | | [][BundleRef](#bundleref) | false |
[Back to Custom Resources](#custom-resources)
#### BundleDeploymentStatus
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| conditions | | []genericcondition.GenericCondition | false |
| appliedDeploymentID | | string | false |
| release | | string | false |
| ready | | bool | false |
| nonModified | | bool | false |
| nonReadyStatus | | [][NonReadyStatus](#nonreadystatus) | false |
| modifiedStatus | | [][ModifiedStatus](#modifiedstatus) | false |
| display | | [BundleDeploymentDisplay](#bundledeploymentdisplay) | false |
| syncGeneration | | *int64 | false |
[Back to Custom Resources](#custom-resources)
#### BundleDisplay
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| readyClusters | | string | false |
| state | | string | false |
[Back to Custom Resources](#custom-resources)
#### BundleNamespaceMapping
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| metadata | | metav1.ObjectMeta | false |
| bundleSelector | | *metav1.LabelSelector | false |
| namespaceSelector | | *metav1.LabelSelector | false |
[Back to Custom Resources](#custom-resources)
#### BundleRef
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| name | | string | false |
| selector | | *metav1.LabelSelector | false |
[Back to Custom Resources](#custom-resources)
#### BundleResource
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| name | | string | false |
| content | | string | false |
| encoding | | string | false |
[Back to Custom Resources](#custom-resources)
#### BundleSpec
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| BundleDeploymentOptions | | [BundleDeploymentOptions](#bundledeploymentoptions) | false |
| paused | | bool | false |
| rolloutStrategy | | *[RolloutStrategy](#rolloutstrategy) | false |
| resources | | [][BundleResource](#bundleresource) | false |
| targets | | [][BundleTarget](#bundletarget) | false |
| targetRestrictions | | [][BundleTargetRestriction](#bundletargetrestriction) | false |
| dependsOn | | [][BundleRef](#bundleref) | false |
[Back to Custom Resources](#custom-resources)
#### BundleStatus
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| conditions | | []genericcondition.GenericCondition | false |
| summary | | [BundleSummary](#bundlesummary) | false |
| newlyCreated | | int | false |
| unavailable | | int | true |
| unavailablePartitions | | int | true |
| maxUnavailable | | int | true |
| maxUnavailablePartitions | | int | true |
| maxNew | | int | false |
| partitions | | [][PartitionStatus](#partitionstatus) | false |
| display | | [BundleDisplay](#bundledisplay) | false |
| resourceKey | | [][ResourceKey](#resourcekey) | false |
| observedGeneration | | int64 | true |
[Back to Custom Resources](#custom-resources)
#### BundleSummary
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| notReady | | int | false |
| waitApplied | | int | false |
| errApplied | | int | false |
| outOfSync | | int | false |
| modified | | int | false |
| ready | | int | true |
| pending | | int | false |
| desiredReady | | int | true |
| nonReadyResources | | [][NonReadyResource](#nonreadyresource) | false |
[Back to Custom Resources](#custom-resources)
#### BundleTarget
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| BundleDeploymentOptions | | [BundleDeploymentOptions](#bundledeploymentoptions) | false |
| name | | string | false |
| clusterName | | string | false |
| clusterSelector | | *metav1.LabelSelector | false |
| clusterGroup | | string | false |
| clusterGroupSelector | | *metav1.LabelSelector | false |
[Back to Custom Resources](#custom-resources)
#### BundleTargetRestriction
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| name | | string | false |
| clusterName | | string | false |
| clusterSelector | | *metav1.LabelSelector | false |
| clusterGroup | | string | false |
| clusterGroupSelector | | *metav1.LabelSelector | false |
[Back to Custom Resources](#custom-resources)
#### ComparePatch
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| kind | | string | false |
| apiVersion | | string | false |
| namespace | | string | false |
| name | | string | false |
| operations | | [][Operation](#operation) | false |
| jsonPointers | | []string | false |
[Back to Custom Resources](#custom-resources)
#### ConfigMapKeySelector
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| namespace | | string | false |
| key | | string | false |
[Back to Custom Resources](#custom-resources)
#### Content
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| metadata | | metav1.ObjectMeta | false |
| content | | []byte | false |
[Back to Custom Resources](#custom-resources)
#### DiffOptions
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| comparePatches | | [][ComparePatch](#comparepatch) | false |
[Back to Custom Resources](#custom-resources)
#### HelmOptions
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| chart | | string | false |
| repo | | string | false |
| releaseName | | string | false |
| version | | string | false |
| timeoutSeconds | | int | false |
| values | | *GenericMap | false |
| valuesFrom | | [][ValuesFrom](#valuesfrom) | false |
| force | | bool | false |
| takeOwnership | | bool | false |
| maxHistory | | int | false |
| valuesFiles | | []string | false |
| atomic | Atomic sets the --atomic flag when Helm is performing an upgrade | bool | false |
[Back to Custom Resources](#custom-resources)
#### KustomizeOptions
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| dir | | string | false |
[Back to Custom Resources](#custom-resources)
#### LocalObjectReference
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| name | | string | true |
[Back to Custom Resources](#custom-resources)
#### ModifiedStatus
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| kind | | string | false |
| apiVersion | | string | false |
| namespace | | string | false |
| name | | string | false |
| missing | | bool | false |
| delete | | bool | false |
| patch | | string | false |
[Back to Custom Resources](#custom-resources)
#### NonReadyResource
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| name | | string | false |
| bundleState | | BundleState | false |
| message | | string | false |
| modifiedStatus | | [][ModifiedStatus](#modifiedstatus) | false |
| nonReadyStatus | | [][NonReadyStatus](#nonreadystatus) | false |
[Back to Custom Resources](#custom-resources)
#### NonReadyStatus
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| uid | | types.UID | false |
| kind | | string | false |
| apiVersion | | string | false |
| namespace | | string | false |
| name | | string | false |
| summary | | summary.Summary | false |
[Back to Custom Resources](#custom-resources)
#### Operation
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| op | | string | false |
| path | | string | false |
| value | | string | false |
[Back to Custom Resources](#custom-resources)
#### Partition
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| name | | string | false |
| maxUnavailable | | *intstr.IntOrString | false |
| clusterName | | string | false |
| clusterSelector | | *metav1.LabelSelector | false |
| clusterGroup | | string | false |
| clusterGroupSelector | | *metav1.LabelSelector | false |
[Back to Custom Resources](#custom-resources)
#### PartitionStatus
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| name | | string | false |
| count | | int | false |
| maxUnavailable | | int | false |
| unavailable | | int | false |
| summary | | [BundleSummary](#bundlesummary) | false |
[Back to Custom Resources](#custom-resources)
#### ResourceKey
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| kind | | string | false |
| apiVersion | | string | false |
| namespace | | string | false |
| name | | string | false |
[Back to Custom Resources](#custom-resources)
#### RolloutStrategy
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| maxUnavailable | | *intstr.IntOrString | false |
| maxUnavailablePartitions | | *intstr.IntOrString | false |
| autoPartitionSize | | *intstr.IntOrString | false |
| partitions | | [][Partition](#partition) | false |
[Back to Custom Resources](#custom-resources)
#### SecretKeySelector
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| namespace | | string | false |
| key | | string | false |
[Back to Custom Resources](#custom-resources)
#### ValuesFrom
Define helm values that can come from configmap, secret or external. Credit: https://github.com/fluxcd/helm-operator/blob/0cfea875b5d44bea995abe7324819432070dfbdc/pkg/apis/helm.fluxcd.io/v1/types_helmrelease.go#L439
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| configMapKeyRef | The reference to a config map with release values. | *[ConfigMapKeySelector](#configmapkeyselector) | false |
| secretKeyRef | The reference to a secret with release values. | *[SecretKeySelector](#secretkeyselector) | false |
[Back to Custom Resources](#custom-resources)
#### YAMLOptions
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| overlays | | []string | false |
[Back to Custom Resources](#custom-resources)
#### AlphabeticalPolicy
AlphabeticalPolicy specifices a alphabetical ordering policy.
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| order | Order specifies the sorting order of the tags. Given the letters of the alphabet as tags, ascending order would select Z, and descending order would select A. | string | false |
[Back to Custom Resources](#custom-resources)
#### CommitSpec
CommitSpec specifies how to commit changes to the git repository
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| authorName | AuthorName gives the name to provide when making a commit | string | true |
| authorEmail | AuthorEmail gives the email to provide when making a commit | string | true |
| messageTemplate | MessageTemplate provides a template for the commit message, into which will be interpolated the details of the change made. | string | false |
[Back to Custom Resources](#custom-resources)
#### ImagePolicyChoice
ImagePolicyChoice is a union of all the types of policy that can be supplied.
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| semver | SemVer gives a semantic version range to check against the tags available. | *[SemVerPolicy](#semverpolicy) | false |
| alphabetical | Alphabetical set of rules to use for alphabetical ordering of the tags. | *[AlphabeticalPolicy](#alphabeticalpolicy) | false |
[Back to Custom Resources](#custom-resources)
#### ImageScan
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| metadata | | metav1.ObjectMeta | false |
| spec | | [ImageScanSpec](#imagescanspec) | false |
| status | | [ImageScanStatus](#imagescanstatus) | false |
[Back to Custom Resources](#custom-resources)
#### ImageScanSpec
API is taken from https://github.com/fluxcd/image-reflector-controller
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| tagName | TagName is the tag ref that needs to be put in manifest to replace fields | string | false |
| gitrepoName | GitRepo reference name | string | false |
| image | Image is the name of the image repository | string | false |
| interval | Interval is the length of time to wait between scans of the image repository. | metav1.Duration | false |
| secretRef | SecretRef can be given the name of a secret containing credentials to use for the image registry. The secret should be created with `kubectl create secret docker-registry`, or the equivalent. | *corev1.LocalObjectReference | false |
| suspend | This flag tells the controller to suspend subsequent image scans. It does not apply to already started scans. Defaults to false. | bool | false |
| policy | Policy gives the particulars of the policy to be followed in selecting the most recent image | [ImagePolicyChoice](#imagepolicychoice) | true |
[Back to Custom Resources](#custom-resources)
#### ImageScanStatus
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| conditions | | []genericcondition.GenericCondition | false |
| lastScanTime | LastScanTime is the last time image was scanned | metav1.Time | false |
| latestImage | LatestImage gives the first in the list of images scanned by the image repository, when filtered and ordered according to the policy. | string | false |
| latestTag | Latest tag is the latest tag filtered by the policy | string | false |
| latestDigest | LatestDigest is the digest of latest tag | string | false |
| observedGeneration | | int64 | false |
| canonicalImageName | CannonicalName is the name of the image repository with all the implied bits made explicit; e.g., `docker.io/library/alpine` rather than `alpine`. | string | false |
[Back to Custom Resources](#custom-resources)
#### SemVerPolicy
SemVerPolicy specifices a semantic version policy.
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| range | Range gives a semver range for the image tag; the highest version within the range that's a tag yields the latest image. | string | true |
[Back to Custom Resources](#custom-resources)
#### AgentStatus
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| lastSeen | | metav1.Time | true |
| namespace | | string | true |
| nonReadyNodes | | int | true |
| readyNodes | | int | true |
| nonReadyNodeNames | At most 3 nodes | []string | true |
| readyNodeNames | At most 3 nodes | []string | true |
[Back to Custom Resources](#custom-resources)
#### Cluster
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| metadata | | metav1.ObjectMeta | false |
| spec | | [ClusterSpec](#clusterspec) | false |
| status | | [ClusterStatus](#clusterstatus) | false |
[Back to Custom Resources](#custom-resources)
#### ClusterDisplay
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| readyBundles | | string | false |
| readyNodes | | string | false |
| sampleNode | | string | false |
| state | | string | false |
[Back to Custom Resources](#custom-resources)
#### ClusterGroup
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| metadata | | metav1.ObjectMeta | false |
| spec | | [ClusterGroupSpec](#clustergroupspec) | true |
| status | | [ClusterGroupStatus](#clustergroupstatus) | true |
[Back to Custom Resources](#custom-resources)
#### ClusterGroupDisplay
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| readyClusters | | string | false |
| readyBundles | | string | false |
| state | | string | false |
[Back to Custom Resources](#custom-resources)
#### ClusterGroupSpec
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| selector | | *metav1.LabelSelector | false |
[Back to Custom Resources](#custom-resources)
#### ClusterGroupStatus
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| clusterCount | | int | true |
| nonReadyClusterCount | | int | true |
| nonReadyClusters | | []string | false |
| conditions | | []genericcondition.GenericCondition | false |
| summary | | [BundleSummary](#bundlesummary) | false |
| display | | [ClusterGroupDisplay](#clustergroupdisplay) | false |
| resourceCounts | | [GitRepoResourceCounts](#gitreporesourcecounts) | false |
[Back to Custom Resources](#custom-resources)
#### ClusterRegistration
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| metadata | | metav1.ObjectMeta | false |
| spec | | [ClusterRegistrationSpec](#clusterregistrationspec) | false |
| status | | [ClusterRegistrationStatus](#clusterregistrationstatus) | false |
[Back to Custom Resources](#custom-resources)
#### ClusterRegistrationSpec
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| clientID | | string | false |
| clientRandom | | string | false |
| clusterLabels | | map[string]string | false |
[Back to Custom Resources](#custom-resources)
#### ClusterRegistrationStatus
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| clusterName | | string | false |
| granted | | bool | false |
[Back to Custom Resources](#custom-resources)
#### ClusterRegistrationToken
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| metadata | | metav1.ObjectMeta | false |
| spec | | [ClusterRegistrationTokenSpec](#clusterregistrationtokenspec) | false |
| status | | [ClusterRegistrationTokenStatus](#clusterregistrationtokenstatus) | false |
[Back to Custom Resources](#custom-resources)
#### ClusterRegistrationTokenSpec
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| ttl | | *metav1.Duration | false |
[Back to Custom Resources](#custom-resources)
#### ClusterRegistrationTokenStatus
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| expires | | *metav1.Time | false |
| secretName | | string | false |
[Back to Custom Resources](#custom-resources)
#### ClusterSpec
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| paused | | bool | false |
| clientID | | string | false |
| kubeConfigSecret | | string | false |
| redeployAgentGeneration | | int64 | false |
| agentEnvVars | | []v1.EnvVar | false |
| agentNamespace | AgentNamespace defaults to the system namespace, e.g. cattle-fleet-system | string | false |
| privateRepoURL | | string | false |
[Back to Custom Resources](#custom-resources)
#### ClusterStatus
| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| conditions | | []genericcondition.GenericCondition | false |
| namespace | Namespace is the cluster namespace, it contains the clusters service account as well as any bundledeployments. Example: \"cluster-fleet-local-cluster-294db1acfa77-d9ccf852678f\" | string | false |
| summary | | [BundleSummary](#bundlesummary) | false |
| resourceCounts | | [GitRepoResourceCounts](#gitreporesourcecounts) | false |
| readyGitRepos | | int | true |
| desiredReadyGitRepos | | int | true |
| agentEnvVarsHash | | string | false |
| agentPrivateRepoURL | | string | false |
| agentDeployedGeneration | | *int64 | false |
| agentMigrated | | bool | false |
| agentNamespaceMigrated | | bool | false |
| cattleNamespaceMigrated | | bool | false |
| display | | [ClusterDisplay](#clusterdisplay) | false |
| agent | | [AgentStatus](#agentstatus) | false |
[Back to Custom Resources](#custom-resources)

0
docs/ref-helm.md Normal file
View File

5
docs/ref-namespaces.md Normal file
View File

@ -0,0 +1,5 @@
# Namespaces
An overview of the [namespaces](namespaces.md) used by fleet and their resources.
![Namespace](/img/FleetNamespaces.svg)

11
docs/ref-registration.md Normal file
View File

@ -0,0 +1,11 @@
# Registration
Detailed analysis of the registration process for clusters. This shows the interaction of controllers, resources and service accounts during the registration of a new downstream cluster or the local cluster.
It's important to note that there are multiple ways to start this:
* Creating a bootstrap config. Fleet does this for the local agent.
* Creating a Cluster resource with a kubeconfing. Rancher does this for downstream clusters.
* Create a Cluster resource with an id.
* Create a ClusterRegistration resource.
![Registration](/img/FleetRegistration.svg)

5
docs/ref-resources.md Normal file
View File

@ -0,0 +1,5 @@
# Resources
This shows the resources, also the internal ones, involved in creating a deployment from a git repository.
![Resources](/img/FleetResources.svg)

View File

@ -37,13 +37,13 @@ Install the following two Helm charts.
First install the Fleet CustomResourcesDefintions. First install the Fleet CustomResourcesDefintions.
```shell ```shell
helm -n cattle-fleet-system install --create-namespace --wait \ helm -n cattle-fleet-system install --create-namespace --wait \
fleet-crd https://github.com/rancher/fleet/releases/download/v0.5.0-rc2/fleet-crd-0.5.0-rc2.tgz fleet-crd https://github.com/rancher/fleet/releases/download/v0.6.0-alpha2/fleet-crd-0.6.0-alpha2.tgz
``` ```
Second install the Fleet controllers. Second install the Fleet controllers.
```shell ```shell
helm -n cattle-fleet-system install --create-namespace --wait \ helm -n cattle-fleet-system install --create-namespace --wait \
fleet https://github.com/rancher/fleet/releases/download/v0.5.0-rc2/fleet-0.5.0-rc2.tgz fleet https://github.com/rancher/fleet/releases/download/v0.6.0-alpha2/fleet-0.6.0-alpha2.tgz
``` ```
Fleet should be ready to use now for single cluster. You can check the status of the Fleet controller pods by Fleet should be ready to use now for single cluster. You can check the status of the Fleet controller pods by

View File

@ -64,5 +64,31 @@ module.exports = {
}, },
], ],
}, },
{
type: 'category',
label: 'Reference',
items:[
'ref-components',
'ref-bundle-stages',
'ref-resources',
'ref-namespaces',
'ref-registration',
{
'CLI':
[
{type: 'doc', id: 'cli/fleet-agent/fleet-agent'},
{
'fleet-gitjob-cli': [
{type: 'doc', id: 'cli/fleet-cli/fleet'},
{type: 'doc', id: 'cli/fleet-cli/fleet_apply'},
{type: 'doc', id: 'cli/fleet-cli/fleet_test'},
],
},
{type: 'doc', id: 'cli/fleet-controller/fleet-manager'},
],
},
"ref-crds",
],
},
], ],
}; };

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 108 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 54 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 109 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 342 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 164 KiB

View File

@ -68,7 +68,7 @@ helm -n cattle-fleet-system install --create-namespace --wait \
--values values.yaml \ --values values.yaml \
--set apiServerCA=${API_SERVER_CA} \ --set apiServerCA=${API_SERVER_CA} \
--set apiServerURL=${API_SERVER_URL} \ --set apiServerURL=${API_SERVER_URL} \
fleet-agent https://github.com/rancher/fleet/releases/download/v0.5.0-rc2/fleet-agent-0.5.0-rc2.tgz fleet-agent https://github.com/rancher/fleet/releases/download/v0.5.0/fleet-agent-0.5.0.tgz
``` ```
The agent should now be deployed. You can check that status of the fleet pods by running the below commands. The agent should now be deployed. You can check that status of the fleet pods by running the below commands.
@ -147,7 +147,7 @@ Finally, install the agent using Helm.
helm -n cattle-fleet-system install --create-namespace --wait \ helm -n cattle-fleet-system install --create-namespace --wait \
--set clientID="${CLUSTER_CLIENT_ID}" \ --set clientID="${CLUSTER_CLIENT_ID}" \
--values values.yaml \ --values values.yaml \
fleet-agent https://github.com/rancher/fleet/releases/download/v0.5.0-rc2/fleet-agent-v0.5.0-rc2.tgz fleet-agent https://github.com/rancher/fleet/releases/download/v0.5.0/fleet-agent-v0.5.0.tgz
``` ```
The agent should now be deployed. You can check that status of the fleet pods by running the below commands. The agent should now be deployed. You can check that status of the fleet pods by running the below commands.

View File

@ -135,7 +135,7 @@ Helm charts.
First install the Fleet CustomResourcesDefintions. First install the Fleet CustomResourcesDefintions.
```shell ```shell
helm -n cattle-fleet-system install --create-namespace --wait fleet-crd https://github.com/rancher/fleet/releases/download/v0.5.0-rc2/fleet-crd-0.5.0-rc2.tgz helm -n cattle-fleet-system install --create-namespace --wait fleet-crd https://github.com/rancher/fleet/releases/download/v0.5.0/fleet-crd-0.5.0.tgz
``` ```
Second install the Fleet controllers. Second install the Fleet controllers.
@ -143,7 +143,7 @@ Second install the Fleet controllers.
helm -n cattle-fleet-system install --create-namespace --wait \ helm -n cattle-fleet-system install --create-namespace --wait \
--set apiServerURL="${API_SERVER_URL}" \ --set apiServerURL="${API_SERVER_URL}" \
--set-file apiServerCA="${API_SERVER_CA}" \ --set-file apiServerCA="${API_SERVER_CA}" \
fleet https://github.com/rancher/fleet/releases/download/v0.5.0-rc2/fleet-0.5.0-rc2.tgz fleet https://github.com/rancher/fleet/releases/download/v0.5.0/fleet-0.5.0.tgz
``` ```
Fleet should be ready to use. You can check the status of the Fleet controller pods by running the below commands. Fleet should be ready to use. You can check the status of the Fleet controller pods by running the below commands.

View File

@ -15,9 +15,9 @@ Install the Fleet Helm charts (there's two because we separate out CRDs for ulti
```shell ```shell
helm -n cattle-fleet-system install --create-namespace --wait \ helm -n cattle-fleet-system install --create-namespace --wait \
fleet-crd https://github.com/rancher/fleet/releases/download/v0.5.0-rc2/fleet-crd-v0.5.0-rc2.tgz fleet-crd https://github.com/rancher/fleet/releases/download/v0.5.0/fleet-crd-v0.5.0.tgz
helm -n cattle-fleet-system install --create-namespace --wait \ helm -n cattle-fleet-system install --create-namespace --wait \
fleet https://github.com/rancher/fleet/releases/download/v0.5.0-rc2/fleet-v0.5.0-rc2.tgz fleet https://github.com/rancher/fleet/releases/download/v0.5.0/fleet-v0.5.0.tgz
``` ```
## Add a Git Repo to watch ## Add a Git Repo to watch

View File

@ -37,13 +37,13 @@ Install the following two Helm charts.
First install the Fleet CustomResourcesDefintions. First install the Fleet CustomResourcesDefintions.
```shell ```shell
helm -n cattle-fleet-system install --create-namespace --wait \ helm -n cattle-fleet-system install --create-namespace --wait \
fleet-crd https://github.com/rancher/fleet/releases/download/v0.5.0-rc2/fleet-crd-0.5.0-rc2.tgz fleet-crd https://github.com/rancher/fleet/releases/download/v0.5.0/fleet-crd-0.5.0.tgz
``` ```
Second install the Fleet controllers. Second install the Fleet controllers.
```shell ```shell
helm -n cattle-fleet-system install --create-namespace --wait \ helm -n cattle-fleet-system install --create-namespace --wait \
fleet https://github.com/rancher/fleet/releases/download/v0.5.0-rc2/fleet-0.5.0-rc2.tgz fleet https://github.com/rancher/fleet/releases/download/v0.5.0/fleet-0.5.0.tgz
``` ```
Fleet should be ready to use now for single cluster. You can check the status of the Fleet controller pods by Fleet should be ready to use now for single cluster. You can check the status of the Fleet controller pods by