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

Support Canary Release #490

Closed
wants to merge 16 commits into from
Closed

Conversation

Bryce-huang
Copy link
Contributor

@Bryce-huang
Copy link
Contributor Author

Bryce-huang commented Sep 7, 2023

This PR is ready for review, it works for me well.

apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
  name: test-server
spec:
  canarySteps:
  - weight: 20
    pause:
      duration: 60
  - weight: 80
     pause:
      duration: 120
  image: brycehuang/web-service-image:v1
  serving:
    template:
      containers:
      - imagePullPolicy: IfNotPresent
        name: function
  version: latest
  workloadRuntime: OCIContaine

After modifying the image brycehuang/web-service-image:v1 to brycehuang/web:v2, start the canary release. You can observe the changes in httproute. After about 3 minutes, the canary release is completed.

@benjaminhuo
Copy link
Member

The e2e test has know issues which is still failing, it's ok not to fix it now.
But it's better to fix https://github.com/OpenFunction/OpenFunction/actions/runs/6109785188/job/16581498056?pr=490 maybe :) @Bryce-huang

Signed-off-by: Bryce-Huang <44901318+Bryce-huang@users.noreply.github.com>
@benjaminhuo
Copy link
Member

@Bryce-huang Is this ready for review?

@Bryce-huang
Copy link
Contributor Author

@Bryce-huang Is this ready for review?

Yes,I'm also doing tests.

@benjaminhuo
Copy link
Member

@Bryce-huang Is this ready for review?

Yes,I'm also doing tests.

@wrongerror @wanjunlei @tpiperatgod @lizzzcai would you help to review this?

Signed-off-by: Bryce-Huang <44901318+Bryce-huang@users.noreply.github.com>

# Conflicts:
#	controllers/core/function_controller.go
#	go.mod
#	go.sum
#	pkg/constants/constants.go
Signed-off-by: Bryce-Huang <44901318+Bryce-huang@users.noreply.github.com>
Signed-off-by: Bryce-Huang <44901318+Bryce-huang@users.noreply.github.com>
Signed-off-by: Bryce-Huang <44901318+Bryce-huang@users.noreply.github.com>

Signed-off-by: Bryce-Huang <44901318+Bryce-huang@users.noreply.github.com>
# Conflicts:
#	controllers/core/function_controller.go
Signed-off-by: Bryce-Huang <44901318+Bryce-huang@users.noreply.github.com>

Signed-off-by: Bryce-Huang <44901318+Bryce-huang@users.noreply.github.com>
Signed-off-by: Bryce-Huang <44901318+Bryce-huang@users.noreply.github.com>
@benjaminhuo
Copy link
Member

benjaminhuo commented Sep 21, 2023

I would suggest the following changes:
@Bryce-huang @wrongerror @wanjunlei @tpiperatgod @lizzzcai what do you think?

apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
  name: test-server
spec:
  rolloutStrategy:
    canary:
      steps:
      - weight: 20
        pause:
          duration: 60
      - weight: 80
        pause:
          duration: 120
  image: brycehuang/web-service-image:v1
  serving:
    template:
      containers:
      - imagePullPolicy: IfNotPresent
        name: function
  version: latest
  workloadRuntime: OCIContainer
status:
  # status.serving and status.revision should always be the stable serving and revision
  # status.canary.serving and status.canary.revision should be the canary ones
  serving:
  revision: 
  rollout:
    canary:
      status: # CanaryStatus
      serving:
      revision:

@Bryce-huang
Copy link
Contributor Author

Bryce-huang commented Sep 21, 2023

I would suggest the following changes: @Bryce-huang @wrongerror @wanjunlei @tpiperatgod @lizzzcai what do you think?

apiVersion: core.openfunction.io/v1beta2
kind: Function
metadata:
  name: test-server
spec:
  rolloutStrategy:
    canary:
      steps:
      - weight: 20
        pause:
          duration: 60
      - weight: 80
        pause:
          duration: 120
  image: brycehuang/web-service-image:v1
  serving:
    template:
      containers:
      - imagePullPolicy: IfNotPresent
        name: function
  version: latest
  workloadRuntime: OCIContainer
status:
  # status.serving and status.revision should always be the stable serving and revision
  # status.canary.serving and status.canary.revision should be the canary ones
  serving:
  revision: 
  rollout:
    canary:
      status: # CanaryStatus
      serving:
      revision:

LGTM

Signed-off-by: Bryce-Huang <44901318+Bryce-huang@users.noreply.github.com>
# Conflicts:
#	apis/core/v1beta2/function_webhook.go
#	controllers/core/function_controller.go
#	pkg/core/serving/knative/servingrun.go
apis/core/v1beta1/function_types.go Outdated Show resolved Hide resolved
Signed-off-by: Bryce-Huang <44901318+Bryce-huang@users.noreply.github.com>
Signed-off-by: Bryce-Huang <44901318+Bryce-huang@users.noreply.github.com>
OpenFunction#504
Signed-off-by: Bryce-Huang <44901318+Bryce-huang@users.noreply.github.com>
Signed-off-by: Bryce-Huang <44901318+Bryce-huang@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants