generated from knative-extensions/sample-controller
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added the new custom resources RolloutOrchestrator&StagePodAutoscaler…
… for rolling upgrade (#12) * Added controller and autoscaler into this extension * Mofidy the go.mod * Removed sample APIs and added stagepodautoscaler&serviceorchestrator * Added the CM serviceorchestrator to configure the over-consumption-ratio * Updated the dependencies * Rename the receicers * Change the go.mod * Updated the fields and comments * Added test cases * Rename the vars and constants * Update the deps * Rename ServiceOrchestrator into RolloutOrchestrator * Install the CRDs in the github action * Rename the files * Add the comments to InitialRevisions and TargetRevisions * Add the kodata for autoscaler * Update the zz_generated.deepcopy.go * Rename the min and max scale for stagePodAutoScaler
- Loading branch information
1 parent
f323a4d
commit f14dd6d
Showing
72 changed files
with
3,061 additions
and
1,839 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../third_party/VENDOR-LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,240 @@ | ||
# Copyright 2023 The Knative Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Note: The schema part of the spec is auto-generated by hack/update-schemas.sh. | ||
|
||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: rolloutorchestrators.serving.knative.dev | ||
labels: | ||
app.kubernetes.io/name: knative-serving | ||
app.kubernetes.io/version: devel | ||
knative.dev/crd-install: "true" | ||
duck.knative.dev/podspecable: "true" | ||
spec: | ||
group: serving.knative.dev | ||
names: | ||
kind: RolloutOrchestrator | ||
plural: rolloutorchestrators | ||
singular: rolloutorchestrator | ||
categories: | ||
- all | ||
- knative | ||
- serving | ||
shortNames: | ||
- so | ||
scope: Namespaced | ||
versions: | ||
- name: v1 | ||
served: true | ||
storage: true | ||
subresources: | ||
status: {} | ||
additionalPrinterColumns: | ||
- name: Ready | ||
type: string | ||
jsonPath: ".status.conditions[?(@.type=='Ready')].status" | ||
- name: Reason | ||
type: string | ||
jsonPath: ".status.conditions[?(@.type=='Ready')].reason" | ||
schema: | ||
openAPIV3Schema: | ||
description: RolloutOrchestrator represents the orchestractor to launch the new revision and direct the traffic in an incremental way. | ||
type: object | ||
properties: | ||
apiVersion: | ||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' | ||
type: string | ||
kind: | ||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' | ||
type: string | ||
metadata: | ||
type: object | ||
spec: | ||
description: RolloutOrchestratorSpec holds the desired state of the Configuration (from the client). | ||
type: object | ||
properties: | ||
initialRevisions: | ||
description: Traffic holds the configured traffic distribution. These entries will always contain RevisionName references. When ConfigurationName appears in the spec, this will hold the LatestReadyRevisionName that we last observed. | ||
type: array | ||
items: | ||
description: RevisionTarget holds the information of the revision for the current stage. | ||
type: object | ||
properties: | ||
direction: | ||
description: Direction indicates up or down. | ||
type: string | ||
latestRevision: | ||
description: LatestRevision indicates whether it is the last revision or not. | ||
type: boolean | ||
maxScale: | ||
description: MaxScale sets the upper bound for the number of the replicas. | ||
type: integer | ||
format: int32 | ||
minScale: | ||
description: MinScale sets the lower bound for the number of the replicas. | ||
type: integer | ||
format: int32 | ||
percent: | ||
description: 'Percent indicates that percentage based routing should be used and the value indicates the percent of traffic that is be routed to this Revision or Configuration. `0` (zero) mean no traffic, `100` means all traffic. When percentage based routing is being used the follow rules apply: - the sum of all percent values must equal 100 - when not specified, the implied value for `percent` is zero for that particular Revision or Configuration' | ||
type: integer | ||
format: int64 | ||
revisionName: | ||
description: RevisionName indicates RevisionName. | ||
type: string | ||
targetReplicas: | ||
description: TargetReplicas indicates an estimated number of replicas. | ||
type: integer | ||
format: int32 | ||
targetRevisions: | ||
description: Traffic holds the configured traffic distribution. These entries will always contain RevisionName references. When ConfigurationName appears in the spec, this will hold the LatestReadyRevisionName that we last observed. | ||
type: array | ||
items: | ||
description: RevisionTarget holds the information of the revision for the current stage. | ||
type: object | ||
properties: | ||
direction: | ||
description: Direction indicates up or down. | ||
type: string | ||
latestRevision: | ||
description: LatestRevision indicates whether it is the last revision or not. | ||
type: boolean | ||
maxScale: | ||
description: MaxScale sets the upper bound for the number of the replicas. | ||
type: integer | ||
format: int32 | ||
minScale: | ||
description: MinScale sets the lower bound for the number of the replicas. | ||
type: integer | ||
format: int32 | ||
percent: | ||
description: 'Percent indicates that percentage based routing should be used and the value indicates the percent of traffic that is be routed to this Revision or Configuration. `0` (zero) mean no traffic, `100` means all traffic. When percentage based routing is being used the follow rules apply: - the sum of all percent values must equal 100 - when not specified, the implied value for `percent` is zero for that particular Revision or Configuration' | ||
type: integer | ||
format: int64 | ||
revisionName: | ||
description: RevisionName indicates RevisionName. | ||
type: string | ||
targetReplicas: | ||
description: TargetReplicas indicates an estimated number of replicas. | ||
type: integer | ||
format: int32 | ||
stageTargetRevisions: | ||
description: StageTraffic holds the configured traffic distribution fot the current stage. These entries will always contain RevisionName references. When ConfigurationName appears in the spec, this will hold the LatestReadyRevisionName that we last observed. | ||
type: array | ||
items: | ||
description: RevisionTarget holds the information of the revision for the current stage. | ||
type: object | ||
properties: | ||
direction: | ||
description: Direction indicates up or down. | ||
type: string | ||
latestRevision: | ||
description: LatestRevision indicates whether it is the last revision or not. | ||
type: boolean | ||
maxScale: | ||
description: MaxScale sets the upper bound for the number of the replicas. | ||
type: integer | ||
format: int32 | ||
minScale: | ||
description: MinScale sets the lower bound for the number of the replicas. | ||
type: integer | ||
format: int32 | ||
percent: | ||
description: 'Percent indicates that percentage based routing should be used and the value indicates the percent of traffic that is be routed to this Revision or Configuration. `0` (zero) mean no traffic, `100` means all traffic. When percentage based routing is being used the follow rules apply: - the sum of all percent values must equal 100 - when not specified, the implied value for `percent` is zero for that particular Revision or Configuration' | ||
type: integer | ||
format: int64 | ||
revisionName: | ||
description: RevisionName indicates RevisionName. | ||
type: string | ||
targetReplicas: | ||
description: TargetReplicas indicates an estimated number of replicas. | ||
type: integer | ||
format: int32 | ||
targetFinishTime: | ||
description: TargetFinishTime indicates target time to complete this target. | ||
type: string | ||
status: | ||
description: RolloutOrchestratorStatus communicates the observed state of the Configuration (from the controller). | ||
type: object | ||
properties: | ||
annotations: | ||
description: Annotations is additional Status fields for the Resource to save some additional State as well as convey more information to the user. This is roughly akin to Annotations on any k8s resource, just the reconciler conveying richer information outwards. | ||
type: object | ||
additionalProperties: | ||
type: string | ||
conditions: | ||
description: Conditions the latest available observations of a resource's current state. | ||
type: array | ||
items: | ||
description: 'Condition defines a readiness condition for a Knative resource. See: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties' | ||
type: object | ||
required: | ||
- status | ||
- type | ||
properties: | ||
lastTransitionTime: | ||
description: LastTransitionTime is the last time the condition transitioned from one status to another. We use VolatileTime in place of metav1.Time to exclude this from creating equality.Semantic differences (all other things held constant). | ||
type: string | ||
message: | ||
description: A human readable message indicating details about the transition. | ||
type: string | ||
reason: | ||
description: The reason for the condition's last transition. | ||
type: string | ||
severity: | ||
description: Severity with which to treat failures of this type of condition. When this is not specified, it defaults to Error. | ||
type: string | ||
status: | ||
description: Status of the condition, one of True, False, Unknown. | ||
type: string | ||
type: | ||
description: Type of condition. | ||
type: string | ||
observedGeneration: | ||
description: ObservedGeneration is the 'Generation' of the Service that was last processed by the controller. | ||
type: integer | ||
format: int64 | ||
stageRevisionStatus: | ||
description: StageRevisionStatus holds the traffic split. | ||
type: array | ||
items: | ||
description: RevisionTarget holds the information of the revision for the current stage. | ||
type: object | ||
properties: | ||
direction: | ||
description: Direction indicates up or down. | ||
type: string | ||
latestRevision: | ||
description: LatestRevision indicates whether it is the last revision or not. | ||
type: boolean | ||
maxScale: | ||
description: MaxScale sets the upper bound for the number of the replicas. | ||
type: integer | ||
format: int32 | ||
minScale: | ||
description: MinScale sets the lower bound for the number of the replicas. | ||
type: integer | ||
format: int32 | ||
percent: | ||
description: 'Percent indicates that percentage based routing should be used and the value indicates the percent of traffic that is be routed to this Revision or Configuration. `0` (zero) mean no traffic, `100` means all traffic. When percentage based routing is being used the follow rules apply: - the sum of all percent values must equal 100 - when not specified, the implied value for `percent` is zero for that particular Revision or Configuration' | ||
type: integer | ||
format: int64 | ||
revisionName: | ||
description: RevisionName indicates RevisionName. | ||
type: string | ||
targetReplicas: | ||
description: TargetReplicas indicates an estimated number of replicas. | ||
type: integer | ||
format: int32 |
Oops, something went wrong.