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

Feat: Single cluster deployment application #667

Merged
merged 3 commits into from
Aug 27, 2024

Conversation

yeyeye2333
Copy link
Contributor

What type of PR is this?
/kind feature

What this PR does / why we need it:
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.

Which issue(s) this PR fixes:
Fixes #653

Does this PR introduce a user-facing change?:
The application can be directly deployed to the current host cluster through the following configuration

apiVersion: apps.kurator.dev/v1alpha1
kind: Application
metadata:
  name: rollout-demo
  namespace: default
spec:
  source:
    gitRepository:
      interval: 3m0s
      ref:
        branch: master
      timeout: 1m0s
      url: https://github.com/stefanprodan/podinfo
  syncPolicies:
    - kustomization:
        interval: 0s
        path: ./deploy/webapp
        prune: true
        timeout: 2m0s
    - kustomization:
        targetNamespace: default
        interval: 5m0s
        path: ./kustomize
        prune: true
        timeout: 2m0s

Copy link

netlify bot commented Aug 8, 2024

Deploy Preview for kurator-dev ready!

Name Link
🔨 Latest commit 42ad69e
🔍 Latest deploy log https://app.netlify.com/sites/kurator-dev/deploys/66cdab6d3109b1000835915e
😎 Deploy Preview https://deploy-preview-667--kurator-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -47,6 +47,7 @@ type ApplicationSpec struct {
SyncPolicies []*ApplicationSyncPolicy `json:"syncPolicies"`
// Destination defines the destination clusters where the artifacts will be synced.
// It can be overriden by the syncPolicies' destination.
// And if both the current field and syncPolicies' destination are empty, the application will be deployed directly in the current cluster.
Copy link
Member

Choose a reason for hiding this comment

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

To be more accurate, current cluster should be the the cluster where kurator resides

log.Info("fleet does not exist", "fleet", fleetKey)
return ctrl.Result{RequeueAfter: fleetmanager.RequeueAfter}, nil
var fleet *fleetapi.Fleet
if fleetKey.Name != "" {
Copy link
Member

Choose a reason for hiding this comment

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

when this can be empty

Copy link
Contributor Author

Choose a reason for hiding this comment

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

return a.reconcile(ctx, app, fleet)

fleet is used here

Copy link
Member

@hzxuzhonghu hzxuzhonghu left a comment

Choose a reason for hiding this comment

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

/lgtm

Can you add an e2e in the following pr

@kurator-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hzxuzhonghu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Signed-off-by: yeyeye2333 <3229833855@qq.com>
Signed-off-by: yeyeye2333 <3229833855@qq.com>
Signed-off-by: yeyeye2333 <3229833855@qq.com>
@LiZhenCheng9527
Copy link
Contributor

/lgtm

@kurator-bot kurator-bot merged commit 1ebcffd into kurator-dev:main Aug 27, 2024
14 checks passed
@yeyeye2333 yeyeye2333 deleted the dev branch August 27, 2024 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Single cluster deployment application
4 participants