Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
Signed-off-by: Tom <[email protected]>
  • Loading branch information
Flying-Tom committed Aug 26, 2024
2 parents a76a4a9 + f47d06a commit 967881c
Show file tree
Hide file tree
Showing 18 changed files with 155 additions and 169 deletions.
2 changes: 1 addition & 1 deletion cmd/cluster-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ kind load docker-image ghcr.io/kurator-dev/cluster-operator:0.3-dev --name <your
helm repo add jetstack https://charts.jetstack.io
helm repo update
kubectl create namespace cert-manager
helm install -n cert-manager cert-manager jetstack/cert-manager --set installCRDs=true
helm install -n cert-manager cert-manager jetstack/cert-manager --set crds.enabled=true --version v1.15.3
```

- Install cluster operator
Expand Down
2 changes: 1 addition & 1 deletion docs/content/en/boilerplates/prerequisites.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ Kurator cluster operator depends on [cert manager CA injector](https://cert-mana
helm repo add jetstack https://charts.jetstack.io
helm repo update
kubectl create namespace cert-manager
helm install -n cert-manager cert-manager jetstack/cert-manager --set installCRDs=true
helm install -n cert-manager cert-manager jetstack/cert-manager --set crds.enabled=true --version v1.15.3
```
8 changes: 4 additions & 4 deletions docs/content/en/docs/fleet-manager/rollout/abtest.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ istioctl manifest install --set profile=default
Review the results:

```console
kubeclt get po -n istio-system --kubeconfig=/root/.kube/kurator-member1.config
kubectl get po -n istio-system --kubeconfig=/root/.kube/kurator-member1.config

istio-system istio-ingressgateway-65b5c9f9bb-8w5ml 1/1 Running 0 37s
istio-system istiod-657f7686cf-hshwp 1/1 Running 0 2m5s
Expand All @@ -68,7 +68,7 @@ kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.20/samp
Review the results:

```console
Kubectl get po -n istio-system --kubeconfig=/root/.kube/kurator-member1.config
kubectl get po -n istio-system --kubeconfig=/root/.kube/kurator-member1.config

istio-system prometheus-5d5d6d6fc-5hxbh 2/2 Running 0 91s
```
Expand Down Expand Up @@ -104,14 +104,14 @@ EOF
Review the results:

```console
Kubectl get gateway -n istio-system --kubeconfig=/root/.kube/kurator-member1.config
kubectl get gateway -n istio-system --kubeconfig=/root/.kube/kurator-member1.config

istio-system public-gateway 17s
```

### Kurator Rollout Plugin

Before delving into the how to Perform a Unified Rollout, ensure you have successfully installed the Rollout plugin as outlined in the [Rollout plugin installation guide](rollout-plugin.md).
Before delving into the how to Perform a Unified Rollout, ensure you have successfully installed the Rollout plugin as outlined in the [Rollout plugin installation guide](/docs/fleet-manager/rollout/rollout-plugin/).

## How to Perform a Unified Rollout

Expand Down
8 changes: 4 additions & 4 deletions docs/content/en/docs/fleet-manager/rollout/blue-green.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ istioctl manifest install --set profile=default
Review the results:

```console
kubeclt get po -n istio-system --kubeconfig=/root/.kube/kurator-member1.config
kubectl get po -n istio-system --kubeconfig=/root/.kube/kurator-member1.config

istio-system istio-ingressgateway-65b5c9f9bb-8w5ml 1/1 Running 0 37s
istio-system istiod-657f7686cf-hshwp 1/1 Running 0 2m5s
Expand All @@ -68,7 +68,7 @@ kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.20/samp
Review the results:

```console
Kubectl get po -n istio-system --kubeconfig=/root/.kube/kurator-member1.config
kubectl get po -n istio-system --kubeconfig=/root/.kube/kurator-member1.config

istio-system prometheus-5d5d6d6fc-5hxbh 2/2 Running 0 91s
```
Expand Down Expand Up @@ -104,14 +104,14 @@ EOF
Review the results:

```console
Kubectl get gateway -n istio-system --kubeconfig=/root/.kube/kurator-member1.config
kubectl get gateway -n istio-system --kubeconfig=/root/.kube/kurator-member1.config

istio-system public-gateway 17s
```

### Kurator Rollout Plugin

Before delving into the how to Perform a Unified Rollout, ensure you have successfully installed the Rollout plugin as outlined in the [Rollout plugin installation guide](rollout-plugin.md).
Before delving into the how to Perform a Unified Rollout, ensure you have successfully installed the Rollout plugin as outlined in the [Rollout plugin installation guide](/docs/fleet-manager/rollout/rollout-plugin/).

## How to Perform a Unified Rollout

Expand Down
8 changes: 4 additions & 4 deletions docs/content/en/docs/fleet-manager/rollout/canary.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ istioctl manifest install --set profile=default
Review the results:

