Compare commits
10 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
ca8b2903ca | |
|
|
0afc933201 | |
|
|
e53ad2cdb8 | |
|
|
c28ddb3914 | |
|
|
c4e9132781 | |
|
|
60eb21ef98 | |
|
|
cf860ed73e | |
|
|
d8e23a74d4 | |
|
|
1de4d5db2b | |
|
|
baf8a18a34 |
|
|
@ -0,0 +1,48 @@
|
|||
name: E2E Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- release-*
|
||||
tags:
|
||||
- v*
|
||||
workflow_dispatch: { }
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- release-*
|
||||
|
||||
env:
|
||||
# Common versions
|
||||
GO_VERSION: '1.20'
|
||||
KIND_VERSION: 'v0.18.0'
|
||||
KIND_IMAGE: 'kindest/node:v1.26.3'
|
||||
KIND_CLUSTER_NAME: 'ci-testing'
|
||||
|
||||
jobs:
|
||||
e2e-test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
- name: Setup Kind Cluster
|
||||
uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1.10.0
|
||||
with:
|
||||
node_image: ${{ env.KIND_IMAGE }}
|
||||
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
|
||||
version: ${{ env.KIND_VERSION }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: go mod download
|
||||
|
||||
- name: Run E2E tests
|
||||
run: |
|
||||
kubectl apply -f https://raw.githubusercontent.com/openkruise/rollouts/refs/heads/master/config/crd/bases/rollouts.kruise.io_rollouts.yaml
|
||||
go test -v ./tests/e2e/...
|
||||
38
Makefile
38
Makefile
|
|
@ -6,21 +6,27 @@ else
|
|||
GOBIN=$(shell go env GOBIN)
|
||||
endif
|
||||
|
||||
KIND_VERSION ?= v0.18.0
|
||||
CLUSTER_NAME ?= rollout-ci-testing
|
||||
|
||||
all: generate gen-openapi-schema
|
||||
|
||||
# Run go vet against code
|
||||
vet:
|
||||
go vet ./...
|
||||
|
||||
# Generate code
|
||||
generate: controller-gen
|
||||
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..."
|
||||
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
|
||||
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./rollouts/..."
|
||||
@hack/generate_client.sh
|
||||
|
||||
CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
|
||||
CONTROLLER_GEN_VERSION = v0.16.0
|
||||
controller-gen: ## Download controller-gen locally if necessary.
|
||||
ifeq ("$(shell $(CONTROLLER_GEN) --version 2> /dev/null)", "Version: v0.7.0")
|
||||
ifeq ("$(shell $(CONTROLLER_GEN) --version)", "Version: ${CONTROLLER_GEN_VERSION}")
|
||||
else
|
||||
rm -rf $(CONTROLLER_GEN)
|
||||
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.7.0)
|
||||
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@${CONTROLLER_GEN_VERSION})
|
||||
endif
|
||||
|
||||
OPENAPI_GEN = $(shell pwd)/bin/openapi-gen
|
||||
|
|
@ -47,6 +53,28 @@ rm -rf $$TMP_DIR ;\
|
|||
}
|
||||
endef
|
||||
|
||||
ensure-kind:
|
||||
ifeq ("$(shell command -v $(PROJECT_DIR)/bin/kind 2> /dev/null)", "")
|
||||
@echo "Downloading kind version $(KIND_VERSION)"
|
||||
GOBIN=$(PROJECT_DIR)/bin go install sigs.k8s.io/kind@$(KIND_VERSION)
|
||||
else
|
||||
@echo "kind is already installed."
|
||||
endif
|
||||
|
||||
delete-cluster: ensure-kind
|
||||
@echo "Deleting kind cluster $(CLUSTER_NAME) if it exists"
|
||||
bin/kind delete cluster --name $(CLUSTER_NAME) || true
|
||||
|
||||
create-cluster: ensure-kind
|
||||
bin/kind create cluster --name $(CLUSTER_NAME)
|
||||
|
||||
.PHONY: run-e2e-test
|
||||
run-e2e-test:
|
||||
@echo "Installing Rollouts CRDs"
|
||||
kubectl apply -f https://raw.githubusercontent.com/openkruise/rollouts/refs/heads/master/config/crd/bases/rollouts.kruise.io_rollouts.yaml
|
||||
@echo "Running E2E tests"
|
||||
go test -v ./tests/e2e/...
|
||||
|
||||
.PHONY: gen-schema-only
|
||||
gen-schema-only:
|
||||
go run cmd/gen-schema/main.go
|
||||
|
|
@ -59,7 +87,7 @@ gen-openapi-schema: gen-rollouts-openapi
|
|||
gen-rollouts-openapi: openapi-gen
|
||||
$(OPENAPI_GEN) \
|
||||
--go-header-file hack/boilerplate.go.txt \
|
||||
--input-dirs github.com/openkruise/kruise-rollout-api/rollouts/v1beta1 \
|
||||
--input-dirs github.com/openkruise/kruise-rollout-api/rollouts/v1beta1,github.com/openkruise/kruise-rollout-api/rollouts/v1alpha1 \
|
||||
--output-package pkg/rollouts/ \
|
||||
--report-filename pkg/rollouts/violation_exceptions.list \
|
||||
-o $(CURRENT_DIR)
|
||||
|
|
|
|||
30
README.md
30
README.md
|
|
@ -4,16 +4,38 @@ The canonical location of the Kruise Rollout API definition and client.
|
|||
|
||||
## Compatibility matrix
|
||||
|
||||
| Kruise-Rollout-API | Kruise-rollout |
|
||||
|--------------------|------------------|
|
||||
| 0.4 | <= 0.4 |
|
||||
| 0.5 | 0.5 |
|
||||
| Kruise-Rollout-API | Kruise-rollout |
|
||||
|--------------------|----------------|
|
||||
| 0.4.1 | <= 0.4 |
|
||||
| 0.5.1 | 0.5 |
|
||||
| 0.6.0 | 0.6 |
|
||||
|
||||
## Where does it come from?
|
||||
|
||||
`kruise-rollout-api` is synced from [https://github.com/openkruise/rollouts/tree/master/api](https://github.com/openkruise/rollouts/tree/master/api).
|
||||
Code changes are made in that location, merged into `openkruise/rollouts` and later synced here.
|
||||
|
||||
|
||||
### How to get it
|
||||
|
||||
To get the latest version, use go1.16+ and fetch using the `go get` command. For example:
|
||||
|
||||
```
|
||||
go get github.com/openkruise/kruise-rollout-api@latest
|
||||
```
|
||||
|
||||
To get a specific version, use go1.11+ and fetch the desired version using the `go get` command. For example:
|
||||
|
||||
```
|
||||
go get github.com/openkruise/kruise-rollout-api@v0.5.1
|
||||
```
|
||||
|
||||
|
||||
### How to use it
|
||||
|
||||
please refer to the [example](examples/create-update-delete-rollout)
|
||||
|
||||
|
||||
## Things you should NOT do
|
||||
|
||||
[https://github.com/openkruise/rollouts/tree/master/api](https://github.com/openkruise/rollouts/tree/master/api) is synced to here.
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ import (
|
|||
"fmt"
|
||||
"net/http"
|
||||
|
||||
rolloutsv1alpha1 "github.com/openkruise/kruise-rollout-api/client/clientset/versioned/typed/rollouts/v1alpha1"
|
||||
rolloutsv1beta1 "github.com/openkruise/kruise-rollout-api/client/clientset/versioned/typed/rollouts/v1beta1"
|
||||
discovery "k8s.io/client-go/discovery"
|
||||
rest "k8s.io/client-go/rest"
|
||||
|
|
@ -30,14 +31,20 @@ import (
|
|||
|
||||
type Interface interface {
|
||||
Discovery() discovery.DiscoveryInterface
|
||||
RolloutsV1alpha1() rolloutsv1alpha1.RolloutsV1alpha1Interface
|
||||
RolloutsV1beta1() rolloutsv1beta1.RolloutsV1beta1Interface
|
||||
}
|
||||
|
||||
// Clientset contains the clients for groups. Each group has exactly one
|
||||
// version included in a Clientset.
|
||||
// Clientset contains the clients for groups.
|
||||
type Clientset struct {
|
||||
*discovery.DiscoveryClient
|
||||
rolloutsV1beta1 *rolloutsv1beta1.RolloutsV1beta1Client
|
||||
rolloutsV1alpha1 *rolloutsv1alpha1.RolloutsV1alpha1Client
|
||||
rolloutsV1beta1 *rolloutsv1beta1.RolloutsV1beta1Client
|
||||
}
|
||||
|
||||
// RolloutsV1alpha1 retrieves the RolloutsV1alpha1Client
|
||||
func (c *Clientset) RolloutsV1alpha1() rolloutsv1alpha1.RolloutsV1alpha1Interface {
|
||||
return c.rolloutsV1alpha1
|
||||
}
|
||||
|
||||
// RolloutsV1beta1 retrieves the RolloutsV1beta1Client
|
||||
|
|
@ -89,6 +96,10 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset,
|
|||
|
||||
var cs Clientset
|
||||
var err error
|
||||
cs.rolloutsV1alpha1, err = rolloutsv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cs.rolloutsV1beta1, err = rolloutsv1beta1.NewForConfigAndClient(&configShallowCopy, httpClient)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
@ -114,6 +125,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
|
|||
// New creates a new Clientset for the given RESTClient.
|
||||
func New(c rest.Interface) *Clientset {
|
||||
var cs Clientset
|
||||
cs.rolloutsV1alpha1 = rolloutsv1alpha1.New(c)
|
||||
cs.rolloutsV1beta1 = rolloutsv1beta1.New(c)
|
||||
|
||||
cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ package fake
|
|||
|
||||
import (
|
||||
clientset "github.com/openkruise/kruise-rollout-api/client/clientset/versioned"
|
||||
rolloutsv1alpha1 "github.com/openkruise/kruise-rollout-api/client/clientset/versioned/typed/rollouts/v1alpha1"
|
||||
fakerolloutsv1alpha1 "github.com/openkruise/kruise-rollout-api/client/clientset/versioned/typed/rollouts/v1alpha1/fake"
|
||||
rolloutsv1beta1 "github.com/openkruise/kruise-rollout-api/client/clientset/versioned/typed/rollouts/v1beta1"
|
||||
fakerolloutsv1beta1 "github.com/openkruise/kruise-rollout-api/client/clientset/versioned/typed/rollouts/v1beta1/fake"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
|
|
@ -79,6 +81,11 @@ var (
|
|||
_ testing.FakeClient = &Clientset{}
|
||||
)
|
||||
|
||||
// RolloutsV1alpha1 retrieves the RolloutsV1alpha1Client
|
||||
func (c *Clientset) RolloutsV1alpha1() rolloutsv1alpha1.RolloutsV1alpha1Interface {
|
||||
return &fakerolloutsv1alpha1.FakeRolloutsV1alpha1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// RolloutsV1beta1 retrieves the RolloutsV1beta1Client
|
||||
func (c *Clientset) RolloutsV1beta1() rolloutsv1beta1.RolloutsV1beta1Interface {
|
||||
return &fakerolloutsv1beta1.FakeRolloutsV1beta1{Fake: &c.Fake}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ limitations under the License.
|
|||
package fake
|
||||
|
||||
import (
|
||||
rolloutsv1alpha1 "github.com/openkruise/kruise-rollout-api/rollouts/v1alpha1"
|
||||
rolloutsv1beta1 "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
|
|
@ -31,6 +32,7 @@ var scheme = runtime.NewScheme()
|
|||
var codecs = serializer.NewCodecFactory(scheme)
|
||||
|
||||
var localSchemeBuilder = runtime.SchemeBuilder{
|
||||
rolloutsv1alpha1.AddToScheme,
|
||||
rolloutsv1beta1.AddToScheme,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ limitations under the License.
|
|||
package scheme
|
||||
|
||||
import (
|
||||
rolloutsv1alpha1 "github.com/openkruise/kruise-rollout-api/rollouts/v1alpha1"
|
||||
rolloutsv1beta1 "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
|
|
@ -31,6 +32,7 @@ var Scheme = runtime.NewScheme()
|
|||
var Codecs = serializer.NewCodecFactory(Scheme)
|
||||
var ParameterCodec = runtime.NewParameterCodec(Scheme)
|
||||
var localSchemeBuilder = runtime.SchemeBuilder{
|
||||
rolloutsv1alpha1.AddToScheme,
|
||||
rolloutsv1beta1.AddToScheme,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
Copyright 2024 The Kruise 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
|
||||
|
||||
http://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.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// This package has the automatically generated typed clients.
|
||||
package v1alpha1
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
Copyright 2024 The Kruise 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
|
||||
|
||||
http://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.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// Package fake has the automatically generated clients.
|
||||
package fake
|
||||
|
|
@ -0,0 +1,142 @@
|
|||
/*
|
||||
Copyright 2024 The Kruise 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
|
||||
|
||||
http://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.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1alpha1 "github.com/openkruise/kruise-rollout-api/rollouts/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeRollouts implements RolloutInterface
|
||||
type FakeRollouts struct {
|
||||
Fake *FakeRolloutsV1alpha1
|
||||
ns string
|
||||
}
|
||||
|
||||
var rolloutsResource = schema.GroupVersionResource{Group: "rollouts.kruise.io", Version: "v1alpha1", Resource: "rollouts"}
|
||||
|
||||
var rolloutsKind = schema.GroupVersionKind{Group: "rollouts.kruise.io", Version: "v1alpha1", Kind: "Rollout"}
|
||||
|
||||
// Get takes name of the rollout, and returns the corresponding rollout object, and an error if there is any.
|
||||
func (c *FakeRollouts) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Rollout, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(rolloutsResource, c.ns, name), &v1alpha1.Rollout{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.Rollout), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Rollouts that match those selectors.
|
||||
func (c *FakeRollouts) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.RolloutList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(rolloutsResource, rolloutsKind, c.ns, opts), &v1alpha1.RolloutList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha1.RolloutList{ListMeta: obj.(*v1alpha1.RolloutList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha1.RolloutList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested rollouts.
|
||||
func (c *FakeRollouts) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(rolloutsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a rollout and creates it. Returns the server's representation of the rollout, and an error, if there is any.
|
||||
func (c *FakeRollouts) Create(ctx context.Context, rollout *v1alpha1.Rollout, opts v1.CreateOptions) (result *v1alpha1.Rollout, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(rolloutsResource, c.ns, rollout), &v1alpha1.Rollout{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.Rollout), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a rollout and updates it. Returns the server's representation of the rollout, and an error, if there is any.
|
||||
func (c *FakeRollouts) Update(ctx context.Context, rollout *v1alpha1.Rollout, opts v1.UpdateOptions) (result *v1alpha1.Rollout, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(rolloutsResource, c.ns, rollout), &v1alpha1.Rollout{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.Rollout), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeRollouts) UpdateStatus(ctx context.Context, rollout *v1alpha1.Rollout, opts v1.UpdateOptions) (*v1alpha1.Rollout, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(rolloutsResource, "status", c.ns, rollout), &v1alpha1.Rollout{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.Rollout), err
|
||||
}
|
||||
|
||||
// Delete takes name of the rollout and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeRollouts) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(rolloutsResource, c.ns, name, opts), &v1alpha1.Rollout{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeRollouts) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(rolloutsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha1.RolloutList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched rollout.
|
||||
func (c *FakeRollouts) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Rollout, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(rolloutsResource, c.ns, name, pt, data, subresources...), &v1alpha1.Rollout{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.Rollout), err
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
Copyright 2024 The Kruise 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
|
||||
|
||||
http://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.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1alpha1 "github.com/openkruise/kruise-rollout-api/client/clientset/versioned/typed/rollouts/v1alpha1"
|
||||
rest "k8s.io/client-go/rest"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
type FakeRolloutsV1alpha1 struct {
|
||||
*testing.Fake
|
||||
}
|
||||
|
||||
func (c *FakeRolloutsV1alpha1) Rollouts(namespace string) v1alpha1.RolloutInterface {
|
||||
return &FakeRollouts{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeRolloutsV1alpha1) TrafficRoutings(namespace string) v1alpha1.TrafficRoutingInterface {
|
||||
return &FakeTrafficRoutings{c, namespace}
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeRolloutsV1alpha1) RESTClient() rest.Interface {
|
||||
var ret *rest.RESTClient
|
||||
return ret
|
||||
}
|
||||
|
|
@ -0,0 +1,142 @@
|
|||
/*
|
||||
Copyright 2024 The Kruise 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
|
||||
|
||||
http://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.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1alpha1 "github.com/openkruise/kruise-rollout-api/rollouts/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeTrafficRoutings implements TrafficRoutingInterface
|
||||
type FakeTrafficRoutings struct {
|
||||
Fake *FakeRolloutsV1alpha1
|
||||
ns string
|
||||
}
|
||||
|
||||
var trafficroutingsResource = schema.GroupVersionResource{Group: "rollouts.kruise.io", Version: "v1alpha1", Resource: "trafficroutings"}
|
||||
|
||||
var trafficroutingsKind = schema.GroupVersionKind{Group: "rollouts.kruise.io", Version: "v1alpha1", Kind: "TrafficRouting"}
|
||||
|
||||
// Get takes name of the trafficRouting, and returns the corresponding trafficRouting object, and an error if there is any.
|
||||
func (c *FakeTrafficRoutings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.TrafficRouting, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(trafficroutingsResource, c.ns, name), &v1alpha1.TrafficRouting{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.TrafficRouting), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of TrafficRoutings that match those selectors.
|
||||
func (c *FakeTrafficRoutings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.TrafficRoutingList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(trafficroutingsResource, trafficroutingsKind, c.ns, opts), &v1alpha1.TrafficRoutingList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha1.TrafficRoutingList{ListMeta: obj.(*v1alpha1.TrafficRoutingList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha1.TrafficRoutingList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested trafficRoutings.
|
||||
func (c *FakeTrafficRoutings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(trafficroutingsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a trafficRouting and creates it. Returns the server's representation of the trafficRouting, and an error, if there is any.
|
||||
func (c *FakeTrafficRoutings) Create(ctx context.Context, trafficRouting *v1alpha1.TrafficRouting, opts v1.CreateOptions) (result *v1alpha1.TrafficRouting, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(trafficroutingsResource, c.ns, trafficRouting), &v1alpha1.TrafficRouting{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.TrafficRouting), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a trafficRouting and updates it. Returns the server's representation of the trafficRouting, and an error, if there is any.
|
||||
func (c *FakeTrafficRoutings) Update(ctx context.Context, trafficRouting *v1alpha1.TrafficRouting, opts v1.UpdateOptions) (result *v1alpha1.TrafficRouting, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(trafficroutingsResource, c.ns, trafficRouting), &v1alpha1.TrafficRouting{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.TrafficRouting), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeTrafficRoutings) UpdateStatus(ctx context.Context, trafficRouting *v1alpha1.TrafficRouting, opts v1.UpdateOptions) (*v1alpha1.TrafficRouting, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(trafficroutingsResource, "status", c.ns, trafficRouting), &v1alpha1.TrafficRouting{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.TrafficRouting), err
|
||||
}
|
||||
|
||||
// Delete takes name of the trafficRouting and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeTrafficRoutings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(trafficroutingsResource, c.ns, name, opts), &v1alpha1.TrafficRouting{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeTrafficRoutings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(trafficroutingsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha1.TrafficRoutingList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched trafficRouting.
|
||||
func (c *FakeTrafficRoutings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.TrafficRouting, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(trafficroutingsResource, c.ns, name, pt, data, subresources...), &v1alpha1.TrafficRouting{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.TrafficRouting), err
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
Copyright 2024 The Kruise 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
|
||||
|
||||
http://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.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
type RolloutExpansion interface{}
|
||||
|
||||
type TrafficRoutingExpansion interface{}
|
||||
|
|
@ -0,0 +1,195 @@
|
|||
/*
|
||||
Copyright 2024 The Kruise 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
|
||||
|
||||
http://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.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
scheme "github.com/openkruise/kruise-rollout-api/client/clientset/versioned/scheme"
|
||||
v1alpha1 "github.com/openkruise/kruise-rollout-api/rollouts/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// RolloutsGetter has a method to return a RolloutInterface.
|
||||
// A group's client should implement this interface.
|
||||
type RolloutsGetter interface {
|
||||
Rollouts(namespace string) RolloutInterface
|
||||
}
|
||||
|
||||
// RolloutInterface has methods to work with Rollout resources.
|
||||
type RolloutInterface interface {
|
||||
Create(ctx context.Context, rollout *v1alpha1.Rollout, opts v1.CreateOptions) (*v1alpha1.Rollout, error)
|
||||
Update(ctx context.Context, rollout *v1alpha1.Rollout, opts v1.UpdateOptions) (*v1alpha1.Rollout, error)
|
||||
UpdateStatus(ctx context.Context, rollout *v1alpha1.Rollout, opts v1.UpdateOptions) (*v1alpha1.Rollout, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.Rollout, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.RolloutList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Rollout, err error)
|
||||
RolloutExpansion
|
||||
}
|
||||
|
||||
// rollouts implements RolloutInterface
|
||||
type rollouts struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newRollouts returns a Rollouts
|
||||
func newRollouts(c *RolloutsV1alpha1Client, namespace string) *rollouts {
|
||||
return &rollouts{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the rollout, and returns the corresponding rollout object, and an error if there is any.
|
||||
func (c *rollouts) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Rollout, err error) {
|
||||
result = &v1alpha1.Rollout{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("rollouts").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Rollouts that match those selectors.
|
||||
func (c *rollouts) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.RolloutList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.RolloutList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("rollouts").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested rollouts.
|
||||
func (c *rollouts) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("rollouts").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a rollout and creates it. Returns the server's representation of the rollout, and an error, if there is any.
|
||||
func (c *rollouts) Create(ctx context.Context, rollout *v1alpha1.Rollout, opts v1.CreateOptions) (result *v1alpha1.Rollout, err error) {
|
||||
result = &v1alpha1.Rollout{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("rollouts").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(rollout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a rollout and updates it. Returns the server's representation of the rollout, and an error, if there is any.
|
||||
func (c *rollouts) Update(ctx context.Context, rollout *v1alpha1.Rollout, opts v1.UpdateOptions) (result *v1alpha1.Rollout, err error) {
|
||||
result = &v1alpha1.Rollout{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("rollouts").
|
||||
Name(rollout.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(rollout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *rollouts) UpdateStatus(ctx context.Context, rollout *v1alpha1.Rollout, opts v1.UpdateOptions) (result *v1alpha1.Rollout, err error) {
|
||||
result = &v1alpha1.Rollout{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("rollouts").
|
||||
Name(rollout.Name).
|
||||
SubResource("status").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(rollout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the rollout and deletes it. Returns an error if one occurs.
|
||||
func (c *rollouts) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("rollouts").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *rollouts) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("rollouts").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched rollout.
|
||||
func (c *rollouts) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Rollout, err error) {
|
||||
result = &v1alpha1.Rollout{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("rollouts").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
|
@ -0,0 +1,112 @@
|
|||
/*
|
||||
Copyright 2024 The Kruise 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
|
||||
|
||||
http://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.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/openkruise/kruise-rollout-api/client/clientset/versioned/scheme"
|
||||
v1alpha1 "github.com/openkruise/kruise-rollout-api/rollouts/v1alpha1"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
type RolloutsV1alpha1Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
RolloutsGetter
|
||||
TrafficRoutingsGetter
|
||||
}
|
||||
|
||||
// RolloutsV1alpha1Client is used to interact with features provided by the rollouts.kruise.io group.
|
||||
type RolloutsV1alpha1Client struct {
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *RolloutsV1alpha1Client) Rollouts(namespace string) RolloutInterface {
|
||||
return newRollouts(c, namespace)
|
||||
}
|
||||
|
||||
func (c *RolloutsV1alpha1Client) TrafficRoutings(namespace string) TrafficRoutingInterface {
|
||||
return newTrafficRoutings(c, namespace)
|
||||
}
|
||||
|
||||
// NewForConfig creates a new RolloutsV1alpha1Client for the given config.
|
||||
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
|
||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||
func NewForConfig(c *rest.Config) (*RolloutsV1alpha1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
httpClient, err := rest.HTTPClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return NewForConfigAndClient(&config, httpClient)
|
||||
}
|
||||
|
||||
// NewForConfigAndClient creates a new RolloutsV1alpha1Client for the given config and http client.
|
||||
// Note the http client provided takes precedence over the configured transport values.
|
||||
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*RolloutsV1alpha1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
client, err := rest.RESTClientForConfigAndClient(&config, h)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &RolloutsV1alpha1Client{client}, nil
|
||||
}
|
||||
|
||||
// NewForConfigOrDie creates a new RolloutsV1alpha1Client for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *rest.Config) *RolloutsV1alpha1Client {
|
||||
client, err := NewForConfig(c)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return client
|
||||
}
|
||||
|
||||
// New creates a new RolloutsV1alpha1Client for the given RESTClient.
|
||||
func New(c rest.Interface) *RolloutsV1alpha1Client {
|
||||
return &RolloutsV1alpha1Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv := v1alpha1.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *RolloutsV1alpha1Client) RESTClient() rest.Interface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.restClient
|
||||
}
|
||||
|
|
@ -0,0 +1,195 @@
|
|||
/*
|
||||
Copyright 2024 The Kruise 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
|
||||
|
||||
http://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.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
scheme "github.com/openkruise/kruise-rollout-api/client/clientset/versioned/scheme"
|
||||
v1alpha1 "github.com/openkruise/kruise-rollout-api/rollouts/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// TrafficRoutingsGetter has a method to return a TrafficRoutingInterface.
|
||||
// A group's client should implement this interface.
|
||||
type TrafficRoutingsGetter interface {
|
||||
TrafficRoutings(namespace string) TrafficRoutingInterface
|
||||
}
|
||||
|
||||
// TrafficRoutingInterface has methods to work with TrafficRouting resources.
|
||||
type TrafficRoutingInterface interface {
|
||||
Create(ctx context.Context, trafficRouting *v1alpha1.TrafficRouting, opts v1.CreateOptions) (*v1alpha1.TrafficRouting, error)
|
||||
Update(ctx context.Context, trafficRouting *v1alpha1.TrafficRouting, opts v1.UpdateOptions) (*v1alpha1.TrafficRouting, error)
|
||||
UpdateStatus(ctx context.Context, trafficRouting *v1alpha1.TrafficRouting, opts v1.UpdateOptions) (*v1alpha1.TrafficRouting, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.TrafficRouting, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.TrafficRoutingList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.TrafficRouting, err error)
|
||||
TrafficRoutingExpansion
|
||||
}
|
||||
|
||||
// trafficRoutings implements TrafficRoutingInterface
|
||||
type trafficRoutings struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newTrafficRoutings returns a TrafficRoutings
|
||||
func newTrafficRoutings(c *RolloutsV1alpha1Client, namespace string) *trafficRoutings {
|
||||
return &trafficRoutings{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the trafficRouting, and returns the corresponding trafficRouting object, and an error if there is any.
|
||||
func (c *trafficRoutings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.TrafficRouting, err error) {
|
||||
result = &v1alpha1.TrafficRouting{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("trafficroutings").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of TrafficRoutings that match those selectors.
|
||||
func (c *trafficRoutings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.TrafficRoutingList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.TrafficRoutingList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("trafficroutings").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested trafficRoutings.
|
||||
func (c *trafficRoutings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("trafficroutings").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a trafficRouting and creates it. Returns the server's representation of the trafficRouting, and an error, if there is any.
|
||||
func (c *trafficRoutings) Create(ctx context.Context, trafficRouting *v1alpha1.TrafficRouting, opts v1.CreateOptions) (result *v1alpha1.TrafficRouting, err error) {
|
||||
result = &v1alpha1.TrafficRouting{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("trafficroutings").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(trafficRouting).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a trafficRouting and updates it. Returns the server's representation of the trafficRouting, and an error, if there is any.
|
||||
func (c *trafficRoutings) Update(ctx context.Context, trafficRouting *v1alpha1.TrafficRouting, opts v1.UpdateOptions) (result *v1alpha1.TrafficRouting, err error) {
|
||||
result = &v1alpha1.TrafficRouting{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("trafficroutings").
|
||||
Name(trafficRouting.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(trafficRouting).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *trafficRoutings) UpdateStatus(ctx context.Context, trafficRouting *v1alpha1.TrafficRouting, opts v1.UpdateOptions) (result *v1alpha1.TrafficRouting, err error) {
|
||||
result = &v1alpha1.TrafficRouting{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("trafficroutings").
|
||||
Name(trafficRouting.Name).
|
||||
SubResource("status").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(trafficRouting).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the trafficRouting and deletes it. Returns an error if one occurs.
|
||||
func (c *trafficRoutings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("trafficroutings").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *trafficRoutings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("trafficroutings").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched trafficRouting.
|
||||
func (c *trafficRoutings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.TrafficRouting, err error) {
|
||||
result = &v1alpha1.TrafficRouting{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("trafficroutings").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
|
@ -1,195 +0,0 @@
|
|||
/*
|
||||
Copyright 2024 The Kruise 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
|
||||
|
||||
http://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.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
scheme "github.com/openkruise/kruise-rollout-api/client/clientset/versioned/scheme"
|
||||
v1beta1 "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// BatchReleasesGetter has a method to return a BatchReleaseInterface.
|
||||
// A group's client should implement this interface.
|
||||
type BatchReleasesGetter interface {
|
||||
BatchReleases(namespace string) BatchReleaseInterface
|
||||
}
|
||||
|
||||
// BatchReleaseInterface has methods to work with BatchRelease resources.
|
||||
type BatchReleaseInterface interface {
|
||||
Create(ctx context.Context, batchRelease *v1beta1.BatchRelease, opts v1.CreateOptions) (*v1beta1.BatchRelease, error)
|
||||
Update(ctx context.Context, batchRelease *v1beta1.BatchRelease, opts v1.UpdateOptions) (*v1beta1.BatchRelease, error)
|
||||
UpdateStatus(ctx context.Context, batchRelease *v1beta1.BatchRelease, opts v1.UpdateOptions) (*v1beta1.BatchRelease, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.BatchRelease, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.BatchReleaseList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.BatchRelease, err error)
|
||||
BatchReleaseExpansion
|
||||
}
|
||||
|
||||
// batchReleases implements BatchReleaseInterface
|
||||
type batchReleases struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newBatchReleases returns a BatchReleases
|
||||
func newBatchReleases(c *RolloutsV1beta1Client, namespace string) *batchReleases {
|
||||
return &batchReleases{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the batchRelease, and returns the corresponding batchRelease object, and an error if there is any.
|
||||
func (c *batchReleases) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.BatchRelease, err error) {
|
||||
result = &v1beta1.BatchRelease{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("batchreleases").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of BatchReleases that match those selectors.
|
||||
func (c *batchReleases) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.BatchReleaseList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1beta1.BatchReleaseList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("batchreleases").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested batchReleases.
|
||||
func (c *batchReleases) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("batchreleases").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a batchRelease and creates it. Returns the server's representation of the batchRelease, and an error, if there is any.
|
||||
func (c *batchReleases) Create(ctx context.Context, batchRelease *v1beta1.BatchRelease, opts v1.CreateOptions) (result *v1beta1.BatchRelease, err error) {
|
||||
result = &v1beta1.BatchRelease{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("batchreleases").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(batchRelease).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a batchRelease and updates it. Returns the server's representation of the batchRelease, and an error, if there is any.
|
||||
func (c *batchReleases) Update(ctx context.Context, batchRelease *v1beta1.BatchRelease, opts v1.UpdateOptions) (result *v1beta1.BatchRelease, err error) {
|
||||
result = &v1beta1.BatchRelease{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("batchreleases").
|
||||
Name(batchRelease.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(batchRelease).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *batchReleases) UpdateStatus(ctx context.Context, batchRelease *v1beta1.BatchRelease, opts v1.UpdateOptions) (result *v1beta1.BatchRelease, err error) {
|
||||
result = &v1beta1.BatchRelease{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("batchreleases").
|
||||
Name(batchRelease.Name).
|
||||
SubResource("status").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(batchRelease).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the batchRelease and deletes it. Returns an error if one occurs.
|
||||
func (c *batchReleases) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("batchreleases").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *batchReleases) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("batchreleases").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched batchRelease.
|
||||
func (c *batchReleases) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.BatchRelease, err error) {
|
||||
result = &v1beta1.BatchRelease{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("batchreleases").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
|
@ -1,142 +0,0 @@
|
|||
/*
|
||||
Copyright 2024 The Kruise 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
|
||||
|
||||
http://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.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1beta1 "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeBatchReleases implements BatchReleaseInterface
|
||||
type FakeBatchReleases struct {
|
||||
Fake *FakeRolloutsV1beta1
|
||||
ns string
|
||||
}
|
||||
|
||||
var batchreleasesResource = schema.GroupVersionResource{Group: "rollouts", Version: "v1beta1", Resource: "batchreleases"}
|
||||
|
||||
var batchreleasesKind = schema.GroupVersionKind{Group: "rollouts", Version: "v1beta1", Kind: "BatchRelease"}
|
||||
|
||||
// Get takes name of the batchRelease, and returns the corresponding batchRelease object, and an error if there is any.
|
||||
func (c *FakeBatchReleases) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.BatchRelease, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(batchreleasesResource, c.ns, name), &v1beta1.BatchRelease{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.BatchRelease), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of BatchReleases that match those selectors.
|
||||
func (c *FakeBatchReleases) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.BatchReleaseList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(batchreleasesResource, batchreleasesKind, c.ns, opts), &v1beta1.BatchReleaseList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1beta1.BatchReleaseList{ListMeta: obj.(*v1beta1.BatchReleaseList).ListMeta}
|
||||
for _, item := range obj.(*v1beta1.BatchReleaseList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested batchReleases.
|
||||
func (c *FakeBatchReleases) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(batchreleasesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a batchRelease and creates it. Returns the server's representation of the batchRelease, and an error, if there is any.
|
||||
func (c *FakeBatchReleases) Create(ctx context.Context, batchRelease *v1beta1.BatchRelease, opts v1.CreateOptions) (result *v1beta1.BatchRelease, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(batchreleasesResource, c.ns, batchRelease), &v1beta1.BatchRelease{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.BatchRelease), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a batchRelease and updates it. Returns the server's representation of the batchRelease, and an error, if there is any.
|
||||
func (c *FakeBatchReleases) Update(ctx context.Context, batchRelease *v1beta1.BatchRelease, opts v1.UpdateOptions) (result *v1beta1.BatchRelease, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(batchreleasesResource, c.ns, batchRelease), &v1beta1.BatchRelease{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.BatchRelease), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeBatchReleases) UpdateStatus(ctx context.Context, batchRelease *v1beta1.BatchRelease, opts v1.UpdateOptions) (*v1beta1.BatchRelease, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(batchreleasesResource, "status", c.ns, batchRelease), &v1beta1.BatchRelease{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.BatchRelease), err
|
||||
}
|
||||
|
||||
// Delete takes name of the batchRelease and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeBatchReleases) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(batchreleasesResource, c.ns, name, opts), &v1beta1.BatchRelease{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeBatchReleases) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(batchreleasesResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.BatchReleaseList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched batchRelease.
|
||||
func (c *FakeBatchReleases) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.BatchRelease, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(batchreleasesResource, c.ns, name, pt, data, subresources...), &v1beta1.BatchRelease{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.BatchRelease), err
|
||||
}
|
||||
|
|
@ -36,9 +36,9 @@ type FakeRollouts struct {
|
|||
ns string
|
||||
}
|
||||
|
||||
var rolloutsResource = schema.GroupVersionResource{Group: "rollouts", Version: "v1beta1", Resource: "rollouts"}
|
||||
var rolloutsResource = schema.GroupVersionResource{Group: "rollouts.kruise.io", Version: "v1beta1", Resource: "rollouts"}
|
||||
|
||||
var rolloutsKind = schema.GroupVersionKind{Group: "rollouts", Version: "v1beta1", Kind: "Rollout"}
|
||||
var rolloutsKind = schema.GroupVersionKind{Group: "rollouts.kruise.io", Version: "v1beta1", Kind: "Rollout"}
|
||||
|
||||
// Get takes name of the rollout, and returns the corresponding rollout object, and an error if there is any.
|
||||
func (c *FakeRollouts) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Rollout, err error) {
|
||||
|
|
|
|||
|
|
@ -28,10 +28,6 @@ type FakeRolloutsV1beta1 struct {
|
|||
*testing.Fake
|
||||
}
|
||||
|
||||
func (c *FakeRolloutsV1beta1) BatchReleases(namespace string) v1beta1.BatchReleaseInterface {
|
||||
return &FakeBatchReleases{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeRolloutsV1beta1) Rollouts(namespace string) v1beta1.RolloutInterface {
|
||||
return &FakeRollouts{c, namespace}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,4 @@ limitations under the License.
|
|||
|
||||
package v1beta1
|
||||
|
||||
type BatchReleaseExpansion interface{}
|
||||
|
||||
type RolloutExpansion interface{}
|
||||
|
|
|
|||
|
|
@ -28,19 +28,14 @@ import (
|
|||
|
||||
type RolloutsV1beta1Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
BatchReleasesGetter
|
||||
RolloutsGetter
|
||||
}
|
||||
|
||||
// RolloutsV1beta1Client is used to interact with features provided by the rollouts group.
|
||||
// RolloutsV1beta1Client is used to interact with features provided by the rollouts.kruise.io group.
|
||||
type RolloutsV1beta1Client struct {
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *RolloutsV1beta1Client) BatchReleases(namespace string) BatchReleaseInterface {
|
||||
return newBatchReleases(c, namespace)
|
||||
}
|
||||
|
||||
func (c *RolloutsV1beta1Client) Rollouts(namespace string) RolloutInterface {
|
||||
return newRollouts(c, namespace)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,6 +47,11 @@ type sharedInformerFactory struct {
|
|||
// startedInformers is used for tracking which informers have been started.
|
||||
// This allows Start() to be called multiple times safely.
|
||||
startedInformers map[reflect.Type]bool
|
||||
// wg tracks how many goroutines were started.
|
||||
wg sync.WaitGroup
|
||||
// shuttingDown is true when Shutdown has been called. It may still be running
|
||||
// because it needs to wait for goroutines.
|
||||
shuttingDown bool
|
||||
}
|
||||
|
||||
// WithCustomResyncConfig sets a custom resync period for the specified informer types.
|
||||
|
|
@ -107,20 +112,39 @@ func NewSharedInformerFactoryWithOptions(client versioned.Interface, defaultResy
|
|||
return factory
|
||||
}
|
||||
|
||||
// Start initializes all requested informers.
|
||||
func (f *sharedInformerFactory) Start(stopCh <-chan struct{}) {
|
||||
f.lock.Lock()
|
||||
defer f.lock.Unlock()
|
||||
|
||||
if f.shuttingDown {
|
||||
return
|
||||
}
|
||||
|
||||
for informerType, informer := range f.informers {
|
||||
if !f.startedInformers[informerType] {
|
||||
go informer.Run(stopCh)
|
||||
f.wg.Add(1)
|
||||
// We need a new variable in each loop iteration,
|
||||
// otherwise the goroutine would use the loop variable
|
||||
// and that keeps changing.
|
||||
informer := informer
|
||||
go func() {
|
||||
defer f.wg.Done()
|
||||
informer.Run(stopCh)
|
||||
}()
|
||||
f.startedInformers[informerType] = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// WaitForCacheSync waits for all started informers' cache were synced.
|
||||
func (f *sharedInformerFactory) Shutdown() {
|
||||
f.lock.Lock()
|
||||
f.shuttingDown = true
|
||||
f.lock.Unlock()
|
||||
|
||||
// Will return immediately if there is nothing to wait for.
|
||||
f.wg.Wait()
|
||||
}
|
||||
|
||||
func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool {
|
||||
informers := func() map[reflect.Type]cache.SharedIndexInformer {
|
||||
f.lock.Lock()
|
||||
|
|
@ -167,11 +191,58 @@ func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internal
|
|||
|
||||
// SharedInformerFactory provides shared informers for resources in all known
|
||||
// API group versions.
|
||||
//
|
||||
// It is typically used like this:
|
||||
//
|
||||
// ctx, cancel := context.Background()
|
||||
// defer cancel()
|
||||
// factory := NewSharedInformerFactory(client, resyncPeriod)
|
||||
// defer factory.WaitForStop() // Returns immediately if nothing was started.
|
||||
// genericInformer := factory.ForResource(resource)
|
||||
// typedInformer := factory.SomeAPIGroup().V1().SomeType()
|
||||
// factory.Start(ctx.Done()) // Start processing these informers.
|
||||
// synced := factory.WaitForCacheSync(ctx.Done())
|
||||
// for v, ok := range synced {
|
||||
// if !ok {
|
||||
// fmt.Fprintf(os.Stderr, "caches failed to sync: %v", v)
|
||||
// return
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // Creating informers can also be created after Start, but then
|
||||
// // Start must be called again:
|
||||
// anotherGenericInformer := factory.ForResource(resource)
|
||||
// factory.Start(ctx.Done())
|
||||
type SharedInformerFactory interface {
|
||||
internalinterfaces.SharedInformerFactory
|
||||
ForResource(resource schema.GroupVersionResource) (GenericInformer, error)
|
||||
|
||||
// Start initializes all requested informers. They are handled in goroutines
|
||||
// which run until the stop channel gets closed.
|
||||
Start(stopCh <-chan struct{})
|
||||
|
||||
// Shutdown marks a factory as shutting down. At that point no new
|
||||
// informers can be started anymore and Start will return without
|
||||
// doing anything.
|
||||
//
|
||||
// In addition, Shutdown blocks until all goroutines have terminated. For that
|
||||
// to happen, the close channel(s) that they were started with must be closed,
|
||||
// either before Shutdown gets called or while it is waiting.
|
||||
//
|
||||
// Shutdown may be called multiple times, even concurrently. All such calls will
|
||||
// block until all goroutines have terminated.
|
||||
Shutdown()
|
||||
|
||||
// WaitForCacheSync blocks until all started informers' caches were synced
|
||||
// or the stop channel gets closed.
|
||||
WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool
|
||||
|
||||
// ForResource gives generic access to a shared informer of the matching type.
|
||||
ForResource(resource schema.GroupVersionResource) (GenericInformer, error)
|
||||
|
||||
// InternalInformerFor returns the SharedIndexInformer for obj using an internal
|
||||
// client.
|
||||
InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer
|
||||
|
||||
Rollouts() rollouts.Interface
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ package externalversions
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
v1alpha1 "github.com/openkruise/kruise-rollout-api/rollouts/v1alpha1"
|
||||
v1beta1 "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
|
|
@ -52,9 +53,13 @@ func (f *genericInformer) Lister() cache.GenericLister {
|
|||
// TODO extend this to unknown resources with a client pool
|
||||
func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) {
|
||||
switch resource {
|
||||
// Group=rollouts, Version=v1beta1
|
||||
case v1beta1.SchemeGroupVersion.WithResource("batchreleases"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Rollouts().V1beta1().BatchReleases().Informer()}, nil
|
||||
// Group=rollouts.kruise.io, Version=v1alpha1
|
||||
case v1alpha1.SchemeGroupVersion.WithResource("rollouts"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Rollouts().V1alpha1().Rollouts().Informer()}, nil
|
||||
case v1alpha1.SchemeGroupVersion.WithResource("trafficroutings"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Rollouts().V1alpha1().TrafficRoutings().Informer()}, nil
|
||||
|
||||
// Group=rollouts.kruise.io, Version=v1beta1
|
||||
case v1beta1.SchemeGroupVersion.WithResource("rollouts"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Rollouts().V1beta1().Rollouts().Informer()}, nil
|
||||
|
||||
|
|
|
|||
|
|
@ -20,11 +20,14 @@ package rollouts
|
|||
|
||||
import (
|
||||
internalinterfaces "github.com/openkruise/kruise-rollout-api/client/informers/externalversions/internalinterfaces"
|
||||
v1alpha1 "github.com/openkruise/kruise-rollout-api/client/informers/externalversions/rollouts/v1alpha1"
|
||||
v1beta1 "github.com/openkruise/kruise-rollout-api/client/informers/externalversions/rollouts/v1beta1"
|
||||
)
|
||||
|
||||
// Interface provides access to each of this group's versions.
|
||||
type Interface interface {
|
||||
// V1alpha1 provides access to shared informers for resources in V1alpha1.
|
||||
V1alpha1() v1alpha1.Interface
|
||||
// V1beta1 provides access to shared informers for resources in V1beta1.
|
||||
V1beta1() v1beta1.Interface
|
||||
}
|
||||
|
|
@ -40,6 +43,11 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
|
|||
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||
}
|
||||
|
||||
// V1alpha1 returns a new v1alpha1.Interface.
|
||||
func (g *group) V1alpha1() v1alpha1.Interface {
|
||||
return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions)
|
||||
}
|
||||
|
||||
// V1beta1 returns a new v1beta1.Interface.
|
||||
func (g *group) V1beta1() v1beta1.Interface {
|
||||
return v1beta1.New(g.factory, g.namespace, g.tweakListOptions)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
Copyright 2024 The Kruise 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
|
||||
|
||||
http://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.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
internalinterfaces "github.com/openkruise/kruise-rollout-api/client/informers/externalversions/internalinterfaces"
|
||||
)
|
||||
|
||||
// Interface provides access to all the informers in this group version.
|
||||
type Interface interface {
|
||||
// Rollouts returns a RolloutInformer.
|
||||
Rollouts() RolloutInformer
|
||||
// TrafficRoutings returns a TrafficRoutingInformer.
|
||||
TrafficRoutings() TrafficRoutingInformer
|
||||
}
|
||||
|
||||
type version struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
namespace string
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// New returns a new Interface.
|
||||
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
|
||||
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||
}
|
||||
|
||||
// Rollouts returns a RolloutInformer.
|
||||
func (v *version) Rollouts() RolloutInformer {
|
||||
return &rolloutInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// TrafficRoutings returns a TrafficRoutingInformer.
|
||||
func (v *version) TrafficRoutings() TrafficRoutingInformer {
|
||||
return &trafficRoutingInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
/*
|
||||
Copyright 2024 The Kruise 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
|
||||
|
||||
http://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.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
versioned "github.com/openkruise/kruise-rollout-api/client/clientset/versioned"
|
||||
internalinterfaces "github.com/openkruise/kruise-rollout-api/client/informers/externalversions/internalinterfaces"
|
||||
v1alpha1 "github.com/openkruise/kruise-rollout-api/client/listers/rollouts/v1alpha1"
|
||||
rolloutsv1alpha1 "github.com/openkruise/kruise-rollout-api/rollouts/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// RolloutInformer provides access to a shared informer and lister for
|
||||
// Rollouts.
|
||||
type RolloutInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha1.RolloutLister
|
||||
}
|
||||
|
||||
type rolloutInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewRolloutInformer constructs a new informer for Rollout type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewRolloutInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredRolloutInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredRolloutInformer constructs a new informer for Rollout type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredRolloutInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.RolloutsV1alpha1().Rollouts(namespace).List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.RolloutsV1alpha1().Rollouts(namespace).Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&rolloutsv1alpha1.Rollout{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *rolloutInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredRolloutInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *rolloutInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&rolloutsv1alpha1.Rollout{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *rolloutInformer) Lister() v1alpha1.RolloutLister {
|
||||
return v1alpha1.NewRolloutLister(f.Informer().GetIndexer())
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@ limitations under the License.
|
|||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
|
@ -24,67 +24,67 @@ import (
|
|||
|
||||
versioned "github.com/openkruise/kruise-rollout-api/client/clientset/versioned"
|
||||
internalinterfaces "github.com/openkruise/kruise-rollout-api/client/informers/externalversions/internalinterfaces"
|
||||
v1beta1 "github.com/openkruise/kruise-rollout-api/client/listers/rollouts/v1beta1"
|
||||
rolloutsv1beta1 "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1"
|
||||
v1alpha1 "github.com/openkruise/kruise-rollout-api/client/listers/rollouts/v1alpha1"
|
||||
rolloutsv1alpha1 "github.com/openkruise/kruise-rollout-api/rollouts/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// BatchReleaseInformer provides access to a shared informer and lister for
|
||||
// BatchReleases.
|
||||
type BatchReleaseInformer interface {
|
||||
// TrafficRoutingInformer provides access to a shared informer and lister for
|
||||
// TrafficRoutings.
|
||||
type TrafficRoutingInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1beta1.BatchReleaseLister
|
||||
Lister() v1alpha1.TrafficRoutingLister
|
||||
}
|
||||
|
||||
type batchReleaseInformer struct {
|
||||
type trafficRoutingInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewBatchReleaseInformer constructs a new informer for BatchRelease type.
|
||||
// NewTrafficRoutingInformer constructs a new informer for TrafficRouting type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewBatchReleaseInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredBatchReleaseInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
func NewTrafficRoutingInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredTrafficRoutingInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredBatchReleaseInformer constructs a new informer for BatchRelease type.
|
||||
// NewFilteredTrafficRoutingInformer constructs a new informer for TrafficRouting type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredBatchReleaseInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
func NewFilteredTrafficRoutingInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.RolloutsV1beta1().BatchReleases(namespace).List(context.TODO(), options)
|
||||
return client.RolloutsV1alpha1().TrafficRoutings(namespace).List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.RolloutsV1beta1().BatchReleases(namespace).Watch(context.TODO(), options)
|
||||
return client.RolloutsV1alpha1().TrafficRoutings(namespace).Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&rolloutsv1beta1.BatchRelease{},
|
||||
&rolloutsv1alpha1.TrafficRouting{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *batchReleaseInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredBatchReleaseInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
func (f *trafficRoutingInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredTrafficRoutingInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *batchReleaseInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&rolloutsv1beta1.BatchRelease{}, f.defaultInformer)
|
||||
func (f *trafficRoutingInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&rolloutsv1alpha1.TrafficRouting{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *batchReleaseInformer) Lister() v1beta1.BatchReleaseLister {
|
||||
return v1beta1.NewBatchReleaseLister(f.Informer().GetIndexer())
|
||||
func (f *trafficRoutingInformer) Lister() v1alpha1.TrafficRoutingLister {
|
||||
return v1alpha1.NewTrafficRoutingLister(f.Informer().GetIndexer())
|
||||
}
|
||||
|
|
@ -24,8 +24,6 @@ import (
|
|||
|
||||
// Interface provides access to all the informers in this group version.
|
||||
type Interface interface {
|
||||
// BatchReleases returns a BatchReleaseInformer.
|
||||
BatchReleases() BatchReleaseInformer
|
||||
// Rollouts returns a RolloutInformer.
|
||||
Rollouts() RolloutInformer
|
||||
}
|
||||
|
|
@ -41,11 +39,6 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
|
|||
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||
}
|
||||
|
||||
// BatchReleases returns a BatchReleaseInformer.
|
||||
func (v *version) BatchReleases() BatchReleaseInformer {
|
||||
return &batchReleaseInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// Rollouts returns a RolloutInformer.
|
||||
func (v *version) Rollouts() RolloutInformer {
|
||||
return &rolloutInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
Copyright 2024 The Kruise 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
|
||||
|
||||
http://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.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
// RolloutListerExpansion allows custom methods to be added to
|
||||
// RolloutLister.
|
||||
type RolloutListerExpansion interface{}
|
||||
|
||||
// RolloutNamespaceListerExpansion allows custom methods to be added to
|
||||
// RolloutNamespaceLister.
|
||||
type RolloutNamespaceListerExpansion interface{}
|
||||
|
||||
// TrafficRoutingListerExpansion allows custom methods to be added to
|
||||
// TrafficRoutingLister.
|
||||
type TrafficRoutingListerExpansion interface{}
|
||||
|
||||
// TrafficRoutingNamespaceListerExpansion allows custom methods to be added to
|
||||
// TrafficRoutingNamespaceLister.
|
||||
type TrafficRoutingNamespaceListerExpansion interface{}
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
/*
|
||||
Copyright 2024 The Kruise 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
|
||||
|
||||
http://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.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
v1alpha1 "github.com/openkruise/kruise-rollout-api/rollouts/v1alpha1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// RolloutLister helps list Rollouts.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type RolloutLister interface {
|
||||
// List lists all Rollouts in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.Rollout, err error)
|
||||
// Rollouts returns an object that can list and get Rollouts.
|
||||
Rollouts(namespace string) RolloutNamespaceLister
|
||||
RolloutListerExpansion
|
||||
}
|
||||
|
||||
// rolloutLister implements the RolloutLister interface.
|
||||
type rolloutLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewRolloutLister returns a new RolloutLister.
|
||||
func NewRolloutLister(indexer cache.Indexer) RolloutLister {
|
||||
return &rolloutLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all Rollouts in the indexer.
|
||||
func (s *rolloutLister) List(selector labels.Selector) (ret []*v1alpha1.Rollout, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha1.Rollout))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Rollouts returns an object that can list and get Rollouts.
|
||||
func (s *rolloutLister) Rollouts(namespace string) RolloutNamespaceLister {
|
||||
return rolloutNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// RolloutNamespaceLister helps list and get Rollouts.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type RolloutNamespaceLister interface {
|
||||
// List lists all Rollouts in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.Rollout, err error)
|
||||
// Get retrieves the Rollout from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1alpha1.Rollout, error)
|
||||
RolloutNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// rolloutNamespaceLister implements the RolloutNamespaceLister
|
||||
// interface.
|
||||
type rolloutNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all Rollouts in the indexer for a given namespace.
|
||||
func (s rolloutNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.Rollout, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha1.Rollout))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the Rollout from the indexer for a given namespace and name.
|
||||
func (s rolloutNamespaceLister) Get(name string) (*v1alpha1.Rollout, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1alpha1.Resource("rollout"), name)
|
||||
}
|
||||
return obj.(*v1alpha1.Rollout), nil
|
||||
}
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
/*
|
||||
Copyright 2024 The Kruise 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
|
||||
|
||||
http://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.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
v1alpha1 "github.com/openkruise/kruise-rollout-api/rollouts/v1alpha1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// TrafficRoutingLister helps list TrafficRoutings.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type TrafficRoutingLister interface {
|
||||
// List lists all TrafficRoutings in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.TrafficRouting, err error)
|
||||
// TrafficRoutings returns an object that can list and get TrafficRoutings.
|
||||
TrafficRoutings(namespace string) TrafficRoutingNamespaceLister
|
||||
TrafficRoutingListerExpansion
|
||||
}
|
||||
|
||||
// trafficRoutingLister implements the TrafficRoutingLister interface.
|
||||
type trafficRoutingLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewTrafficRoutingLister returns a new TrafficRoutingLister.
|
||||
func NewTrafficRoutingLister(indexer cache.Indexer) TrafficRoutingLister {
|
||||
return &trafficRoutingLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all TrafficRoutings in the indexer.
|
||||
func (s *trafficRoutingLister) List(selector labels.Selector) (ret []*v1alpha1.TrafficRouting, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha1.TrafficRouting))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// TrafficRoutings returns an object that can list and get TrafficRoutings.
|
||||
func (s *trafficRoutingLister) TrafficRoutings(namespace string) TrafficRoutingNamespaceLister {
|
||||
return trafficRoutingNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// TrafficRoutingNamespaceLister helps list and get TrafficRoutings.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type TrafficRoutingNamespaceLister interface {
|
||||
// List lists all TrafficRoutings in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.TrafficRouting, err error)
|
||||
// Get retrieves the TrafficRouting from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1alpha1.TrafficRouting, error)
|
||||
TrafficRoutingNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// trafficRoutingNamespaceLister implements the TrafficRoutingNamespaceLister
|
||||
// interface.
|
||||
type trafficRoutingNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all TrafficRoutings in the indexer for a given namespace.
|
||||
func (s trafficRoutingNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.TrafficRouting, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha1.TrafficRouting))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the TrafficRouting from the indexer for a given namespace and name.
|
||||
func (s trafficRoutingNamespaceLister) Get(name string) (*v1alpha1.TrafficRouting, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1alpha1.Resource("trafficrouting"), name)
|
||||
}
|
||||
return obj.(*v1alpha1.TrafficRouting), nil
|
||||
}
|
||||
|
|
@ -1,99 +0,0 @@
|
|||
/*
|
||||
Copyright 2024 The Kruise 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
|
||||
|
||||
http://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.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
v1beta1 "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// BatchReleaseLister helps list BatchReleases.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type BatchReleaseLister interface {
|
||||
// List lists all BatchReleases in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.BatchRelease, err error)
|
||||
// BatchReleases returns an object that can list and get BatchReleases.
|
||||
BatchReleases(namespace string) BatchReleaseNamespaceLister
|
||||
BatchReleaseListerExpansion
|
||||
}
|
||||
|
||||
// batchReleaseLister implements the BatchReleaseLister interface.
|
||||
type batchReleaseLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewBatchReleaseLister returns a new BatchReleaseLister.
|
||||
func NewBatchReleaseLister(indexer cache.Indexer) BatchReleaseLister {
|
||||
return &batchReleaseLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all BatchReleases in the indexer.
|
||||
func (s *batchReleaseLister) List(selector labels.Selector) (ret []*v1beta1.BatchRelease, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1beta1.BatchRelease))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// BatchReleases returns an object that can list and get BatchReleases.
|
||||
func (s *batchReleaseLister) BatchReleases(namespace string) BatchReleaseNamespaceLister {
|
||||
return batchReleaseNamespaceLister{indexer: s.indexer, namespace: namespace}
|
||||
}
|
||||
|
||||
// BatchReleaseNamespaceLister helps list and get BatchReleases.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type BatchReleaseNamespaceLister interface {
|
||||
// List lists all BatchReleases in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1beta1.BatchRelease, err error)
|
||||
// Get retrieves the BatchRelease from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1beta1.BatchRelease, error)
|
||||
BatchReleaseNamespaceListerExpansion
|
||||
}
|
||||
|
||||
// batchReleaseNamespaceLister implements the BatchReleaseNamespaceLister
|
||||
// interface.
|
||||
type batchReleaseNamespaceLister struct {
|
||||
indexer cache.Indexer
|
||||
namespace string
|
||||
}
|
||||
|
||||
// List lists all BatchReleases in the indexer for a given namespace.
|
||||
func (s batchReleaseNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.BatchRelease, err error) {
|
||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1beta1.BatchRelease))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the BatchRelease from the indexer for a given namespace and name.
|
||||
func (s batchReleaseNamespaceLister) Get(name string) (*v1beta1.BatchRelease, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1beta1.Resource("batchrelease"), name)
|
||||
}
|
||||
return obj.(*v1beta1.BatchRelease), nil
|
||||
}
|
||||
|
|
@ -18,14 +18,6 @@ limitations under the License.
|
|||
|
||||
package v1beta1
|
||||
|
||||
// BatchReleaseListerExpansion allows custom methods to be added to
|
||||
// BatchReleaseLister.
|
||||
type BatchReleaseListerExpansion interface{}
|
||||
|
||||
// BatchReleaseNamespaceListerExpansion allows custom methods to be added to
|
||||
// BatchReleaseNamespaceLister.
|
||||
type BatchReleaseNamespaceListerExpansion interface{}
|
||||
|
||||
// RolloutListerExpansion allows custom methods to be added to
|
||||
// RolloutLister.
|
||||
type RolloutListerExpansion interface{}
|
||||
|
|
|
|||
|
|
@ -4,14 +4,16 @@ import (
|
|||
"context"
|
||||
"flag"
|
||||
"fmt"
|
||||
|
||||
rolloutsv1beta1 "github.com/openkruise/kruise-rollout-api/client/clientset/versioned"
|
||||
rolloutapi "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/util/intstr"
|
||||
|
||||
"path/filepath"
|
||||
|
||||
"k8s.io/client-go/tools/clientcmd"
|
||||
"k8s.io/client-go/util/homedir"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
|||
40
go.mod
40
go.mod
|
|
@ -5,27 +5,32 @@ go 1.19
|
|||
require (
|
||||
github.com/blang/semver/v4 v4.0.0
|
||||
github.com/go-bindata/go-bindata v3.1.2+incompatible
|
||||
k8s.io/api v0.24.1
|
||||
k8s.io/apimachinery v0.24.1
|
||||
k8s.io/client-go v0.24.1
|
||||
k8s.io/code-generator v0.24.1
|
||||
k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42
|
||||
sigs.k8s.io/gateway-api v0.5.1
|
||||
github.com/onsi/ginkgo/v2 v2.9.2 // 添加
|
||||
github.com/onsi/gomega v1.27.4 // 添加
|
||||
k8s.io/api v0.26.3
|
||||
k8s.io/apimachinery v0.26.3
|
||||
k8s.io/client-go v0.26.3
|
||||
k8s.io/code-generator v0.26.3
|
||||
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280
|
||||
k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 // indirect
|
||||
sigs.k8s.io/gateway-api v0.7.1
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/emicklei/go-restful v2.9.5+incompatible // indirect
|
||||
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
|
||||
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
|
||||
github.com/go-logr/logr v1.2.3 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.19.5 // indirect
|
||||
github.com/go-openapi/jsonreference v0.20.0 // indirect
|
||||
github.com/go-openapi/swag v0.19.14 // indirect
|
||||
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang/protobuf v1.5.2 // indirect
|
||||
github.com/golang/protobuf v1.5.3 // indirect
|
||||
github.com/google/gnostic v0.5.7-v3refs // indirect
|
||||
github.com/google/go-cmp v0.5.9 // indirect
|
||||
github.com/google/gofuzz v1.1.0 // indirect
|
||||
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect
|
||||
github.com/imdario/mergo v0.3.12 // indirect
|
||||
github.com/josharian/intern v1.0.0 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
|
|
@ -35,23 +40,22 @@ require (
|
|||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
golang.org/x/mod v0.6.0 // indirect
|
||||
golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 // indirect
|
||||
golang.org/x/mod v0.9.0 // indirect
|
||||
golang.org/x/net v0.8.0 // indirect
|
||||
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect
|
||||
golang.org/x/sys v0.3.0 // indirect
|
||||
golang.org/x/term v0.3.0 // indirect
|
||||
golang.org/x/text v0.5.0 // indirect
|
||||
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
|
||||
golang.org/x/tools v0.2.0 // indirect
|
||||
golang.org/x/sys v0.6.0 // indirect
|
||||
golang.org/x/term v0.6.0 // indirect
|
||||
golang.org/x/text v0.8.0 // indirect
|
||||
golang.org/x/time v0.3.0 // indirect
|
||||
golang.org/x/tools v0.7.0 // indirect
|
||||
google.golang.org/appengine v1.6.7 // indirect
|
||||
google.golang.org/protobuf v1.28.1 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
k8s.io/gengo v0.0.0-20220902162205-c0856e24416d // indirect
|
||||
k8s.io/klog/v2 v2.80.1 // indirect
|
||||
k8s.io/utils v0.0.0-20221107191617-1a15be271d1d // indirect
|
||||
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect
|
||||
k8s.io/klog/v2 v2.100.1 // indirect
|
||||
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
|
||||
sigs.k8s.io/yaml v1.3.0 // indirect
|
||||
)
|
||||
|
|
|
|||
254
go.sum
254
go.sum
|
|
@ -13,11 +13,6 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV
|
|||
cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=
|
||||
cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc=
|
||||
cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY=
|
||||
cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI=
|
||||
cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk=
|
||||
cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg=
|
||||
cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8=
|
||||
cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0=
|
||||
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
|
||||
cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
|
||||
cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
|
||||
|
|
@ -36,20 +31,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl
|
|||
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
|
||||
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
|
||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
|
||||
github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA=
|
||||
github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M=
|
||||
github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74=
|
||||
github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k=
|
||||
github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8=
|
||||
github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
|
||||
github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
|
||||
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
|
||||
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
|
||||
github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM=
|
||||
github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
|
|
@ -58,38 +41,24 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P
|
|||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
||||
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
|
||||
github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
|
||||
github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
|
||||
github.com/emicklei/go-restful v2.9.5+incompatible h1:spTtZBk5DYEvbxMVutUuTyh1Ao2r4iyvLdACqsl/Ljk=
|
||||
github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
|
||||
github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE=
|
||||
github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
|
||||
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
|
||||
github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=
|
||||
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84=
|
||||
github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
|
||||
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
|
||||
github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/go-bindata/go-bindata v3.1.2+incompatible h1:5vjJMVhowQdPzjE1LdxyFF7YFTXg5IgGVW4gBr5IbvE=
|
||||
github.com/go-bindata/go-bindata v3.1.2+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo=
|
||||
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
|
||||
github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
|
||||
github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
|
||||
|
|
@ -97,20 +66,19 @@ github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbV
|
|||
github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
|
||||
github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY=
|
||||
github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
|
||||
github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8=
|
||||
github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg=
|
||||
github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA=
|
||||
github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo=
|
||||
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
|
||||
github.com/go-openapi/swag v0.19.14 h1:gm3vOOXfiuw5i9p5N9xJvfjvuofpyvLA9Wr6QfK5Fng=
|
||||
github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ=
|
||||
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI=
|
||||
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls=
|
||||
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
||||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
|
||||
|
|
@ -118,7 +86,6 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt
|
|||
github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
|
||||
github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
|
||||
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
|
||||
github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
|
|
@ -132,14 +99,12 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W
|
|||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM=
|
||||
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
|
||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
|
||||
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA=
|
||||
github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54=
|
||||
github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ=
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
|
|
@ -149,9 +114,6 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
|
|||
github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
||||
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
|
|
@ -160,7 +122,6 @@ github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g=
|
|||
github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
|
||||
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
|
||||
github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
|
||||
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||
github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
|
|
@ -168,29 +129,20 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf
|
|||
github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE=
|
||||
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||
github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y=
|
||||
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
||||
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
||||
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
|
||||
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
|
||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
|
||||
github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU=
|
||||
github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
|
||||
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
|
||||
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
|
||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
||||
|
|
@ -207,39 +159,25 @@ github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN
|
|||
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||
github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA=
|
||||
github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
|
||||
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
||||
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||
github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
|
||||
github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||
github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA=
|
||||
github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
|
||||
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
|
||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||
github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE=
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
|
||||
github.com/onsi/ginkgo/v2 v2.9.2 h1:BA2GMJOtfGAfagzYtrAlufIP0lq6QERkFmHLMLPwFSU=
|
||||
github.com/onsi/ginkgo/v2 v2.9.2/go.mod h1:WHcJJG2dIlcCqVfBAwUCrJxSPFb6v4azBwgxeMeDuts=
|
||||
github.com/onsi/gomega v1.27.4 h1:Z2AnStgsdSayCMDiCU42qIz+HLqEPcgiOCXjAU/w+8E=
|
||||
github.com/onsi/gomega v1.27.4/go.mod h1:riYq/GJKh8hhoM01HN6Vmuy93AarCXCBGpvFDK3q3fQ=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
|
||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8=
|
||||
|
|
@ -248,29 +186,21 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV
|
|||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
|
||||
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
|
||||
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
|
||||
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||
|
|
@ -293,7 +223,6 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl
|
|||
golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
|
||||
golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
||||
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
||||
golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
||||
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
|
||||
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
|
||||
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
|
||||
|
|
@ -302,15 +231,10 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB
|
|||
golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY=
|
||||
golang.org/x/mod v0.6.0 h1:b9gGHsz9/HhJ3HF5DHQytPpuwocVTChQJK3AvoLRD5I=
|
||||
golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI=
|
||||
golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs=
|
||||
golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
|
|
@ -321,7 +245,6 @@ golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR
|
|||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
|
|
@ -332,36 +255,19 @@ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/
|
|||
golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=
|
||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 h1:Frnccbp+ok2GkUS2tC84yAq/U9Vg+0sIO7aRL3T4Xnc=
|
||||
golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
|
||||
golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
|
||||
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b h1:clP8eMhB30EHdc0bd2Twtq6kgU7yl5ub2cQLSdrv1Dg=
|
||||
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
|
|
@ -373,10 +279,7 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ
|
|||
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
|
|
@ -385,10 +288,7 @@ golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7w
|
|||
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
|
|
@ -402,48 +302,29 @@ golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7w
|
|||
golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ=
|
||||
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI=
|
||||
golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA=
|
||||
golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw=
|
||||
golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=
|
||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM=
|
||||
golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
|
||||
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44=
|
||||
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
|
||||
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||
|
|
@ -486,21 +367,12 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY
|
|||
golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
|
||||
golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE=
|
||||
golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
|
||||
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/tools v0.1.10-0.20220218145154-897bd77cd717/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E=
|
||||
golang.org/x/tools v0.2.0 h1:G6AHpWxTMGY1KyEYoAQ5WTtIekUUvDNjan3ugu60JvE=
|
||||
golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA=
|
||||
golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4=
|
||||
golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
|
||||
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
|
||||
|
|
@ -518,11 +390,6 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M
|
|||
google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
|
||||
google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=
|
||||
google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc=
|
||||
google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg=
|
||||
google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE=
|
||||
google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8=
|
||||
google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU=
|
||||
google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94=
|
||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
|
|
@ -560,17 +427,7 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc
|
|||
google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
|
||||
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
|
||||
|
|
@ -583,12 +440,6 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa
|
|||
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
|
||||
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
||||
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
||||
google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
|
||||
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
|
||||
google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8=
|
||||
google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
|
||||
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
|
||||
google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||
|
|
@ -601,7 +452,6 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj
|
|||
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
|
||||
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
|
|
@ -610,21 +460,15 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8
|
|||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
|
||||
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
|
|
@ -634,38 +478,30 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
|
|||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||
k8s.io/api v0.24.1 h1:BjCMRDcyEYz03joa3K1+rbshwh1Ay6oB53+iUx2H8UY=
|
||||
k8s.io/api v0.24.1/go.mod h1:JhoOvNiLXKTPQ60zh2g0ewpA+bnEYf5q44Flhquh4vQ=
|
||||
k8s.io/apimachinery v0.24.1 h1:ShD4aDxTQKN5zNf8K1RQ2u98ELLdIW7jEnlO9uAMX/I=
|
||||
k8s.io/apimachinery v0.24.1/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM=
|
||||
k8s.io/client-go v0.24.1 h1:w1hNdI9PFrzu3OlovVeTnf4oHDt+FJLd9Ndluvnb42E=
|
||||
k8s.io/client-go v0.24.1/go.mod h1:f1kIDqcEYmwXS/vTbbhopMUbhKp2JhOeVTfxgaCIlF8=
|
||||
k8s.io/code-generator v0.24.1 h1:zS+dvmUNaOcvsQ4faV9hXNjsKG9/pQaLnts1Wma4RM8=
|
||||
k8s.io/code-generator v0.24.1/go.mod h1:dpVhs00hTuTdTY6jvVxvTFCk6gSMrtfRydbhZwHI15w=
|
||||
k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
|
||||
k8s.io/gengo v0.0.0-20211129171323-c02415ce4185/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
|
||||
k8s.io/api v0.26.3 h1:emf74GIQMTik01Aum9dPP0gAypL8JTLl/lHa4V9RFSU=
|
||||
k8s.io/api v0.26.3/go.mod h1:PXsqwPMXBSBcL1lJ9CYDKy7kIReUydukS5JiRlxC3qE=
|
||||
k8s.io/apimachinery v0.26.3 h1:dQx6PNETJ7nODU3XPtrwkfuubs6w7sX0M8n61zHIV/k=
|
||||
k8s.io/apimachinery v0.26.3/go.mod h1:ats7nN1LExKHvJ9TmwootT00Yz05MuYqPXEXaVeOy5I=
|
||||
k8s.io/client-go v0.26.3 h1:k1UY+KXfkxV2ScEL3gilKcF7761xkYsSD6BC9szIu8s=
|
||||
k8s.io/client-go v0.26.3/go.mod h1:ZPNu9lm8/dbRIPAgteN30RSXea6vrCpFvq+MateTUuQ=
|
||||
k8s.io/code-generator v0.26.3 h1:DNYPsWoeFwmg4qFg97Z1cHSSv7KSG10mAEIFoZGTQM8=
|
||||
k8s.io/code-generator v0.26.3/go.mod h1:ryaiIKwfxEJEaywEzx3dhWOydpVctKYbqLajJf0O8dI=
|
||||
k8s.io/gengo v0.0.0-20220902162205-c0856e24416d h1:U9tB195lKdzwqicbJvyJeOXV7Klv+wNAWENRnXEGi08=
|
||||
k8s.io/gengo v0.0.0-20220902162205-c0856e24416d/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
|
||||
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
|
||||
k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
|
||||
k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
|
||||
k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4=
|
||||
k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
|
||||
k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 h1:Gii5eqf+GmIEwGNKQYQClCayuJCe2/4fZUvF7VG99sU=
|
||||
k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk=
|
||||
k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
||||
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
||||
k8s.io/utils v0.0.0-20221107191617-1a15be271d1d h1:0Smp/HP1OH4Rvhe+4B8nWGERtlqAGSftbSbbmm45oFs=
|
||||
k8s.io/utils v0.0.0-20221107191617-1a15be271d1d/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
|
||||
k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg=
|
||||
k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
|
||||
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E=
|
||||
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4=
|
||||
k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 h1:KTgPnR10d5zhztWptI952TNtt/4u5h3IzDXkdIMuo2Y=
|
||||
k8s.io/utils v0.0.0-20221128185143-99ec85e7a448/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
|
||||
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
||||
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
|
||||
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
|
||||
sigs.k8s.io/gateway-api v0.5.1 h1:EqzgOKhChzyve9rmeXXbceBYB6xiM50vDfq0kK5qpdw=
|
||||
sigs.k8s.io/gateway-api v0.5.1/go.mod h1:x0AP6gugkFV8fC/oTlnOMU0pnmuzIR8LfIPRVUjxSqA=
|
||||
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 h1:kDi4JBNAsJWfz1aEXhO8Jg87JJaPNLh5tIzYHgStQ9Y=
|
||||
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4=
|
||||
sigs.k8s.io/gateway-api v0.7.1 h1:Tts2jeepVkPA5rVG/iO+S43s9n7Vp7jCDhZDQYtPigQ=
|
||||
sigs.k8s.io/gateway-api v0.7.1/go.mod h1:Xv0+ZMxX0lu1nSSDIIPEfbVztgNZ+3cfiYrJsa2Ooso=
|
||||
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k=
|
||||
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E=
|
||||
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ cp -r ./{rollouts,hack,vendor,go.mod} "${TMP_DIR}"/src/github.com/openkruise/kru
|
|||
|
||||
(cd "${TMP_DIR}"/src/github.com/openkruise/kruise-rollout-api; \
|
||||
GOPATH=${TMP_DIR} GO111MODULE=on /bin/bash vendor/k8s.io/code-generator/generate-groups.sh all \
|
||||
github.com/openkruise/kruise-rollout-api/client github.com/openkruise/kruise-rollout-api "rollouts:v1beta1" -h ./hack/boilerplate.go.txt)
|
||||
github.com/openkruise/kruise-rollout-api/client github.com/openkruise/kruise-rollout-api "rollouts:v1alpha1,v1beta1" -h ./hack/boilerplate.go.txt)
|
||||
|
||||
mkdir -p ./client
|
||||
rm -rf ./client/{clientset,informers,listers}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,15 @@
|
|||
API rule violation: list_type_missing,github.com/openkruise/kruise-rollout-api/rollouts/v1alpha1,CanaryStrategy,Steps
|
||||
API rule violation: list_type_missing,github.com/openkruise/kruise-rollout-api/rollouts/v1alpha1,CanaryStrategy,TrafficRoutings
|
||||
API rule violation: list_type_missing,github.com/openkruise/kruise-rollout-api/rollouts/v1alpha1,HttpRouteMatch,Headers
|
||||
API rule violation: list_type_missing,github.com/openkruise/kruise-rollout-api/rollouts/v1alpha1,RolloutStatus,Conditions
|
||||
API rule violation: list_type_missing,github.com/openkruise/kruise-rollout-api/rollouts/v1alpha1,TrafficRoutingRef,CustomNetworkRefs
|
||||
API rule violation: list_type_missing,github.com/openkruise/kruise-rollout-api/rollouts/v1alpha1,TrafficRoutingSpec,ObjectRef
|
||||
API rule violation: list_type_missing,github.com/openkruise/kruise-rollout-api/rollouts/v1alpha1,TrafficRoutingStrategy,Matches
|
||||
API rule violation: list_type_missing,github.com/openkruise/kruise-rollout-api/rollouts/v1beta1,BlueGreenStrategy,Steps
|
||||
API rule violation: list_type_missing,github.com/openkruise/kruise-rollout-api/rollouts/v1beta1,BlueGreenStrategy,TrafficRoutings
|
||||
API rule violation: list_type_missing,github.com/openkruise/kruise-rollout-api/rollouts/v1beta1,CanaryStrategy,Steps
|
||||
API rule violation: list_type_missing,github.com/openkruise/kruise-rollout-api/rollouts/v1beta1,CanaryStrategy,TrafficRoutings
|
||||
API rule violation: list_type_missing,github.com/openkruise/kruise-rollout-api/rollouts/v1beta1,RolloutStatus,Conditions
|
||||
API rule violation: list_type_missing,github.com/openkruise/kruise-rollout-api/rollouts/v1beta1,TrafficRoutingRef,CustomNetworkRefs
|
||||
API rule violation: list_type_missing,github.com/openkruise/kruise-rollout-api/rollouts/v1beta1,TrafficRoutingStrategy,Matches
|
||||
API rule violation: names_match,github.com/openkruise/kruise-rollout-api/rollouts/v1alpha1,RolloutSpec,DeprecatedRolloutID
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
Copyright 2023 The Kruise 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
|
||||
|
||||
http://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.
|
||||
*/
|
||||
|
||||
package rollouts
|
||||
|
||||
import (
|
||||
"github.com/openkruise/kruise-rollout-api/rollouts/v1alpha1"
|
||||
)
|
||||
|
||||
func init() {
|
||||
// Register the types with the Scheme so the components can map objects to GroupVersionKinds and back
|
||||
AddToSchemes = append(AddToSchemes, v1alpha1.SchemeBuilder.AddToScheme)
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
Copyright 2023 The Kruise 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
|
||||
|
||||
http://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.
|
||||
*/
|
||||
|
||||
package rollouts
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// AddToSchemes may be used to add all resources defined in the project to a Scheme
|
||||
var AddToSchemes runtime.SchemeBuilder
|
||||
|
||||
// AddToScheme adds all Resources to the Scheme
|
||||
func AddToScheme(s *runtime.Scheme) error {
|
||||
return AddToSchemes.AddToScheme(s)
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
Copyright 2020 The Kruise 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
|
||||
|
||||
http://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.
|
||||
*/
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
// +groupName=rollouts.kruise.io
|
||||
package v1alpha1
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
Copyright 2022 The Kruise 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
|
||||
|
||||
http://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.
|
||||
*/
|
||||
|
||||
// Package v1alpha1 contains API Schema definitions for the apps v1alpha1 API group
|
||||
// +kubebuilder:object:generate=true
|
||||
// +groupName=rollouts.kruise.io
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"github.com/openkruise/kruise-rollout-api/utils/scheme"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
)
|
||||
|
||||
var (
|
||||
// GroupVersion is group version used to register these objects
|
||||
GroupVersion = schema.GroupVersion{Group: "rollouts.kruise.io", Version: "v1alpha1"}
|
||||
|
||||
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
|
||||
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
|
||||
|
||||
// AddToScheme adds the types in this group-version to the given scheme.
|
||||
AddToScheme = SchemeBuilder.AddToScheme
|
||||
|
||||
SchemeGroupVersion = GroupVersion
|
||||
)
|
||||
|
||||
// Resource is required by pkg/client/listers/...
|
||||
func Resource(resource string) schema.GroupResource {
|
||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
||||
}
|
||||
|
|
@ -0,0 +1,322 @@
|
|||
/*
|
||||
Copyright 2022 The Kruise 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
|
||||
|
||||
http://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.
|
||||
*/
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/util/intstr"
|
||||
gatewayv1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1"
|
||||
)
|
||||
|
||||
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
|
||||
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
|
||||
|
||||
const (
|
||||
// RolloutIDLabel is set to workload labels.
|
||||
// RolloutIDLabel is designed to distinguish each workload revision publications.
|
||||
// The value of RolloutIDLabel corresponds Rollout.Spec.RolloutID.
|
||||
RolloutIDLabel = "rollouts.kruise.io/rollout-id"
|
||||
|
||||
// RolloutBatchIDLabel is patched in pod labels.
|
||||
// RolloutBatchIDLabel is the label key of batch id that will be patched to pods during rollout.
|
||||
// Only when RolloutIDLabel is set, RolloutBatchIDLabel will be patched.
|
||||
// Users can use RolloutIDLabel and RolloutBatchIDLabel to select the pods that are upgraded in some certain batch and release.
|
||||
RolloutBatchIDLabel = "rollouts.kruise.io/rollout-batch-id"
|
||||
|
||||
// RollbackInBatchAnnotation is set to rollout annotations.
|
||||
// RollbackInBatchAnnotation allow use disable quick rollback, and will roll back in batch style.
|
||||
RollbackInBatchAnnotation = "rollouts.kruise.io/rollback-in-batch"
|
||||
|
||||
// RolloutStyleAnnotation define the rolling behavior for Deployment.
|
||||
// must be "partition" or "canary":
|
||||
// * "partition" means rolling in batches just like CloneSet, and will NOT create any extra Workload;
|
||||
// * "canary" means rolling in canary way, and will create a canary Workload.
|
||||
// Currently, only Deployment support both "partition" and "canary" rolling styles.
|
||||
// For other workload types, they only support "partition" styles.
|
||||
// Defaults to "canary" to Deployment.
|
||||
// Defaults to "partition" to the others.
|
||||
RolloutStyleAnnotation = "rollouts.kruise.io/rolling-style"
|
||||
|
||||
// TrafficRoutingAnnotation is the TrafficRouting Name, and it is the Rollout's TrafficRouting.
|
||||
// The Rollout release will trigger the TrafficRouting release. For example:
|
||||
// A microservice consists of three applications, and the invocation relationship is as follows: a -> b -> c,
|
||||
// and application(a, b, c)'s gateway is trafficRouting. Any application(a, b or b) release will trigger TrafficRouting release.
|
||||
TrafficRoutingAnnotation = "rollouts.kruise.io/trafficrouting"
|
||||
)
|
||||
|
||||
// RolloutSpec defines the desired state of Rollout
|
||||
type RolloutSpec struct {
|
||||
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
|
||||
// Important: Run "make" to regenerate code after modifying this file
|
||||
// ObjectRef indicates workload
|
||||
ObjectRef ObjectRef `json:"objectRef"`
|
||||
// rollout strategy
|
||||
Strategy RolloutStrategy `json:"strategy"`
|
||||
// DeprecatedRolloutID is the deprecated field.
|
||||
// It is recommended that configure RolloutId in workload.annotations[rollouts.kruise.io/rollout-id].
|
||||
// RolloutID should be changed before each workload revision publication.
|
||||
// It is to distinguish consecutive multiple workload publications and rollout progress.
|
||||
DeprecatedRolloutID string `json:"rolloutID,omitempty"`
|
||||
// if a rollout disabled, then the rollout would not watch changes of workload
|
||||
//+kubebuilder:validation:Optional
|
||||
//+kubebuilder:default=false
|
||||
Disabled bool `json:"disabled"`
|
||||
}
|
||||
|
||||
type ObjectRef struct {
|
||||
// WorkloadRef contains enough information to let you identify a workload for Rollout
|
||||
// Batch release of the bypass
|
||||
WorkloadRef *WorkloadRef `json:"workloadRef,omitempty"`
|
||||
}
|
||||
|
||||
// WorkloadRef holds a references to the Kubernetes object
|
||||
type WorkloadRef struct {
|
||||
// API Version of the referent
|
||||
APIVersion string `json:"apiVersion"`
|
||||
// Kind of the referent
|
||||
Kind string `json:"kind"`
|
||||
// Name of the referent
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// RolloutStrategy defines strategy to apply during next rollout
|
||||
type RolloutStrategy struct {
|
||||
// Paused indicates that the Rollout is paused.
|
||||
// Default value is false
|
||||
Paused bool `json:"paused,omitempty"`
|
||||
// +optional
|
||||
Canary *CanaryStrategy `json:"canary,omitempty"`
|
||||
}
|
||||
|
||||
// CanaryStrategy defines parameters for a Replica Based Canary
|
||||
type CanaryStrategy struct {
|
||||
// Steps define the order of phases to execute release in batches(20%, 40%, 60%, 80%, 100%)
|
||||
// +optional
|
||||
Steps []CanaryStep `json:"steps,omitempty"`
|
||||
// TrafficRoutings hosts all the supported service meshes supported to enable more fine-grained traffic routing
|
||||
// and current only support one TrafficRouting
|
||||
TrafficRoutings []TrafficRoutingRef `json:"trafficRoutings,omitempty"`
|
||||
// FailureThreshold indicates how many failed pods can be tolerated in all upgraded pods.
|
||||
// Only when FailureThreshold are satisfied, Rollout can enter ready state.
|
||||
// If FailureThreshold is nil, Rollout will use the MaxUnavailable of workload as its
|
||||
// FailureThreshold.
|
||||
// Defaults to nil.
|
||||
FailureThreshold *intstr.IntOrString `json:"failureThreshold,omitempty"`
|
||||
// PatchPodTemplateMetadata indicates patch configuration(e.g. labels, annotations) to the canary deployment podTemplateSpec.metadata
|
||||
// only support for canary deployment
|
||||
// +optional
|
||||
PatchPodTemplateMetadata *PatchPodTemplateMetadata `json:"patchPodTemplateMetadata,omitempty"`
|
||||
// canary service will not be generated if DisableGenerateCanaryService is true
|
||||
DisableGenerateCanaryService bool `json:"disableGenerateCanaryService,omitempty"`
|
||||
}
|
||||
|
||||
type PatchPodTemplateMetadata struct {
|
||||
// annotations
|
||||
Annotations map[string]string `json:"annotations,omitempty"`
|
||||
// labels
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
}
|
||||
|
||||
// CanaryStep defines a step of a canary workload.
|
||||
type CanaryStep struct {
|
||||
TrafficRoutingStrategy `json:",inline"`
|
||||
// Replicas is the number of expected canary pods in this batch
|
||||
// it can be an absolute number (ex: 5) or a percentage of total pods.
|
||||
Replicas *intstr.IntOrString `json:"replicas,omitempty"`
|
||||
// Pause defines a pause stage for a rollout, manual or auto
|
||||
// +optional
|
||||
Pause RolloutPause `json:"pause,omitempty"`
|
||||
}
|
||||
|
||||
type HttpRouteMatch struct {
|
||||
// Headers specifies HTTP request header matchers. Multiple match values are
|
||||
// ANDed together, meaning, a request must match all the specified headers
|
||||
// to select the route.
|
||||
// +kubebuilder:validation:MaxItems=16
|
||||
Headers []gatewayv1beta1.HTTPHeaderMatch `json:"headers,omitempty"`
|
||||
}
|
||||
|
||||
// RolloutPause defines a pause stage for a rollout
|
||||
type RolloutPause struct {
|
||||
// Duration the amount of time to wait before moving to the next step.
|
||||
// +optional
|
||||
Duration *int32 `json:"duration,omitempty"`
|
||||
}
|
||||
|
||||
// RolloutStatus defines the observed state of Rollout
|
||||
type RolloutStatus struct {
|
||||
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
|
||||
// Important: Run "make" to regenerate code after modifying this file
|
||||
|
||||
// observedGeneration is the most recent generation observed for this Rollout.
|
||||
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
|
||||
// Canary describes the state of the canary rollout
|
||||
// +optional
|
||||
CanaryStatus *CanaryStatus `json:"canaryStatus,omitempty"`
|
||||
// Conditions a list of conditions a rollout can have.
|
||||
// +optional
|
||||
Conditions []RolloutCondition `json:"conditions,omitempty"`
|
||||
// Phase is the rollout phase.
|
||||
Phase RolloutPhase `json:"phase,omitempty"`
|
||||
// Message provides details on why the rollout is in its current phase
|
||||
Message string `json:"message,omitempty"`
|
||||
}
|
||||
|
||||
// RolloutCondition describes the state of a rollout at a certain point.
|
||||
type RolloutCondition struct {
|
||||
// Type of rollout condition.
|
||||
Type RolloutConditionType `json:"type"`
|
||||
// Phase of the condition, one of True, False, Unknown.
|
||||
Status corev1.ConditionStatus `json:"status"`
|
||||
// The last time this condition was updated.
|
||||
LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"`
|
||||
// Last time the condition transitioned from one status to another.
|
||||
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
|
||||
// The reason for the condition's last transition.
|
||||
Reason string `json:"reason"`
|
||||
// A human readable message indicating details about the transition.
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
// RolloutConditionType defines the conditions of Rollout
|
||||
type RolloutConditionType string
|
||||
|
||||
// These are valid conditions of a rollout.
|
||||
const (
|
||||
// RolloutConditionProgressing means the rollout is progressing. Progress for a rollout is
|
||||
// considered when a new replica set is created or adopted, when pods scale
|
||||
// up or old pods scale down, or when the services are updated. Progress is not estimated
|
||||
// for paused rollouts.
|
||||
RolloutConditionProgressing RolloutConditionType = "Progressing"
|
||||
// Progressing Reason
|
||||
ProgressingReasonInitializing = "Initializing"
|
||||
ProgressingReasonInRolling = "InRolling"
|
||||
ProgressingReasonFinalising = "Finalising"
|
||||
ProgressingReasonCompleted = "Completed"
|
||||
ProgressingReasonCancelling = "Cancelling"
|
||||
ProgressingReasonPaused = "Paused"
|
||||
|
||||
// RolloutConditionSucceeded indicates whether rollout is succeeded or failed.
|
||||
RolloutConditionSucceeded RolloutConditionType = "Succeeded"
|
||||
|
||||
// Terminating condition
|
||||
RolloutConditionTerminating RolloutConditionType = "Terminating"
|
||||
// Terminating Reason
|
||||
TerminatingReasonInTerminating = "InTerminating"
|
||||
TerminatingReasonCompleted = "Completed"
|
||||
)
|
||||
|
||||
// CanaryStatus status fields that only pertain to the canary rollout
|
||||
type CanaryStatus struct {
|
||||
// observedWorkloadGeneration is the most recent generation observed for this Rollout ref workload generation.
|
||||
ObservedWorkloadGeneration int64 `json:"observedWorkloadGeneration,omitempty"`
|
||||
// ObservedRolloutID will record the newest spec.RolloutID if status.canaryRevision equals to workload.updateRevision
|
||||
ObservedRolloutID string `json:"observedRolloutID,omitempty"`
|
||||
// RolloutHash from rollout.spec object
|
||||
RolloutHash string `json:"rolloutHash,omitempty"`
|
||||
// StableRevision indicates the revision of stable pods
|
||||
StableRevision string `json:"stableRevision,omitempty"`
|
||||
// CanaryRevision is calculated by rollout based on podTemplateHash, and the internal logic flow uses
|
||||
// It may be different from rs podTemplateHash in different k8s versions, so it cannot be used as service selector label
|
||||
CanaryRevision string `json:"canaryRevision"`
|
||||
// pod template hash is used as service selector label
|
||||
PodTemplateHash string `json:"podTemplateHash"`
|
||||
// CanaryReplicas the numbers of canary revision pods
|
||||
CanaryReplicas int32 `json:"canaryReplicas"`
|
||||
// CanaryReadyReplicas the numbers of ready canary revision pods
|
||||
CanaryReadyReplicas int32 `json:"canaryReadyReplicas"`
|
||||
// NextStepIndex defines the next step of the rollout is on.
|
||||
// In normal case, NextStepIndex is equal to CurrentStepIndex + 1
|
||||
// If the current step is the last step, NextStepIndex is equal to -1
|
||||
// Before the release, NextStepIndex is also equal to -1
|
||||
// 0 is not used and won't appear in any case
|
||||
// It is allowed to patch NextStepIndex by design,
|
||||
// e.g. if CurrentStepIndex is 2, user can patch NextStepIndex to 3 (if exists) to
|
||||
// achieve batch jump, or patch NextStepIndex to 1 to implement a re-execution of step 1
|
||||
// Patching it with a non-positive value is meaningless, which will be corrected
|
||||
// in the next reconciliation
|
||||
// achieve batch jump, or patch NextStepIndex to 1 to implement a re-execution of step 1
|
||||
NextStepIndex int32 `json:"nextStepIndex"`
|
||||
// +optional
|
||||
CurrentStepIndex int32 `json:"currentStepIndex"`
|
||||
CurrentStepState CanaryStepState `json:"currentStepState"`
|
||||
Message string `json:"message,omitempty"`
|
||||
LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"`
|
||||
FinalisingStep FinalizeStateType `json:"finalisingStep"`
|
||||
}
|
||||
|
||||
type CanaryStepState string
|
||||
type FinalizeStateType string
|
||||
|
||||
const (
|
||||
CanaryStepStateUpgrade CanaryStepState = "StepUpgrade"
|
||||
CanaryStepStateTrafficRouting CanaryStepState = "StepTrafficRouting"
|
||||
CanaryStepStateMetricsAnalysis CanaryStepState = "StepMetricsAnalysis"
|
||||
CanaryStepStatePaused CanaryStepState = "StepPaused"
|
||||
CanaryStepStateReady CanaryStepState = "StepReady"
|
||||
CanaryStepStateCompleted CanaryStepState = "Completed"
|
||||
)
|
||||
|
||||
// RolloutPhase are a set of phases that this rollout
|
||||
type RolloutPhase string
|
||||
|
||||
const (
|
||||
// RolloutPhaseInitial indicates a rollout is Initial
|
||||
RolloutPhaseInitial RolloutPhase = "Initial"
|
||||
// RolloutPhaseHealthy indicates a rollout is healthy
|
||||
RolloutPhaseHealthy RolloutPhase = "Healthy"
|
||||
// RolloutPhaseProgressing indicates a rollout is not yet healthy but still making progress towards a healthy state
|
||||
RolloutPhaseProgressing RolloutPhase = "Progressing"
|
||||
// RolloutPhaseTerminating indicates a rollout is terminated
|
||||
RolloutPhaseTerminating RolloutPhase = "Terminating"
|
||||
// RolloutPhaseDisabled indicates a rollout is disabled
|
||||
RolloutPhaseDisabled RolloutPhase = "Disabled"
|
||||
// RolloutPhaseDisabling indicates a rollout is disabling and releasing resources
|
||||
RolloutPhaseDisabling RolloutPhase = "Disabling"
|
||||
)
|
||||
|
||||
// +genclient
|
||||
//+kubebuilder:object:root=true
|
||||
//+kubebuilder:subresource:status
|
||||
// +kubebuilder:printcolumn:name="STATUS",type="string",JSONPath=".status.phase",description="The rollout status phase"
|
||||
// +kubebuilder:printcolumn:name="CANARY_STEP",type="integer",JSONPath=".status.canaryStatus.currentStepIndex",description="The rollout canary status step"
|
||||
// +kubebuilder:printcolumn:name="CANARY_STATE",type="string",JSONPath=".status.canaryStatus.currentStepState",description="The rollout canary status step state"
|
||||
// +kubebuilder:printcolumn:name="MESSAGE",type="string",JSONPath=".status.message",description="The rollout canary status message"
|
||||
// +kubebuilder:printcolumn:name="AGE",type=date,JSONPath=".metadata.creationTimestamp"
|
||||
|
||||
// Rollout is the Schema for the rollouts API
|
||||
type Rollout struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec RolloutSpec `json:"spec,omitempty"`
|
||||
Status RolloutStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
//+kubebuilder:object:root=true
|
||||
|
||||
// RolloutList contains a list of Rollout
|
||||
type RolloutList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []Rollout `json:"items"`
|
||||
}
|
||||
|
||||
func init() {
|
||||
SchemeBuilder.Register(&Rollout{}, &RolloutList{})
|
||||
}
|
||||
|
|
@ -0,0 +1,163 @@
|
|||
/*
|
||||
Copyright 2023 The Kruise 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
|
||||
|
||||
http://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.
|
||||
*/
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
gatewayv1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1"
|
||||
)
|
||||
|
||||
const (
|
||||
ProgressingRolloutFinalizerPrefix = "progressing.rollouts.kruise.io"
|
||||
)
|
||||
|
||||
// TrafficRoutingRef hosts all the different configuration for supported service meshes to enable more fine-grained traffic routing
|
||||
type TrafficRoutingRef struct {
|
||||
// Service holds the name of a service which selects pods with stable version and don't select any pods with canary version.
|
||||
Service string `json:"service"`
|
||||
// Optional duration in seconds the traffic provider(e.g. nginx ingress controller) consumes the service, ingress configuration changes gracefully.
|
||||
// +kubebuilder:default=3
|
||||
GracePeriodSeconds int32 `json:"gracePeriodSeconds,omitempty"`
|
||||
// Ingress holds Ingress specific configuration to route traffic, e.g. Nginx, Alb.
|
||||
Ingress *IngressTrafficRouting `json:"ingress,omitempty"`
|
||||
// Gateway holds Gateway specific configuration to route traffic
|
||||
// Gateway configuration only supports >= v0.4.0 (v1alpha2).
|
||||
Gateway *GatewayTrafficRouting `json:"gateway,omitempty"`
|
||||
// CustomNetworkRefs hold a list of custom providers to route traffic
|
||||
CustomNetworkRefs []CustomNetworkRef `json:"customNetworkRefs,omitempty"`
|
||||
}
|
||||
|
||||
// IngressTrafficRouting configuration for ingress controller to control traffic routing
|
||||
type IngressTrafficRouting struct {
|
||||
// ClassType refers to the type of `Ingress`.
|
||||
// current support nginx, aliyun-alb. default is nginx.
|
||||
// +optional
|
||||
ClassType string `json:"classType,omitempty"`
|
||||
// Name refers to the name of an `Ingress` resource in the same namespace as the `Rollout`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// GatewayTrafficRouting configuration for gateway api
|
||||
type GatewayTrafficRouting struct {
|
||||
// HTTPRouteName refers to the name of an `HTTPRoute` resource in the same namespace as the `Rollout`
|
||||
HTTPRouteName *string `json:"httpRouteName,omitempty"`
|
||||
// TCPRouteName *string `json:"tcpRouteName,omitempty"`
|
||||
// UDPRouteName *string `json:"udpRouteName,omitempty"`
|
||||
}
|
||||
|
||||
type TrafficRoutingSpec struct {
|
||||
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
|
||||
// Important: Run "make" to regenerate code after modifying this file
|
||||
|
||||
// ObjectRef indicates trafficRouting ref
|
||||
ObjectRef []TrafficRoutingRef `json:"objectRef"`
|
||||
// trafficrouting strategy
|
||||
Strategy TrafficRoutingStrategy `json:"strategy"`
|
||||
}
|
||||
|
||||
type TrafficRoutingStrategy struct {
|
||||
// Weight indicate how many percentage of traffic the canary pods should receive
|
||||
// +optional
|
||||
Weight *int32 `json:"weight,omitempty"`
|
||||
// Set overwrites the request with the given header (name, value)
|
||||
// before the action.
|
||||
//
|
||||
// Input:
|
||||
// GET /foo HTTP/1.1
|
||||
// my-header: foo
|
||||
//
|
||||
// requestHeaderModifier:
|
||||
// set:
|
||||
// - name: "my-header"
|
||||
// value: "bar"
|
||||
//
|
||||
// Output:
|
||||
// GET /foo HTTP/1.1
|
||||
// my-header: bar
|
||||
//
|
||||
// +optional
|
||||
RequestHeaderModifier *gatewayv1beta1.HTTPHeaderFilter `json:"requestHeaderModifier,omitempty"`
|
||||
// Matches define conditions used for matching the incoming HTTP requests to canary service.
|
||||
// Each match is independent, i.e. this rule will be matched if **any** one of the matches is satisfied.
|
||||
// If Gateway API, current only support one match.
|
||||
// And cannot support both weight and matches, if both are configured, then matches takes precedence.
|
||||
Matches []HttpRouteMatch `json:"matches,omitempty"`
|
||||
}
|
||||
|
||||
type TrafficRoutingStatus struct {
|
||||
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
|
||||
// Important: Run "make" to regenerate code after modifying this file
|
||||
|
||||
// observedGeneration is the most recent generation observed for this Rollout.
|
||||
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
|
||||
// Phase is the trafficRouting phase.
|
||||
Phase TrafficRoutingPhase `json:"phase,omitempty"`
|
||||
// Message provides details on why the rollout is in its current phase
|
||||
Message string `json:"message,omitempty"`
|
||||
}
|
||||
|
||||
// TrafficRoutingPhase are a set of phases that this rollout
|
||||
type TrafficRoutingPhase string
|
||||
|
||||
const (
|
||||
// TrafficRoutingPhaseInitial indicates a traffic routing is Initial
|
||||
TrafficRoutingPhaseInitial TrafficRoutingPhase = "Initial"
|
||||
// TrafficRoutingPhaseHealthy indicates a traffic routing is healthy.
|
||||
// This means that Ingress and Service Resources exist.
|
||||
TrafficRoutingPhaseHealthy TrafficRoutingPhase = "Healthy"
|
||||
// TrafficRoutingPhaseProgressing indicates a traffic routing is not yet healthy but still making progress towards a healthy state
|
||||
TrafficRoutingPhaseProgressing TrafficRoutingPhase = "Progressing"
|
||||
// TrafficRoutingPhaseFinalizing indicates the trafficRouting progress is complete, and is running recycle operations.
|
||||
TrafficRoutingPhaseFinalizing TrafficRoutingPhase = "Finalizing"
|
||||
// TrafficRoutingPhaseTerminating indicates a traffic routing is terminated
|
||||
TrafficRoutingPhaseTerminating TrafficRoutingPhase = "Terminating"
|
||||
)
|
||||
|
||||
// +genclient
|
||||
//+kubebuilder:object:root=true
|
||||
//+kubebuilder:subresource:status
|
||||
// +kubebuilder:printcolumn:name="STATUS",type="string",JSONPath=".status.phase",description="The TrafficRouting status phase"
|
||||
// +kubebuilder:printcolumn:name="MESSAGE",type="string",JSONPath=".status.message",description="The TrafficRouting canary status message"
|
||||
// +kubebuilder:printcolumn:name="AGE",type=date,JSONPath=".metadata.creationTimestamp"
|
||||
|
||||
// TrafficRouting is the Schema for the TrafficRoutings API
|
||||
type TrafficRouting struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec TrafficRoutingSpec `json:"spec,omitempty"`
|
||||
Status TrafficRoutingStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
//+kubebuilder:object:root=true
|
||||
|
||||
// TrafficRoutingList contains a list of TrafficRouting
|
||||
type TrafficRoutingList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []TrafficRouting `json:"items"`
|
||||
}
|
||||
|
||||
type CustomNetworkRef struct {
|
||||
APIVersion string `json:"apiVersion"`
|
||||
Kind string `json:"kind"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
func init() {
|
||||
SchemeBuilder.Register(&TrafficRouting{}, &TrafficRoutingList{})
|
||||
}
|
||||
|
|
@ -0,0 +1,562 @@
|
|||
//go:build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
Copyright 2024 The Kruise 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
|
||||
|
||||
http://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.
|
||||
*/
|
||||
|
||||
// Code generated by controller-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/util/intstr"
|
||||
"sigs.k8s.io/gateway-api/apis/v1beta1"
|
||||
)
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *CanaryStatus) DeepCopyInto(out *CanaryStatus) {
|
||||
*out = *in
|
||||
if in.LastUpdateTime != nil {
|
||||
in, out := &in.LastUpdateTime, &out.LastUpdateTime
|
||||
*out = (*in).DeepCopy()
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CanaryStatus.
|
||||
func (in *CanaryStatus) DeepCopy() *CanaryStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(CanaryStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *CanaryStep) DeepCopyInto(out *CanaryStep) {
|
||||
*out = *in
|
||||
in.TrafficRoutingStrategy.DeepCopyInto(&out.TrafficRoutingStrategy)
|
||||
if in.Replicas != nil {
|
||||
in, out := &in.Replicas, &out.Replicas
|
||||
*out = new(intstr.IntOrString)
|
||||
**out = **in
|
||||
}
|
||||
in.Pause.DeepCopyInto(&out.Pause)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CanaryStep.
|
||||
func (in *CanaryStep) DeepCopy() *CanaryStep {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(CanaryStep)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *CanaryStrategy) DeepCopyInto(out *CanaryStrategy) {
|
||||
*out = *in
|
||||
if in.Steps != nil {
|
||||
in, out := &in.Steps, &out.Steps
|
||||
*out = make([]CanaryStep, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.TrafficRoutings != nil {
|
||||
in, out := &in.TrafficRoutings, &out.TrafficRoutings
|
||||
*out = make([]TrafficRoutingRef, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.FailureThreshold != nil {
|
||||
in, out := &in.FailureThreshold, &out.FailureThreshold
|
||||
*out = new(intstr.IntOrString)
|
||||
**out = **in
|
||||
}
|
||||
if in.PatchPodTemplateMetadata != nil {
|
||||
in, out := &in.PatchPodTemplateMetadata, &out.PatchPodTemplateMetadata
|
||||
*out = new(PatchPodTemplateMetadata)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CanaryStrategy.
|
||||
func (in *CanaryStrategy) DeepCopy() *CanaryStrategy {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(CanaryStrategy)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *CustomNetworkRef) DeepCopyInto(out *CustomNetworkRef) {
|
||||
*out = *in
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomNetworkRef.
|
||||
func (in *CustomNetworkRef) DeepCopy() *CustomNetworkRef {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(CustomNetworkRef)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *GatewayTrafficRouting) DeepCopyInto(out *GatewayTrafficRouting) {
|
||||
*out = *in
|
||||
if in.HTTPRouteName != nil {
|
||||
in, out := &in.HTTPRouteName, &out.HTTPRouteName
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatewayTrafficRouting.
|
||||
func (in *GatewayTrafficRouting) DeepCopy() *GatewayTrafficRouting {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(GatewayTrafficRouting)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *HttpRouteMatch) DeepCopyInto(out *HttpRouteMatch) {
|
||||
*out = *in
|
||||
if in.Headers != nil {
|
||||
in, out := &in.Headers, &out.Headers
|
||||
*out = make([]v1beta1.HTTPHeaderMatch, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HttpRouteMatch.
|
||||
func (in *HttpRouteMatch) DeepCopy() *HttpRouteMatch {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(HttpRouteMatch)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *IngressTrafficRouting) DeepCopyInto(out *IngressTrafficRouting) {
|
||||
*out = *in
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressTrafficRouting.
|
||||
func (in *IngressTrafficRouting) DeepCopy() *IngressTrafficRouting {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(IngressTrafficRouting)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ObjectRef) DeepCopyInto(out *ObjectRef) {
|
||||
*out = *in
|
||||
if in.WorkloadRef != nil {
|
||||
in, out := &in.WorkloadRef, &out.WorkloadRef
|
||||
*out = new(WorkloadRef)
|
||||
**out = **in
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectRef.
|
||||
func (in *ObjectRef) DeepCopy() *ObjectRef {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ObjectRef)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PatchPodTemplateMetadata) DeepCopyInto(out *PatchPodTemplateMetadata) {
|
||||
*out = *in
|
||||
if in.Annotations != nil {
|
||||
in, out := &in.Annotations, &out.Annotations
|
||||
*out = make(map[string]string, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
if in.Labels != nil {
|
||||
in, out := &in.Labels, &out.Labels
|
||||
*out = make(map[string]string, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PatchPodTemplateMetadata.
|
||||
func (in *PatchPodTemplateMetadata) DeepCopy() *PatchPodTemplateMetadata {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PatchPodTemplateMetadata)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Rollout) DeepCopyInto(out *Rollout) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rollout.
|
||||
func (in *Rollout) DeepCopy() *Rollout {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(Rollout)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *Rollout) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *RolloutCondition) DeepCopyInto(out *RolloutCondition) {
|
||||
*out = *in
|
||||
in.LastUpdateTime.DeepCopyInto(&out.LastUpdateTime)
|
||||
in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RolloutCondition.
|
||||
func (in *RolloutCondition) DeepCopy() *RolloutCondition {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(RolloutCondition)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *RolloutList) DeepCopyInto(out *RolloutList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]Rollout, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RolloutList.
|
||||
func (in *RolloutList) DeepCopy() *RolloutList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(RolloutList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *RolloutList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *RolloutPause) DeepCopyInto(out *RolloutPause) {
|
||||
*out = *in
|
||||
if in.Duration != nil {
|
||||
in, out := &in.Duration, &out.Duration
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RolloutPause.
|
||||
func (in *RolloutPause) DeepCopy() *RolloutPause {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(RolloutPause)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *RolloutSpec) DeepCopyInto(out *RolloutSpec) {
|
||||
*out = *in
|
||||
in.ObjectRef.DeepCopyInto(&out.ObjectRef)
|
||||
in.Strategy.DeepCopyInto(&out.Strategy)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RolloutSpec.
|
||||
func (in *RolloutSpec) DeepCopy() *RolloutSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(RolloutSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *RolloutStatus) DeepCopyInto(out *RolloutStatus) {
|
||||
*out = *in
|
||||
if in.CanaryStatus != nil {
|
||||
in, out := &in.CanaryStatus, &out.CanaryStatus
|
||||
*out = new(CanaryStatus)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.Conditions != nil {
|
||||
in, out := &in.Conditions, &out.Conditions
|
||||
*out = make([]RolloutCondition, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RolloutStatus.
|
||||
func (in *RolloutStatus) DeepCopy() *RolloutStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(RolloutStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *RolloutStrategy) DeepCopyInto(out *RolloutStrategy) {
|
||||
*out = *in
|
||||
if in.Canary != nil {
|
||||
in, out := &in.Canary, &out.Canary
|
||||
*out = new(CanaryStrategy)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RolloutStrategy.
|
||||
func (in *RolloutStrategy) DeepCopy() *RolloutStrategy {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(RolloutStrategy)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *TrafficRouting) DeepCopyInto(out *TrafficRouting) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
out.Status = in.Status
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrafficRouting.
|
||||
func (in *TrafficRouting) DeepCopy() *TrafficRouting {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(TrafficRouting)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *TrafficRouting) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *TrafficRoutingList) DeepCopyInto(out *TrafficRoutingList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]TrafficRouting, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrafficRoutingList.
|
||||
func (in *TrafficRoutingList) DeepCopy() *TrafficRoutingList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(TrafficRoutingList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *TrafficRoutingList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *TrafficRoutingRef) DeepCopyInto(out *TrafficRoutingRef) {
|
||||
*out = *in
|
||||
if in.Ingress != nil {
|
||||
in, out := &in.Ingress, &out.Ingress
|
||||
*out = new(IngressTrafficRouting)
|
||||
**out = **in
|
||||
}
|
||||
if in.Gateway != nil {
|
||||
in, out := &in.Gateway, &out.Gateway
|
||||
*out = new(GatewayTrafficRouting)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.CustomNetworkRefs != nil {
|
||||
in, out := &in.CustomNetworkRefs, &out.CustomNetworkRefs
|
||||
*out = make([]CustomNetworkRef, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrafficRoutingRef.
|
||||
func (in *TrafficRoutingRef) DeepCopy() *TrafficRoutingRef {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(TrafficRoutingRef)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *TrafficRoutingSpec) DeepCopyInto(out *TrafficRoutingSpec) {
|
||||
*out = *in
|
||||
if in.ObjectRef != nil {
|
||||
in, out := &in.ObjectRef, &out.ObjectRef
|
||||
*out = make([]TrafficRoutingRef, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
in.Strategy.DeepCopyInto(&out.Strategy)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrafficRoutingSpec.
|
||||
func (in *TrafficRoutingSpec) DeepCopy() *TrafficRoutingSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(TrafficRoutingSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *TrafficRoutingStatus) DeepCopyInto(out *TrafficRoutingStatus) {
|
||||
*out = *in
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrafficRoutingStatus.
|
||||
func (in *TrafficRoutingStatus) DeepCopy() *TrafficRoutingStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(TrafficRoutingStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *TrafficRoutingStrategy) DeepCopyInto(out *TrafficRoutingStrategy) {
|
||||
*out = *in
|
||||
if in.Weight != nil {
|
||||
in, out := &in.Weight, &out.Weight
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
if in.RequestHeaderModifier != nil {
|
||||
in, out := &in.RequestHeaderModifier, &out.RequestHeaderModifier
|
||||
*out = new(v1beta1.HTTPHeaderFilter)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.Matches != nil {
|
||||
in, out := &in.Matches, &out.Matches
|
||||
*out = make([]HttpRouteMatch, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrafficRoutingStrategy.
|
||||
func (in *TrafficRoutingStrategy) DeepCopy() *TrafficRoutingStrategy {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(TrafficRoutingStrategy)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkloadRef) DeepCopyInto(out *WorkloadRef) {
|
||||
*out = *in
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadRef.
|
||||
func (in *WorkloadRef) DeepCopy() *WorkloadRef {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(WorkloadRef)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
|
@ -1,151 +0,0 @@
|
|||
/*
|
||||
Copyright 2023 The Kruise 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
|
||||
|
||||
http://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.
|
||||
*/
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/util/intstr"
|
||||
)
|
||||
|
||||
// ReleasePlan fines the details of the release plan
|
||||
type ReleasePlan struct {
|
||||
// Batches is the details on each batch of the ReleasePlan.
|
||||
//Users can specify their batch plan in this field, such as:
|
||||
// batches:
|
||||
// - canaryReplicas: 1 # batches 0
|
||||
// - canaryReplicas: 2 # batches 1
|
||||
// - canaryReplicas: 5 # batches 2
|
||||
// Not that these canaryReplicas should be a non-decreasing sequence.
|
||||
// +optional
|
||||
Batches []ReleaseBatch `json:"batches"`
|
||||
// All pods in the batches up to the batchPartition (included) will have
|
||||
// the target resource specification while the rest still is the stable revision.
|
||||
// This is designed for the operators to manually rollout.
|
||||
// Default is nil, which means no partition and will release all batches.
|
||||
// BatchPartition start from 0.
|
||||
// +optional
|
||||
BatchPartition *int32 `json:"batchPartition,omitempty"`
|
||||
// RolloutID indicates an id for each rollout progress
|
||||
RolloutID string `json:"rolloutID,omitempty"`
|
||||
// FailureThreshold indicates how many failed pods can be tolerated in all upgraded pods.
|
||||
// Only when FailureThreshold are satisfied, Rollout can enter ready state.
|
||||
// If FailureThreshold is nil, Rollout will use the MaxUnavailable of workload as its
|
||||
// FailureThreshold.
|
||||
// Defaults to nil.
|
||||
FailureThreshold *intstr.IntOrString `json:"failureThreshold,omitempty"`
|
||||
// FinalizingPolicy define the behavior of controller when phase enter Finalizing
|
||||
// Defaults to "Immediate"
|
||||
FinalizingPolicy FinalizingPolicyType `json:"finalizingPolicy,omitempty"`
|
||||
// PatchPodTemplateMetadata indicates patch configuration(e.g. labels, annotations) to the canary deployment podTemplateSpec.metadata
|
||||
// only support for canary deployment
|
||||
// +optional
|
||||
PatchPodTemplateMetadata *PatchPodTemplateMetadata `json:"patchPodTemplateMetadata,omitempty"`
|
||||
// If true, then it will create new deployment for canary, such as: workload-demo-canary.
|
||||
// When user verifies that the canary version is ready, we will remove the canary deployment and release the deployment workload-demo in full.
|
||||
// Current only support k8s native deployment
|
||||
EnableExtraWorkloadForCanary bool `json:"enableExtraWorkloadForCanary"`
|
||||
}
|
||||
|
||||
type FinalizingPolicyType string
|
||||
|
||||
const (
|
||||
// WaitResumeFinalizingPolicyType will wait workload to be resumed, which means
|
||||
// controller will be hold at Finalizing phase util all pods of workload is upgraded.
|
||||
// WaitResumeFinalizingPolicyType only works in canary-style BatchRelease controller.
|
||||
WaitResumeFinalizingPolicyType FinalizingPolicyType = "WaitResume"
|
||||
// ImmediateFinalizingPolicyType will not to wait workload to be resumed.
|
||||
ImmediateFinalizingPolicyType FinalizingPolicyType = "Immediate"
|
||||
)
|
||||
|
||||
// ReleaseBatch is used to describe how each batch release should be
|
||||
type ReleaseBatch struct {
|
||||
// CanaryReplicas is the number of upgraded pods that should have in this batch.
|
||||
// it can be an absolute number (ex: 5) or a percentage of workload replicas.
|
||||
// batches[i].canaryReplicas should less than or equal to batches[j].canaryReplicas if i < j.
|
||||
CanaryReplicas intstr.IntOrString `json:"canaryReplicas"`
|
||||
}
|
||||
|
||||
// BatchReleaseStatus defines the observed state of a release plan
|
||||
type BatchReleaseStatus struct {
|
||||
// Conditions represents the observed process state of each phase during executing the release plan.
|
||||
Conditions []RolloutCondition `json:"conditions,omitempty"`
|
||||
// CanaryStatus describes the state of the canary rollout.
|
||||
CanaryStatus BatchReleaseCanaryStatus `json:"canaryStatus,omitempty"`
|
||||
// StableRevision is the pod-template-hash of stable revision pod template.
|
||||
StableRevision string `json:"stableRevision,omitempty"`
|
||||
// UpdateRevision is the pod-template-hash of update revision pod template.
|
||||
UpdateRevision string `json:"updateRevision,omitempty"`
|
||||
// ObservedGeneration is the most recent generation observed for this BatchRelease.
|
||||
// It corresponds to this BatchRelease's generation, which is updated on mutation
|
||||
// by the API Server, and only if BatchRelease Spec was changed, its generation will increase 1.
|
||||
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
|
||||
// ObservedRolloutID is the most recent rollout-id observed for this BatchRelease.
|
||||
// If RolloutID was changed, we will restart to roll out from batch 0,
|
||||
// to ensure the batch-id and rollout-id labels of Pods are correct.
|
||||
ObservedRolloutID string `json:"observedRolloutID,omitempty"`
|
||||
// ObservedWorkloadReplicas is observed replicas of target referenced workload.
|
||||
// This field is designed to deal with scaling event during rollout, if this field changed,
|
||||
// it means that the workload is scaling during rollout.
|
||||
ObservedWorkloadReplicas int32 `json:"observedWorkloadReplicas,omitempty"`
|
||||
// Count of hash collisions for creating canary Deployment. The controller uses this
|
||||
// field as a collision avoidance mechanism when it needs to create the name for the
|
||||
// newest canary Deployment.
|
||||
// +optional
|
||||
CollisionCount *int32 `json:"collisionCount,omitempty"`
|
||||
// ObservedReleasePlanHash is a hash code of observed itself spec.releasePlan.
|
||||
ObservedReleasePlanHash string `json:"observedReleasePlanHash,omitempty"`
|
||||
// Phase is the release plan phase, which indicates the current state of release
|
||||
// plan state machine in BatchRelease controller.
|
||||
Phase RolloutPhase `json:"phase,omitempty"`
|
||||
}
|
||||
|
||||
type BatchReleaseCanaryStatus struct {
|
||||
// CurrentBatchState indicates the release state of the current batch.
|
||||
CurrentBatchState BatchReleaseBatchStateType `json:"batchState,omitempty"`
|
||||
// The current batch the rollout is working on/blocked, it starts from 0
|
||||
CurrentBatch int32 `json:"currentBatch"`
|
||||
// BatchReadyTime is the ready timestamp of the current batch or the last batch.
|
||||
// This field is updated once a batch ready, and the batches[x].pausedSeconds
|
||||
// relies on this field to calculate the real-time duration.
|
||||
BatchReadyTime *metav1.Time `json:"batchReadyTime,omitempty"`
|
||||
// UpdatedReplicas is the number of upgraded Pods.
|
||||
UpdatedReplicas int32 `json:"updatedReplicas,omitempty"`
|
||||
// UpdatedReadyReplicas is the number upgraded Pods that have a Ready Condition.
|
||||
UpdatedReadyReplicas int32 `json:"updatedReadyReplicas,omitempty"`
|
||||
// the number of pods that no need to rollback in rollback scene.
|
||||
NoNeedUpdateReplicas *int32 `json:"noNeedUpdateReplicas,omitempty"`
|
||||
}
|
||||
|
||||
type BatchReleaseBatchStateType string
|
||||
|
||||
const (
|
||||
// UpgradingBatchState indicates that current batch is at upgrading pod state
|
||||
UpgradingBatchState BatchReleaseBatchStateType = "Upgrading"
|
||||
// VerifyingBatchState indicates that current batch is at verifying whether it's ready state
|
||||
VerifyingBatchState BatchReleaseBatchStateType = "Verifying"
|
||||
// ReadyBatchState indicates that current batch is at batch ready state
|
||||
ReadyBatchState BatchReleaseBatchStateType = "Ready"
|
||||
)
|
||||
|
||||
const (
|
||||
// RolloutPhasePreparing indicates a rollout is preparing for next progress.
|
||||
RolloutPhasePreparing RolloutPhase = "Preparing"
|
||||
// RolloutPhaseFinalizing indicates a rollout is finalizing
|
||||
RolloutPhaseFinalizing RolloutPhase = "Finalizing"
|
||||
// RolloutPhaseCompleted indicates a rollout is completed/cancelled/terminated
|
||||
RolloutPhaseCompleted RolloutPhase = "Completed"
|
||||
)
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
/*
|
||||
Copyright 2023 The Kruise 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
|
||||
|
||||
http://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.
|
||||
*/
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// +genclient
|
||||
// +k8s:openapi-gen=true
|
||||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:subresource:status
|
||||
// +kubebuilder:storageversion
|
||||
// +kubebuilder:printcolumn:name="KIND",type=string,JSONPath=`.spec.targetReference.workloadRef.kind`
|
||||
// +kubebuilder:printcolumn:name="PHASE",type=string,JSONPath=`.status.phase`
|
||||
// +kubebuilder:printcolumn:name="BATCH",type=integer,JSONPath=`.status.canaryStatus.currentBatch`
|
||||
// +kubebuilder:printcolumn:name="BATCH-STATE",type=string,JSONPath=`.status.canaryStatus.batchState`
|
||||
// +kubebuilder:printcolumn:name="AGE",type=date,JSONPath=".metadata.creationTimestamp"
|
||||
|
||||
type BatchRelease struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Spec BatchReleaseSpec `json:"spec,omitempty"`
|
||||
Status BatchReleaseStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// BatchReleaseSpec defines how to describe an update between different compRevision
|
||||
type BatchReleaseSpec struct {
|
||||
// WorkloadRef contains enough information to let you identify a workload for Rollout
|
||||
// Batch release of the bypass
|
||||
WorkloadRef ObjectRef `json:"workloadRef,omitempty"`
|
||||
// ReleasePlan is the details on how to rollout the resources
|
||||
ReleasePlan ReleasePlan `json:"releasePlan"`
|
||||
}
|
||||
|
||||
// BatchReleaseList contains a list of BatchRelease
|
||||
// +kubebuilder:object:root=true
|
||||
type BatchReleaseList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []BatchRelease `json:"items"`
|
||||
}
|
||||
|
||||
func init() {
|
||||
SchemeBuilder.Register(&BatchRelease{}, &BatchReleaseList{})
|
||||
}
|
||||
|
|
@ -37,6 +37,16 @@ const (
|
|||
// AdvancedDeploymentControlLabel is label for deployment,
|
||||
// which labels whether the deployment is controlled by advanced-deployment-controller.
|
||||
AdvancedDeploymentControlLabel = "rollouts.kruise.io/controlled-by-advanced-deployment-controller"
|
||||
|
||||
// OriginalDeploymentStrategyAnnotation is annotation for workload in BlueGreen Release,
|
||||
// it will store the original setting of the workload, which will be used to restore the workload
|
||||
OriginalDeploymentStrategyAnnotation = "rollouts.kruise.io/original-deployment-strategy"
|
||||
|
||||
// MaxProgressSeconds is the value we set for ProgressDeadlineSeconds
|
||||
// MaxReadySeconds is the value we set for MinReadySeconds, which is one less than ProgressDeadlineSeconds
|
||||
// MaxInt32: 2147483647, ≈ 68 years
|
||||
MaxProgressSeconds = 1<<31 - 1
|
||||
MaxReadySeconds = MaxProgressSeconds - 1
|
||||
)
|
||||
|
||||
// DeploymentStrategy is strategy field for Advanced Deployment
|
||||
|
|
@ -59,6 +69,8 @@ const (
|
|||
PartitionRollingStyle RollingStyleType = "Partition"
|
||||
// CanaryRollingStyle means rolling in canary way, and will create a canary Deployment.
|
||||
CanaryRollingStyle RollingStyleType = "Canary"
|
||||
// BlueGreenRollingStyle means rolling in blue-green way, and will NOT create a extra Deployment.
|
||||
BlueGreenRollingStyle RollingStyleType = "BlueGreen"
|
||||
)
|
||||
|
||||
// DeploymentExtraStatus is extra status field for Advanced Deployment
|
||||
|
|
@ -74,7 +86,7 @@ type DeploymentExtraStatus struct {
|
|||
}
|
||||
|
||||
func SetDefaultDeploymentStrategy(strategy *DeploymentStrategy) {
|
||||
if strategy.RollingStyle == CanaryRollingStyle {
|
||||
if strategy.RollingStyle != PartitionRollingStyle {
|
||||
return
|
||||
}
|
||||
if strategy.RollingUpdate == nil {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2023 The Kruise Authors.
|
||||
Copyright 2020 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
@ -14,8 +14,6 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
// +groupName=rollouts.kruise.io
|
||||
package v1beta1
|
||||
|
||||
func (*Rollout) Hub() {}
|
||||
|
||||
func (*BatchRelease) Hub() {}
|
||||
|
|
@ -17,6 +17,9 @@ limitations under the License.
|
|||
package v1beta1
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
apps "k8s.io/api/apps/v1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/util/intstr"
|
||||
|
|
@ -75,6 +78,115 @@ type RolloutStrategy struct {
|
|||
Paused bool `json:"paused,omitempty"`
|
||||
// +optional
|
||||
Canary *CanaryStrategy `json:"canary,omitempty"`
|
||||
// +optional
|
||||
BlueGreen *BlueGreenStrategy `json:"blueGreen,omitempty" protobuf:"bytes,1,opt,name=blueGreen"`
|
||||
}
|
||||
|
||||
// Get the rolling style based on the strategy
|
||||
func (r *RolloutStrategy) GetRollingStyle() RollingStyleType {
|
||||
if r.BlueGreen != nil {
|
||||
return BlueGreenRollingStyle
|
||||
}
|
||||
//NOTE - even EnableExtraWorkloadForCanary is true, as long as it is not Deployment,
|
||||
//we won't do canary release. BatchRelease will treat it as Partiton release
|
||||
if r.Canary.EnableExtraWorkloadForCanary {
|
||||
return CanaryRollingStyle
|
||||
}
|
||||
return PartitionRollingStyle
|
||||
}
|
||||
|
||||
// using single field EnableExtraWorkloadForCanary to distinguish partition-style from canary-style
|
||||
// is not enough, for example, a v1alaph1 Rollout can be converted to v1beta1 Rollout
|
||||
// with EnableExtraWorkloadForCanary set as true, even the objectRef is cloneset (which doesn't support canary release)
|
||||
func IsRealPartition(rollout *Rollout) bool {
|
||||
if rollout.Spec.Strategy.IsEmptyRelease() {
|
||||
return false
|
||||
}
|
||||
estimation := rollout.Spec.Strategy.GetRollingStyle()
|
||||
if estimation == BlueGreenRollingStyle {
|
||||
return false
|
||||
}
|
||||
targetRef := rollout.Spec.WorkloadRef
|
||||
if targetRef.APIVersion == apps.SchemeGroupVersion.String() && targetRef.Kind == reflect.TypeOf(apps.Deployment{}).Name() &&
|
||||
estimation == CanaryRollingStyle {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// r.GetRollingStyle() == BlueGreenRollingStyle
|
||||
func (r *RolloutStrategy) IsBlueGreenRelease() bool {
|
||||
return r.GetRollingStyle() == BlueGreenRollingStyle
|
||||
}
|
||||
|
||||
// r.GetRollingStyle() == CanaryRollingStyle || r.GetRollingStyle() == PartitionRollingStyle
|
||||
func (r *RolloutStrategy) IsCanaryStragegy() bool {
|
||||
return r.GetRollingStyle() == CanaryRollingStyle || r.GetRollingStyle() == PartitionRollingStyle
|
||||
}
|
||||
|
||||
func (r *RolloutStrategy) IsEmptyRelease() bool {
|
||||
return r.BlueGreen == nil && r.Canary == nil
|
||||
}
|
||||
|
||||
// Get the steps based on the rolling style
|
||||
func (r *RolloutStrategy) GetSteps() []CanaryStep {
|
||||
switch r.GetRollingStyle() {
|
||||
case BlueGreenRollingStyle:
|
||||
return r.BlueGreen.Steps
|
||||
case CanaryRollingStyle, PartitionRollingStyle:
|
||||
return r.Canary.Steps
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// Get the traffic routing based on the rolling style
|
||||
func (r *RolloutStrategy) GetTrafficRouting() []TrafficRoutingRef {
|
||||
switch r.GetRollingStyle() {
|
||||
case BlueGreenRollingStyle:
|
||||
return r.BlueGreen.TrafficRoutings
|
||||
case CanaryRollingStyle, PartitionRollingStyle:
|
||||
return r.Canary.TrafficRoutings
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// Check if there are traffic routings
|
||||
func (r *RolloutStrategy) HasTrafficRoutings() bool {
|
||||
return len(r.GetTrafficRouting()) > 0
|
||||
}
|
||||
|
||||
// Check the value of DisableGenerateCanaryService
|
||||
func (r *RolloutStrategy) DisableGenerateCanaryService() bool {
|
||||
switch r.GetRollingStyle() {
|
||||
case BlueGreenRollingStyle:
|
||||
return r.BlueGreen.DisableGenerateCanaryService
|
||||
case CanaryRollingStyle, PartitionRollingStyle:
|
||||
return r.Canary.DisableGenerateCanaryService
|
||||
default:
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
// BlueGreenStrategy defines parameters for Blue Green Release
|
||||
type BlueGreenStrategy struct {
|
||||
// Steps define the order of phases to execute release in batches(20%, 40%, 60%, 80%, 100%)
|
||||
// +optional
|
||||
Steps []CanaryStep `json:"steps,omitempty"`
|
||||
// TrafficRoutings support ingress, gateway api and custom network resource(e.g. istio, apisix) to enable more fine-grained traffic routing
|
||||
// and current only support one TrafficRouting
|
||||
TrafficRoutings []TrafficRoutingRef `json:"trafficRoutings,omitempty"`
|
||||
// FailureThreshold indicates how many failed pods can be tolerated in all upgraded pods.
|
||||
// Only when FailureThreshold are satisfied, Rollout can enter ready state.
|
||||
// If FailureThreshold is nil, Rollout will use the MaxUnavailable of workload as its
|
||||
// FailureThreshold.
|
||||
// Defaults to nil.
|
||||
FailureThreshold *intstr.IntOrString `json:"failureThreshold,omitempty"`
|
||||
// TrafficRoutingRef is TrafficRouting's Name
|
||||
TrafficRoutingRef string `json:"trafficRoutingRef,omitempty"`
|
||||
// canary service will not be generated if DisableGenerateCanaryService is true
|
||||
DisableGenerateCanaryService bool `json:"disableGenerateCanaryService,omitempty"`
|
||||
}
|
||||
|
||||
// CanaryStrategy defines parameters for a Replica Based Canary
|
||||
|
|
@ -101,6 +213,8 @@ type CanaryStrategy struct {
|
|||
EnableExtraWorkloadForCanary bool `json:"enableExtraWorkloadForCanary,omitempty"`
|
||||
// TrafficRoutingRef is TrafficRouting's Name
|
||||
TrafficRoutingRef string `json:"trafficRoutingRef,omitempty"`
|
||||
// canary service will not be generated if DisableGenerateCanaryService is true
|
||||
DisableGenerateCanaryService bool `json:"disableGenerateCanaryService,omitempty"`
|
||||
}
|
||||
|
||||
type PatchPodTemplateMetadata struct {
|
||||
|
|
@ -143,20 +257,48 @@ type TrafficRoutingStrategy struct {
|
|||
// my-header: bar
|
||||
//
|
||||
// +optional
|
||||
RequestHeaderModifier *gatewayv1beta1.HTTPRequestHeaderFilter `json:"requestHeaderModifier,omitempty"`
|
||||
// Matches define conditions used for matching the incoming HTTP requests to canary service.
|
||||
// Each match is independent, i.e. this rule will be matched if **any** one of the matches is satisfied.
|
||||
// If Gateway API, current only support one match.
|
||||
// And cannot support both weight and matches, if both are configured, then matches takes precedence.
|
||||
RequestHeaderModifier *gatewayv1beta1.HTTPHeaderFilter `json:"requestHeaderModifier,omitempty"`
|
||||
// Matches define conditions used for matching incoming HTTP requests to the canary service.
|
||||
// Each match is independent, i.e. this rule will be matched as long as **any** one of the matches is satisfied.
|
||||
//
|
||||
// It cannot support Traffic (weight-based routing) and Matches simultaneously, if both are configured.
|
||||
// In such cases, Matches takes precedence.
|
||||
Matches []HttpRouteMatch `json:"matches,omitempty"`
|
||||
}
|
||||
|
||||
type HttpRouteMatch struct {
|
||||
// Path specifies a HTTP request path matcher.
|
||||
// Supported list:
|
||||
// - Istio: https://istio.io/latest/docs/reference/config/networking/virtual-service/#HTTPMatchRequest
|
||||
// - GatewayAPI: If path is defined, the whole HttpRouteMatch will be used as a standalone matcher
|
||||
//
|
||||
// +optional
|
||||
Path *gatewayv1beta1.HTTPPathMatch `json:"path,omitempty"`
|
||||
|
||||
// Headers specifies HTTP request header matchers. Multiple match values are
|
||||
// ANDed together, meaning, a request must match all the specified headers
|
||||
// to select the route.
|
||||
//
|
||||
// +listType=map
|
||||
// +listMapKey=name
|
||||
// +optional
|
||||
// +kubebuilder:validation:MaxItems=16
|
||||
Headers []gatewayv1beta1.HTTPHeaderMatch `json:"headers,omitempty"`
|
||||
|
||||
// QueryParams specifies HTTP query parameter matchers. Multiple match
|
||||
// values are ANDed together, meaning, a request must match all the
|
||||
// specified query parameters to select the route.
|
||||
// Supported list:
|
||||
// - Istio: https://istio.io/latest/docs/reference/config/networking/virtual-service/#HTTPMatchRequest
|
||||
// - MSE Ingress: https://help.aliyun.com/zh/ack/ack-managed-and-ack-dedicated/user-guide/annotations-supported-by-mse-ingress-gateways-1
|
||||
// Header/Cookie > QueryParams
|
||||
// - Gateway API
|
||||
//
|
||||
// +listType=map
|
||||
// +listMapKey=name
|
||||
// +optional
|
||||
// +kubebuilder:validation:MaxItems=16
|
||||
QueryParams []gatewayv1beta1.HTTPQueryParamMatch `json:"queryParams,omitempty"`
|
||||
}
|
||||
|
||||
// RolloutPause defines a pause stage for a rollout
|
||||
|
|
@ -176,6 +318,9 @@ type RolloutStatus struct {
|
|||
// Canary describes the state of the canary rollout
|
||||
// +optional
|
||||
CanaryStatus *CanaryStatus `json:"canaryStatus,omitempty"`
|
||||
// BlueGreen describes the state of the blueGreen rollout
|
||||
// +optional
|
||||
BlueGreenStatus *BlueGreenStatus `json:"blueGreenStatus,omitempty"`
|
||||
// Conditions a list of conditions a rollout can have.
|
||||
// +optional
|
||||
Conditions []RolloutCondition `json:"conditions,omitempty"`
|
||||
|
|
@ -185,6 +330,10 @@ type RolloutStatus struct {
|
|||
Phase RolloutPhase `json:"phase,omitempty"`
|
||||
// Message provides details on why the rollout is in its current phase
|
||||
Message string `json:"message,omitempty"`
|
||||
// These two values will be synchronized with the same fileds in CanaryStatus or BlueGreeenStatus
|
||||
// mainly used to provide info for kubectl get command
|
||||
CurrentStepIndex int32 `json:"currentStepIndex"`
|
||||
CurrentStepState CanaryStepState `json:"currentStepState"`
|
||||
}
|
||||
|
||||
// RolloutCondition describes the state of a rollout at a certain point.
|
||||
|
|
@ -207,6 +356,8 @@ type RolloutCondition struct {
|
|||
type RolloutConditionType string
|
||||
|
||||
// These are valid conditions of a rollout.
|
||||
//
|
||||
//goland:noinspection GoUnusedConst
|
||||
const (
|
||||
// RolloutConditionProgressing means the rollout is progressing. Progress for a rollout is
|
||||
// considered when a new replica set is created or adopted, when pods scale
|
||||
|
|
@ -229,10 +380,26 @@ const (
|
|||
// Terminating Reason
|
||||
TerminatingReasonInTerminating = "InTerminating"
|
||||
TerminatingReasonCompleted = "Completed"
|
||||
|
||||
// Finalise Reason
|
||||
// Finalise when the last batch is released and all pods will update to new version
|
||||
FinaliseReasonSuccess = "Success"
|
||||
// Finalise when rollback detected
|
||||
FinaliseReasonRollback = "Rollback"
|
||||
// Finalise when Continuous Release detected
|
||||
FinaliseReasonContinuous = "Continuous"
|
||||
// Finalise when Rollout is disabling
|
||||
FinaliseReasonDisalbed = "RolloutDisabled"
|
||||
// Finalise when Rollout is deleting
|
||||
FinaliseReasonDelete = "RolloutDeleting"
|
||||
)
|
||||
|
||||
// CanaryStatus status fields that only pertain to the canary rollout
|
||||
type CanaryStatus struct {
|
||||
// fields in CommonStatus are shared between canary status and bluegreen status
|
||||
// if a field is accessed in strategy-agnostic way, e.g. accessed from rollout_progressing.go, or rollout_status.go
|
||||
// then it can be put into CommonStatus
|
||||
// if a field is only accessed in strategy-specific way, e.g. accessed from rollout_canary.go or rollout_bluegreen.go
|
||||
// then it should stay behind with CanaryStatus or BlueGreenStatus
|
||||
type CommonStatus struct {
|
||||
// observedWorkloadGeneration is the most recent generation observed for this Rollout ref workload generation.
|
||||
ObservedWorkloadGeneration int64 `json:"observedWorkloadGeneration,omitempty"`
|
||||
// ObservedRolloutID will record the newest spec.RolloutID if status.canaryRevision equals to workload.updateRevision
|
||||
|
|
@ -241,27 +408,129 @@ type CanaryStatus struct {
|
|||
RolloutHash string `json:"rolloutHash,omitempty"`
|
||||
// StableRevision indicates the revision of stable pods
|
||||
StableRevision string `json:"stableRevision,omitempty"`
|
||||
// pod template hash is used as service selector label
|
||||
PodTemplateHash string `json:"podTemplateHash"`
|
||||
// CurrentStepIndex defines the current step of the rollout is on.
|
||||
// +optional
|
||||
CurrentStepIndex int32 `json:"currentStepIndex"`
|
||||
// NextStepIndex defines the next step of the rollout is on.
|
||||
// In normal case, NextStepIndex is equal to CurrentStepIndex + 1
|
||||
// If the current step is the last step, NextStepIndex is equal to -1
|
||||
// Before the release, NextStepIndex is also equal to -1
|
||||
// 0 is not used and won't appear in any case
|
||||
// It is allowed to patch NextStepIndex by design,
|
||||
// e.g. if CurrentStepIndex is 2, user can patch NextStepIndex to 3 (if exists) to
|
||||
// achieve batch jump, or patch NextStepIndex to 1 to implement a re-execution of step 1
|
||||
// Patching it with a non-positive value is useless and meaningless, which will be corrected
|
||||
// in the next reconciliation
|
||||
NextStepIndex int32 `json:"nextStepIndex"`
|
||||
// FinalisingStep the step of finalising
|
||||
FinalisingStep FinalisingStepType `json:"finalisingStep"`
|
||||
CurrentStepState CanaryStepState `json:"currentStepState"`
|
||||
Message string `json:"message,omitempty"`
|
||||
LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"`
|
||||
}
|
||||
|
||||
// CanaryStatus status fields that only pertain to the canary rollout
|
||||
type CanaryStatus struct {
|
||||
// must be inline
|
||||
CommonStatus `json:",inline"`
|
||||
// CanaryRevision is calculated by rollout based on podTemplateHash, and the internal logic flow uses
|
||||
// It may be different from rs podTemplateHash in different k8s versions, so it cannot be used as service selector label
|
||||
CanaryRevision string `json:"canaryRevision"`
|
||||
// pod template hash is used as service selector label
|
||||
PodTemplateHash string `json:"podTemplateHash"`
|
||||
// CanaryReplicas the numbers of canary revision pods
|
||||
CanaryReplicas int32 `json:"canaryReplicas"`
|
||||
// CanaryReadyReplicas the numbers of ready canary revision pods
|
||||
CanaryReadyReplicas int32 `json:"canaryReadyReplicas"`
|
||||
// CurrentStepIndex defines the current step of the rollout is on. If the current step index is null, the
|
||||
// controller will execute the rollout.
|
||||
// +optional
|
||||
CurrentStepIndex int32 `json:"currentStepIndex"`
|
||||
CurrentStepState CanaryStepState `json:"currentStepState"`
|
||||
Message string `json:"message,omitempty"`
|
||||
LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"`
|
||||
}
|
||||
|
||||
// BlueGreenStatus status fields that only pertain to the blueGreen rollout
|
||||
type BlueGreenStatus struct {
|
||||
CommonStatus `json:",inline"`
|
||||
// UpdatedRevision is calculated by rollout based on podTemplateHash, and the internal logic flow uses
|
||||
// It may be different from rs podTemplateHash in different k8s versions, so it cannot be used as service selector label
|
||||
UpdatedRevision string `json:"updatedRevision"`
|
||||
// UpdatedReplicas the numbers of updated pods
|
||||
UpdatedReplicas int32 `json:"updatedReplicas"`
|
||||
// UpdatedReadyReplicas the numbers of updated ready pods
|
||||
UpdatedReadyReplicas int32 `json:"updatedReadyReplicas"`
|
||||
}
|
||||
|
||||
// GetSubStatus returns the ethier canary or bluegreen status
|
||||
func (r *RolloutStatus) GetSubStatus() *CommonStatus {
|
||||
if r.CanaryStatus == nil && r.BlueGreenStatus == nil {
|
||||
return nil
|
||||
}
|
||||
if r.CanaryStatus != nil {
|
||||
return &r.CanaryStatus.CommonStatus
|
||||
}
|
||||
return &r.BlueGreenStatus.CommonStatus
|
||||
}
|
||||
|
||||
func (r *RolloutStatus) IsSubStatusEmpty() bool {
|
||||
return r.CanaryStatus == nil && r.BlueGreenStatus == nil
|
||||
}
|
||||
|
||||
func (r *RolloutStatus) Clear() {
|
||||
r.CanaryStatus = nil
|
||||
r.BlueGreenStatus = nil
|
||||
}
|
||||
|
||||
//TODO - the following functions seem awkward, is there better way for our case?
|
||||
|
||||
func (r *RolloutStatus) GetCanaryRevision() string {
|
||||
if r.CanaryStatus != nil {
|
||||
return r.CanaryStatus.CanaryRevision
|
||||
}
|
||||
return r.BlueGreenStatus.UpdatedRevision
|
||||
}
|
||||
|
||||
func (r *RolloutStatus) SetCanaryRevision(revision string) {
|
||||
if r.CanaryStatus != nil {
|
||||
r.CanaryStatus.CanaryRevision = revision
|
||||
}
|
||||
if r.BlueGreenStatus != nil {
|
||||
r.BlueGreenStatus.UpdatedRevision = revision
|
||||
}
|
||||
}
|
||||
|
||||
func (r *RolloutStatus) GetCanaryReplicas() int32 {
|
||||
if r.CanaryStatus != nil {
|
||||
return r.CanaryStatus.CanaryReplicas
|
||||
}
|
||||
return r.BlueGreenStatus.UpdatedReplicas
|
||||
}
|
||||
|
||||
func (r *RolloutStatus) SetCanaryReplicas(replicas int32) {
|
||||
if r.CanaryStatus != nil {
|
||||
r.CanaryStatus.CanaryReplicas = replicas
|
||||
}
|
||||
if r.BlueGreenStatus != nil {
|
||||
r.BlueGreenStatus.UpdatedReplicas = replicas
|
||||
}
|
||||
}
|
||||
|
||||
func (r *RolloutStatus) GetCanaryReadyReplicas() int32 {
|
||||
if r.CanaryStatus != nil {
|
||||
return r.CanaryStatus.CanaryReadyReplicas
|
||||
}
|
||||
return r.BlueGreenStatus.UpdatedReadyReplicas
|
||||
}
|
||||
|
||||
func (r *RolloutStatus) SetCanaryReadyReplicas(replicas int32) {
|
||||
if r.CanaryStatus != nil {
|
||||
r.CanaryStatus.CanaryReadyReplicas = replicas
|
||||
}
|
||||
if r.BlueGreenStatus != nil {
|
||||
r.BlueGreenStatus.UpdatedReadyReplicas = replicas
|
||||
}
|
||||
}
|
||||
|
||||
type CanaryStepState string
|
||||
|
||||
const (
|
||||
// the first step, handle some special cases before step upgrade, to prevent traffic loss
|
||||
CanaryStepStateInit CanaryStepState = "BeforeStepUpgrade"
|
||||
CanaryStepStateUpgrade CanaryStepState = "StepUpgrade"
|
||||
CanaryStepStateTrafficRouting CanaryStepState = "StepTrafficRouting"
|
||||
CanaryStepStateMetricsAnalysis CanaryStepState = "StepMetricsAnalysis"
|
||||
|
|
@ -288,13 +557,39 @@ const (
|
|||
RolloutPhaseDisabling RolloutPhase = "Disabling"
|
||||
)
|
||||
|
||||
type FinalisingStepType string
|
||||
|
||||
//goland:noinspection GoUnusedConst
|
||||
const (
|
||||
// Route all traffic to new version (for bluegreen)
|
||||
FinalisingStepRouteTrafficToNew FinalisingStepType = "FinalisingStepRouteTrafficToNew"
|
||||
// Restore the GatewayAPI/Ingress/Istio
|
||||
FinalisingStepRouteTrafficToStable FinalisingStepType = "FinalisingStepRouteTrafficToStable"
|
||||
// Restore the stable Service, i.e. remove corresponding selector
|
||||
FinalisingStepRestoreStableService FinalisingStepType = "RestoreStableService"
|
||||
// Remove the Canary Service
|
||||
FinalisingStepRemoveCanaryService FinalisingStepType = "RemoveCanaryService"
|
||||
|
||||
// Patch Batch Release to scale down (exception: the canary Deployment will be
|
||||
// scaled down in FinalisingStepTypeDeleteBR step)
|
||||
// For Both BlueGreenStrategy and CanaryStrategy:
|
||||
// set workload.pause=false, set workload.partition=0
|
||||
FinalisingStepResumeWorkload FinalisingStepType = "ResumeWorkload"
|
||||
// Delete Batch Release
|
||||
FinalisingStepReleaseWorkloadControl FinalisingStepType = "ReleaseWorkloadControl"
|
||||
// All needed work done
|
||||
FinalisingStepTypeEnd FinalisingStepType = "END"
|
||||
// Only for debugging use
|
||||
FinalisingStepWaitEndless FinalisingStepType = "WaitEndless"
|
||||
)
|
||||
|
||||
// +genclient
|
||||
//+kubebuilder:object:root=true
|
||||
//+kubebuilder:subresource:status
|
||||
// +kubebuilder:storageversion
|
||||
// +kubebuilder:printcolumn:name="STATUS",type="string",JSONPath=".status.phase",description="The rollout status phase"
|
||||
// +kubebuilder:printcolumn:name="CANARY_STEP",type="integer",JSONPath=".status.canaryStatus.currentStepIndex",description="The rollout canary status step"
|
||||
// +kubebuilder:printcolumn:name="CANARY_STATE",type="string",JSONPath=".status.canaryStatus.currentStepState",description="The rollout canary status step state"
|
||||
// +kubebuilder:printcolumn:name="CANARY_STEP",type="integer",JSONPath=".status.currentStepIndex",description="The rollout canary status step"
|
||||
// +kubebuilder:printcolumn:name="CANARY_STATE",type="string",JSONPath=".status.currentStepState",description="The rollout canary status step state"
|
||||
// +kubebuilder:printcolumn:name="MESSAGE",type="string",JSONPath=".status.message",description="The rollout canary status message"
|
||||
// +kubebuilder:printcolumn:name="AGE",type=date,JSONPath=".metadata.creationTimestamp"
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ type TrafficRoutingRef struct {
|
|||
// Service holds the name of a service which selects pods with stable version and don't select any pods with canary version.
|
||||
Service string `json:"service"`
|
||||
// Optional duration in seconds the traffic provider(e.g. nginx ingress controller) consumes the service, ingress configuration changes gracefully.
|
||||
// +kubebuilder:default=3
|
||||
GracePeriodSeconds int32 `json:"gracePeriodSeconds,omitempty"`
|
||||
// Ingress holds Ingress specific configuration to route traffic, e.g. Nginx, Alb.
|
||||
Ingress *IngressTrafficRouting `json:"ingress,omitempty"`
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
//go:build !ignore_autogenerated
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
Copyright 2023 The Kruise Authors.
|
||||
Copyright 2024 The Kruise Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
|
@ -29,129 +28,51 @@ import (
|
|||
)
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *BatchRelease) DeepCopyInto(out *BatchRelease) {
|
||||
func (in *BlueGreenStatus) DeepCopyInto(out *BlueGreenStatus) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
in.CommonStatus.DeepCopyInto(&out.CommonStatus)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BatchRelease.
|
||||
func (in *BatchRelease) DeepCopy() *BatchRelease {
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlueGreenStatus.
|
||||
func (in *BlueGreenStatus) DeepCopy() *BlueGreenStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(BatchRelease)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *BatchRelease) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *BatchReleaseCanaryStatus) DeepCopyInto(out *BatchReleaseCanaryStatus) {
|
||||
*out = *in
|
||||
if in.BatchReadyTime != nil {
|
||||
in, out := &in.BatchReadyTime, &out.BatchReadyTime
|
||||
*out = (*in).DeepCopy()
|
||||
}
|
||||
if in.NoNeedUpdateReplicas != nil {
|
||||
in, out := &in.NoNeedUpdateReplicas, &out.NoNeedUpdateReplicas
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BatchReleaseCanaryStatus.
|
||||
func (in *BatchReleaseCanaryStatus) DeepCopy() *BatchReleaseCanaryStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(BatchReleaseCanaryStatus)
|
||||
out := new(BlueGreenStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *BatchReleaseList) DeepCopyInto(out *BatchReleaseList) {
|
||||
func (in *BlueGreenStrategy) DeepCopyInto(out *BlueGreenStrategy) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]BatchRelease, len(*in))
|
||||
if in.Steps != nil {
|
||||
in, out := &in.Steps, &out.Steps
|
||||
*out = make([]CanaryStep, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BatchReleaseList.
|
||||
func (in *BatchReleaseList) DeepCopy() *BatchReleaseList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(BatchReleaseList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *BatchReleaseList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *BatchReleaseSpec) DeepCopyInto(out *BatchReleaseSpec) {
|
||||
*out = *in
|
||||
out.WorkloadRef = in.WorkloadRef
|
||||
in.ReleasePlan.DeepCopyInto(&out.ReleasePlan)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BatchReleaseSpec.
|
||||
func (in *BatchReleaseSpec) DeepCopy() *BatchReleaseSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(BatchReleaseSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *BatchReleaseStatus) DeepCopyInto(out *BatchReleaseStatus) {
|
||||
*out = *in
|
||||
if in.Conditions != nil {
|
||||
in, out := &in.Conditions, &out.Conditions
|
||||
*out = make([]RolloutCondition, len(*in))
|
||||
if in.TrafficRoutings != nil {
|
||||
in, out := &in.TrafficRoutings, &out.TrafficRoutings
|
||||
*out = make([]TrafficRoutingRef, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
in.CanaryStatus.DeepCopyInto(&out.CanaryStatus)
|
||||
if in.CollisionCount != nil {
|
||||
in, out := &in.CollisionCount, &out.CollisionCount
|
||||
*out = new(int32)
|
||||
if in.FailureThreshold != nil {
|
||||
in, out := &in.FailureThreshold, &out.FailureThreshold
|
||||
*out = new(intstr.IntOrString)
|
||||
**out = **in
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BatchReleaseStatus.
|
||||
func (in *BatchReleaseStatus) DeepCopy() *BatchReleaseStatus {
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlueGreenStrategy.
|
||||
func (in *BlueGreenStrategy) DeepCopy() *BlueGreenStrategy {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(BatchReleaseStatus)
|
||||
out := new(BlueGreenStrategy)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
|
@ -159,10 +80,7 @@ func (in *BatchReleaseStatus) DeepCopy() *BatchReleaseStatus {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *CanaryStatus) DeepCopyInto(out *CanaryStatus) {
|
||||
*out = *in
|
||||
if in.LastUpdateTime != nil {
|
||||
in, out := &in.LastUpdateTime, &out.LastUpdateTime
|
||||
*out = (*in).DeepCopy()
|
||||
}
|
||||
in.CommonStatus.DeepCopyInto(&out.CommonStatus)
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CanaryStatus.
|
||||
|
|
@ -236,6 +154,25 @@ func (in *CanaryStrategy) DeepCopy() *CanaryStrategy {
|
|||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *CommonStatus) DeepCopyInto(out *CommonStatus) {
|
||||
*out = *in
|
||||
if in.LastUpdateTime != nil {
|
||||
in, out := &in.LastUpdateTime, &out.LastUpdateTime
|
||||
*out = (*in).DeepCopy()
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommonStatus.
|
||||
func (in *CommonStatus) DeepCopy() *CommonStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(CommonStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *DeploymentExtraStatus) DeepCopyInto(out *DeploymentExtraStatus) {
|
||||
*out = *in
|
||||
|
|
@ -295,6 +232,11 @@ func (in *GatewayTrafficRouting) DeepCopy() *GatewayTrafficRouting {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *HttpRouteMatch) DeepCopyInto(out *HttpRouteMatch) {
|
||||
*out = *in
|
||||
if in.Path != nil {
|
||||
in, out := &in.Path, &out.Path
|
||||
*out = new(apisv1beta1.HTTPPathMatch)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.Headers != nil {
|
||||
in, out := &in.Headers, &out.Headers
|
||||
*out = make([]apisv1beta1.HTTPHeaderMatch, len(*in))
|
||||
|
|
@ -302,6 +244,13 @@ func (in *HttpRouteMatch) DeepCopyInto(out *HttpRouteMatch) {
|
|||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.QueryParams != nil {
|
||||
in, out := &in.QueryParams, &out.QueryParams
|
||||
*out = make([]apisv1beta1.HTTPQueryParamMatch, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HttpRouteMatch.
|
||||
|
|
@ -373,57 +322,6 @@ func (in *PatchPodTemplateMetadata) DeepCopy() *PatchPodTemplateMetadata {
|
|||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ReleaseBatch) DeepCopyInto(out *ReleaseBatch) {
|
||||
*out = *in
|
||||
out.CanaryReplicas = in.CanaryReplicas
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReleaseBatch.
|
||||
func (in *ReleaseBatch) DeepCopy() *ReleaseBatch {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ReleaseBatch)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ReleasePlan) DeepCopyInto(out *ReleasePlan) {
|
||||
*out = *in
|
||||
if in.Batches != nil {
|
||||
in, out := &in.Batches, &out.Batches
|
||||
*out = make([]ReleaseBatch, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.BatchPartition != nil {
|
||||
in, out := &in.BatchPartition, &out.BatchPartition
|
||||
*out = new(int32)
|
||||
**out = **in
|
||||
}
|
||||
if in.FailureThreshold != nil {
|
||||
in, out := &in.FailureThreshold, &out.FailureThreshold
|
||||
*out = new(intstr.IntOrString)
|
||||
**out = **in
|
||||
}
|
||||
if in.PatchPodTemplateMetadata != nil {
|
||||
in, out := &in.PatchPodTemplateMetadata, &out.PatchPodTemplateMetadata
|
||||
*out = new(PatchPodTemplateMetadata)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReleasePlan.
|
||||
func (in *ReleasePlan) DeepCopy() *ReleasePlan {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ReleasePlan)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Rollout) DeepCopyInto(out *Rollout) {
|
||||
*out = *in
|
||||
|
|
@ -545,6 +443,11 @@ func (in *RolloutStatus) DeepCopyInto(out *RolloutStatus) {
|
|||
*out = new(CanaryStatus)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.BlueGreenStatus != nil {
|
||||
in, out := &in.BlueGreenStatus, &out.BlueGreenStatus
|
||||
*out = new(BlueGreenStatus)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.Conditions != nil {
|
||||
in, out := &in.Conditions, &out.Conditions
|
||||
*out = make([]RolloutCondition, len(*in))
|
||||
|
|
@ -572,6 +475,11 @@ func (in *RolloutStrategy) DeepCopyInto(out *RolloutStrategy) {
|
|||
*out = new(CanaryStrategy)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.BlueGreen != nil {
|
||||
in, out := &in.BlueGreen, &out.BlueGreen
|
||||
*out = new(BlueGreenStrategy)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RolloutStrategy.
|
||||
|
|
@ -624,7 +532,7 @@ func (in *TrafficRoutingStrategy) DeepCopyInto(out *TrafficRoutingStrategy) {
|
|||
}
|
||||
if in.RequestHeaderModifier != nil {
|
||||
in, out := &in.RequestHeaderModifier, &out.RequestHeaderModifier
|
||||
*out = new(apisv1beta1.HTTPRequestHeaderFilter)
|
||||
*out = new(apisv1beta1.HTTPHeaderFilter)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.Matches != nil {
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,179 @@
|
|||
package e2e
|
||||
|
||||
import (
|
||||
"context"
|
||||
"flag"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
rollouts "github.com/openkruise/kruise-rollout-api/client/clientset/versioned"
|
||||
"github.com/openkruise/kruise-rollout-api/rollouts/v1alpha1"
|
||||
"github.com/openkruise/kruise-rollout-api/rollouts/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/util/intstr"
|
||||
"k8s.io/client-go/tools/clientcmd"
|
||||
"k8s.io/client-go/util/homedir"
|
||||
)
|
||||
|
||||
var _ = Describe("Rollout E2E Tests", func() {
|
||||
var (
|
||||
clientset *rollouts.Clientset
|
||||
namespace = "default"
|
||||
)
|
||||
|
||||
var kubeconfig *string
|
||||
if home := homedir.HomeDir(); home != "" {
|
||||
kubeconfig = flag.String("kubeconfig", filepath.Join(home, ".kube", "config"), "(optional) absolute path to the kubeconfig file")
|
||||
} else {
|
||||
kubeconfig = flag.String("kubeconfig", "", "absolute path to the kubeconfig file")
|
||||
}
|
||||
flag.Parse()
|
||||
|
||||
config, err := clientcmd.BuildConfigFromFlags("", *kubeconfig)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
clientset, err = rollouts.NewForConfig(config)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
Context("v1beta1", func() {
|
||||
var rolloutDemo *v1beta1.Rollout
|
||||
|
||||
BeforeEach(func() {
|
||||
firststep := intstr.FromString("10%")
|
||||
|
||||
rolloutDemo = &v1beta1.Rollout{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "demo-rollout",
|
||||
},
|
||||
Spec: v1beta1.RolloutSpec{
|
||||
WorkloadRef: v1beta1.ObjectRef{
|
||||
APIVersion: "apps/v1",
|
||||
Kind: "Deployment",
|
||||
Name: "demo-deploy",
|
||||
},
|
||||
Strategy: v1beta1.RolloutStrategy{
|
||||
Canary: &v1beta1.CanaryStrategy{
|
||||
Steps: []v1beta1.CanaryStep{
|
||||
{
|
||||
Replicas: &firststep,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
It("should create a Rollout", func() {
|
||||
rollout := rolloutDemo.DeepCopy()
|
||||
rollout.Name = "test-create-v1beta1"
|
||||
result, err := clientset.RolloutsV1beta1().Rollouts(namespace).Create(context.TODO(), rollout, metav1.CreateOptions{})
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(result.Name).To(Equal(rollout.Name))
|
||||
})
|
||||
|
||||
It("should update a Rollout", func() {
|
||||
rollout := rolloutDemo.DeepCopy()
|
||||
rollout.Name = "test-update-v1beta1"
|
||||
result, err := clientset.RolloutsV1beta1().Rollouts(namespace).Create(context.TODO(), rollout, metav1.CreateOptions{})
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
result.Spec.Strategy.Canary.Steps[0].Replicas = &intstr.IntOrString{
|
||||
Type: intstr.String,
|
||||
StrVal: "20%",
|
||||
}
|
||||
updatedResult, err := clientset.RolloutsV1beta1().Rollouts(namespace).Update(context.TODO(), result, metav1.UpdateOptions{})
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(updatedResult.Spec.Strategy.Canary.Steps[0].Replicas.StrVal).To(Equal("20%"))
|
||||
})
|
||||
|
||||
It("should delete a Rollout", func() {
|
||||
rollout := rolloutDemo.DeepCopy()
|
||||
rollout.Name = "test-delete-v1beta1"
|
||||
result, err := clientset.RolloutsV1beta1().Rollouts(namespace).Create(context.TODO(), rollout, metav1.CreateOptions{})
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
err = clientset.RolloutsV1beta1().Rollouts(namespace).Delete(context.TODO(), result.Name, metav1.DeleteOptions{})
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
_, err = clientset.RolloutsV1beta1().Rollouts(namespace).Get(context.TODO(), result.Name, metav1.GetOptions{})
|
||||
Expect(err).To(HaveOccurred())
|
||||
})
|
||||
})
|
||||
|
||||
Context("v1alpha1", func() {
|
||||
var rolloutDemo *v1alpha1.Rollout
|
||||
|
||||
BeforeEach(func() {
|
||||
firststep := intstr.FromString("10%")
|
||||
|
||||
rolloutDemo = &v1alpha1.Rollout{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "test-create",
|
||||
Namespace: namespace,
|
||||
},
|
||||
Spec: v1alpha1.RolloutSpec{
|
||||
ObjectRef: v1alpha1.ObjectRef{
|
||||
WorkloadRef: &v1alpha1.WorkloadRef{
|
||||
APIVersion: "apps/v1",
|
||||
Kind: "Deployment",
|
||||
Name: "demo",
|
||||
},
|
||||
},
|
||||
Strategy: v1alpha1.RolloutStrategy{
|
||||
Canary: &v1alpha1.CanaryStrategy{
|
||||
Steps: []v1alpha1.CanaryStep{
|
||||
{
|
||||
Replicas: &firststep,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
It("should create a Rollout", func() {
|
||||
rollout := rolloutDemo.DeepCopy()
|
||||
rollout.Name = "test-create-v1alpha1"
|
||||
result, err := clientset.RolloutsV1alpha1().Rollouts(namespace).Create(context.TODO(), rollout, metav1.CreateOptions{})
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(result.Name).To(Equal(rollout.Name))
|
||||
})
|
||||
|
||||
It("should update a Rollout", func() {
|
||||
rollout := rolloutDemo.DeepCopy()
|
||||
rollout.Name = "test-update-v1alpha1"
|
||||
result, err := clientset.RolloutsV1alpha1().Rollouts(namespace).Create(context.TODO(), rollout, metav1.CreateOptions{})
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
result.Spec.Strategy.Canary.Steps[0].Replicas = &intstr.IntOrString{
|
||||
Type: intstr.String,
|
||||
StrVal: "20%",
|
||||
}
|
||||
updatedResult, err := clientset.RolloutsV1alpha1().Rollouts(namespace).Update(context.TODO(), result, metav1.UpdateOptions{})
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(updatedResult.Spec.Strategy.Canary.Steps[0].Replicas.StrVal).To(Equal("20%"))
|
||||
})
|
||||
|
||||
It("should delete a Rollout", func() {
|
||||
rollout := rolloutDemo.DeepCopy()
|
||||
rollout.Name = "test-delete-v1alpha1"
|
||||
result, err := clientset.RolloutsV1alpha1().Rollouts(namespace).Create(context.TODO(), rollout, metav1.CreateOptions{})
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
err = clientset.RolloutsV1alpha1().Rollouts(namespace).Delete(context.TODO(), result.Name, metav1.DeleteOptions{})
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
_, err = clientset.RolloutsV1alpha1().Rollouts(namespace).Get(context.TODO(), result.Name, metav1.GetOptions{})
|
||||
Expect(err).To(HaveOccurred())
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
func TestRolloutE2E(t *testing.T) {
|
||||
RegisterFailHandler(Fail)
|
||||
RunSpecs(t, "Rollout E2E Tests")
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
Copyright 2019 The Kubernetes 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
|
||||
|
||||
http://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.
|
||||
*/
|
||||
|
||||
/*
|
||||
Package conversion provides interface definitions that an API Type needs to
|
||||
implement for it to be supported by the generic conversion webhook handler
|
||||
defined under pkg/webhook/conversion.
|
||||
*/
|
||||
package conversion
|
||||
|
||||
import "k8s.io/apimachinery/pkg/runtime"
|
||||
|
||||
// Convertible defines capability of a type to convertible i.e. it can be converted to/from a hub type.
|
||||
type Convertible interface {
|
||||
runtime.Object
|
||||
ConvertTo(dst Hub) error
|
||||
ConvertFrom(src Hub) error
|
||||
}
|
||||
|
||||
// Hub marks that a given type is the hub type for conversion. This means that
|
||||
// all conversions will first convert to the hub type, then convert from the hub
|
||||
// type to the destination type. All types besides the hub type should implement
|
||||
// Convertible.
|
||||
type Hub interface {
|
||||
runtime.Object
|
||||
Hub()
|
||||
}
|
||||
Loading…
Reference in New Issue