Skip to content

Commit 7ff1021

Browse files
Support pause rollout (#780)
* Support pause rollout * Observer StatefulSet first * Update status * Expose pendingChange * Update diff * Fix livenessrobe compare
1 parent e416e71 commit 7ff1021

File tree

21 files changed

+126
-12
lines changed

21 files changed

+126
-12
lines changed

.ci/tests/integration/cases/java-download-function/manifests.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
apiVersion: compute.functionmesh.io/v1alpha1
22
kind: Function
33
metadata:
4+
annotations:
5+
compute.functionmesh.io/pause-rollout: "false"
46
name: function-download-sample
57
namespace: default
68
spec:

.ci/tests/integration/cases/java-function-vpa/manifests.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
apiVersion: compute.functionmesh.io/v1alpha1
22
kind: Function
33
metadata:
4+
annotations:
5+
compute.functionmesh.io/pause-rollout: "true"
46
name: function-sample-vpa
57
namespace: default
68
spec:

.ci/tests/integration/cases/java-function/manifests.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
apiVersion: compute.functionmesh.io/v1alpha1
22
kind: Function
33
metadata:
4+
annotations:
5+
compute.functionmesh.io/pause-rollout: "true"
46
name: function-sample
57
namespace: default
68
spec:

.ci/tests/integration/cases/java-log-config/manifests.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
apiVersion: compute.functionmesh.io/v1alpha1
22
kind: Function
33
metadata:
4+
annotations:
5+
compute.functionmesh.io/pause-rollout: "true"
46
name: java-log-config
57
namespace: default
68
spec:

.ci/tests/integration/cases/java-log-format-json/manifests.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
apiVersion: compute.functionmesh.io/v1alpha1
22
kind: Function
33
metadata:
4+
annotations:
5+
compute.functionmesh.io/pause-rollout: "false"
46
name: java-log-format-json
57
namespace: default
68
spec:

api/compute/v1alpha1/function_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ type FunctionStatus struct {
125125
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
126126
GlobalBackendConfigRevision string `json:"globalBackendConfigRevision,omitempty"`
127127
NamespacedBackendConfigRevision string `json:"namespacedBackendConfigRevision,omitempty"`
128+
PendingChange string `json:"pendingChange,omitempty"`
128129
}
129130

130131
// +genclient

api/compute/v1alpha1/sink_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ type SinkStatus struct {
115115
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
116116
GlobalBackendConfigRevision string `json:"globalBackendConfigRevision,omitempty"`
117117
NamespacedBackendConfigRevision string `json:"namespacedBackendConfigRevision,omitempty"`
118+
PendingChange string `json:"pendingChange,omitempty"`
118119
}
119120

120121
// +genclient

api/compute/v1alpha1/source_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ type SourceStatus struct {
120120
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
121121
GlobalBackendConfigRevision string `json:"globalBackendConfigRevision,omitempty"`
122122
NamespacedBackendConfigRevision string `json:"namespacedBackendConfigRevision,omitempty"`
123+
PendingChange string `json:"pendingChange,omitempty"`
123124
}
124125

125126
// +genclient

charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-functions.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3846,6 +3846,8 @@ spec:
38463846
observedGeneration:
38473847
format: int64
38483848
type: integer
3849+
pendingChange:
3850+
type: string
38493851
replicas:
38503852
format: int32
38513853
type: integer

charts/function-mesh-operator/charts/admission-webhook/templates/crd-compute.functionmesh.io-sinks.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3565,6 +3565,8 @@ spec:
35653565
observedGeneration:
35663566
format: int64
35673567
type: integer
3568+
pendingChange:
3569+
type: string
35683570
replicas:
35693571
format: int32
35703572
type: integer

0 commit comments

Comments
 (0)