```console
kubeclt get po -n istio-system --kubeconfig=/root/.kube/kurator-member1.config
kubectl get po -n istio-system --kubeconfig=/root/.kube/kurator-member1.config

istio-system istio-ingressgateway-65b5c9f9bb-8w5ml 1/1 Running 0 37s
istio-system istiod-657f7686cf-hshwp 1/1 Running 0 2m5s
Expand All @@ -68,7 +68,7 @@ kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.20/samp
Review the results:

```console
Kubectl get po -n istio-system --kubeconfig=/root/.kube/kurator-member1.config
kubectl get po -n istio-system --kubeconfig=/root/.kube/kurator-member1.config

istio-system prometheus-5d5d6d6fc-5hxbh 2/2 Running 0 91s
```
Expand Down Expand Up @@ -104,14 +104,14 @@ EOF
Review the results:

```console
Kubectl get gateway -n istio-system --kubeconfig=/root/.kube/kurator-member1.config
kubectl get gateway -n istio-system --kubeconfig=/root/.kube/kurator-member1.config

istio-system public-gateway 17s
```

### Kurator Rollout Plugin

Before delving into the how to Perform a Unified Rollout, ensure you have successfully installed the Rollout plugin as outlined in the [Rollout plugin installation guide](rollout-plugin.md).
Before delving into the how to Perform a Unified Rollout, ensure you have successfully installed the Rollout plugin as outlined in the [Rollout plugin installation guide](/docs/fleet-manager/rollout/rollout-plugin/).

## How to Perform a Unified Rollout

Expand Down
29 changes: 0 additions & 29 deletions docs/content/en/references/backups_v1alpha1_types.html
Original file line number Diff line number Diff line change
Expand Up @@ -408,35 +408,6 @@ <h3 id="backup.kurator.dev/v1alpha1.BackupStatus">BackupStatus
</table>
</div>
</div>
<h3 id="backup.kurator.dev/v1alpha1.ClusterSelector">ClusterSelector
</h3>
<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>matchLabels</code><br>
<em>
map[string]string
</em>
</td>
<td>
<em>(Optional)</em>
<p>MatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is &ldquo;key&rdquo;, the operator is &ldquo;In&rdquo;, and the values array contains only &ldquo;value&rdquo;.
More info: <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors">https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors</a></p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<h3 id="backup.kurator.dev/v1alpha1.Destination">Destination
</h3>
<p>
Expand Down
2 changes: 1 addition & 1 deletion docs/content/en/references/fleet_v1alpha1_types.html
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ <h3 id="fleet.kurator.dev/v1alpha1.KyvernoConfig">KyvernoConfig
</td>
<td>
<em>(Optional)</em>
<p>ExtraArgs is the set of extra arguments for Grafana chart.
<p>ExtraArgs is the set of extra arguments for Kyverno chart.
For Example, using following configuration to change image pull policy.</p>
<pre><code class="language-yaml">extraArgs:
image:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
title: Single cluster deployment application
authors:
- @yeyeye2333
reviewers:
approvers:

creation-date: 2024-07-24

---

## Single Cluster Deployment Application

### Summary

This proposal aims to allow setting the application's destination to a cluster, reducing the operational steps and enabling users to seamlessly use Kurator in a single-cluster, thereby increasing Kurator's flexibility.

### Motivation

Kurator leverages Fleet for multi-cluster management. However, this has resulted in the current application deployment being tightly coupled with Fleet, even requiring Fleet creation for single-cluster usage. Therefore, we aim to decouple the single-cluster client from Fleet.

#### Goals

- Add a new feature to support setting the application's destination to a cluster.
- Enable users to seamlessly use Kurator in a single-cluster environment, thus eliminating the need for Fleet.

### Proposal

Currently, the application registration is handled in the fleet-manager. The proposal is to add a new feature to deploy the application directly to the current host cluster when ApplicationDestination is not specified.

The preliminary discussion results are as follows:

- If `ApplicationDestination` is not specified, the `application` is deployed directly under the current host cluster, otherwise it is deployed in `ApplicationDestination.fleet`
- When updating the destination configuration, no actions will be taken on applications deployed in the old clusters (no deletion).



### Design Details

This proposal does not involve API modification, and supports new functions in code logic.
In the specific code, if `ApplicationDestination` is empty, `handleSyncPolicyByKind` directly on the current cluster client to create Kustomization or HelmRelease resources.


#### Test Plan

During the coding phase, add unit tests covering core functionalities and edge cases. After completing the coding work, design integration tests to ensure the proper deployment of applications in a single cluster, and subsequently, provide examples of deploying applications in a single cluster.
2 changes: 1 addition & 1 deletion hack/e2e-test/install-kurator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ VERSION=$(echo "$VERSION" | sed 's/^0*//')
helm repo add jetstack https://charts.jetstack.io
helm repo update
kubectl create namespace cert-manager
helm install -n cert-manager cert-manager jetstack/cert-manager --set installCRDs=true
helm install -n cert-manager cert-manager jetstack/cert-manager --set crds.enabled=true --version v1.15.3

helm repo add fluxcd-community https://fluxcd-community.github.io/helm-charts
cat <<EOF | helm install fluxcd fluxcd-community/flux2 --version 2.7.0 -n fluxcd-system --create-namespace -f -
Expand Down
Loading

0 comments on commit 967881c

Please sign in to comment.