Crds update (#2033)
* Add code generated using latest code-generator Signed-off-by: Sanket Sudake <sanketsudake@gmail.com> * Update client-go and respective dependencies to v0.19.2 Signed-off-by: Sanket Sudake <sanketsudake@gmail.com> * Upgrading CRD version Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com> * Minor changes Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com> * Resolved client-go calls as per new generated code Signed-off-by: Sanket Sudake <sanketsudake@gmail.com> * Function validations fix Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com> * Fix environment and package validations Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com> * Add basic validation to all CRDs Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com> * Remove CRD installation related code Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com> * Modify GHA for CRD installation Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com> * Fix Package and HTTPTrigger validations Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com> * Change Go version in CI to 1.15 Signed-off-by: Sanket Sudake <sanketsudake@gmail.com> * Style: kubebuilder marker change Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com> * Fix test with deprecated fields Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com> * Update kind node image to v1.16.15 in CI Signed-off-by: Sanket Sudake <sanketsudake@gmail.com> * Update kind node image to v1.19.11 in CI Signed-off-by: Sanket Sudake <sanketsudake@gmail.com> * Replace context Background with TODO for future implementation Signed-off-by: Sanket Sudake <sanketsudake@gmail.com> * Optimize initial CRD check code Signed-off-by: Sanket Sudake <sanketsudake@gmail.com> * Use Get call only to check CRDs Signed-off-by: Sanket Sudake <sanketsudake@gmail.com> * Add kustomize for CRD apply Signed-off-by: Sanket Sudake <sanketsudake@gmail.com> Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
co-authored by
Sanket Sudake
parent
a9c56e5bb2
commit
1e0baf5f6c
@@ -23,7 +23,7 @@ jobs:
|
||||
- name: setup go
|
||||
uses: actions/setup-go@v2.1.3
|
||||
with:
|
||||
go-version: '1.14.15'
|
||||
go-version: '1.15.12'
|
||||
|
||||
- name: Helm installation
|
||||
uses: Azure/setup-helm@v1
|
||||
@@ -63,6 +63,7 @@ jobs:
|
||||
- name: Build and Install Fission
|
||||
run: |
|
||||
kubectl create ns fission
|
||||
kubectl create -k crds/v1
|
||||
skaffold run -p kind-ci
|
||||
|
||||
- name: Build and Install Fission CLI
|
||||
|
||||
@@ -58,6 +58,8 @@ image-multiarch:
|
||||
docker buildx build --platform=$(PLATFORMS) -t $(REPO)/preupgradechecks:$(TAG) --push -f cmd/preupgradechecks/Dockerfile.fission-preupgradechecks .
|
||||
docker buildx build --platform=$(PLATFORMS) -t $(REPO)/reporter:$(TAG) --push -f cmd/reporter/Dockerfile.reporter .
|
||||
|
||||
manifests:
|
||||
controller-gen crd:trivialVersions=false,preserveUnknownFields=false paths=./pkg/apis/core/v1 output:crd:artifacts:config=crds/v1
|
||||
clean:
|
||||
@rm -f cmd/fission-bundle/fission-bundle
|
||||
@rm -f cmd/fission-cli/fission
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM golang:1.14-alpine as godep
|
||||
FROM golang:1.15-alpine as godep
|
||||
RUN apk add bash ca-certificates git gcc g++ libc-dev
|
||||
|
||||
ARG GOPKG=github.com/fission/fission
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM golang:1.14-alpine as godep
|
||||
FROM golang:1.15-alpine as godep
|
||||
RUN apk add bash ca-certificates git gcc g++ libc-dev
|
||||
|
||||
ARG GOPKG=github.com/fission/fission
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM golang:1.14-alpine as godep
|
||||
FROM golang:1.15-alpine as godep
|
||||
RUN apk add bash ca-certificates git gcc g++ libc-dev
|
||||
|
||||
ARG GOPKG=github.com/fission/fission
|
||||
|
||||
@@ -17,13 +17,14 @@ limitations under the License.
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
multierror "github.com/hashicorp/go-multierror"
|
||||
"github.com/pkg/errors"
|
||||
"go.uber.org/zap"
|
||||
"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"
|
||||
v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
|
||||
apiextensionsclient "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset"
|
||||
k8serrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -67,9 +68,9 @@ func makePreUpgradeTaskClient(logger *zap.Logger, fnPodNs, envBuilderNs string)
|
||||
|
||||
// GetFunctionCRD checks if function CRD is present on the cluster and returns it. It returns nil if not found
|
||||
// We can use this to find out if fission had been previously installed on this cluster too.
|
||||
func (client *PreUpgradeTaskClient) GetFunctionCRD() *v1beta1.CustomResourceDefinition {
|
||||
func (client *PreUpgradeTaskClient) GetFunctionCRD() *v1.CustomResourceDefinition {
|
||||
for i := 0; i < maxRetries; i++ {
|
||||
crd, err := client.apiExtClient.ApiextensionsV1beta1().CustomResourceDefinitions().Get(FunctionCRD, metav1.GetOptions{})
|
||||
crd, err := client.apiExtClient.ApiextensionsV1().CustomResourceDefinitions().Get(context.TODO(), FunctionCRD, metav1.GetOptions{})
|
||||
if err != nil && k8serrors.IsNotFound(err) {
|
||||
continue
|
||||
}
|
||||
@@ -102,7 +103,7 @@ func (client *PreUpgradeTaskClient) VerifyFunctionSpecReferences() {
|
||||
var fList *fv1.FunctionList
|
||||
|
||||
for i := 0; i < maxRetries; i++ {
|
||||
fList, err = client.fissionClient.CoreV1().Functions(metav1.NamespaceAll).List(metav1.ListOptions{})
|
||||
fList, err = client.fissionClient.CoreV1().Functions(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{})
|
||||
if err == nil {
|
||||
break
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM golang:1.14-alpine as godep
|
||||
FROM golang:1.15-alpine as godep
|
||||
RUN apk add bash ca-certificates git gcc g++ libc-dev
|
||||
|
||||
ARG GOPKG=github.com/fission/fission
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: canaryconfigs.fission.io
|
||||
|
||||
spec:
|
||||
conversion:
|
||||
strategy: None
|
||||
group: fission.io
|
||||
names:
|
||||
kind: CanaryConfig
|
||||
listKind: CanaryConfigList
|
||||
plural: canaryconfigs
|
||||
singular: canaryconfig
|
||||
preserveUnknownFields: true
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
served: true
|
||||
storage: true
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: CanaryConfig
|
||||
listKind: CanaryConfigList
|
||||
plural: canaryconfigs
|
||||
singular: canaryconfig
|
||||
conditions: []
|
||||
storedVersions:
|
||||
- v1
|
||||
@@ -1,120 +0,0 @@
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: environments.fission.io
|
||||
spec:
|
||||
conversion:
|
||||
strategy: None
|
||||
group: fission.io
|
||||
names:
|
||||
kind: Environment
|
||||
listKind: EnvironmentList
|
||||
plural: environments
|
||||
singular: environment
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: Environments are the language-specific runtime parts of Fission.
|
||||
An Environment contains just enough software to build and run a Fission
|
||||
Function.
|
||||
properties:
|
||||
spec:
|
||||
description: Specification of the desired behaviour of the Environment
|
||||
properties:
|
||||
allowAccessToExternalNetwork:
|
||||
description: To enable accessibility of external network for builder/function
|
||||
pod, set to 'true'.
|
||||
type: boolean
|
||||
allowedFunctionsPerContainer:
|
||||
description: 'Allowed functions per container. Allowed Values: single,
|
||||
multiple'
|
||||
type: string
|
||||
builder:
|
||||
description: (Optional) Builder is configuration for builder manager
|
||||
to launch environment builder to build source code into deployable
|
||||
binary.
|
||||
properties:
|
||||
command:
|
||||
description: (Optional) Default build command to run for this
|
||||
build environment.
|
||||
type: string
|
||||
container:
|
||||
description: |-
|
||||
(Optional) Container allows the modification of the deployed runtime container using the Kubernetes Container spec. Fission overrides the following fields: Name, Image (set to the Runtime.Image), TerminationMessagePath, ImagePullPolicy
|
||||
You can set either PodSpec or Container, but not both.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
image:
|
||||
description: Image for containing the language runtime.
|
||||
type: string
|
||||
podspec:
|
||||
description: |-
|
||||
(Optional) Podspec allows modification of deployed runtime pod with Kubernetes PodSpec.
|
||||
You can set either PodSpec or Container, but not both.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
type: object
|
||||
imagepullsecret:
|
||||
description: ImagePullSecret is the secret for Kubernetes to pull
|
||||
an image from a private registry.
|
||||
type: string
|
||||
keeparchive:
|
||||
description: KeepArchive is used by fetcher to determine if the extracted
|
||||
archive should be extracted. For compiled languages such as Java,
|
||||
it should be true
|
||||
type: boolean
|
||||
poolsize:
|
||||
description: The initial pool size for environment
|
||||
type: integer
|
||||
resources:
|
||||
description: The request and limit CPU/MEM resource setting for the
|
||||
pods of the function. Can be overridden at Function in case of newdeployment
|
||||
executor type
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
runtime:
|
||||
description: Runtime is configuration for running function, like container
|
||||
image etc.
|
||||
properties:
|
||||
container:
|
||||
description: |-
|
||||
(Optional) Container allows the modification of the deployed runtime container using the Kubernetes Container spec. Fission overrides the following fields: Name, Image (set to the Runtime.Image), TerminationMessagePath, ImagePullPolicy
|
||||
You can set either PodSpec or Container, but not both.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
image:
|
||||
description: Image for containing the language runtime.
|
||||
type: string
|
||||
podspec:
|
||||
description: |-
|
||||
(Optional) Podspec allows modification of deployed runtime pod with Kubernetes PodSpec.
|
||||
You can set either PodSpec or Container, but not both.
|
||||
More info for podspec:
|
||||
https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#podspec-v1-core
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
type: object
|
||||
terminationGracePeriod:
|
||||
description: The grace time for pod to perform connection draining
|
||||
before termination. The unit is in seconds.
|
||||
format: int64
|
||||
type: integer
|
||||
version:
|
||||
description: Version is the Environment API version
|
||||
type: integer
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: Environment
|
||||
listKind: EnvironmentList
|
||||
plural: environments
|
||||
singular: environment
|
||||
conditions: []
|
||||
storedVersions:
|
||||
- v1
|
||||
@@ -0,0 +1,81 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.5.0
|
||||
creationTimestamp: null
|
||||
name: canaryconfigs.fission.io
|
||||
spec:
|
||||
group: fission.io
|
||||
names:
|
||||
kind: CanaryConfig
|
||||
listKind: CanaryConfigList
|
||||
plural: canaryconfigs
|
||||
singular: canaryconfig
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: CanaryConfig is for canary deployment of two functions.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: CanaryConfigSpec defines the canary configuration spec
|
||||
properties:
|
||||
duration:
|
||||
description: 'Weight increment interval, string representation of time.Duration, ex : 1m, 2h, 2d (default: "2m")'
|
||||
type: string
|
||||
failureType:
|
||||
description: FailureType refers to the type of failure
|
||||
type: string
|
||||
failurethreshold:
|
||||
description: Threshold in percentage beyond which the new version of the function is considered unstable
|
||||
type: integer
|
||||
newfunction:
|
||||
description: New version of the function
|
||||
type: string
|
||||
oldfunction:
|
||||
description: Old stable version of the function
|
||||
type: string
|
||||
trigger:
|
||||
description: HTTP trigger that this config references
|
||||
type: string
|
||||
weightincrement:
|
||||
description: Weight increment step for function
|
||||
type: integer
|
||||
required:
|
||||
- newfunction
|
||||
- oldfunction
|
||||
- trigger
|
||||
type: object
|
||||
status:
|
||||
description: CanaryConfigStatus represents canary config status
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
required:
|
||||
- status
|
||||
type: object
|
||||
required:
|
||||
- metadata
|
||||
- spec
|
||||
- status
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,177 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.5.0
|
||||
creationTimestamp: null
|
||||
name: functions.fission.io
|
||||
spec:
|
||||
group: fission.io
|
||||
names:
|
||||
kind: Function
|
||||
listKind: FunctionList
|
||||
plural: functions
|
||||
shortNames:
|
||||
- fn
|
||||
singular: function
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: Function is function runs within environment runtime with given package and secrets/configmaps.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: FunctionSpec describes the contents of the function.
|
||||
properties:
|
||||
InvokeStrategy:
|
||||
description: InvokeStrategy is a set of controls which affect how function executes
|
||||
properties:
|
||||
ExecutionStrategy:
|
||||
description: ExecutionStrategy specifies low-level parameters for function execution, such as the number of instances.
|
||||
properties:
|
||||
ExecutorType:
|
||||
description: "ExecutorType is the executor type of a function used. Defaults to \"poolmgr\". \n Available value: - poolmgr - newdeploy"
|
||||
type: string
|
||||
MaxScale:
|
||||
description: This is only for newdeploy to set up maximum replicas of deployment.
|
||||
type: integer
|
||||
MinScale:
|
||||
description: This is only for newdeploy to set up minimum replicas of deployment.
|
||||
type: integer
|
||||
SpecializationTimeout:
|
||||
description: This is the timeout setting for executor to wait for pod specialization.
|
||||
type: integer
|
||||
TargetCPUPercent:
|
||||
description: This is only for newdeploy to set up target CPU utilization of HPA.
|
||||
type: integer
|
||||
type: object
|
||||
StrategyType:
|
||||
description: StrategyType is the strategy type of a function. Now it only supports 'execution'.
|
||||
type: string
|
||||
type: object
|
||||
concurrency:
|
||||
description: Maximum number of pods to be specialized which will serve requests This is optional. If not specified default value will be taken as 500
|
||||
type: integer
|
||||
configmaps:
|
||||
description: Reference to a list of configmaps.
|
||||
items:
|
||||
description: ConfigMapReference is a reference to a kubernetes configmap.
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
namespace:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- namespace
|
||||
type: object
|
||||
nullable: true
|
||||
type: array
|
||||
environment:
|
||||
description: Environment is the build and runtime environment that this function is associated with. An Environment with this name should exist, otherwise the function cannot be invoked.
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
namespace:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- namespace
|
||||
type: object
|
||||
functionTimeout:
|
||||
description: FunctionTimeout provides a maximum amount of duration within which a request for a particular function execution should be complete. This is optional. If not specified default value will be taken as 60s
|
||||
type: integer
|
||||
idletimeout:
|
||||
description: IdleTimeout specifies the length of time that a function is idle before the function pod(s) are eligible for deletion. If no traffic to the function is detected within the idle timeout, the executor will then recycle the function pod(s) to release resources.
|
||||
type: integer
|
||||
onceOnly:
|
||||
description: OnceOnly specifies if specialized pod will serve exactly one request in its lifetime and would be garbage collected after serving that one request This is optional. If not specified default value will be taken as false
|
||||
type: boolean
|
||||
package:
|
||||
description: Reference to a package containing deployment and optionally the source.
|
||||
properties:
|
||||
functionName:
|
||||
description: "FunctionName specifies a specific function within the package. This allows functions to share packages, by having different functions within the same package. \n Fission itself does not interpret this path. It is passed verbatim to build and runtime environments. \n This is optional: if unspecified, the environment has a default name."
|
||||
type: string
|
||||
packageref:
|
||||
description: Package reference
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
namespace:
|
||||
type: string
|
||||
resourceversion:
|
||||
description: Including resource version in the reference forces the function to be updated on package update, making it possible to cache the function based on its metadata.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
requestsPerPod:
|
||||
description: RequestsPerPod indicates the maximum number of concurrent requests that can be served by a specialized pod This is optional. If not specified default value will be taken as 1
|
||||
type: integer
|
||||
resources:
|
||||
description: cpu and memory resources as per K8S standards This is only for newdeploy to set up resource limitation when creating deployment for a function.
|
||||
properties:
|
||||
limits:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
|
||||
type: object
|
||||
requests:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
|
||||
type: object
|
||||
type: object
|
||||
secrets:
|
||||
description: Reference to a list of secrets.
|
||||
items:
|
||||
description: SecretReference is a reference to a kubernetes secret.
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
namespace:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- namespace
|
||||
type: object
|
||||
nullable: true
|
||||
type: array
|
||||
required:
|
||||
- InvokeStrategy
|
||||
- environment
|
||||
- package
|
||||
type: object
|
||||
required:
|
||||
- metadata
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
@@ -0,0 +1,103 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.5.0
|
||||
creationTimestamp: null
|
||||
name: httptriggers.fission.io
|
||||
spec:
|
||||
group: fission.io
|
||||
names:
|
||||
kind: HTTPTrigger
|
||||
listKind: HTTPTriggerList
|
||||
plural: httptriggers
|
||||
singular: httptrigger
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: HTTPTrigger is the trigger invokes user functions when receiving HTTP requests.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: HTTPTriggerSpec is for router to expose user functions at the given URL path.
|
||||
properties:
|
||||
createingress:
|
||||
description: If CreateIngress is true, router will create a ingress definition.
|
||||
type: boolean
|
||||
functionref:
|
||||
description: FunctionReference is a reference to the target function.
|
||||
properties:
|
||||
functionweights:
|
||||
additionalProperties:
|
||||
type: integer
|
||||
description: Function Reference by weight. this map contains function name as key and its weight as the value. This is for canary upgrade purpose.
|
||||
nullable: true
|
||||
type: object
|
||||
name:
|
||||
description: Name of the function.
|
||||
type: string
|
||||
type:
|
||||
description: 'Type indicates whether this function reference is by name or selector. For now, the only supported reference type is by "name". Future reference types: * Function by label or annotation * Branch or tag of a versioned function * A "rolling upgrade" from one version of a function to another Available value: - name - function-weights'
|
||||
type: string
|
||||
required:
|
||||
- functionweights
|
||||
- name
|
||||
- type
|
||||
type: object
|
||||
host:
|
||||
description: 'TODO: remove this field since we have IngressConfig already Deprecated: the original idea of this field is not for setting Ingress. Since we have IngressConfig now, remove Host after couple releases.'
|
||||
type: string
|
||||
ingressconfig:
|
||||
description: 'TODO: make IngressConfig a independent Fission resource IngressConfig for router to set up Ingress.'
|
||||
properties:
|
||||
annotations:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: Annotations will be add to metadata when creating Ingress.
|
||||
nullable: true
|
||||
type: object
|
||||
host:
|
||||
description: Host is for ingress controller to apply rules. If host is empty or "*", the rule applies to all inbound HTTP traffic.
|
||||
type: string
|
||||
path:
|
||||
description: Path is for path matching. The format of path depends on what ingress controller you used.
|
||||
type: string
|
||||
tls:
|
||||
description: TLS is for user to specify a Secret that contains TLS key and certificate. The domain name in the key and crt must match the value of Host field.
|
||||
type: string
|
||||
type: object
|
||||
method:
|
||||
description: HTTP method to access a function.
|
||||
type: string
|
||||
relativeurl:
|
||||
description: RelativeURL is the exposed URL for external client to access a function with.
|
||||
type: string
|
||||
required:
|
||||
- functionref
|
||||
- relativeurl
|
||||
type: object
|
||||
required:
|
||||
- metadata
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
@@ -0,0 +1,83 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.5.0
|
||||
creationTimestamp: null
|
||||
name: kuberneteswatchtriggers.fission.io
|
||||
spec:
|
||||
group: fission.io
|
||||
names:
|
||||
kind: KubernetesWatchTrigger
|
||||
listKind: KubernetesWatchTriggerList
|
||||
plural: kuberneteswatchtriggers
|
||||
singular: kuberneteswatchtrigger
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: KubernetesWatchTrigger watches kubernetes resource events and invokes functions.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: KubernetesWatchTriggerSpec defines spec of KuberenetesWatchTrigger
|
||||
properties:
|
||||
functionref:
|
||||
description: The reference to a function for kubewatcher to invoke with when receiving events.
|
||||
properties:
|
||||
functionweights:
|
||||
additionalProperties:
|
||||
type: integer
|
||||
description: Function Reference by weight. this map contains function name as key and its weight as the value. This is for canary upgrade purpose.
|
||||
nullable: true
|
||||
type: object
|
||||
name:
|
||||
description: Name of the function.
|
||||
type: string
|
||||
type:
|
||||
description: 'Type indicates whether this function reference is by name or selector. For now, the only supported reference type is by "name". Future reference types: * Function by label or annotation * Branch or tag of a versioned function * A "rolling upgrade" from one version of a function to another Available value: - name - function-weights'
|
||||
type: string
|
||||
required:
|
||||
- functionweights
|
||||
- name
|
||||
- type
|
||||
type: object
|
||||
labelselector:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: Resource labels
|
||||
type: object
|
||||
namespace:
|
||||
type: string
|
||||
type:
|
||||
description: Type of resource to watch (Pod, Service, etc.)
|
||||
type: string
|
||||
required:
|
||||
- functionref
|
||||
- namespace
|
||||
- type
|
||||
type: object
|
||||
required:
|
||||
- metadata
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
@@ -0,0 +1,114 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.5.0
|
||||
creationTimestamp: null
|
||||
name: messagequeuetriggers.fission.io
|
||||
spec:
|
||||
group: fission.io
|
||||
names:
|
||||
kind: MessageQueueTrigger
|
||||
listKind: MessageQueueTriggerList
|
||||
plural: messagequeuetriggers
|
||||
singular: messagequeuetrigger
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: MessageQueueTrigger invokes functions when messages arrive to certain topic that trigger subscribes to.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: MessageQueueTriggerSpec defines a binding from a topic in a message queue to a function.
|
||||
properties:
|
||||
contentType:
|
||||
description: Content type of payload
|
||||
type: string
|
||||
cooldownPeriod:
|
||||
description: The period to wait after the last trigger reported active before scaling the deployment back to 0
|
||||
format: int32
|
||||
type: integer
|
||||
errorTopic:
|
||||
description: Topic to collect error response sent from function
|
||||
type: string
|
||||
functionref:
|
||||
description: The reference to a function for message queue trigger to invoke with when receiving messages from subscribed topic.
|
||||
properties:
|
||||
functionweights:
|
||||
additionalProperties:
|
||||
type: integer
|
||||
description: Function Reference by weight. this map contains function name as key and its weight as the value. This is for canary upgrade purpose.
|
||||
nullable: true
|
||||
type: object
|
||||
name:
|
||||
description: Name of the function.
|
||||
type: string
|
||||
type:
|
||||
description: 'Type indicates whether this function reference is by name or selector. For now, the only supported reference type is by "name". Future reference types: * Function by label or annotation * Branch or tag of a versioned function * A "rolling upgrade" from one version of a function to another Available value: - name - function-weights'
|
||||
type: string
|
||||
required:
|
||||
- functionweights
|
||||
- name
|
||||
- type
|
||||
type: object
|
||||
maxReplicaCount:
|
||||
description: Maximum number of replicas KEDA will scale the deployment up to
|
||||
format: int32
|
||||
type: integer
|
||||
maxRetries:
|
||||
description: Maximum times for message queue trigger to retry
|
||||
type: integer
|
||||
messageQueueType:
|
||||
description: Type of message queue (NATS, Kafka, AzureQueue)
|
||||
type: string
|
||||
metadata:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: ScalerTrigger fields
|
||||
type: object
|
||||
minReplicaCount:
|
||||
description: Minimum number of replicas KEDA will scale the deployment down to
|
||||
format: int32
|
||||
type: integer
|
||||
mqtkind:
|
||||
description: Kind of Message Queue Trigger to be created, by default its fission
|
||||
type: string
|
||||
pollingInterval:
|
||||
description: The period to check each trigger source on every ScaledObject, and scale the deployment up or down accordingly
|
||||
format: int32
|
||||
type: integer
|
||||
respTopic:
|
||||
description: Topic for message queue trigger to sent response from function.
|
||||
type: string
|
||||
secret:
|
||||
description: Secret name
|
||||
type: string
|
||||
topic:
|
||||
description: Subscribed topic
|
||||
type: string
|
||||
required:
|
||||
- topic
|
||||
type: object
|
||||
required:
|
||||
- metadata
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
@@ -0,0 +1,127 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.5.0
|
||||
creationTimestamp: null
|
||||
name: packages.fission.io
|
||||
spec:
|
||||
group: fission.io
|
||||
names:
|
||||
kind: Package
|
||||
listKind: PackageList
|
||||
plural: packages
|
||||
shortNames:
|
||||
- pkg
|
||||
singular: package
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: Package Think of these as function-level images.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: PackageSpec includes source/deploy archives and the reference of environment to build the package.
|
||||
properties:
|
||||
buildcmd:
|
||||
description: BuildCommand is a custom build command that builder used to build the source archive.
|
||||
type: string
|
||||
deployment:
|
||||
description: Deployment is the deployable archive that environment runtime used to run user function.
|
||||
properties:
|
||||
checksum:
|
||||
description: Checksum ensures the integrity of packages referenced by URL. Ignored for literals.
|
||||
properties:
|
||||
sum:
|
||||
type: string
|
||||
type:
|
||||
description: ChecksumType specifies the checksum algorithm, such as sha256, used for a checksum.
|
||||
type: string
|
||||
type: object
|
||||
literal:
|
||||
description: Literal contents of the package. Can be used for encoding packages below TODO (256KB?) size.
|
||||
format: byte
|
||||
type: string
|
||||
type:
|
||||
description: 'Type defines how the package is specified: literal or URL. Available value: - literal - url'
|
||||
type: string
|
||||
url:
|
||||
description: URL references a package.
|
||||
type: string
|
||||
type: object
|
||||
environment:
|
||||
description: Environment is a reference to the environment for building source archive.
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
namespace:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- namespace
|
||||
type: object
|
||||
source:
|
||||
description: Source is the archive contains source code and dependencies file. If the package status is in PENDING state, builder manager will then notify builder to compile source and save the result as deployable archive.
|
||||
properties:
|
||||
checksum:
|
||||
description: Checksum ensures the integrity of packages referenced by URL. Ignored for literals.
|
||||
properties:
|
||||
sum:
|
||||
type: string
|
||||
type:
|
||||
description: ChecksumType specifies the checksum algorithm, such as sha256, used for a checksum.
|
||||
type: string
|
||||
type: object
|
||||
literal:
|
||||
description: Literal contents of the package. Can be used for encoding packages below TODO (256KB?) size.
|
||||
format: byte
|
||||
type: string
|
||||
type:
|
||||
description: 'Type defines how the package is specified: literal or URL. Available value: - literal - url'
|
||||
type: string
|
||||
url:
|
||||
description: URL references a package.
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- environment
|
||||
type: object
|
||||
status:
|
||||
description: Status indicates the build status of package.
|
||||
properties:
|
||||
buildlog:
|
||||
description: BuildLog stores build log during the compilation.
|
||||
type: string
|
||||
buildstatus:
|
||||
default: Pending
|
||||
description: BuildStatus is the package build status.
|
||||
type: string
|
||||
lastUpdateTimestamp:
|
||||
description: LastUpdateTimestamp will store the timestamp the package was last updated metav1.Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. https://github.com/kubernetes/apimachinery/blob/44bd77c24ef93cd3a5eb6fef64e514025d10d44e/pkg/apis/meta/v1/time.go#L26-L35
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- metadata
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
@@ -0,0 +1,75 @@
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.5.0
|
||||
creationTimestamp: null
|
||||
name: timetriggers.fission.io
|
||||
spec:
|
||||
group: fission.io
|
||||
names:
|
||||
kind: TimeTrigger
|
||||
listKind: TimeTriggerList
|
||||
plural: timetriggers
|
||||
singular: timetrigger
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: TimeTrigger invokes functions based on given cron schedule.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: TimeTriggerSpec invokes the specific function at a time or times specified by a cron string.
|
||||
properties:
|
||||
cron:
|
||||
description: Cron schedule
|
||||
type: string
|
||||
functionref:
|
||||
description: The reference to function
|
||||
properties:
|
||||
functionweights:
|
||||
additionalProperties:
|
||||
type: integer
|
||||
description: Function Reference by weight. this map contains function name as key and its weight as the value. This is for canary upgrade purpose.
|
||||
nullable: true
|
||||
type: object
|
||||
name:
|
||||
description: Name of the function.
|
||||
type: string
|
||||
type:
|
||||
description: 'Type indicates whether this function reference is by name or selector. For now, the only supported reference type is by "name". Future reference types: * Function by label or annotation * Branch or tag of a versioned function * A "rolling upgrade" from one version of a function to another Available value: - name - function-weights'
|
||||
type: string
|
||||
required:
|
||||
- functionweights
|
||||
- name
|
||||
- type
|
||||
type: object
|
||||
required:
|
||||
- cron
|
||||
- functionref
|
||||
type: object
|
||||
required:
|
||||
- metadata
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
@@ -1,163 +0,0 @@
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: functions.fission.io
|
||||
spec:
|
||||
conversion:
|
||||
strategy: None
|
||||
group: fission.io
|
||||
names:
|
||||
kind: Function
|
||||
listKind: FunctionList
|
||||
plural: functions
|
||||
singular: function
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: A Function is a code and a runtime environment which can be used
|
||||
to execute code
|
||||
properties:
|
||||
spec:
|
||||
description: Specification of the desired behaviour of the Function
|
||||
properties:
|
||||
InvokeStrategy:
|
||||
description: 'InvokeStrategy is a set of controls over how the function
|
||||
executes. It affects the performance and resource usage of the function.
|
||||
An InvokeStrategy is of one of two types: ExecutionStrategy, which
|
||||
controls low-level parameters such as which ExecutorType to use,
|
||||
when to autoscale, minimum and maximum number of running instances,
|
||||
etc.'
|
||||
properties:
|
||||
ExecutionStrategy:
|
||||
description: ExecutionStrategy specifies low-level parameters
|
||||
for function execution, such as the number of instances, scaling
|
||||
strategy etc.
|
||||
properties:
|
||||
ExecutorType:
|
||||
description: 'ExecutorType is the executor type of a function
|
||||
used. Defaults to poolmgr. Available value: poolmgr, newdeploy'
|
||||
type: string
|
||||
MaxScale:
|
||||
description: Only for newdeploy executor to set up maximum
|
||||
replicas of deployment.
|
||||
type: integer
|
||||
MinScale:
|
||||
description: Only for newdeploy executor to set up minimum
|
||||
replicas of deployment.
|
||||
type: integer
|
||||
SpecializationTimeout:
|
||||
description: Timeout setting for executor to wait for pod
|
||||
specialization.
|
||||
type: integer
|
||||
TargetCPUPercent:
|
||||
description: Only for newdeploy executor to set up target
|
||||
CPU utilization of HPA.
|
||||
type: integer
|
||||
type: object
|
||||
StrategyType:
|
||||
description: StrategyType is the strategy type of a function.
|
||||
type: string
|
||||
type: object
|
||||
concurrency:
|
||||
description: |-
|
||||
Concurrency specifies the maximum number of pods that can be specialized concurrently to serve requests.
|
||||
This is optional. If not specified default value will be taken as 500
|
||||
type: integer
|
||||
configmaps:
|
||||
items:
|
||||
description: Reference to a Kubernetes ConfigMap.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the ConfigMap to use
|
||||
type: string
|
||||
namespace:
|
||||
description: Namespace for corresponding ConfigMap
|
||||
type: string
|
||||
type: object
|
||||
nullable: true
|
||||
type: array
|
||||
environment:
|
||||
description: Reference to Fission Environment type custom resource.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the Environment to use
|
||||
type: string
|
||||
namespace:
|
||||
description: Namespace for corresponding Environment
|
||||
type: string
|
||||
type: object
|
||||
functionTimeout:
|
||||
description: |2-
|
||||
FunctionTimeout provides a maximum amount of duration within which a request for a particular function execution should be complete.
|
||||
This is optional. If not specified default value will be taken as 60s
|
||||
type: integer
|
||||
idletimeout:
|
||||
description: IdleTimeout specifies the length of time that a function
|
||||
is idle before the function pod(s) are eligible for deletion. If
|
||||
no traffic to the function is detected within the idle timeout,
|
||||
the executor will then recycle the function pod(s) to release resources.
|
||||
type: integer
|
||||
package:
|
||||
description: FunctionPackageRef includes the reference to the package.
|
||||
properties:
|
||||
functionName:
|
||||
description: FunctionName specifies a specific function within
|
||||
the package using the path and specific function and varies
|
||||
based on language/environment
|
||||
type: string
|
||||
packageref:
|
||||
description: Package Reference
|
||||
properties:
|
||||
name:
|
||||
description: Name of the Package to use
|
||||
type: string
|
||||
namespace:
|
||||
description: Namespace for corresponding Package
|
||||
type: string
|
||||
resourceversion:
|
||||
description: Including resource version in the reference forces
|
||||
the function to be updated on package update, making it
|
||||
possible to cache the function based on its metadata.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
requestsPerPod:
|
||||
description: |-
|
||||
RequestsPerPod indicates the maximum number of concurrent requests that can be served by a specialized pod.
|
||||
This is optional. If not specified default value will be taken as 1
|
||||
type: integer
|
||||
resources:
|
||||
description: ResourceRequirements describes the compute resource requirements.
|
||||
This is only for newdeploy to set up resource limitation when creating
|
||||
deployment for a function.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
secrets:
|
||||
items:
|
||||
description: Reference to a Kubernetes secret.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the secret to use
|
||||
type: string
|
||||
namespace:
|
||||
description: Namespace for corresponding secret
|
||||
type: string
|
||||
type: object
|
||||
nullable: true
|
||||
type: array
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: Function
|
||||
listKind: FunctionList
|
||||
plural: functions
|
||||
singular: function
|
||||
conditions: []
|
||||
storedVersions:
|
||||
- v1
|
||||
@@ -1,29 +0,0 @@
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: httptriggers.fission.io
|
||||
spec:
|
||||
conversion:
|
||||
strategy: None
|
||||
group: fission.io
|
||||
names:
|
||||
kind: HTTPTrigger
|
||||
listKind: HTTPTriggerList
|
||||
plural: httptriggers
|
||||
singular: httptrigger
|
||||
preserveUnknownFields: true
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
served: true
|
||||
storage: true
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: HTTPTrigger
|
||||
listKind: HTTPTriggerList
|
||||
plural: httptriggers
|
||||
singular: httptrigger
|
||||
conditions: []
|
||||
storedVersions:
|
||||
- v1
|
||||
@@ -1,29 +0,0 @@
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: kuberneteswatchtriggers.fission.io
|
||||
spec:
|
||||
conversion:
|
||||
strategy: None
|
||||
group: fission.io
|
||||
names:
|
||||
kind: KubernetesWatchTrigger
|
||||
listKind: KubernetesWatchTriggerList
|
||||
plural: kuberneteswatchtriggers
|
||||
singular: kuberneteswatchtrigger
|
||||
preserveUnknownFields: true
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
served: true
|
||||
storage: true
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: KubernetesWatchTrigger
|
||||
listKind: KubernetesWatchTriggerList
|
||||
plural: kuberneteswatchtriggers
|
||||
singular: kuberneteswatchtrigger
|
||||
conditions: []
|
||||
storedVersions:
|
||||
- v1
|
||||
@@ -0,0 +1,13 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
commonLabels:
|
||||
group: fission.io
|
||||
resources:
|
||||
- fission.io_canaryconfigs.yaml
|
||||
- fission.io_environments.yaml
|
||||
- fission.io_functions.yaml
|
||||
- fission.io_httptriggers.yaml
|
||||
- fission.io_kuberneteswatchtriggers.yaml
|
||||
- fission.io_messagequeuetriggers.yaml
|
||||
- fission.io_packages.yaml
|
||||
- fission.io_timetriggers.yaml
|
||||
@@ -1,29 +0,0 @@
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: messagequeuetriggers.fission.io
|
||||
spec:
|
||||
conversion:
|
||||
strategy: None
|
||||
group: fission.io
|
||||
names:
|
||||
kind: MessageQueueTrigger
|
||||
listKind: MessageQueueTriggerList
|
||||
plural: messagequeuetriggers
|
||||
singular: messagequeuetrigger
|
||||
preserveUnknownFields: true
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
served: true
|
||||
storage: true
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: MessageQueueTrigger
|
||||
listKind: MessageQueueTriggerList
|
||||
plural: messagequeuetriggers
|
||||
singular: messagequeuetrigger
|
||||
conditions: []
|
||||
storedVersions:
|
||||
- v1
|
||||
@@ -1,141 +0,0 @@
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: packages.fission.io
|
||||
spec:
|
||||
conversion:
|
||||
strategy: None
|
||||
group: fission.io
|
||||
names:
|
||||
kind: Package
|
||||
listKind: PackageList
|
||||
plural: packages
|
||||
singular: package
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: A Package is a Fission object containing a Deployment Archive
|
||||
and a Source Archive (if any). A Package also references a certain environment.
|
||||
properties:
|
||||
spec:
|
||||
description: Specification of the desired behaviour of the package.
|
||||
properties:
|
||||
buildcmd:
|
||||
description: BuildCommand is a custom build command that builder uses
|
||||
to build the source archive.
|
||||
type: string
|
||||
configmaps:
|
||||
items:
|
||||
description: Reference to a Kubernetes ConfigMap.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the ConfigMap to use
|
||||
type: string
|
||||
namespace:
|
||||
description: Namespace for corresponding ConfigMap
|
||||
type: string
|
||||
type: object
|
||||
nullable: true
|
||||
type: array
|
||||
deployment:
|
||||
description: Package contains or references a collection of source
|
||||
or binary files.
|
||||
properties:
|
||||
checksum:
|
||||
description: Checksum of package contents when the contents are
|
||||
stored outside the Package struct. Type is the checksum algorithm; sha256
|
||||
is the only currently supported one. Sum is hex encoded.
|
||||
properties:
|
||||
sum:
|
||||
description: ' Sum is hex encoded chechsum value.'
|
||||
type: string
|
||||
type:
|
||||
description: ChecksumType specifies the checksum algorithm,
|
||||
such as sha256, used for a checksum.
|
||||
type: string
|
||||
type: object
|
||||
literal:
|
||||
description: Literal contents of the package.
|
||||
format: byte
|
||||
type: string
|
||||
type:
|
||||
description: 'Type defines how the package is specified: literal
|
||||
or url.'
|
||||
type: string
|
||||
url:
|
||||
description: URL references a package.
|
||||
type: string
|
||||
type: object
|
||||
environment:
|
||||
description: Reference to Fission Environment type custom resource.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the Environment to use
|
||||
type: string
|
||||
namespace:
|
||||
description: Namespace for corresponding Environment
|
||||
type: string
|
||||
type: object
|
||||
source:
|
||||
description: Package contains or references a collection of source
|
||||
or binary files.
|
||||
properties:
|
||||
checksum:
|
||||
description: Checksum of package contents when the contents are
|
||||
stored outside the Package struct. Type is the checksum algorithm; sha256
|
||||
is the only currently supported one. Sum is hex encoded.
|
||||
properties:
|
||||
sum:
|
||||
description: ' Sum is hex encoded chechsum value.'
|
||||
type: string
|
||||
type:
|
||||
description: ChecksumType specifies the checksum algorithm,
|
||||
such as sha256, used for a checksum.
|
||||
type: string
|
||||
type: object
|
||||
literal:
|
||||
description: Literal contents of the package.
|
||||
format: byte
|
||||
type: string
|
||||
type:
|
||||
description: 'Type defines how the package is specified: literal
|
||||
or url.'
|
||||
type: string
|
||||
url:
|
||||
description: URL references a package.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
status:
|
||||
description: PackageStatus contains the build status of a package also
|
||||
the build log for examination.
|
||||
properties:
|
||||
buildlog:
|
||||
description: BuildCommand is a custom build command that builder used
|
||||
to build the source archive.
|
||||
type: string
|
||||
buildstatus:
|
||||
description: BuildStatus is the package build status.
|
||||
type: string
|
||||
lastUpdateTimestamp:
|
||||
description: LastUpdateTimestamp will store the timestamp the package
|
||||
was last updated metav1.Time is a wrapper around time.Time which
|
||||
supports correct marshaling to YAML and JSON.
|
||||
nullable: true
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: Package
|
||||
listKind: PackageList
|
||||
plural: packages
|
||||
singular: package
|
||||
conditions: []
|
||||
storedVersions:
|
||||
- v1
|
||||
@@ -1,28 +0,0 @@
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: timetriggers.fission.io
|
||||
spec:
|
||||
conversion:
|
||||
strategy: None
|
||||
group: fission.io
|
||||
names:
|
||||
kind: TimeTrigger
|
||||
listKind: TimeTriggerList
|
||||
plural: timetriggers
|
||||
singular: timetrigger
|
||||
preserveUnknownFields: true
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
served: true
|
||||
storage: true
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: TimeTrigger
|
||||
listKind: TimeTriggerList
|
||||
plural: timetriggers
|
||||
singular: timetrigger
|
||||
conditions: []
|
||||
storedVersions:
|
||||
- v1
|
||||
@@ -1,6 +1,6 @@
|
||||
module github.com/fission/fission
|
||||
|
||||
go 1.14
|
||||
go 1.15
|
||||
|
||||
require (
|
||||
contrib.go.opencensus.io/exporter/jaeger v0.1.0
|
||||
@@ -61,10 +61,10 @@ require (
|
||||
golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb
|
||||
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e // indirect
|
||||
gopkg.in/jcmturner/goidentity.v3 v3.0.0 // indirect
|
||||
k8s.io/api v0.17.2
|
||||
k8s.io/apiextensions-apiserver v0.17.2
|
||||
k8s.io/apimachinery v0.17.2
|
||||
k8s.io/client-go v0.17.2
|
||||
k8s.io/api v0.19.2
|
||||
k8s.io/apiextensions-apiserver v0.19.2
|
||||
k8s.io/apimachinery v0.19.2
|
||||
k8s.io/client-go v0.19.2
|
||||
k8s.io/klog v1.0.0
|
||||
k8s.io/metrics v0.17.2
|
||||
k8s.io/metrics v0.19.2
|
||||
)
|
||||
|
||||
@@ -5,9 +5,9 @@ cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSR
|
||||
cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=
|
||||
cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
|
||||
cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=
|
||||
cloud.google.com/go v0.46.3 h1:AVXDdKsrtX33oR9fbCMu/+c1o8Ofjq6Ku/MInaLVg5Y=
|
||||
cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=
|
||||
cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To=
|
||||
cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw=
|
||||
cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4=
|
||||
cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M=
|
||||
cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc=
|
||||
@@ -44,16 +44,20 @@ github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX
|
||||
github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs=
|
||||
github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
|
||||
github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=
|
||||
github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630=
|
||||
github.com/Azure/go-autorest/autorest v0.11.18 h1:90Y4srNYrwOtAgVo3ndrQkTYn6kf1Eg/AjTFJ8Is2aM=
|
||||
github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA=
|
||||
github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0=
|
||||
github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q=
|
||||
github.com/Azure/go-autorest/autorest/adal v0.9.13 h1:Mp5hbtOePIzM8pJVRa3YLrWWmZtoxRXqUEzCfJt3+/Q=
|
||||
github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M=
|
||||
github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA=
|
||||
github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g=
|
||||
github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw=
|
||||
github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74=
|
||||
github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
|
||||
github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
|
||||
github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM=
|
||||
github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk=
|
||||
github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k=
|
||||
github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc=
|
||||
@@ -148,7 +152,6 @@ github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7/go.mod h1:kR
|
||||
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
|
||||
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=
|
||||
github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc=
|
||||
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
@@ -156,13 +159,10 @@ github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7
|
||||
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||
github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
|
||||
github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
|
||||
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
|
||||
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
||||
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
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=
|
||||
@@ -172,7 +172,6 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm
|
||||
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
|
||||
github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c=
|
||||
github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko=
|
||||
github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||
github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
|
||||
github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
|
||||
github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
|
||||
@@ -194,8 +193,8 @@ github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 h1:YEetp8
|
||||
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
|
||||
github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc=
|
||||
github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
|
||||
github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e h1:p1yVGRW3nmb85p1Sh1ZJSDm4A4iKLS5QNbvUHMgGu/M=
|
||||
github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
|
||||
github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc=
|
||||
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/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
|
||||
github.com/emicklei/go-restful v2.9.6+incompatible h1:tfrHha8zJ01ywiOEC1miGY8st1/igzWB8OmvPgoYX7w=
|
||||
@@ -209,8 +208,8 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m
|
||||
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/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/evanphx/json-patch v4.2.0+incompatible h1:fUDGZCv/7iAN7u0puUVhvKCcsR6vRfwrJatElLBEf0I=
|
||||
github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
|
||||
github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses=
|
||||
github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
|
||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BHsljHzVlRcyQhjrss6TZTdY2VfCqZPbv5k3iBFa2ZQ=
|
||||
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
|
||||
@@ -245,6 +244,8 @@ github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2
|
||||
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
|
||||
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
|
||||
github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
|
||||
github.com/go-logr/logr v0.2.0 h1:QvGt2nLcHH0WK9orKa+ppBPAxREcH364nPUedEpK0TY=
|
||||
github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
|
||||
github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI=
|
||||
github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik=
|
||||
github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik=
|
||||
@@ -303,7 +304,6 @@ github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRx
|
||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
|
||||
github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
|
||||
github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls=
|
||||
github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
|
||||
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g=
|
||||
@@ -322,7 +322,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/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
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=
|
||||
@@ -352,9 +351,9 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
|
||||
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.3 h1:x95R7cp+rSeeqAMI2knLtQ0DKlaBhv2NrtrOvafPHRo=
|
||||
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI=
|
||||
github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
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/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||
@@ -371,10 +370,8 @@ 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/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d h1:7XGaL1e6bYS1yIonGp9761ExpPPV1ui0SAC59Yube9k=
|
||||
github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
|
||||
github.com/gophercloud/gophercloud v0.1.0 h1:P/nh25+rzXouhytV2pUHBb65fnds26Ghl8/391+sT5o=
|
||||
github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8=
|
||||
github.com/googleapis/gnostic v0.4.1 h1:DLJCy1n/vrD4HPjOvYcT8aYQXpPIzoRZONaYwyycI+I=
|
||||
github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg=
|
||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
|
||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
||||
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
|
||||
@@ -431,7 +428,6 @@ github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/J
|
||||
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
|
||||
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/imdario/mergo v0.3.5 h1:JboBksRwiiAJWvIYJVo46AfV+IAIKZpfrSzVKj42R4Q=
|
||||
github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
|
||||
github.com/imdario/mergo v0.3.9 h1:UauaLniWCFHWd+Jp9oCEkTBj8VO/9DKg3PV3VCNMDIg=
|
||||
github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
|
||||
@@ -490,10 +486,8 @@ github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHW
|
||||
github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8=
|
||||
github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=
|
||||
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
|
||||
github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68=
|
||||
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
||||
@@ -513,12 +507,11 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxv
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
|
||||
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
|
||||
github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
|
||||
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
@@ -555,8 +548,9 @@ github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2y
|
||||
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
|
||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
|
||||
github.com/mholt/archiver v0.0.0-20180417220235-e4ef56d48eb0 h1:581DnhoG2Q33rqM3X6Is+8agf17B2vlzV/H52/Xvcd0=
|
||||
github.com/mholt/archiver v0.0.0-20180417220235-e4ef56d48eb0/go.mod h1:Dh2dOXnSdiLxRiPoVfIr/fI1TwETms9B8CTWfeh7ROU=
|
||||
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
|
||||
@@ -571,16 +565,15 @@ github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS4
|
||||
github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
|
||||
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo=
|
||||
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 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
|
||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8=
|
||||
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/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
|
||||
@@ -609,8 +602,8 @@ github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:v
|
||||
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.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo=
|
||||
github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw=
|
||||
github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
|
||||
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
||||
github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME=
|
||||
@@ -641,7 +634,6 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA=
|
||||
github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
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/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
|
||||
@@ -677,7 +669,6 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O
|
||||
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
|
||||
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a h1:9ZKAASQSHhDYGoxY8uLVpewe1GDZ2vu2Tr/vTdVAkFQ=
|
||||
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M=
|
||||
github.com/robfig/cron v0.0.0-20180505203441-b41be1df6967 h1:x7xEyJDP7Hv3LVgvWhzioQqbC/KtuUhTigKlH/8ehhE=
|
||||
github.com/robfig/cron v0.0.0-20180505203441-b41be1df6967/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
|
||||
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
|
||||
@@ -685,7 +676,6 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR
|
||||
github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
|
||||
github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU=
|
||||
github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc=
|
||||
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
|
||||
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
||||
github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww=
|
||||
@@ -713,7 +703,7 @@ github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTd
|
||||
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
|
||||
github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
|
||||
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
|
||||
github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU=
|
||||
github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE=
|
||||
github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4=
|
||||
github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI=
|
||||
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
|
||||
@@ -723,13 +713,12 @@ github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn
|
||||
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||
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/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s=
|
||||
github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE=
|
||||
github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48=
|
||||
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
|
||||
github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
@@ -742,7 +731,7 @@ github.com/tinylib/msgp v1.1.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDW
|
||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
|
||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
|
||||
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
|
||||
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
|
||||
github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
|
||||
github.com/ulikunitz/xz v0.5.6/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8=
|
||||
github.com/ulikunitz/xz v0.5.9 h1:RsKRIA2MO8x56wkkcd3LbtcE/uMszhb6DpRf+3uwa3I=
|
||||
github.com/ulikunitz/xz v0.5.9/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
|
||||
@@ -762,9 +751,10 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
|
||||
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||
go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk=
|
||||
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg=
|
||||
go.etcd.io/bbolt v1.3.5 h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0=
|
||||
go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
|
||||
go.etcd.io/etcd v0.5.0-alpha.5.0.20200819165624-17cef6e3e9d5/go.mod h1:skWido08r9w6Lq/w70DO5XYIKMu4QFu1+4VsqLQuJy8=
|
||||
go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
|
||||
go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
|
||||
go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
|
||||
@@ -789,8 +779,6 @@ go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM=
|
||||
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
@@ -804,6 +792,7 @@ golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8U
|
||||
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200206161412-a0c6ece9d31a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
@@ -812,9 +801,7 @@ golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPh
|
||||
golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c h1:9HhBz5L/UjnK9XLtiZhYAdue5BVKep3PMmS2LuPDt8k=
|
||||
golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/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-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||
golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek=
|
||||
golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=
|
||||
@@ -846,7 +833,6 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB
|
||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
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=
|
||||
@@ -864,6 +850,7 @@ golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
|
||||
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
|
||||
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
@@ -871,7 +858,6 @@ golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLL
|
||||
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/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-20191004110552-13f9640d40b9/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=
|
||||
@@ -907,7 +893,6 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 h1:SQFwaSi55rU7vdNs9Yr0Z324VNlrF+0wMqRXT4St8ck=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
@@ -916,8 +901,6 @@ golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5h
|
||||
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190209173611-3b5209105503/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-20190221075227-b4e8571b14e0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
@@ -956,13 +939,13 @@ golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3 h1:kzM6+9dur93BcC2kVlYl34cHU+TYZLanmpSJHVMmL64=
|
||||
golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221 h1:/ZHdbVpdR/jk3g30/d4yUL0JU9kksj8+F/bnQUVLGDM=
|
||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
||||
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
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=
|
||||
@@ -982,7 +965,6 @@ golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGm
|
||||
golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/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-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
@@ -996,11 +978,11 @@ golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgw
|
||||
golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
||||
golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
@@ -1026,6 +1008,7 @@ golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWc
|
||||
golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20200616133436-c1934b75d054/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
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=
|
||||
@@ -1039,9 +1022,6 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T
|
||||
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=
|
||||
gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0=
|
||||
gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw=
|
||||
gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmKJ7gzohV1XkqsFehRA2FbsbkopSuQ=
|
||||
google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=
|
||||
google.golang.org/api v0.3.2/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=
|
||||
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
|
||||
@@ -1100,9 +1080,9 @@ google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6D
|
||||
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
|
||||
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.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
|
||||
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
|
||||
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
|
||||
google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
@@ -1127,7 +1107,7 @@ gopkg.in/DataDog/dd-trace-go.v1 v1.27.1/go.mod h1:Sp1lku8WJMvNV0kjDI4Ni/T7J/U3BO
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
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=
|
||||
@@ -1169,6 +1149,7 @@ gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclp
|
||||
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
|
||||
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
|
||||
gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk=
|
||||
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
@@ -1178,38 +1159,36 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt
|
||||
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 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8=
|
||||
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||
k8s.io/api v0.17.2 h1:NF1UFXcKN7/OOv1uxdRz3qfra8AHsPav5M93hlV9+Dc=
|
||||
k8s.io/api v0.17.2/go.mod h1:BS9fjjLc4CMuqfSO8vgbHPKMt5+SF0ET6u/RVDihTo4=
|
||||
k8s.io/apiextensions-apiserver v0.17.2 h1:cP579D2hSZNuO/rZj9XFRzwJNYb41DbNANJb6Kolpss=
|
||||
k8s.io/apiextensions-apiserver v0.17.2/go.mod h1:4KdMpjkEjjDI2pPfBA15OscyNldHWdBCfsWMDWAmSTs=
|
||||
k8s.io/apimachinery v0.17.2 h1:hwDQQFbdRlpnnsR64Asdi55GyCaIP/3WQpMmbNBeWr4=
|
||||
k8s.io/apimachinery v0.17.2/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg=
|
||||
k8s.io/apiserver v0.17.2/go.mod h1:lBmw/TtQdtxvrTk0e2cgtOxHizXI+d0mmGQURIHQZlo=
|
||||
k8s.io/client-go v0.17.2 h1:ndIfkfXEGrNhLIgkr0+qhRguSD3u6DCmonepn1O6NYc=
|
||||
k8s.io/client-go v0.17.2/go.mod h1:QAzRgsa0C2xl4/eVpeVAZMvikCn8Nm81yqVx3Kk9XYI=
|
||||
k8s.io/code-generator v0.17.2/go.mod h1:DVmfPQgxQENqDIzVR2ddLXMH34qeszkKSdH/N+s+38s=
|
||||
k8s.io/component-base v0.17.2/go.mod h1:zMPW3g5aH7cHJpKYQ/ZsGMcgbsA/VyhEugF3QT1awLs=
|
||||
k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
|
||||
k8s.io/gengo v0.0.0-20190822140433-26a664648505/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
|
||||
k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
|
||||
k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
|
||||
k8s.io/api v0.19.2 h1:q+/krnHWKsL7OBZg/rxnycsl9569Pud76UJ77MvKXms=
|
||||
k8s.io/api v0.19.2/go.mod h1:IQpK0zFQ1xc5iNIQPqzgoOwuFugaYHK4iCknlAQP9nI=
|
||||
k8s.io/apiextensions-apiserver v0.19.2 h1:oG84UwiDsVDu7dlsGQs5GySmQHCzMhknfhFExJMz9tA=
|
||||
k8s.io/apiextensions-apiserver v0.19.2/go.mod h1:EYNjpqIAvNZe+svXVx9j4uBaVhTB4C94HkY3w058qcg=
|
||||
k8s.io/apimachinery v0.19.2 h1:5Gy9vQpAGTKHPVOh5c4plE274X8D/6cuEiTO2zve7tc=
|
||||
k8s.io/apimachinery v0.19.2/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA=
|
||||
k8s.io/apiserver v0.19.2/go.mod h1:FreAq0bJ2vtZFj9Ago/X0oNGC51GfubKK/ViOKfVAOA=
|
||||
k8s.io/client-go v0.19.2 h1:gMJuU3xJZs86L1oQ99R4EViAADUPMHHtS9jFshasHSc=
|
||||
k8s.io/client-go v0.19.2/go.mod h1:S5wPhCqyDNAlzM9CnEdgTGV4OqhsW3jGO1UM1epwfJA=
|
||||
k8s.io/code-generator v0.19.2/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk=
|
||||
k8s.io/component-base v0.19.2/go.mod h1:g5LrsiTiabMLZ40AR6Hl45f088DevyGY+cCE2agEIVo=
|
||||
k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
|
||||
k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
|
||||
k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8=
|
||||
k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
|
||||
k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a h1:UcxjrRMyNx/i/y8G7kPvLyy7rfbeuf1PYyBf973pgyU=
|
||||
k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E=
|
||||
k8s.io/metrics v0.17.2 h1:cuN1ScyUS9/tj4YFI8d0/7yO0BveFHhyQpPNWS8uLr8=
|
||||
k8s.io/metrics v0.17.2/go.mod h1:3TkNHET4ROd+NfzNxkjoVfQ0Ob4iZnaHmSEA4vYpwLw=
|
||||
k8s.io/utils v0.0.0-20191114184206-e782cd3c129f h1:GiPwtSzdP43eI1hpPCbROQCCIgCuiMMNF8YUVLF3vJo=
|
||||
k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
|
||||
modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw=
|
||||
modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk=
|
||||
modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k=
|
||||
modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs=
|
||||
modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I=
|
||||
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
|
||||
k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A=
|
||||
k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
|
||||
k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6 h1:+WnxoVtG8TMiudHBSEtrVL1egv36TkkJm+bA8AxicmQ=
|
||||
k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o=
|
||||
k8s.io/metrics v0.19.2 h1:rpfp7VDWvc6hnF9keM23+3NIkqTlgG0qF2/Xhp3q2DA=
|
||||
k8s.io/metrics v0.19.2/go.mod h1:IlLaAGXN0q7yrtB+SV0q3JIraf6VtlDr+iuTcX21fCU=
|
||||
k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K8Hf8whTseBgJcg=
|
||||
k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
||||
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/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI=
|
||||
sigs.k8s.io/structured-merge-diff v1.0.1-0.20191108220359-b1b620dd3f06/go.mod h1:/ULNhyfzRopfcjskuui0cTITekDduZ7ycKN3oUT9R18=
|
||||
sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=
|
||||
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.9/go.mod h1:dzAXnQbTRyDlZPJX2SUPEqvnB+j7AJjtlox7PEwigU0=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.0.1 h1:YXTMot5Qz/X1iBRJhAt+vI+HVttY0WkSqqhKxQ0xVbA=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
|
||||
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
|
||||
sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=
|
||||
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
|
||||
|
||||
@@ -8,7 +8,7 @@ kind: Cluster
|
||||
apiVersion: kind.x-k8s.io/v1alpha4
|
||||
nodes:
|
||||
- role: control-plane
|
||||
image: kindest/node:v1.16.4
|
||||
image: kindest/node:v1.19.11
|
||||
kubeadmConfigPatches:
|
||||
- |
|
||||
kind: InitConfiguration
|
||||
|
||||
+108
-20
@@ -38,9 +38,11 @@ import (
|
||||
|
||||
type (
|
||||
|
||||
// Packages. Think of these as function-level images.
|
||||
// Package Think of these as function-level images.
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:resource:singular="package",scope="Namespaced",shortName={pkg}
|
||||
Package struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata"`
|
||||
@@ -48,11 +50,13 @@ type (
|
||||
Spec PackageSpec `json:"spec"`
|
||||
|
||||
// Status indicates the build status of package.
|
||||
//+optional
|
||||
Status PackageStatus `json:"status"`
|
||||
}
|
||||
|
||||
// PackageList is a list of Packages.
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +kubebuilder:object:root=true
|
||||
PackageList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata"`
|
||||
@@ -62,6 +66,9 @@ type (
|
||||
// Function is function runs within environment runtime with given package and secrets/configmaps.
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:subresource:status
|
||||
// +kubebuilder:resource:singular="function",scope="Namespaced",shortName={fn}
|
||||
Function struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata"`
|
||||
@@ -70,6 +77,7 @@ type (
|
||||
|
||||
// FunctionList is a list of Functions.
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
//+kubebuilder:object:root=true
|
||||
FunctionList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata"`
|
||||
@@ -79,6 +87,8 @@ type (
|
||||
// Environment is environment for building and running user functions.
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:subresource:status
|
||||
Environment struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata"`
|
||||
@@ -87,6 +97,7 @@ type (
|
||||
|
||||
// EnvironmentList is a list of Environments.
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
//+kubebuilder:object:root=true
|
||||
EnvironmentList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata"`
|
||||
@@ -96,6 +107,8 @@ type (
|
||||
// HTTPTrigger is the trigger invokes user functions when receiving HTTP requests.
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:subresource:status
|
||||
HTTPTrigger struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata"`
|
||||
@@ -104,6 +117,7 @@ type (
|
||||
|
||||
// HTTPTriggerList is a list of HTTPTriggers
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
//+kubebuilder:object:root=true
|
||||
HTTPTriggerList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata"`
|
||||
@@ -113,6 +127,8 @@ type (
|
||||
// KubernetesWatchTrigger watches kubernetes resource events and invokes functions.
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:subresource:status
|
||||
KubernetesWatchTrigger struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata"`
|
||||
@@ -121,6 +137,7 @@ type (
|
||||
|
||||
// KubernetesWatchTriggerList is a list of KubernetesWatchTriggers
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +kubebuilder:object:root=true
|
||||
KubernetesWatchTriggerList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata"`
|
||||
@@ -130,6 +147,8 @@ type (
|
||||
// TimeTrigger invokes functions based on given cron schedule.
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +kubebuilder:object:root=true
|
||||
// +kubebuilder:subresource:status
|
||||
TimeTrigger struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata"`
|
||||
@@ -139,6 +158,7 @@ type (
|
||||
|
||||
// TimeTriggerList is a list of TimeTriggers.
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +kubebuilder:object:root=true
|
||||
TimeTriggerList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata"`
|
||||
@@ -149,6 +169,7 @@ type (
|
||||
// MessageQueueTrigger invokes functions when messages arrive to certain topic that trigger subscribes to.
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +kubebuilder:object:root=true
|
||||
MessageQueueTrigger struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata"`
|
||||
@@ -158,6 +179,7 @@ type (
|
||||
|
||||
// MessageQueueTriggerList is a list of MessageQueueTriggers.
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +kubebuilder:object:root=true
|
||||
MessageQueueTriggerList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata"`
|
||||
@@ -167,6 +189,7 @@ type (
|
||||
// CanaryConfig is for canary deployment of two functions.
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +kubebuilder:object:root=true
|
||||
CanaryConfig struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata"`
|
||||
@@ -176,6 +199,7 @@ type (
|
||||
|
||||
// CanaryConfigList is a list of CanaryConfigs.
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +kubebuilder:object:root=true
|
||||
CanaryConfigList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ListMeta `json:"metadata"`
|
||||
@@ -205,24 +229,28 @@ type (
|
||||
// externally.
|
||||
ArchiveType string
|
||||
|
||||
// Package contains or references a collection of source or
|
||||
// Archive contains or references a collection of source or
|
||||
// binary files.
|
||||
Archive struct {
|
||||
// Type defines how the package is specified: literal or URL.
|
||||
// Available value:
|
||||
// - literal
|
||||
// - url
|
||||
// +optional
|
||||
Type ArchiveType `json:"type,omitempty"`
|
||||
|
||||
// Literal contents of the package. Can be used for
|
||||
// encoding packages below TODO (256KB?) size.
|
||||
// +optional
|
||||
Literal []byte `json:"literal,omitempty"`
|
||||
|
||||
// URL references a package.
|
||||
// +optional
|
||||
URL string `json:"url,omitempty"`
|
||||
|
||||
// Checksum ensures the integrity of packages
|
||||
// referenced by URL. Ignored for literals.
|
||||
// +optional
|
||||
Checksum Checksum `json:"checksum,omitempty"`
|
||||
}
|
||||
|
||||
@@ -255,12 +283,15 @@ type (
|
||||
// Source is the archive contains source code and dependencies file.
|
||||
// If the package status is in PENDING state, builder manager will then
|
||||
// notify builder to compile source and save the result as deployable archive.
|
||||
// +optional
|
||||
Source Archive `json:"source,omitempty"`
|
||||
|
||||
// Deployment is the deployable archive that environment runtime used to run user function.
|
||||
// +optional
|
||||
Deployment Archive `json:"deployment,omitempty"`
|
||||
|
||||
// BuildCommand is a custom build command that builder used to build the source archive.
|
||||
// +optional
|
||||
BuildCommand string `json:"buildcmd,omitempty"`
|
||||
|
||||
// In the future, we can have a debug build here too
|
||||
@@ -272,21 +303,27 @@ type (
|
||||
// is ready for deploy instead of setting "none" in build status.
|
||||
|
||||
// BuildStatus is the package build status.
|
||||
// +kubebuilder:default:="Pending"
|
||||
BuildStatus BuildStatus `json:"buildstatus,omitempty"`
|
||||
|
||||
// BuildLog stores build log during the compilation.
|
||||
// +optional
|
||||
BuildLog string `json:"buildlog,omitempty"` // output of the build (errors etc)
|
||||
|
||||
// LastUpdateTimestamp will store the timestamp the package was last updated
|
||||
// metav1.Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON.
|
||||
// https://github.com/kubernetes/apimachinery/blob/44bd77c24ef93cd3a5eb6fef64e514025d10d44e/pkg/apis/meta/v1/time.go#L26-L35
|
||||
// +optional
|
||||
// +nullable
|
||||
LastUpdateTimestamp metav1.Time `json:"lastUpdateTimestamp,omitempty"`
|
||||
}
|
||||
|
||||
// PackageRef is a reference to the package.
|
||||
PackageRef struct {
|
||||
// +optional
|
||||
Namespace string `json:"namespace"`
|
||||
Name string `json:"name"`
|
||||
// +optional
|
||||
Name string `json:"name"`
|
||||
|
||||
// Including resource version in the reference forces the function to be updated on
|
||||
// package update, making it possible to cache the function based on its metadata.
|
||||
@@ -296,6 +333,7 @@ type (
|
||||
// FunctionPackageRef includes the reference to the package also the entrypoint of package.
|
||||
FunctionPackageRef struct {
|
||||
// Package reference
|
||||
// +optional
|
||||
PackageRef PackageRef `json:"packageref"`
|
||||
|
||||
// FunctionName specifies a specific function within the package. This allows
|
||||
@@ -326,40 +364,50 @@ type (
|
||||
Package FunctionPackageRef `json:"package"`
|
||||
|
||||
// Reference to a list of secrets.
|
||||
Secrets []SecretReference `json:"secrets"`
|
||||
// +optional
|
||||
// +nullable
|
||||
Secrets []SecretReference `json:"secrets,omitempty"`
|
||||
|
||||
// Reference to a list of configmaps.
|
||||
ConfigMaps []ConfigMapReference `json:"configmaps"`
|
||||
// +optional
|
||||
// +nullable
|
||||
ConfigMaps []ConfigMapReference `json:"configmaps,omitempty"`
|
||||
|
||||
// cpu and memory resources as per K8S standards
|
||||
// This is only for newdeploy to set up resource limitation
|
||||
// when creating deployment for a function.
|
||||
// +optional
|
||||
Resources apiv1.ResourceRequirements `json:"resources"`
|
||||
|
||||
// InvokeStrategy is a set of controls which affect how function executes
|
||||
InvokeStrategy InvokeStrategy
|
||||
InvokeStrategy InvokeStrategy `json:"InvokeStrategy"`
|
||||
|
||||
// FunctionTimeout provides a maximum amount of duration within which a request for
|
||||
// a particular function execution should be complete.
|
||||
// This is optional. If not specified default value will be taken as 60s
|
||||
// +optional
|
||||
FunctionTimeout int `json:"functionTimeout,omitempty"`
|
||||
|
||||
// IdleTimeout specifies the length of time that a function is idle before the
|
||||
// function pod(s) are eligible for deletion. If no traffic to the function
|
||||
// is detected within the idle timeout, the executor will then recycle the
|
||||
// function pod(s) to release resources.
|
||||
// +optional
|
||||
IdleTimeout *int `json:"idletimeout,omitempty"`
|
||||
|
||||
// Maximum number of pods to be specialized which will serve requests
|
||||
// This is optional. If not specified default value will be taken as 500
|
||||
// +optional
|
||||
Concurrency int `json:"concurrency,omitempty"`
|
||||
|
||||
// RequestsPerPod indicates the maximum number of concurrent requests that can be served by a specialized pod
|
||||
// This is optional. If not specified default value will be taken as 1
|
||||
// +optional
|
||||
RequestsPerPod int `json:"requestsPerPod,omitempty"`
|
||||
|
||||
// OnceOnly specifies if specialized pod will serve exactly one request in its lifetime and would be garbage collected after serving that one request
|
||||
// This is optional. If not specified default value will be taken as false
|
||||
// +optional
|
||||
OnceOnly bool `json:"onceOnly,omitempty"`
|
||||
}
|
||||
|
||||
@@ -375,11 +423,13 @@ type (
|
||||
|
||||
// ExecutionStrategy specifies low-level parameters for function execution,
|
||||
// such as the number of instances.
|
||||
ExecutionStrategy ExecutionStrategy
|
||||
// +optional
|
||||
ExecutionStrategy ExecutionStrategy `json:"ExecutionStrategy"`
|
||||
|
||||
// StrategyType is the strategy type of a function.
|
||||
// Now it only supports 'execution'.
|
||||
StrategyType StrategyType
|
||||
// +optional
|
||||
StrategyType StrategyType `json:"StrategyType"`
|
||||
}
|
||||
|
||||
// ExecutionStrategy specifies low-level parameters for function execution,
|
||||
@@ -400,23 +450,29 @@ type (
|
||||
// Available value:
|
||||
// - poolmgr
|
||||
// - newdeploy
|
||||
ExecutorType ExecutorType
|
||||
// +optional
|
||||
ExecutorType ExecutorType `json:"ExecutorType"`
|
||||
|
||||
// +optional
|
||||
// This is only for newdeploy to set up minimum replicas of deployment.
|
||||
MinScale int
|
||||
MinScale int `json:"MinScale"`
|
||||
|
||||
// +optional
|
||||
// This is only for newdeploy to set up maximum replicas of deployment.
|
||||
MaxScale int
|
||||
MaxScale int `json:"MaxScale"`
|
||||
|
||||
// +optional
|
||||
// This is only for newdeploy to set up target CPU utilization of HPA.
|
||||
TargetCPUPercent int
|
||||
TargetCPUPercent int `json:"TargetCPUPercent"`
|
||||
|
||||
// +optional
|
||||
// This is the timeout setting for executor to wait for pod specialization.
|
||||
SpecializationTimeout int
|
||||
SpecializationTimeout int `json:"SpecializationTimeout"`
|
||||
}
|
||||
|
||||
// FunctionReferenceType refers to type of Function
|
||||
FunctionReferenceType string
|
||||
|
||||
// FunctionReference refers to a function
|
||||
FunctionReference struct {
|
||||
// Type indicates whether this function reference is by name or selector. For now,
|
||||
// the only supported reference type is by "name". Future reference types:
|
||||
@@ -433,6 +489,7 @@ type (
|
||||
|
||||
// Function Reference by weight. this map contains function name as key and its weight
|
||||
// as the value. This is for canary upgrade purpose.
|
||||
// +nullable
|
||||
FunctionWeights map[string]int `json:"functionweights"`
|
||||
}
|
||||
|
||||
@@ -472,6 +529,7 @@ type (
|
||||
// - ImagePullPolicy
|
||||
//
|
||||
// You can set either PodSpec or Container, but not both.
|
||||
// kubebuilder:validation:XPreserveUnknownFields=true
|
||||
Container *apiv1.Container `json:"container,omitempty"`
|
||||
|
||||
// (Optional) Podspec allows modification of deployed runtime pod with Kubernetes PodSpec
|
||||
@@ -526,10 +584,12 @@ type (
|
||||
|
||||
// (Optional) Builder is configuration for builder manager to launch environment builder to build source code into
|
||||
// deployable binary.
|
||||
// +optional
|
||||
Builder Builder `json:"builder"`
|
||||
|
||||
// NOT USED NOW.
|
||||
// (Optional) Strongly encouraged. Used to populate links from UI, CLI, etc.
|
||||
// +optional
|
||||
DocumentationURL string `json:"-"` // `json:"documentationurl,omitempty"`
|
||||
|
||||
// (Optional) defaults to 'single'. Fission workflow uses
|
||||
@@ -537,34 +597,41 @@ type (
|
||||
// Available value:
|
||||
// - single
|
||||
// - infinite
|
||||
// +optional
|
||||
AllowedFunctionsPerContainer AllowedFunctionsPerContainer `json:"allowedFunctionsPerContainer,omitempty"`
|
||||
|
||||
// Istio default blocks all egress traffic for safety.
|
||||
// To enable accessibility of external network for builder/function pod, set to 'true'.
|
||||
// (Optional) defaults to 'false'
|
||||
// +optional
|
||||
AllowAccessToExternalNetwork bool `json:"allowAccessToExternalNetwork,omitempty"`
|
||||
|
||||
// The request and limit CPU/MEM resource setting for poolmanager to set up pods in the pre-warm pool.
|
||||
// (Optional) defaults to no limitation.
|
||||
// +optional
|
||||
Resources apiv1.ResourceRequirements `json:"resources"`
|
||||
|
||||
// The initial pool size for environment
|
||||
// +optional
|
||||
Poolsize int `json:"poolsize,omitempty"`
|
||||
|
||||
// The grace time for pod to perform connection draining before termination. The unit is in seconds.
|
||||
// (Optional) defaults to 360 seconds
|
||||
// +optional
|
||||
TerminationGracePeriod int64 `json:"terminationGracePeriod,omitempty"`
|
||||
|
||||
// KeepArchive is used by fetcher to determine if the extracted archive
|
||||
// or unarchived file should be placed, which is then used by specialize handler.
|
||||
// (This is mainly for the JVM environment because .jar is one kind of zip archive.)
|
||||
// +optional
|
||||
KeepArchive bool `json:"keeparchive"`
|
||||
|
||||
// ImagePullSecret is the secret for Kubernetes to pull an image from a
|
||||
// private registry.
|
||||
// +optional
|
||||
ImagePullSecret string `json:"imagepullsecret"`
|
||||
}
|
||||
|
||||
// AllowedFunctionsPerContainer defaults to 'single'. Related to Fission Workflows
|
||||
AllowedFunctionsPerContainer string
|
||||
|
||||
//
|
||||
@@ -576,46 +643,55 @@ type (
|
||||
// TODO: remove this field since we have IngressConfig already
|
||||
// Deprecated: the original idea of this field is not for setting Ingress.
|
||||
// Since we have IngressConfig now, remove Host after couple releases.
|
||||
// +optional
|
||||
Host string `json:"host"`
|
||||
|
||||
// RelativeURL is the exposed URL for external client to access a function with.
|
||||
RelativeURL string `json:"relativeurl"`
|
||||
|
||||
// HTTP method to access a function.
|
||||
// +optional
|
||||
Method string `json:"method"`
|
||||
|
||||
// FunctionReference is a reference to the target function.
|
||||
FunctionReference FunctionReference `json:"functionref"`
|
||||
|
||||
// If CreateIngress is true, router will create a ingress definition.
|
||||
// +optional
|
||||
CreateIngress bool `json:"createingress"`
|
||||
|
||||
// TODO: make IngressConfig a independent Fission resource
|
||||
// IngressConfig for router to set up Ingress.
|
||||
// +optional
|
||||
IngressConfig IngressConfig `json:"ingressconfig"`
|
||||
}
|
||||
|
||||
// IngressConfig is for router to set up Ingress.
|
||||
IngressConfig struct {
|
||||
// Annotations will be add to metadata when creating Ingress.
|
||||
// +optional
|
||||
// +nullable
|
||||
Annotations map[string]string `json:"annotations"`
|
||||
|
||||
// Path is for path matching. The format of path
|
||||
// depends on what ingress controller you used.
|
||||
// +optional
|
||||
Path string `json:"path"`
|
||||
|
||||
// Host is for ingress controller to apply rules. If
|
||||
// host is empty or "*", the rule applies to all
|
||||
// inbound HTTP traffic.
|
||||
// +optional
|
||||
Host string `json:"host"`
|
||||
|
||||
// TLS is for user to specify a Secret that contains
|
||||
// TLS key and certificate. The domain name in the
|
||||
// key and crt must match the value of Host field.
|
||||
// +optional
|
||||
TLS string `json:"tls"`
|
||||
}
|
||||
|
||||
// KubernetesWatchTriggerSpec
|
||||
// KubernetesWatchTriggerSpec defines spec of KuberenetesWatchTrigger
|
||||
KubernetesWatchTriggerSpec struct {
|
||||
Namespace string `json:"namespace"`
|
||||
|
||||
@@ -623,6 +699,7 @@ type (
|
||||
Type string `json:"type"`
|
||||
|
||||
// Resource labels
|
||||
// +optional
|
||||
LabelSelector map[string]string `json:"labelselector"`
|
||||
|
||||
// The reference to a function for kubewatcher to invoke with
|
||||
@@ -630,7 +707,7 @@ type (
|
||||
FunctionReference FunctionReference `json:"functionref"`
|
||||
}
|
||||
|
||||
// Type of message queue
|
||||
// MessageQueueType refers to Type of message queue
|
||||
MessageQueueType string
|
||||
|
||||
// MessageQueueTriggerSpec defines a binding from a topic in a
|
||||
@@ -638,24 +715,30 @@ type (
|
||||
MessageQueueTriggerSpec struct {
|
||||
// The reference to a function for message queue trigger to invoke with
|
||||
// when receiving messages from subscribed topic.
|
||||
// +optional
|
||||
FunctionReference FunctionReference `json:"functionref"`
|
||||
|
||||
// Type of message queue (NATS, Kafka, AzureQueue)
|
||||
// +optional
|
||||
MessageQueueType MessageQueueType `json:"messageQueueType"`
|
||||
|
||||
// Subscribed topic
|
||||
Topic string `json:"topic"`
|
||||
|
||||
// Topic for message queue trigger to sent response from function.
|
||||
// +optional
|
||||
ResponseTopic string `json:"respTopic,omitempty"`
|
||||
|
||||
// Topic to collect error response sent from function
|
||||
// +optional
|
||||
ErrorTopic string `json:"errorTopic"`
|
||||
|
||||
// Maximum times for message queue trigger to retry
|
||||
// +optional
|
||||
MaxRetries int `json:"maxRetries"`
|
||||
|
||||
// Content type of payload
|
||||
// +optional
|
||||
ContentType string `json:"contentType"`
|
||||
|
||||
// The period to check each trigger source on every ScaledObject, and scale the deployment up or down accordingly
|
||||
@@ -696,7 +779,7 @@ type (
|
||||
// The reference to function
|
||||
FunctionReference `json:"functionref"`
|
||||
}
|
||||
|
||||
// FailureType refers to the type of failure
|
||||
FailureType string
|
||||
|
||||
// CanaryConfigSpec defines the canary configuration spec
|
||||
@@ -711,14 +794,18 @@ type (
|
||||
OldFunction string `json:"oldfunction"`
|
||||
|
||||
// Weight increment step for function
|
||||
// +optional
|
||||
WeightIncrement int `json:"weightincrement"`
|
||||
|
||||
// Weight increment interval, string representation of time.Duration, ex : 1m, 2h, 2d (default: "2m")
|
||||
// +optional
|
||||
WeightIncrementDuration string `json:"duration"`
|
||||
|
||||
// Threshold in percentage beyond which the new version of the function is considered unstable
|
||||
FailureThreshold int `json:"failurethreshold"`
|
||||
FailureType FailureType `json:"failureType"`
|
||||
// +optional
|
||||
FailureThreshold int `json:"failurethreshold"`
|
||||
// +optional
|
||||
FailureType FailureType `json:"failureType"`
|
||||
}
|
||||
|
||||
// CanaryConfigStatus represents canary config status
|
||||
@@ -734,6 +821,7 @@ type (
|
||||
}
|
||||
)
|
||||
|
||||
//IsEmpty checks if the archive byte and litreal are of length 0
|
||||
func (a Archive) IsEmpty() bool {
|
||||
return len(a.Literal) == 0 && len(a.URL) == 0
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
|
||||
configShallowCopy := *c
|
||||
if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 {
|
||||
if configShallowCopy.Burst <= 0 {
|
||||
return nil, fmt.Errorf("Burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0")
|
||||
return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0")
|
||||
}
|
||||
configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst)
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ import (
|
||||
|
||||
var scheme = runtime.NewScheme()
|
||||
var codecs = serializer.NewCodecFactory(scheme)
|
||||
var parameterCodec = runtime.NewParameterCodec(scheme)
|
||||
|
||||
var localSchemeBuilder = runtime.SchemeBuilder{
|
||||
corev1.AddToScheme,
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
@@ -37,15 +38,15 @@ type CanaryConfigsGetter interface {
|
||||
|
||||
// CanaryConfigInterface has methods to work with CanaryConfig resources.
|
||||
type CanaryConfigInterface interface {
|
||||
Create(*v1.CanaryConfig) (*v1.CanaryConfig, error)
|
||||
Update(*v1.CanaryConfig) (*v1.CanaryConfig, error)
|
||||
UpdateStatus(*v1.CanaryConfig) (*v1.CanaryConfig, error)
|
||||
Delete(name string, options *metav1.DeleteOptions) error
|
||||
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
|
||||
Get(name string, options metav1.GetOptions) (*v1.CanaryConfig, error)
|
||||
List(opts metav1.ListOptions) (*v1.CanaryConfigList, error)
|
||||
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.CanaryConfig, err error)
|
||||
Create(ctx context.Context, _canaryConfig *v1.CanaryConfig, opts metav1.CreateOptions) (*v1.CanaryConfig, error)
|
||||
Update(ctx context.Context, _canaryConfig *v1.CanaryConfig, opts metav1.UpdateOptions) (*v1.CanaryConfig, error)
|
||||
UpdateStatus(ctx context.Context, _canaryConfig *v1.CanaryConfig, opts metav1.UpdateOptions) (*v1.CanaryConfig, error)
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.CanaryConfig, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.CanaryConfigList, error)
|
||||
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CanaryConfig, err error)
|
||||
CanaryConfigExpansion
|
||||
}
|
||||
|
||||
@@ -64,20 +65,20 @@ func newCanaryConfigs(c *CoreV1Client, namespace string) *canaryConfigs {
|
||||
}
|
||||
|
||||
// Get takes name of the _canaryConfig, and returns the corresponding canaryConfig object, and an error if there is any.
|
||||
func (c *canaryConfigs) Get(name string, options metav1.GetOptions) (result *v1.CanaryConfig, err error) {
|
||||
func (c *canaryConfigs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.CanaryConfig, err error) {
|
||||
result = &v1.CanaryConfig{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("canaryconfigs").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of CanaryConfigs that match those selectors.
|
||||
func (c *canaryConfigs) List(opts metav1.ListOptions) (result *v1.CanaryConfigList, err error) {
|
||||
func (c *canaryConfigs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.CanaryConfigList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -88,13 +89,13 @@ func (c *canaryConfigs) List(opts metav1.ListOptions) (result *v1.CanaryConfigLi
|
||||
Resource("canaryconfigs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested canaryConfigs.
|
||||
func (c *canaryConfigs) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
func (c *canaryConfigs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -105,87 +106,90 @@ func (c *canaryConfigs) Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||
Resource("canaryconfigs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a _canaryConfig and creates it. Returns the server's representation of the canaryConfig, and an error, if there is any.
|
||||
func (c *canaryConfigs) Create(_canaryConfig *v1.CanaryConfig) (result *v1.CanaryConfig, err error) {
|
||||
func (c *canaryConfigs) Create(ctx context.Context, _canaryConfig *v1.CanaryConfig, opts metav1.CreateOptions) (result *v1.CanaryConfig, err error) {
|
||||
result = &v1.CanaryConfig{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("canaryconfigs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_canaryConfig).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a _canaryConfig and updates it. Returns the server's representation of the canaryConfig, and an error, if there is any.
|
||||
func (c *canaryConfigs) Update(_canaryConfig *v1.CanaryConfig) (result *v1.CanaryConfig, err error) {
|
||||
func (c *canaryConfigs) Update(ctx context.Context, _canaryConfig *v1.CanaryConfig, opts metav1.UpdateOptions) (result *v1.CanaryConfig, err error) {
|
||||
result = &v1.CanaryConfig{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("canaryconfigs").
|
||||
Name(_canaryConfig.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_canaryConfig).
|
||||
Do().
|
||||
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 *canaryConfigs) UpdateStatus(_canaryConfig *v1.CanaryConfig) (result *v1.CanaryConfig, err error) {
|
||||
func (c *canaryConfigs) UpdateStatus(ctx context.Context, _canaryConfig *v1.CanaryConfig, opts metav1.UpdateOptions) (result *v1.CanaryConfig, err error) {
|
||||
result = &v1.CanaryConfig{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("canaryconfigs").
|
||||
Name(_canaryConfig.Name).
|
||||
SubResource("status").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_canaryConfig).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the _canaryConfig and deletes it. Returns an error if one occurs.
|
||||
func (c *canaryConfigs) Delete(name string, options *metav1.DeleteOptions) error {
|
||||
func (c *canaryConfigs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("canaryconfigs").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *canaryConfigs) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
func (c *canaryConfigs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("canaryconfigs").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched canaryConfig.
|
||||
func (c *canaryConfigs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.CanaryConfig, err error) {
|
||||
func (c *canaryConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CanaryConfig, err error) {
|
||||
result = &v1.CanaryConfig{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("canaryconfigs").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
@@ -37,14 +38,14 @@ type EnvironmentsGetter interface {
|
||||
|
||||
// EnvironmentInterface has methods to work with Environment resources.
|
||||
type EnvironmentInterface interface {
|
||||
Create(*v1.Environment) (*v1.Environment, error)
|
||||
Update(*v1.Environment) (*v1.Environment, error)
|
||||
Delete(name string, options *metav1.DeleteOptions) error
|
||||
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
|
||||
Get(name string, options metav1.GetOptions) (*v1.Environment, error)
|
||||
List(opts metav1.ListOptions) (*v1.EnvironmentList, error)
|
||||
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Environment, err error)
|
||||
Create(ctx context.Context, _environment *v1.Environment, opts metav1.CreateOptions) (*v1.Environment, error)
|
||||
Update(ctx context.Context, _environment *v1.Environment, opts metav1.UpdateOptions) (*v1.Environment, error)
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Environment, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.EnvironmentList, error)
|
||||
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Environment, err error)
|
||||
EnvironmentExpansion
|
||||
}
|
||||
|
||||
@@ -63,20 +64,20 @@ func newEnvironments(c *CoreV1Client, namespace string) *environments {
|
||||
}
|
||||
|
||||
// Get takes name of the _environment, and returns the corresponding environment object, and an error if there is any.
|
||||
func (c *environments) Get(name string, options metav1.GetOptions) (result *v1.Environment, err error) {
|
||||
func (c *environments) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Environment, err error) {
|
||||
result = &v1.Environment{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("environments").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Environments that match those selectors.
|
||||
func (c *environments) List(opts metav1.ListOptions) (result *v1.EnvironmentList, err error) {
|
||||
func (c *environments) List(ctx context.Context, opts metav1.ListOptions) (result *v1.EnvironmentList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -87,13 +88,13 @@ func (c *environments) List(opts metav1.ListOptions) (result *v1.EnvironmentList
|
||||
Resource("environments").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested environments.
|
||||
func (c *environments) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
func (c *environments) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -104,71 +105,74 @@ func (c *environments) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
Resource("environments").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a _environment and creates it. Returns the server's representation of the environment, and an error, if there is any.
|
||||
func (c *environments) Create(_environment *v1.Environment) (result *v1.Environment, err error) {
|
||||
func (c *environments) Create(ctx context.Context, _environment *v1.Environment, opts metav1.CreateOptions) (result *v1.Environment, err error) {
|
||||
result = &v1.Environment{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("environments").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_environment).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a _environment and updates it. Returns the server's representation of the environment, and an error, if there is any.
|
||||
func (c *environments) Update(_environment *v1.Environment) (result *v1.Environment, err error) {
|
||||
func (c *environments) Update(ctx context.Context, _environment *v1.Environment, opts metav1.UpdateOptions) (result *v1.Environment, err error) {
|
||||
result = &v1.Environment{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("environments").
|
||||
Name(_environment.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_environment).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the _environment and deletes it. Returns an error if one occurs.
|
||||
func (c *environments) Delete(name string, options *metav1.DeleteOptions) error {
|
||||
func (c *environments) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("environments").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *environments) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
func (c *environments) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("environments").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched environment.
|
||||
func (c *environments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Environment, err error) {
|
||||
func (c *environments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Environment, err error) {
|
||||
result = &v1.Environment{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("environments").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
@@ -39,7 +41,7 @@ var canaryconfigsResource = schema.GroupVersionResource{Group: "fission.io", Ver
|
||||
var canaryconfigsKind = schema.GroupVersionKind{Group: "fission.io", Version: "v1", Kind: "CanaryConfig"}
|
||||
|
||||
// Get takes name of the _canaryConfig, and returns the corresponding canaryConfig object, and an error if there is any.
|
||||
func (c *FakeCanaryConfigs) Get(name string, options v1.GetOptions) (result *corev1.CanaryConfig, err error) {
|
||||
func (c *FakeCanaryConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.CanaryConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(canaryconfigsResource, c.ns, name), &corev1.CanaryConfig{})
|
||||
|
||||
@@ -50,7 +52,7 @@ func (c *FakeCanaryConfigs) Get(name string, options v1.GetOptions) (result *cor
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of CanaryConfigs that match those selectors.
|
||||
func (c *FakeCanaryConfigs) List(opts v1.ListOptions) (result *corev1.CanaryConfigList, err error) {
|
||||
func (c *FakeCanaryConfigs) List(ctx context.Context, opts v1.ListOptions) (result *corev1.CanaryConfigList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(canaryconfigsResource, canaryconfigsKind, c.ns, opts), &corev1.CanaryConfigList{})
|
||||
|
||||
@@ -72,14 +74,14 @@ func (c *FakeCanaryConfigs) List(opts v1.ListOptions) (result *corev1.CanaryConf
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested canaryConfigs.
|
||||
func (c *FakeCanaryConfigs) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakeCanaryConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(canaryconfigsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a _canaryConfig and creates it. Returns the server's representation of the canaryConfig, and an error, if there is any.
|
||||
func (c *FakeCanaryConfigs) Create(_canaryConfig *corev1.CanaryConfig) (result *corev1.CanaryConfig, err error) {
|
||||
func (c *FakeCanaryConfigs) Create(ctx context.Context, _canaryConfig *corev1.CanaryConfig, opts v1.CreateOptions) (result *corev1.CanaryConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(canaryconfigsResource, c.ns, _canaryConfig), &corev1.CanaryConfig{})
|
||||
|
||||
@@ -90,7 +92,7 @@ func (c *FakeCanaryConfigs) Create(_canaryConfig *corev1.CanaryConfig) (result *
|
||||
}
|
||||
|
||||
// Update takes the representation of a _canaryConfig and updates it. Returns the server's representation of the canaryConfig, and an error, if there is any.
|
||||
func (c *FakeCanaryConfigs) Update(_canaryConfig *corev1.CanaryConfig) (result *corev1.CanaryConfig, err error) {
|
||||
func (c *FakeCanaryConfigs) Update(ctx context.Context, _canaryConfig *corev1.CanaryConfig, opts v1.UpdateOptions) (result *corev1.CanaryConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(canaryconfigsResource, c.ns, _canaryConfig), &corev1.CanaryConfig{})
|
||||
|
||||
@@ -102,7 +104,7 @@ func (c *FakeCanaryConfigs) Update(_canaryConfig *corev1.CanaryConfig) (result *
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeCanaryConfigs) UpdateStatus(_canaryConfig *corev1.CanaryConfig) (*corev1.CanaryConfig, error) {
|
||||
func (c *FakeCanaryConfigs) UpdateStatus(ctx context.Context, _canaryConfig *corev1.CanaryConfig, opts v1.UpdateOptions) (*corev1.CanaryConfig, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(canaryconfigsResource, "status", c.ns, _canaryConfig), &corev1.CanaryConfig{})
|
||||
|
||||
@@ -113,7 +115,7 @@ func (c *FakeCanaryConfigs) UpdateStatus(_canaryConfig *corev1.CanaryConfig) (*c
|
||||
}
|
||||
|
||||
// Delete takes name of the _canaryConfig and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeCanaryConfigs) Delete(name string, options *v1.DeleteOptions) error {
|
||||
func (c *FakeCanaryConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(canaryconfigsResource, c.ns, name), &corev1.CanaryConfig{})
|
||||
|
||||
@@ -121,15 +123,15 @@ func (c *FakeCanaryConfigs) Delete(name string, options *v1.DeleteOptions) error
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeCanaryConfigs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(canaryconfigsResource, c.ns, listOptions)
|
||||
func (c *FakeCanaryConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(canaryconfigsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.CanaryConfigList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched canaryConfig.
|
||||
func (c *FakeCanaryConfigs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.CanaryConfig, err error) {
|
||||
func (c *FakeCanaryConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.CanaryConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(canaryconfigsResource, c.ns, name, pt, data, subresources...), &corev1.CanaryConfig{})
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
@@ -39,7 +41,7 @@ var environmentsResource = schema.GroupVersionResource{Group: "fission.io", Vers
|
||||
var environmentsKind = schema.GroupVersionKind{Group: "fission.io", Version: "v1", Kind: "Environment"}
|
||||
|
||||
// Get takes name of the _environment, and returns the corresponding environment object, and an error if there is any.
|
||||
func (c *FakeEnvironments) Get(name string, options v1.GetOptions) (result *corev1.Environment, err error) {
|
||||
func (c *FakeEnvironments) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Environment, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(environmentsResource, c.ns, name), &corev1.Environment{})
|
||||
|
||||
@@ -50,7 +52,7 @@ func (c *FakeEnvironments) Get(name string, options v1.GetOptions) (result *core
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Environments that match those selectors.
|
||||
func (c *FakeEnvironments) List(opts v1.ListOptions) (result *corev1.EnvironmentList, err error) {
|
||||
func (c *FakeEnvironments) List(ctx context.Context, opts v1.ListOptions) (result *corev1.EnvironmentList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(environmentsResource, environmentsKind, c.ns, opts), &corev1.EnvironmentList{})
|
||||
|
||||
@@ -72,14 +74,14 @@ func (c *FakeEnvironments) List(opts v1.ListOptions) (result *corev1.Environment
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested environments.
|
||||
func (c *FakeEnvironments) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakeEnvironments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(environmentsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a _environment and creates it. Returns the server's representation of the environment, and an error, if there is any.
|
||||
func (c *FakeEnvironments) Create(_environment *corev1.Environment) (result *corev1.Environment, err error) {
|
||||
func (c *FakeEnvironments) Create(ctx context.Context, _environment *corev1.Environment, opts v1.CreateOptions) (result *corev1.Environment, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(environmentsResource, c.ns, _environment), &corev1.Environment{})
|
||||
|
||||
@@ -90,7 +92,7 @@ func (c *FakeEnvironments) Create(_environment *corev1.Environment) (result *cor
|
||||
}
|
||||
|
||||
// Update takes the representation of a _environment and updates it. Returns the server's representation of the environment, and an error, if there is any.
|
||||
func (c *FakeEnvironments) Update(_environment *corev1.Environment) (result *corev1.Environment, err error) {
|
||||
func (c *FakeEnvironments) Update(ctx context.Context, _environment *corev1.Environment, opts v1.UpdateOptions) (result *corev1.Environment, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(environmentsResource, c.ns, _environment), &corev1.Environment{})
|
||||
|
||||
@@ -101,7 +103,7 @@ func (c *FakeEnvironments) Update(_environment *corev1.Environment) (result *cor
|
||||
}
|
||||
|
||||
// Delete takes name of the _environment and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeEnvironments) Delete(name string, options *v1.DeleteOptions) error {
|
||||
func (c *FakeEnvironments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(environmentsResource, c.ns, name), &corev1.Environment{})
|
||||
|
||||
@@ -109,15 +111,15 @@ func (c *FakeEnvironments) Delete(name string, options *v1.DeleteOptions) error
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeEnvironments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(environmentsResource, c.ns, listOptions)
|
||||
func (c *FakeEnvironments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(environmentsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.EnvironmentList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched environment.
|
||||
func (c *FakeEnvironments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Environment, err error) {
|
||||
func (c *FakeEnvironments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Environment, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(environmentsResource, c.ns, name, pt, data, subresources...), &corev1.Environment{})
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
@@ -39,7 +41,7 @@ var functionsResource = schema.GroupVersionResource{Group: "fission.io", Version
|
||||
var functionsKind = schema.GroupVersionKind{Group: "fission.io", Version: "v1", Kind: "Function"}
|
||||
|
||||
// Get takes name of the _function, and returns the corresponding function object, and an error if there is any.
|
||||
func (c *FakeFunctions) Get(name string, options v1.GetOptions) (result *corev1.Function, err error) {
|
||||
func (c *FakeFunctions) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Function, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(functionsResource, c.ns, name), &corev1.Function{})
|
||||
|
||||
@@ -50,7 +52,7 @@ func (c *FakeFunctions) Get(name string, options v1.GetOptions) (result *corev1.
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Functions that match those selectors.
|
||||
func (c *FakeFunctions) List(opts v1.ListOptions) (result *corev1.FunctionList, err error) {
|
||||
func (c *FakeFunctions) List(ctx context.Context, opts v1.ListOptions) (result *corev1.FunctionList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(functionsResource, functionsKind, c.ns, opts), &corev1.FunctionList{})
|
||||
|
||||
@@ -72,14 +74,14 @@ func (c *FakeFunctions) List(opts v1.ListOptions) (result *corev1.FunctionList,
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested functions.
|
||||
func (c *FakeFunctions) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakeFunctions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(functionsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a _function and creates it. Returns the server's representation of the function, and an error, if there is any.
|
||||
func (c *FakeFunctions) Create(_function *corev1.Function) (result *corev1.Function, err error) {
|
||||
func (c *FakeFunctions) Create(ctx context.Context, _function *corev1.Function, opts v1.CreateOptions) (result *corev1.Function, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(functionsResource, c.ns, _function), &corev1.Function{})
|
||||
|
||||
@@ -90,7 +92,7 @@ func (c *FakeFunctions) Create(_function *corev1.Function) (result *corev1.Funct
|
||||
}
|
||||
|
||||
// Update takes the representation of a _function and updates it. Returns the server's representation of the function, and an error, if there is any.
|
||||
func (c *FakeFunctions) Update(_function *corev1.Function) (result *corev1.Function, err error) {
|
||||
func (c *FakeFunctions) Update(ctx context.Context, _function *corev1.Function, opts v1.UpdateOptions) (result *corev1.Function, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(functionsResource, c.ns, _function), &corev1.Function{})
|
||||
|
||||
@@ -101,7 +103,7 @@ func (c *FakeFunctions) Update(_function *corev1.Function) (result *corev1.Funct
|
||||
}
|
||||
|
||||
// Delete takes name of the _function and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeFunctions) Delete(name string, options *v1.DeleteOptions) error {
|
||||
func (c *FakeFunctions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(functionsResource, c.ns, name), &corev1.Function{})
|
||||
|
||||
@@ -109,15 +111,15 @@ func (c *FakeFunctions) Delete(name string, options *v1.DeleteOptions) error {
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeFunctions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(functionsResource, c.ns, listOptions)
|
||||
func (c *FakeFunctions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(functionsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.FunctionList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched function.
|
||||
func (c *FakeFunctions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Function, err error) {
|
||||
func (c *FakeFunctions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Function, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(functionsResource, c.ns, name, pt, data, subresources...), &corev1.Function{})
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
@@ -39,7 +41,7 @@ var httptriggersResource = schema.GroupVersionResource{Group: "fission.io", Vers
|
||||
var httptriggersKind = schema.GroupVersionKind{Group: "fission.io", Version: "v1", Kind: "HTTPTrigger"}
|
||||
|
||||
// Get takes name of the _hTTPTrigger, and returns the corresponding hTTPTrigger object, and an error if there is any.
|
||||
func (c *FakeHTTPTriggers) Get(name string, options v1.GetOptions) (result *corev1.HTTPTrigger, err error) {
|
||||
func (c *FakeHTTPTriggers) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.HTTPTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(httptriggersResource, c.ns, name), &corev1.HTTPTrigger{})
|
||||
|
||||
@@ -50,7 +52,7 @@ func (c *FakeHTTPTriggers) Get(name string, options v1.GetOptions) (result *core
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of HTTPTriggers that match those selectors.
|
||||
func (c *FakeHTTPTriggers) List(opts v1.ListOptions) (result *corev1.HTTPTriggerList, err error) {
|
||||
func (c *FakeHTTPTriggers) List(ctx context.Context, opts v1.ListOptions) (result *corev1.HTTPTriggerList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(httptriggersResource, httptriggersKind, c.ns, opts), &corev1.HTTPTriggerList{})
|
||||
|
||||
@@ -72,14 +74,14 @@ func (c *FakeHTTPTriggers) List(opts v1.ListOptions) (result *corev1.HTTPTrigger
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested hTTPTriggers.
|
||||
func (c *FakeHTTPTriggers) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakeHTTPTriggers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(httptriggersResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a _hTTPTrigger and creates it. Returns the server's representation of the hTTPTrigger, and an error, if there is any.
|
||||
func (c *FakeHTTPTriggers) Create(_hTTPTrigger *corev1.HTTPTrigger) (result *corev1.HTTPTrigger, err error) {
|
||||
func (c *FakeHTTPTriggers) Create(ctx context.Context, _hTTPTrigger *corev1.HTTPTrigger, opts v1.CreateOptions) (result *corev1.HTTPTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(httptriggersResource, c.ns, _hTTPTrigger), &corev1.HTTPTrigger{})
|
||||
|
||||
@@ -90,7 +92,7 @@ func (c *FakeHTTPTriggers) Create(_hTTPTrigger *corev1.HTTPTrigger) (result *cor
|
||||
}
|
||||
|
||||
// Update takes the representation of a _hTTPTrigger and updates it. Returns the server's representation of the hTTPTrigger, and an error, if there is any.
|
||||
func (c *FakeHTTPTriggers) Update(_hTTPTrigger *corev1.HTTPTrigger) (result *corev1.HTTPTrigger, err error) {
|
||||
func (c *FakeHTTPTriggers) Update(ctx context.Context, _hTTPTrigger *corev1.HTTPTrigger, opts v1.UpdateOptions) (result *corev1.HTTPTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(httptriggersResource, c.ns, _hTTPTrigger), &corev1.HTTPTrigger{})
|
||||
|
||||
@@ -101,7 +103,7 @@ func (c *FakeHTTPTriggers) Update(_hTTPTrigger *corev1.HTTPTrigger) (result *cor
|
||||
}
|
||||
|
||||
// Delete takes name of the _hTTPTrigger and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeHTTPTriggers) Delete(name string, options *v1.DeleteOptions) error {
|
||||
func (c *FakeHTTPTriggers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(httptriggersResource, c.ns, name), &corev1.HTTPTrigger{})
|
||||
|
||||
@@ -109,15 +111,15 @@ func (c *FakeHTTPTriggers) Delete(name string, options *v1.DeleteOptions) error
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeHTTPTriggers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(httptriggersResource, c.ns, listOptions)
|
||||
func (c *FakeHTTPTriggers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(httptriggersResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.HTTPTriggerList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched hTTPTrigger.
|
||||
func (c *FakeHTTPTriggers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.HTTPTrigger, err error) {
|
||||
func (c *FakeHTTPTriggers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.HTTPTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(httptriggersResource, c.ns, name, pt, data, subresources...), &corev1.HTTPTrigger{})
|
||||
|
||||
|
||||
+11
-9
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
@@ -39,7 +41,7 @@ var kuberneteswatchtriggersResource = schema.GroupVersionResource{Group: "fissio
|
||||
var kuberneteswatchtriggersKind = schema.GroupVersionKind{Group: "fission.io", Version: "v1", Kind: "KubernetesWatchTrigger"}
|
||||
|
||||
// Get takes name of the _kubernetesWatchTrigger, and returns the corresponding kubernetesWatchTrigger object, and an error if there is any.
|
||||
func (c *FakeKubernetesWatchTriggers) Get(name string, options v1.GetOptions) (result *corev1.KubernetesWatchTrigger, err error) {
|
||||
func (c *FakeKubernetesWatchTriggers) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.KubernetesWatchTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(kuberneteswatchtriggersResource, c.ns, name), &corev1.KubernetesWatchTrigger{})
|
||||
|
||||
@@ -50,7 +52,7 @@ func (c *FakeKubernetesWatchTriggers) Get(name string, options v1.GetOptions) (r
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of KubernetesWatchTriggers that match those selectors.
|
||||
func (c *FakeKubernetesWatchTriggers) List(opts v1.ListOptions) (result *corev1.KubernetesWatchTriggerList, err error) {
|
||||
func (c *FakeKubernetesWatchTriggers) List(ctx context.Context, opts v1.ListOptions) (result *corev1.KubernetesWatchTriggerList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(kuberneteswatchtriggersResource, kuberneteswatchtriggersKind, c.ns, opts), &corev1.KubernetesWatchTriggerList{})
|
||||
|
||||
@@ -72,14 +74,14 @@ func (c *FakeKubernetesWatchTriggers) List(opts v1.ListOptions) (result *corev1.
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested kubernetesWatchTriggers.
|
||||
func (c *FakeKubernetesWatchTriggers) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakeKubernetesWatchTriggers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(kuberneteswatchtriggersResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a _kubernetesWatchTrigger and creates it. Returns the server's representation of the kubernetesWatchTrigger, and an error, if there is any.
|
||||
func (c *FakeKubernetesWatchTriggers) Create(_kubernetesWatchTrigger *corev1.KubernetesWatchTrigger) (result *corev1.KubernetesWatchTrigger, err error) {
|
||||
func (c *FakeKubernetesWatchTriggers) Create(ctx context.Context, _kubernetesWatchTrigger *corev1.KubernetesWatchTrigger, opts v1.CreateOptions) (result *corev1.KubernetesWatchTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(kuberneteswatchtriggersResource, c.ns, _kubernetesWatchTrigger), &corev1.KubernetesWatchTrigger{})
|
||||
|
||||
@@ -90,7 +92,7 @@ func (c *FakeKubernetesWatchTriggers) Create(_kubernetesWatchTrigger *corev1.Kub
|
||||
}
|
||||
|
||||
// Update takes the representation of a _kubernetesWatchTrigger and updates it. Returns the server's representation of the kubernetesWatchTrigger, and an error, if there is any.
|
||||
func (c *FakeKubernetesWatchTriggers) Update(_kubernetesWatchTrigger *corev1.KubernetesWatchTrigger) (result *corev1.KubernetesWatchTrigger, err error) {
|
||||
func (c *FakeKubernetesWatchTriggers) Update(ctx context.Context, _kubernetesWatchTrigger *corev1.KubernetesWatchTrigger, opts v1.UpdateOptions) (result *corev1.KubernetesWatchTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(kuberneteswatchtriggersResource, c.ns, _kubernetesWatchTrigger), &corev1.KubernetesWatchTrigger{})
|
||||
|
||||
@@ -101,7 +103,7 @@ func (c *FakeKubernetesWatchTriggers) Update(_kubernetesWatchTrigger *corev1.Kub
|
||||
}
|
||||
|
||||
// Delete takes name of the _kubernetesWatchTrigger and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeKubernetesWatchTriggers) Delete(name string, options *v1.DeleteOptions) error {
|
||||
func (c *FakeKubernetesWatchTriggers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(kuberneteswatchtriggersResource, c.ns, name), &corev1.KubernetesWatchTrigger{})
|
||||
|
||||
@@ -109,15 +111,15 @@ func (c *FakeKubernetesWatchTriggers) Delete(name string, options *v1.DeleteOpti
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeKubernetesWatchTriggers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(kuberneteswatchtriggersResource, c.ns, listOptions)
|
||||
func (c *FakeKubernetesWatchTriggers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(kuberneteswatchtriggersResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.KubernetesWatchTriggerList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched kubernetesWatchTrigger.
|
||||
func (c *FakeKubernetesWatchTriggers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.KubernetesWatchTrigger, err error) {
|
||||
func (c *FakeKubernetesWatchTriggers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.KubernetesWatchTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(kuberneteswatchtriggersResource, c.ns, name, pt, data, subresources...), &corev1.KubernetesWatchTrigger{})
|
||||
|
||||
|
||||
+11
-9
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
@@ -39,7 +41,7 @@ var messagequeuetriggersResource = schema.GroupVersionResource{Group: "fission.i
|
||||
var messagequeuetriggersKind = schema.GroupVersionKind{Group: "fission.io", Version: "v1", Kind: "MessageQueueTrigger"}
|
||||
|
||||
// Get takes name of the _messageQueueTrigger, and returns the corresponding messageQueueTrigger object, and an error if there is any.
|
||||
func (c *FakeMessageQueueTriggers) Get(name string, options v1.GetOptions) (result *corev1.MessageQueueTrigger, err error) {
|
||||
func (c *FakeMessageQueueTriggers) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.MessageQueueTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(messagequeuetriggersResource, c.ns, name), &corev1.MessageQueueTrigger{})
|
||||
|
||||
@@ -50,7 +52,7 @@ func (c *FakeMessageQueueTriggers) Get(name string, options v1.GetOptions) (resu
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of MessageQueueTriggers that match those selectors.
|
||||
func (c *FakeMessageQueueTriggers) List(opts v1.ListOptions) (result *corev1.MessageQueueTriggerList, err error) {
|
||||
func (c *FakeMessageQueueTriggers) List(ctx context.Context, opts v1.ListOptions) (result *corev1.MessageQueueTriggerList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(messagequeuetriggersResource, messagequeuetriggersKind, c.ns, opts), &corev1.MessageQueueTriggerList{})
|
||||
|
||||
@@ -72,14 +74,14 @@ func (c *FakeMessageQueueTriggers) List(opts v1.ListOptions) (result *corev1.Mes
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested messageQueueTriggers.
|
||||
func (c *FakeMessageQueueTriggers) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakeMessageQueueTriggers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(messagequeuetriggersResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a _messageQueueTrigger and creates it. Returns the server's representation of the messageQueueTrigger, and an error, if there is any.
|
||||
func (c *FakeMessageQueueTriggers) Create(_messageQueueTrigger *corev1.MessageQueueTrigger) (result *corev1.MessageQueueTrigger, err error) {
|
||||
func (c *FakeMessageQueueTriggers) Create(ctx context.Context, _messageQueueTrigger *corev1.MessageQueueTrigger, opts v1.CreateOptions) (result *corev1.MessageQueueTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(messagequeuetriggersResource, c.ns, _messageQueueTrigger), &corev1.MessageQueueTrigger{})
|
||||
|
||||
@@ -90,7 +92,7 @@ func (c *FakeMessageQueueTriggers) Create(_messageQueueTrigger *corev1.MessageQu
|
||||
}
|
||||
|
||||
// Update takes the representation of a _messageQueueTrigger and updates it. Returns the server's representation of the messageQueueTrigger, and an error, if there is any.
|
||||
func (c *FakeMessageQueueTriggers) Update(_messageQueueTrigger *corev1.MessageQueueTrigger) (result *corev1.MessageQueueTrigger, err error) {
|
||||
func (c *FakeMessageQueueTriggers) Update(ctx context.Context, _messageQueueTrigger *corev1.MessageQueueTrigger, opts v1.UpdateOptions) (result *corev1.MessageQueueTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(messagequeuetriggersResource, c.ns, _messageQueueTrigger), &corev1.MessageQueueTrigger{})
|
||||
|
||||
@@ -101,7 +103,7 @@ func (c *FakeMessageQueueTriggers) Update(_messageQueueTrigger *corev1.MessageQu
|
||||
}
|
||||
|
||||
// Delete takes name of the _messageQueueTrigger and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeMessageQueueTriggers) Delete(name string, options *v1.DeleteOptions) error {
|
||||
func (c *FakeMessageQueueTriggers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(messagequeuetriggersResource, c.ns, name), &corev1.MessageQueueTrigger{})
|
||||
|
||||
@@ -109,15 +111,15 @@ func (c *FakeMessageQueueTriggers) Delete(name string, options *v1.DeleteOptions
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeMessageQueueTriggers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(messagequeuetriggersResource, c.ns, listOptions)
|
||||
func (c *FakeMessageQueueTriggers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(messagequeuetriggersResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.MessageQueueTriggerList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched messageQueueTrigger.
|
||||
func (c *FakeMessageQueueTriggers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.MessageQueueTrigger, err error) {
|
||||
func (c *FakeMessageQueueTriggers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.MessageQueueTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(messagequeuetriggersResource, c.ns, name, pt, data, subresources...), &corev1.MessageQueueTrigger{})
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
@@ -39,7 +41,7 @@ var packagesResource = schema.GroupVersionResource{Group: "fission.io", Version:
|
||||
var packagesKind = schema.GroupVersionKind{Group: "fission.io", Version: "v1", Kind: "Package"}
|
||||
|
||||
// Get takes name of the _package, and returns the corresponding package object, and an error if there is any.
|
||||
func (c *FakePackages) Get(name string, options v1.GetOptions) (result *corev1.Package, err error) {
|
||||
func (c *FakePackages) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Package, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(packagesResource, c.ns, name), &corev1.Package{})
|
||||
|
||||
@@ -50,7 +52,7 @@ func (c *FakePackages) Get(name string, options v1.GetOptions) (result *corev1.P
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Packages that match those selectors.
|
||||
func (c *FakePackages) List(opts v1.ListOptions) (result *corev1.PackageList, err error) {
|
||||
func (c *FakePackages) List(ctx context.Context, opts v1.ListOptions) (result *corev1.PackageList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(packagesResource, packagesKind, c.ns, opts), &corev1.PackageList{})
|
||||
|
||||
@@ -72,14 +74,14 @@ func (c *FakePackages) List(opts v1.ListOptions) (result *corev1.PackageList, er
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested packages.
|
||||
func (c *FakePackages) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakePackages) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(packagesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a _package and creates it. Returns the server's representation of the package, and an error, if there is any.
|
||||
func (c *FakePackages) Create(_package *corev1.Package) (result *corev1.Package, err error) {
|
||||
func (c *FakePackages) Create(ctx context.Context, _package *corev1.Package, opts v1.CreateOptions) (result *corev1.Package, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(packagesResource, c.ns, _package), &corev1.Package{})
|
||||
|
||||
@@ -90,7 +92,7 @@ func (c *FakePackages) Create(_package *corev1.Package) (result *corev1.Package,
|
||||
}
|
||||
|
||||
// Update takes the representation of a _package and updates it. Returns the server's representation of the package, and an error, if there is any.
|
||||
func (c *FakePackages) Update(_package *corev1.Package) (result *corev1.Package, err error) {
|
||||
func (c *FakePackages) Update(ctx context.Context, _package *corev1.Package, opts v1.UpdateOptions) (result *corev1.Package, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(packagesResource, c.ns, _package), &corev1.Package{})
|
||||
|
||||
@@ -102,7 +104,7 @@ func (c *FakePackages) Update(_package *corev1.Package) (result *corev1.Package,
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakePackages) UpdateStatus(_package *corev1.Package) (*corev1.Package, error) {
|
||||
func (c *FakePackages) UpdateStatus(ctx context.Context, _package *corev1.Package, opts v1.UpdateOptions) (*corev1.Package, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(packagesResource, "status", c.ns, _package), &corev1.Package{})
|
||||
|
||||
@@ -113,7 +115,7 @@ func (c *FakePackages) UpdateStatus(_package *corev1.Package) (*corev1.Package,
|
||||
}
|
||||
|
||||
// Delete takes name of the _package and deletes it. Returns an error if one occurs.
|
||||
func (c *FakePackages) Delete(name string, options *v1.DeleteOptions) error {
|
||||
func (c *FakePackages) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(packagesResource, c.ns, name), &corev1.Package{})
|
||||
|
||||
@@ -121,15 +123,15 @@ func (c *FakePackages) Delete(name string, options *v1.DeleteOptions) error {
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakePackages) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(packagesResource, c.ns, listOptions)
|
||||
func (c *FakePackages) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(packagesResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.PackageList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched package.
|
||||
func (c *FakePackages) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Package, err error) {
|
||||
func (c *FakePackages) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Package, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(packagesResource, c.ns, name, pt, data, subresources...), &corev1.Package{})
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
@@ -39,7 +41,7 @@ var timetriggersResource = schema.GroupVersionResource{Group: "fission.io", Vers
|
||||
var timetriggersKind = schema.GroupVersionKind{Group: "fission.io", Version: "v1", Kind: "TimeTrigger"}
|
||||
|
||||
// Get takes name of the _timeTrigger, and returns the corresponding timeTrigger object, and an error if there is any.
|
||||
func (c *FakeTimeTriggers) Get(name string, options v1.GetOptions) (result *corev1.TimeTrigger, err error) {
|
||||
func (c *FakeTimeTriggers) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.TimeTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(timetriggersResource, c.ns, name), &corev1.TimeTrigger{})
|
||||
|
||||
@@ -50,7 +52,7 @@ func (c *FakeTimeTriggers) Get(name string, options v1.GetOptions) (result *core
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of TimeTriggers that match those selectors.
|
||||
func (c *FakeTimeTriggers) List(opts v1.ListOptions) (result *corev1.TimeTriggerList, err error) {
|
||||
func (c *FakeTimeTriggers) List(ctx context.Context, opts v1.ListOptions) (result *corev1.TimeTriggerList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(timetriggersResource, timetriggersKind, c.ns, opts), &corev1.TimeTriggerList{})
|
||||
|
||||
@@ -72,14 +74,14 @@ func (c *FakeTimeTriggers) List(opts v1.ListOptions) (result *corev1.TimeTrigger
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested timeTriggers.
|
||||
func (c *FakeTimeTriggers) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakeTimeTriggers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(timetriggersResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a _timeTrigger and creates it. Returns the server's representation of the timeTrigger, and an error, if there is any.
|
||||
func (c *FakeTimeTriggers) Create(_timeTrigger *corev1.TimeTrigger) (result *corev1.TimeTrigger, err error) {
|
||||
func (c *FakeTimeTriggers) Create(ctx context.Context, _timeTrigger *corev1.TimeTrigger, opts v1.CreateOptions) (result *corev1.TimeTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(timetriggersResource, c.ns, _timeTrigger), &corev1.TimeTrigger{})
|
||||
|
||||
@@ -90,7 +92,7 @@ func (c *FakeTimeTriggers) Create(_timeTrigger *corev1.TimeTrigger) (result *cor
|
||||
}
|
||||
|
||||
// Update takes the representation of a _timeTrigger and updates it. Returns the server's representation of the timeTrigger, and an error, if there is any.
|
||||
func (c *FakeTimeTriggers) Update(_timeTrigger *corev1.TimeTrigger) (result *corev1.TimeTrigger, err error) {
|
||||
func (c *FakeTimeTriggers) Update(ctx context.Context, _timeTrigger *corev1.TimeTrigger, opts v1.UpdateOptions) (result *corev1.TimeTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(timetriggersResource, c.ns, _timeTrigger), &corev1.TimeTrigger{})
|
||||
|
||||
@@ -101,7 +103,7 @@ func (c *FakeTimeTriggers) Update(_timeTrigger *corev1.TimeTrigger) (result *cor
|
||||
}
|
||||
|
||||
// Delete takes name of the _timeTrigger and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeTimeTriggers) Delete(name string, options *v1.DeleteOptions) error {
|
||||
func (c *FakeTimeTriggers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteAction(timetriggersResource, c.ns, name), &corev1.TimeTrigger{})
|
||||
|
||||
@@ -109,15 +111,15 @@ func (c *FakeTimeTriggers) Delete(name string, options *v1.DeleteOptions) error
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeTimeTriggers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(timetriggersResource, c.ns, listOptions)
|
||||
func (c *FakeTimeTriggers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(timetriggersResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.TimeTriggerList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched timeTrigger.
|
||||
func (c *FakeTimeTriggers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.TimeTrigger, err error) {
|
||||
func (c *FakeTimeTriggers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.TimeTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(timetriggersResource, c.ns, name, pt, data, subresources...), &corev1.TimeTrigger{})
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
@@ -37,14 +38,14 @@ type FunctionsGetter interface {
|
||||
|
||||
// FunctionInterface has methods to work with Function resources.
|
||||
type FunctionInterface interface {
|
||||
Create(*v1.Function) (*v1.Function, error)
|
||||
Update(*v1.Function) (*v1.Function, error)
|
||||
Delete(name string, options *metav1.DeleteOptions) error
|
||||
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
|
||||
Get(name string, options metav1.GetOptions) (*v1.Function, error)
|
||||
List(opts metav1.ListOptions) (*v1.FunctionList, error)
|
||||
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Function, err error)
|
||||
Create(ctx context.Context, _function *v1.Function, opts metav1.CreateOptions) (*v1.Function, error)
|
||||
Update(ctx context.Context, _function *v1.Function, opts metav1.UpdateOptions) (*v1.Function, error)
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Function, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.FunctionList, error)
|
||||
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Function, err error)
|
||||
FunctionExpansion
|
||||
}
|
||||
|
||||
@@ -63,20 +64,20 @@ func newFunctions(c *CoreV1Client, namespace string) *functions {
|
||||
}
|
||||
|
||||
// Get takes name of the _function, and returns the corresponding function object, and an error if there is any.
|
||||
func (c *functions) Get(name string, options metav1.GetOptions) (result *v1.Function, err error) {
|
||||
func (c *functions) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Function, err error) {
|
||||
result = &v1.Function{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("functions").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Functions that match those selectors.
|
||||
func (c *functions) List(opts metav1.ListOptions) (result *v1.FunctionList, err error) {
|
||||
func (c *functions) List(ctx context.Context, opts metav1.ListOptions) (result *v1.FunctionList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -87,13 +88,13 @@ func (c *functions) List(opts metav1.ListOptions) (result *v1.FunctionList, err
|
||||
Resource("functions").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested functions.
|
||||
func (c *functions) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
func (c *functions) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -104,71 +105,74 @@ func (c *functions) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
Resource("functions").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a _function and creates it. Returns the server's representation of the function, and an error, if there is any.
|
||||
func (c *functions) Create(_function *v1.Function) (result *v1.Function, err error) {
|
||||
func (c *functions) Create(ctx context.Context, _function *v1.Function, opts metav1.CreateOptions) (result *v1.Function, err error) {
|
||||
result = &v1.Function{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("functions").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_function).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a _function and updates it. Returns the server's representation of the function, and an error, if there is any.
|
||||
func (c *functions) Update(_function *v1.Function) (result *v1.Function, err error) {
|
||||
func (c *functions) Update(ctx context.Context, _function *v1.Function, opts metav1.UpdateOptions) (result *v1.Function, err error) {
|
||||
result = &v1.Function{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("functions").
|
||||
Name(_function.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_function).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the _function and deletes it. Returns an error if one occurs.
|
||||
func (c *functions) Delete(name string, options *metav1.DeleteOptions) error {
|
||||
func (c *functions) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("functions").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *functions) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
func (c *functions) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("functions").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched function.
|
||||
func (c *functions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Function, err error) {
|
||||
func (c *functions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Function, err error) {
|
||||
result = &v1.Function{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("functions").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
@@ -37,14 +38,14 @@ type HTTPTriggersGetter interface {
|
||||
|
||||
// HTTPTriggerInterface has methods to work with HTTPTrigger resources.
|
||||
type HTTPTriggerInterface interface {
|
||||
Create(*v1.HTTPTrigger) (*v1.HTTPTrigger, error)
|
||||
Update(*v1.HTTPTrigger) (*v1.HTTPTrigger, error)
|
||||
Delete(name string, options *metav1.DeleteOptions) error
|
||||
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
|
||||
Get(name string, options metav1.GetOptions) (*v1.HTTPTrigger, error)
|
||||
List(opts metav1.ListOptions) (*v1.HTTPTriggerList, error)
|
||||
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HTTPTrigger, err error)
|
||||
Create(ctx context.Context, _hTTPTrigger *v1.HTTPTrigger, opts metav1.CreateOptions) (*v1.HTTPTrigger, error)
|
||||
Update(ctx context.Context, _hTTPTrigger *v1.HTTPTrigger, opts metav1.UpdateOptions) (*v1.HTTPTrigger, error)
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.HTTPTrigger, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.HTTPTriggerList, error)
|
||||
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.HTTPTrigger, err error)
|
||||
HTTPTriggerExpansion
|
||||
}
|
||||
|
||||
@@ -63,20 +64,20 @@ func newHTTPTriggers(c *CoreV1Client, namespace string) *hTTPTriggers {
|
||||
}
|
||||
|
||||
// Get takes name of the _hTTPTrigger, and returns the corresponding hTTPTrigger object, and an error if there is any.
|
||||
func (c *hTTPTriggers) Get(name string, options metav1.GetOptions) (result *v1.HTTPTrigger, err error) {
|
||||
func (c *hTTPTriggers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.HTTPTrigger, err error) {
|
||||
result = &v1.HTTPTrigger{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("httptriggers").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of HTTPTriggers that match those selectors.
|
||||
func (c *hTTPTriggers) List(opts metav1.ListOptions) (result *v1.HTTPTriggerList, err error) {
|
||||
func (c *hTTPTriggers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.HTTPTriggerList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -87,13 +88,13 @@ func (c *hTTPTriggers) List(opts metav1.ListOptions) (result *v1.HTTPTriggerList
|
||||
Resource("httptriggers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested hTTPTriggers.
|
||||
func (c *hTTPTriggers) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
func (c *hTTPTriggers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -104,71 +105,74 @@ func (c *hTTPTriggers) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
Resource("httptriggers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a _hTTPTrigger and creates it. Returns the server's representation of the hTTPTrigger, and an error, if there is any.
|
||||
func (c *hTTPTriggers) Create(_hTTPTrigger *v1.HTTPTrigger) (result *v1.HTTPTrigger, err error) {
|
||||
func (c *hTTPTriggers) Create(ctx context.Context, _hTTPTrigger *v1.HTTPTrigger, opts metav1.CreateOptions) (result *v1.HTTPTrigger, err error) {
|
||||
result = &v1.HTTPTrigger{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("httptriggers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_hTTPTrigger).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a _hTTPTrigger and updates it. Returns the server's representation of the hTTPTrigger, and an error, if there is any.
|
||||
func (c *hTTPTriggers) Update(_hTTPTrigger *v1.HTTPTrigger) (result *v1.HTTPTrigger, err error) {
|
||||
func (c *hTTPTriggers) Update(ctx context.Context, _hTTPTrigger *v1.HTTPTrigger, opts metav1.UpdateOptions) (result *v1.HTTPTrigger, err error) {
|
||||
result = &v1.HTTPTrigger{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("httptriggers").
|
||||
Name(_hTTPTrigger.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_hTTPTrigger).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the _hTTPTrigger and deletes it. Returns an error if one occurs.
|
||||
func (c *hTTPTriggers) Delete(name string, options *metav1.DeleteOptions) error {
|
||||
func (c *hTTPTriggers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("httptriggers").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *hTTPTriggers) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
func (c *hTTPTriggers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("httptriggers").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched hTTPTrigger.
|
||||
func (c *hTTPTriggers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HTTPTrigger, err error) {
|
||||
func (c *hTTPTriggers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.HTTPTrigger, err error) {
|
||||
result = &v1.HTTPTrigger{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("httptriggers").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
@@ -37,14 +38,14 @@ type KubernetesWatchTriggersGetter interface {
|
||||
|
||||
// KubernetesWatchTriggerInterface has methods to work with KubernetesWatchTrigger resources.
|
||||
type KubernetesWatchTriggerInterface interface {
|
||||
Create(*v1.KubernetesWatchTrigger) (*v1.KubernetesWatchTrigger, error)
|
||||
Update(*v1.KubernetesWatchTrigger) (*v1.KubernetesWatchTrigger, error)
|
||||
Delete(name string, options *metav1.DeleteOptions) error
|
||||
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
|
||||
Get(name string, options metav1.GetOptions) (*v1.KubernetesWatchTrigger, error)
|
||||
List(opts metav1.ListOptions) (*v1.KubernetesWatchTriggerList, error)
|
||||
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.KubernetesWatchTrigger, err error)
|
||||
Create(ctx context.Context, _kubernetesWatchTrigger *v1.KubernetesWatchTrigger, opts metav1.CreateOptions) (*v1.KubernetesWatchTrigger, error)
|
||||
Update(ctx context.Context, _kubernetesWatchTrigger *v1.KubernetesWatchTrigger, opts metav1.UpdateOptions) (*v1.KubernetesWatchTrigger, error)
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.KubernetesWatchTrigger, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.KubernetesWatchTriggerList, error)
|
||||
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.KubernetesWatchTrigger, err error)
|
||||
KubernetesWatchTriggerExpansion
|
||||
}
|
||||
|
||||
@@ -63,20 +64,20 @@ func newKubernetesWatchTriggers(c *CoreV1Client, namespace string) *kubernetesWa
|
||||
}
|
||||
|
||||
// Get takes name of the _kubernetesWatchTrigger, and returns the corresponding kubernetesWatchTrigger object, and an error if there is any.
|
||||
func (c *kubernetesWatchTriggers) Get(name string, options metav1.GetOptions) (result *v1.KubernetesWatchTrigger, err error) {
|
||||
func (c *kubernetesWatchTriggers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.KubernetesWatchTrigger, err error) {
|
||||
result = &v1.KubernetesWatchTrigger{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("kuberneteswatchtriggers").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of KubernetesWatchTriggers that match those selectors.
|
||||
func (c *kubernetesWatchTriggers) List(opts metav1.ListOptions) (result *v1.KubernetesWatchTriggerList, err error) {
|
||||
func (c *kubernetesWatchTriggers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.KubernetesWatchTriggerList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -87,13 +88,13 @@ func (c *kubernetesWatchTriggers) List(opts metav1.ListOptions) (result *v1.Kube
|
||||
Resource("kuberneteswatchtriggers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested kubernetesWatchTriggers.
|
||||
func (c *kubernetesWatchTriggers) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
func (c *kubernetesWatchTriggers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -104,71 +105,74 @@ func (c *kubernetesWatchTriggers) Watch(opts metav1.ListOptions) (watch.Interfac
|
||||
Resource("kuberneteswatchtriggers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a _kubernetesWatchTrigger and creates it. Returns the server's representation of the kubernetesWatchTrigger, and an error, if there is any.
|
||||
func (c *kubernetesWatchTriggers) Create(_kubernetesWatchTrigger *v1.KubernetesWatchTrigger) (result *v1.KubernetesWatchTrigger, err error) {
|
||||
func (c *kubernetesWatchTriggers) Create(ctx context.Context, _kubernetesWatchTrigger *v1.KubernetesWatchTrigger, opts metav1.CreateOptions) (result *v1.KubernetesWatchTrigger, err error) {
|
||||
result = &v1.KubernetesWatchTrigger{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("kuberneteswatchtriggers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_kubernetesWatchTrigger).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a _kubernetesWatchTrigger and updates it. Returns the server's representation of the kubernetesWatchTrigger, and an error, if there is any.
|
||||
func (c *kubernetesWatchTriggers) Update(_kubernetesWatchTrigger *v1.KubernetesWatchTrigger) (result *v1.KubernetesWatchTrigger, err error) {
|
||||
func (c *kubernetesWatchTriggers) Update(ctx context.Context, _kubernetesWatchTrigger *v1.KubernetesWatchTrigger, opts metav1.UpdateOptions) (result *v1.KubernetesWatchTrigger, err error) {
|
||||
result = &v1.KubernetesWatchTrigger{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("kuberneteswatchtriggers").
|
||||
Name(_kubernetesWatchTrigger.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_kubernetesWatchTrigger).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the _kubernetesWatchTrigger and deletes it. Returns an error if one occurs.
|
||||
func (c *kubernetesWatchTriggers) Delete(name string, options *metav1.DeleteOptions) error {
|
||||
func (c *kubernetesWatchTriggers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("kuberneteswatchtriggers").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *kubernetesWatchTriggers) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
func (c *kubernetesWatchTriggers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("kuberneteswatchtriggers").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched kubernetesWatchTrigger.
|
||||
func (c *kubernetesWatchTriggers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.KubernetesWatchTrigger, err error) {
|
||||
func (c *kubernetesWatchTriggers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.KubernetesWatchTrigger, err error) {
|
||||
result = &v1.KubernetesWatchTrigger{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("kuberneteswatchtriggers").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
@@ -37,14 +38,14 @@ type MessageQueueTriggersGetter interface {
|
||||
|
||||
// MessageQueueTriggerInterface has methods to work with MessageQueueTrigger resources.
|
||||
type MessageQueueTriggerInterface interface {
|
||||
Create(*v1.MessageQueueTrigger) (*v1.MessageQueueTrigger, error)
|
||||
Update(*v1.MessageQueueTrigger) (*v1.MessageQueueTrigger, error)
|
||||
Delete(name string, options *metav1.DeleteOptions) error
|
||||
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
|
||||
Get(name string, options metav1.GetOptions) (*v1.MessageQueueTrigger, error)
|
||||
List(opts metav1.ListOptions) (*v1.MessageQueueTriggerList, error)
|
||||
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.MessageQueueTrigger, err error)
|
||||
Create(ctx context.Context, _messageQueueTrigger *v1.MessageQueueTrigger, opts metav1.CreateOptions) (*v1.MessageQueueTrigger, error)
|
||||
Update(ctx context.Context, _messageQueueTrigger *v1.MessageQueueTrigger, opts metav1.UpdateOptions) (*v1.MessageQueueTrigger, error)
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.MessageQueueTrigger, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.MessageQueueTriggerList, error)
|
||||
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.MessageQueueTrigger, err error)
|
||||
MessageQueueTriggerExpansion
|
||||
}
|
||||
|
||||
@@ -63,20 +64,20 @@ func newMessageQueueTriggers(c *CoreV1Client, namespace string) *messageQueueTri
|
||||
}
|
||||
|
||||
// Get takes name of the _messageQueueTrigger, and returns the corresponding messageQueueTrigger object, and an error if there is any.
|
||||
func (c *messageQueueTriggers) Get(name string, options metav1.GetOptions) (result *v1.MessageQueueTrigger, err error) {
|
||||
func (c *messageQueueTriggers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.MessageQueueTrigger, err error) {
|
||||
result = &v1.MessageQueueTrigger{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("messagequeuetriggers").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of MessageQueueTriggers that match those selectors.
|
||||
func (c *messageQueueTriggers) List(opts metav1.ListOptions) (result *v1.MessageQueueTriggerList, err error) {
|
||||
func (c *messageQueueTriggers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.MessageQueueTriggerList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -87,13 +88,13 @@ func (c *messageQueueTriggers) List(opts metav1.ListOptions) (result *v1.Message
|
||||
Resource("messagequeuetriggers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested messageQueueTriggers.
|
||||
func (c *messageQueueTriggers) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
func (c *messageQueueTriggers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -104,71 +105,74 @@ func (c *messageQueueTriggers) Watch(opts metav1.ListOptions) (watch.Interface,
|
||||
Resource("messagequeuetriggers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a _messageQueueTrigger and creates it. Returns the server's representation of the messageQueueTrigger, and an error, if there is any.
|
||||
func (c *messageQueueTriggers) Create(_messageQueueTrigger *v1.MessageQueueTrigger) (result *v1.MessageQueueTrigger, err error) {
|
||||
func (c *messageQueueTriggers) Create(ctx context.Context, _messageQueueTrigger *v1.MessageQueueTrigger, opts metav1.CreateOptions) (result *v1.MessageQueueTrigger, err error) {
|
||||
result = &v1.MessageQueueTrigger{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("messagequeuetriggers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_messageQueueTrigger).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a _messageQueueTrigger and updates it. Returns the server's representation of the messageQueueTrigger, and an error, if there is any.
|
||||
func (c *messageQueueTriggers) Update(_messageQueueTrigger *v1.MessageQueueTrigger) (result *v1.MessageQueueTrigger, err error) {
|
||||
func (c *messageQueueTriggers) Update(ctx context.Context, _messageQueueTrigger *v1.MessageQueueTrigger, opts metav1.UpdateOptions) (result *v1.MessageQueueTrigger, err error) {
|
||||
result = &v1.MessageQueueTrigger{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("messagequeuetriggers").
|
||||
Name(_messageQueueTrigger.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_messageQueueTrigger).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the _messageQueueTrigger and deletes it. Returns an error if one occurs.
|
||||
func (c *messageQueueTriggers) Delete(name string, options *metav1.DeleteOptions) error {
|
||||
func (c *messageQueueTriggers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("messagequeuetriggers").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *messageQueueTriggers) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
func (c *messageQueueTriggers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("messagequeuetriggers").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched messageQueueTrigger.
|
||||
func (c *messageQueueTriggers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.MessageQueueTrigger, err error) {
|
||||
func (c *messageQueueTriggers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.MessageQueueTrigger, err error) {
|
||||
result = &v1.MessageQueueTrigger{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("messagequeuetriggers").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
@@ -37,15 +38,15 @@ type PackagesGetter interface {
|
||||
|
||||
// PackageInterface has methods to work with Package resources.
|
||||
type PackageInterface interface {
|
||||
Create(*v1.Package) (*v1.Package, error)
|
||||
Update(*v1.Package) (*v1.Package, error)
|
||||
UpdateStatus(*v1.Package) (*v1.Package, error)
|
||||
Delete(name string, options *metav1.DeleteOptions) error
|
||||
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
|
||||
Get(name string, options metav1.GetOptions) (*v1.Package, error)
|
||||
List(opts metav1.ListOptions) (*v1.PackageList, error)
|
||||
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Package, err error)
|
||||
Create(ctx context.Context, _package *v1.Package, opts metav1.CreateOptions) (*v1.Package, error)
|
||||
Update(ctx context.Context, _package *v1.Package, opts metav1.UpdateOptions) (*v1.Package, error)
|
||||
UpdateStatus(ctx context.Context, _package *v1.Package, opts metav1.UpdateOptions) (*v1.Package, error)
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Package, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.PackageList, error)
|
||||
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Package, err error)
|
||||
PackageExpansion
|
||||
}
|
||||
|
||||
@@ -64,20 +65,20 @@ func newPackages(c *CoreV1Client, namespace string) *packages {
|
||||
}
|
||||
|
||||
// Get takes name of the _package, and returns the corresponding package object, and an error if there is any.
|
||||
func (c *packages) Get(name string, options metav1.GetOptions) (result *v1.Package, err error) {
|
||||
func (c *packages) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Package, err error) {
|
||||
result = &v1.Package{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("packages").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Packages that match those selectors.
|
||||
func (c *packages) List(opts metav1.ListOptions) (result *v1.PackageList, err error) {
|
||||
func (c *packages) List(ctx context.Context, opts metav1.ListOptions) (result *v1.PackageList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -88,13 +89,13 @@ func (c *packages) List(opts metav1.ListOptions) (result *v1.PackageList, err er
|
||||
Resource("packages").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested packages.
|
||||
func (c *packages) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
func (c *packages) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -105,87 +106,90 @@ func (c *packages) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
Resource("packages").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a _package and creates it. Returns the server's representation of the package, and an error, if there is any.
|
||||
func (c *packages) Create(_package *v1.Package) (result *v1.Package, err error) {
|
||||
func (c *packages) Create(ctx context.Context, _package *v1.Package, opts metav1.CreateOptions) (result *v1.Package, err error) {
|
||||
result = &v1.Package{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("packages").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_package).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a _package and updates it. Returns the server's representation of the package, and an error, if there is any.
|
||||
func (c *packages) Update(_package *v1.Package) (result *v1.Package, err error) {
|
||||
func (c *packages) Update(ctx context.Context, _package *v1.Package, opts metav1.UpdateOptions) (result *v1.Package, err error) {
|
||||
result = &v1.Package{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("packages").
|
||||
Name(_package.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_package).
|
||||
Do().
|
||||
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 *packages) UpdateStatus(_package *v1.Package) (result *v1.Package, err error) {
|
||||
func (c *packages) UpdateStatus(ctx context.Context, _package *v1.Package, opts metav1.UpdateOptions) (result *v1.Package, err error) {
|
||||
result = &v1.Package{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("packages").
|
||||
Name(_package.Name).
|
||||
SubResource("status").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_package).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the _package and deletes it. Returns an error if one occurs.
|
||||
func (c *packages) Delete(name string, options *metav1.DeleteOptions) error {
|
||||
func (c *packages) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("packages").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *packages) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
func (c *packages) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("packages").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched package.
|
||||
func (c *packages) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Package, err error) {
|
||||
func (c *packages) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Package, err error) {
|
||||
result = &v1.Package{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("packages").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
@@ -37,14 +38,14 @@ type TimeTriggersGetter interface {
|
||||
|
||||
// TimeTriggerInterface has methods to work with TimeTrigger resources.
|
||||
type TimeTriggerInterface interface {
|
||||
Create(*v1.TimeTrigger) (*v1.TimeTrigger, error)
|
||||
Update(*v1.TimeTrigger) (*v1.TimeTrigger, error)
|
||||
Delete(name string, options *metav1.DeleteOptions) error
|
||||
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
|
||||
Get(name string, options metav1.GetOptions) (*v1.TimeTrigger, error)
|
||||
List(opts metav1.ListOptions) (*v1.TimeTriggerList, error)
|
||||
Watch(opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.TimeTrigger, err error)
|
||||
Create(ctx context.Context, _timeTrigger *v1.TimeTrigger, opts metav1.CreateOptions) (*v1.TimeTrigger, error)
|
||||
Update(ctx context.Context, _timeTrigger *v1.TimeTrigger, opts metav1.UpdateOptions) (*v1.TimeTrigger, error)
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.TimeTrigger, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.TimeTriggerList, error)
|
||||
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.TimeTrigger, err error)
|
||||
TimeTriggerExpansion
|
||||
}
|
||||
|
||||
@@ -63,20 +64,20 @@ func newTimeTriggers(c *CoreV1Client, namespace string) *timeTriggers {
|
||||
}
|
||||
|
||||
// Get takes name of the _timeTrigger, and returns the corresponding timeTrigger object, and an error if there is any.
|
||||
func (c *timeTriggers) Get(name string, options metav1.GetOptions) (result *v1.TimeTrigger, err error) {
|
||||
func (c *timeTriggers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.TimeTrigger, err error) {
|
||||
result = &v1.TimeTrigger{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("timetriggers").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of TimeTriggers that match those selectors.
|
||||
func (c *timeTriggers) List(opts metav1.ListOptions) (result *v1.TimeTriggerList, err error) {
|
||||
func (c *timeTriggers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.TimeTriggerList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -87,13 +88,13 @@ func (c *timeTriggers) List(opts metav1.ListOptions) (result *v1.TimeTriggerList
|
||||
Resource("timetriggers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested timeTriggers.
|
||||
func (c *timeTriggers) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
func (c *timeTriggers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -104,71 +105,74 @@ func (c *timeTriggers) Watch(opts metav1.ListOptions) (watch.Interface, error) {
|
||||
Resource("timetriggers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a _timeTrigger and creates it. Returns the server's representation of the timeTrigger, and an error, if there is any.
|
||||
func (c *timeTriggers) Create(_timeTrigger *v1.TimeTrigger) (result *v1.TimeTrigger, err error) {
|
||||
func (c *timeTriggers) Create(ctx context.Context, _timeTrigger *v1.TimeTrigger, opts metav1.CreateOptions) (result *v1.TimeTrigger, err error) {
|
||||
result = &v1.TimeTrigger{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("timetriggers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_timeTrigger).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a _timeTrigger and updates it. Returns the server's representation of the timeTrigger, and an error, if there is any.
|
||||
func (c *timeTriggers) Update(_timeTrigger *v1.TimeTrigger) (result *v1.TimeTrigger, err error) {
|
||||
func (c *timeTriggers) Update(ctx context.Context, _timeTrigger *v1.TimeTrigger, opts metav1.UpdateOptions) (result *v1.TimeTrigger, err error) {
|
||||
result = &v1.TimeTrigger{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("timetriggers").
|
||||
Name(_timeTrigger.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(_timeTrigger).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the _timeTrigger and deletes it. Returns an error if one occurs.
|
||||
func (c *timeTriggers) Delete(name string, options *metav1.DeleteOptions) error {
|
||||
func (c *timeTriggers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("timetriggers").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *timeTriggers) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
|
||||
func (c *timeTriggers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("timetriggers").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched timeTrigger.
|
||||
func (c *timeTriggers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.TimeTrigger, err error) {
|
||||
func (c *timeTriggers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.TimeTrigger, err error) {
|
||||
result = &v1.TimeTrigger{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("timetriggers").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do().
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
@@ -61,13 +62,13 @@ func NewFilteredCanaryConfigInformer(client versioned.Interface, namespace strin
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CoreV1().CanaryConfigs(namespace).List(options)
|
||||
return client.CoreV1().CanaryConfigs(namespace).List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CoreV1().CanaryConfigs(namespace).Watch(options)
|
||||
return client.CoreV1().CanaryConfigs(namespace).Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&corev1.CanaryConfig{},
|
||||
|
||||
@@ -19,6 +19,7 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
@@ -61,13 +62,13 @@ func NewFilteredEnvironmentInformer(client versioned.Interface, namespace string
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CoreV1().Environments(namespace).List(options)
|
||||
return client.CoreV1().Environments(namespace).List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CoreV1().Environments(namespace).Watch(options)
|
||||
return client.CoreV1().Environments(namespace).Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&corev1.Environment{},
|
||||
|
||||
@@ -19,6 +19,7 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
@@ -61,13 +62,13 @@ func NewFilteredFunctionInformer(client versioned.Interface, namespace string, r
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CoreV1().Functions(namespace).List(options)
|
||||
return client.CoreV1().Functions(namespace).List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CoreV1().Functions(namespace).Watch(options)
|
||||
return client.CoreV1().Functions(namespace).Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&corev1.Function{},
|
||||
|
||||
@@ -19,6 +19,7 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
@@ -61,13 +62,13 @@ func NewFilteredHTTPTriggerInformer(client versioned.Interface, namespace string
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CoreV1().HTTPTriggers(namespace).List(options)
|
||||
return client.CoreV1().HTTPTriggers(namespace).List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CoreV1().HTTPTriggers(namespace).Watch(options)
|
||||
return client.CoreV1().HTTPTriggers(namespace).Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&corev1.HTTPTrigger{},
|
||||
|
||||
@@ -19,6 +19,7 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
@@ -61,13 +62,13 @@ func NewFilteredKubernetesWatchTriggerInformer(client versioned.Interface, names
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CoreV1().KubernetesWatchTriggers(namespace).List(options)
|
||||
return client.CoreV1().KubernetesWatchTriggers(namespace).List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CoreV1().KubernetesWatchTriggers(namespace).Watch(options)
|
||||
return client.CoreV1().KubernetesWatchTriggers(namespace).Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&corev1.KubernetesWatchTrigger{},
|
||||
|
||||
@@ -19,6 +19,7 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
@@ -61,13 +62,13 @@ func NewFilteredMessageQueueTriggerInformer(client versioned.Interface, namespac
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CoreV1().MessageQueueTriggers(namespace).List(options)
|
||||
return client.CoreV1().MessageQueueTriggers(namespace).List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CoreV1().MessageQueueTriggers(namespace).Watch(options)
|
||||
return client.CoreV1().MessageQueueTriggers(namespace).Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&corev1.MessageQueueTrigger{},
|
||||
|
||||
@@ -19,6 +19,7 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
@@ -61,13 +62,13 @@ func NewFilteredPackageInformer(client versioned.Interface, namespace string, re
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CoreV1().Packages(namespace).List(options)
|
||||
return client.CoreV1().Packages(namespace).List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CoreV1().Packages(namespace).Watch(options)
|
||||
return client.CoreV1().Packages(namespace).Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&corev1.Package{},
|
||||
|
||||
@@ -19,6 +19,7 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
@@ -61,13 +62,13 @@ func NewFilteredTimeTriggerInformer(client versioned.Interface, namespace string
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CoreV1().TimeTriggers(namespace).List(options)
|
||||
return client.CoreV1().TimeTriggers(namespace).List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.CoreV1().TimeTriggers(namespace).Watch(options)
|
||||
return client.CoreV1().TimeTriggers(namespace).Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&corev1.TimeTrigger{},
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// CanaryConfigLister helps list CanaryConfigs.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type CanaryConfigLister interface {
|
||||
// List lists all CanaryConfigs in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.CanaryConfig, err error)
|
||||
// CanaryConfigs returns an object that can list and get CanaryConfigs.
|
||||
CanaryConfigs(namespace string) CanaryConfigNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *_canaryConfigLister) CanaryConfigs(namespace string) CanaryConfigNamesp
|
||||
}
|
||||
|
||||
// CanaryConfigNamespaceLister helps list and get CanaryConfigs.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type CanaryConfigNamespaceLister interface {
|
||||
// List lists all CanaryConfigs in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.CanaryConfig, err error)
|
||||
// Get retrieves the CanaryConfig from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.CanaryConfig, error)
|
||||
CanaryConfigNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// EnvironmentLister helps list Environments.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type EnvironmentLister interface {
|
||||
// List lists all Environments in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.Environment, err error)
|
||||
// Environments returns an object that can list and get Environments.
|
||||
Environments(namespace string) EnvironmentNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *_environmentLister) Environments(namespace string) EnvironmentNamespace
|
||||
}
|
||||
|
||||
// EnvironmentNamespaceLister helps list and get Environments.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type EnvironmentNamespaceLister interface {
|
||||
// List lists all Environments in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.Environment, err error)
|
||||
// Get retrieves the Environment from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.Environment, error)
|
||||
EnvironmentNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// FunctionLister helps list Functions.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type FunctionLister interface {
|
||||
// List lists all Functions in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.Function, err error)
|
||||
// Functions returns an object that can list and get Functions.
|
||||
Functions(namespace string) FunctionNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *_functionLister) Functions(namespace string) FunctionNamespaceLister {
|
||||
}
|
||||
|
||||
// FunctionNamespaceLister helps list and get Functions.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type FunctionNamespaceLister interface {
|
||||
// List lists all Functions in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.Function, err error)
|
||||
// Get retrieves the Function from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.Function, error)
|
||||
FunctionNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// HTTPTriggerLister helps list HTTPTriggers.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type HTTPTriggerLister interface {
|
||||
// List lists all HTTPTriggers in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.HTTPTrigger, err error)
|
||||
// HTTPTriggers returns an object that can list and get HTTPTriggers.
|
||||
HTTPTriggers(namespace string) HTTPTriggerNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *_hTTPTriggerLister) HTTPTriggers(namespace string) HTTPTriggerNamespace
|
||||
}
|
||||
|
||||
// HTTPTriggerNamespaceLister helps list and get HTTPTriggers.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type HTTPTriggerNamespaceLister interface {
|
||||
// List lists all HTTPTriggers in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.HTTPTrigger, err error)
|
||||
// Get retrieves the HTTPTrigger from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.HTTPTrigger, error)
|
||||
HTTPTriggerNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// KubernetesWatchTriggerLister helps list KubernetesWatchTriggers.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type KubernetesWatchTriggerLister interface {
|
||||
// List lists all KubernetesWatchTriggers in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.KubernetesWatchTrigger, err error)
|
||||
// KubernetesWatchTriggers returns an object that can list and get KubernetesWatchTriggers.
|
||||
KubernetesWatchTriggers(namespace string) KubernetesWatchTriggerNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *_kubernetesWatchTriggerLister) KubernetesWatchTriggers(namespace string
|
||||
}
|
||||
|
||||
// KubernetesWatchTriggerNamespaceLister helps list and get KubernetesWatchTriggers.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type KubernetesWatchTriggerNamespaceLister interface {
|
||||
// List lists all KubernetesWatchTriggers in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.KubernetesWatchTrigger, err error)
|
||||
// Get retrieves the KubernetesWatchTrigger from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.KubernetesWatchTrigger, error)
|
||||
KubernetesWatchTriggerNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// MessageQueueTriggerLister helps list MessageQueueTriggers.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type MessageQueueTriggerLister interface {
|
||||
// List lists all MessageQueueTriggers in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.MessageQueueTrigger, err error)
|
||||
// MessageQueueTriggers returns an object that can list and get MessageQueueTriggers.
|
||||
MessageQueueTriggers(namespace string) MessageQueueTriggerNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *_messageQueueTriggerLister) MessageQueueTriggers(namespace string) Mess
|
||||
}
|
||||
|
||||
// MessageQueueTriggerNamespaceLister helps list and get MessageQueueTriggers.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type MessageQueueTriggerNamespaceLister interface {
|
||||
// List lists all MessageQueueTriggers in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.MessageQueueTrigger, err error)
|
||||
// Get retrieves the MessageQueueTrigger from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.MessageQueueTrigger, error)
|
||||
MessageQueueTriggerNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// PackageLister helps list Packages.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type PackageLister interface {
|
||||
// List lists all Packages in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.Package, err error)
|
||||
// Packages returns an object that can list and get Packages.
|
||||
Packages(namespace string) PackageNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *_packageLister) Packages(namespace string) PackageNamespaceLister {
|
||||
}
|
||||
|
||||
// PackageNamespaceLister helps list and get Packages.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type PackageNamespaceLister interface {
|
||||
// List lists all Packages in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.Package, err error)
|
||||
// Get retrieves the Package from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.Package, error)
|
||||
PackageNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -26,8 +26,10 @@ import (
|
||||
)
|
||||
|
||||
// TimeTriggerLister helps list TimeTriggers.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type TimeTriggerLister interface {
|
||||
// List lists all TimeTriggers in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.TimeTrigger, err error)
|
||||
// TimeTriggers returns an object that can list and get TimeTriggers.
|
||||
TimeTriggers(namespace string) TimeTriggerNamespaceLister
|
||||
@@ -58,10 +60,13 @@ func (s *_timeTriggerLister) TimeTriggers(namespace string) TimeTriggerNamespace
|
||||
}
|
||||
|
||||
// TimeTriggerNamespaceLister helps list and get TimeTriggers.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type TimeTriggerNamespaceLister interface {
|
||||
// List lists all TimeTriggers in the indexer for a given namespace.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v1.TimeTrigger, err error)
|
||||
// Get retrieves the TimeTrigger from the indexer for a given namespace and name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v1.TimeTrigger, error)
|
||||
TimeTriggerNamespaceListerExpansion
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ import (
|
||||
func buildPackage(ctx context.Context, logger *zap.Logger, fissionClient *crd.FissionClient, envBuilderNamespace string,
|
||||
storageSvcUrl string, pkg *fv1.Package) (uploadResp *fetcher.ArchiveUploadResponse, buildLogs string, err error) {
|
||||
|
||||
env, err := fissionClient.CoreV1().Environments(pkg.Spec.Environment.Namespace).Get(pkg.Spec.Environment.Name, metav1.GetOptions{})
|
||||
env, err := fissionClient.CoreV1().Environments(pkg.Spec.Environment.Namespace).Get(context.TODO(), pkg.Spec.Environment.Name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
e := "error getting environment CRD info"
|
||||
logger.Error(e, zap.Error(err))
|
||||
@@ -140,7 +140,7 @@ func updatePackage(logger *zap.Logger, fissionClient *crd.FissionClient,
|
||||
}
|
||||
|
||||
// update package spec
|
||||
pkg, err := fissionClient.CoreV1().Packages(pkg.ObjectMeta.Namespace).Update(pkg)
|
||||
pkg, err := fissionClient.CoreV1().Packages(pkg.ObjectMeta.Namespace).Update(context.TODO(), pkg, metav1.UpdateOptions{})
|
||||
if err != nil {
|
||||
e := "error updating package"
|
||||
logger.Error(e, zap.Error(err))
|
||||
|
||||
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package buildermgr
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"strconv"
|
||||
@@ -147,9 +148,10 @@ func (envw *environmentWatcher) getLabels(envName string, envNamespace string, e
|
||||
func (envw *environmentWatcher) watchEnvironments() {
|
||||
rv := ""
|
||||
for {
|
||||
wi, err := envw.fissionClient.CoreV1().Environments(metav1.NamespaceAll).Watch(metav1.ListOptions{
|
||||
ResourceVersion: rv,
|
||||
})
|
||||
wi, err := envw.fissionClient.CoreV1().Environments(metav1.NamespaceAll).Watch(context.TODO(),
|
||||
metav1.ListOptions{
|
||||
ResourceVersion: rv,
|
||||
})
|
||||
if err != nil {
|
||||
if utils.IsNetworkError(err) {
|
||||
envw.logger.Error("encountered network error, retrying later", zap.Error(err))
|
||||
@@ -181,7 +183,7 @@ func (envw *environmentWatcher) watchEnvironments() {
|
||||
func (envw *environmentWatcher) sync() {
|
||||
maxRetries := 10
|
||||
for i := 0; i < maxRetries; i++ {
|
||||
envList, err := envw.fissionClient.CoreV1().Environments(metav1.NamespaceAll).List(metav1.ListOptions{})
|
||||
envList, err := envw.fissionClient.CoreV1().Environments(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{})
|
||||
if err != nil {
|
||||
if utils.IsNetworkError(err) {
|
||||
envw.logger.Error("error syncing environment CRD resources due to network error, retrying later", zap.Error(err))
|
||||
@@ -370,7 +372,7 @@ func (envw *environmentWatcher) createBuilder(env *fv1.Environment, ns string) (
|
||||
func (envw *environmentWatcher) deleteBuilderServiceByName(name, namespace string) error {
|
||||
err := envw.kubernetesClient.CoreV1().
|
||||
Services(namespace).
|
||||
Delete(name, &delOpt)
|
||||
Delete(context.TODO(), name, delOpt)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "error deleting builder service %s.%s", name, namespace)
|
||||
}
|
||||
@@ -380,7 +382,7 @@ func (envw *environmentWatcher) deleteBuilderServiceByName(name, namespace strin
|
||||
func (envw *environmentWatcher) deleteBuilderDeploymentByName(name, namespace string) error {
|
||||
err := envw.kubernetesClient.AppsV1().
|
||||
Deployments(namespace).
|
||||
Delete(name, &delOpt)
|
||||
Delete(context.TODO(), name, delOpt)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "error deleting builder deployment %s.%s", name, namespace)
|
||||
}
|
||||
@@ -389,6 +391,7 @@ func (envw *environmentWatcher) deleteBuilderDeploymentByName(name, namespace st
|
||||
|
||||
func (envw *environmentWatcher) getBuilderServiceList(sel map[string]string, ns string) ([]apiv1.Service, error) {
|
||||
svcList, err := envw.kubernetesClient.CoreV1().Services(ns).List(
|
||||
context.TODO(),
|
||||
metav1.ListOptions{
|
||||
LabelSelector: labels.Set(sel).AsSelector().String(),
|
||||
})
|
||||
@@ -433,7 +436,7 @@ func (envw *environmentWatcher) createBuilderService(env *fv1.Environment, ns st
|
||||
},
|
||||
}
|
||||
envw.logger.Info("creating builder service", zap.String("service_name", name))
|
||||
_, err := envw.kubernetesClient.CoreV1().Services(ns).Create(&service)
|
||||
_, err := envw.kubernetesClient.CoreV1().Services(ns).Create(context.TODO(), &service, metav1.CreateOptions{})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -442,6 +445,7 @@ func (envw *environmentWatcher) createBuilderService(env *fv1.Environment, ns st
|
||||
|
||||
func (envw *environmentWatcher) getBuilderDeploymentList(sel map[string]string, ns string) ([]appsv1.Deployment, error) {
|
||||
deployList, err := envw.kubernetesClient.AppsV1().Deployments(ns).List(
|
||||
context.TODO(),
|
||||
metav1.ListOptions{
|
||||
LabelSelector: labels.Set(sel).AsSelector().String(),
|
||||
})
|
||||
@@ -529,7 +533,7 @@ func (envw *environmentWatcher) createBuilderDeployment(env *fv1.Environment, ns
|
||||
deployment.Spec.Template.Spec = *newPodSpec
|
||||
}
|
||||
|
||||
_, err = envw.kubernetesClient.AppsV1().Deployments(ns).Create(deployment)
|
||||
_, err = envw.kubernetesClient.AppsV1().Deployments(ns).Create(context.TODO(), deployment, metav1.CreateOptions{})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ func (pkgw *packageWatcher) build(buildCache *cache.Cache, srcpkg *fv1.Package)
|
||||
return
|
||||
}
|
||||
|
||||
env, err := pkgw.fissionClient.CoreV1().Environments(pkg.Spec.Environment.Namespace).Get(pkg.Spec.Environment.Name, metav1.GetOptions{})
|
||||
env, err := pkgw.fissionClient.CoreV1().Environments(pkg.Spec.Environment.Namespace).Get(context.TODO(), pkg.Spec.Environment.Name, metav1.GetOptions{})
|
||||
if k8serrors.IsNotFound(err) {
|
||||
e := "environment does not exist"
|
||||
pkgw.logger.Error(e, zap.String("environment", pkg.Spec.Environment.Name))
|
||||
@@ -201,7 +201,7 @@ func (pkgw *packageWatcher) build(buildCache *cache.Cache, srcpkg *fv1.Package)
|
||||
pkgw.logger.Info("starting package info update", zap.String("package_name", pkg.ObjectMeta.Name))
|
||||
|
||||
fnList, err := pkgw.fissionClient.CoreV1().
|
||||
Functions(metav1.NamespaceAll).List(metav1.ListOptions{})
|
||||
Functions(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{})
|
||||
if err != nil {
|
||||
e := "error getting function list"
|
||||
pkgw.logger.Error(e, zap.Error(err))
|
||||
@@ -225,7 +225,7 @@ func (pkgw *packageWatcher) build(buildCache *cache.Cache, srcpkg *fv1.Package)
|
||||
fn.Spec.Package.PackageRef.ResourceVersion != pkg.ObjectMeta.ResourceVersion {
|
||||
fn.Spec.Package.PackageRef.ResourceVersion = pkg.ObjectMeta.ResourceVersion
|
||||
// update CRD
|
||||
_, err = pkgw.fissionClient.CoreV1().Functions(fn.ObjectMeta.Namespace).Update(&fn)
|
||||
_, err = pkgw.fissionClient.CoreV1().Functions(fn.ObjectMeta.Namespace).Update(context.TODO(), &fn, metav1.UpdateOptions{})
|
||||
if err != nil {
|
||||
e := "error updating function package resource version"
|
||||
pkgw.logger.Error(e, zap.Error(err))
|
||||
@@ -352,5 +352,5 @@ func setInitialBuildStatus(fissionClient *crd.FissionClient, pkg *fv1.Package) (
|
||||
}
|
||||
|
||||
// TODO: use UpdateStatus to update status
|
||||
return fissionClient.CoreV1().Packages(pkg.Namespace).Update(pkg)
|
||||
return fissionClient.CoreV1().Packages(pkg.Namespace).Update(context.TODO(), pkg, metav1.UpdateOptions{})
|
||||
}
|
||||
|
||||
@@ -242,7 +242,7 @@ func (canaryCfgMgr *canaryConfigMgr) RollForwardOrBack(canaryConfig *fv1.CanaryC
|
||||
}
|
||||
|
||||
// get the http trigger object associated with this canary config
|
||||
triggerObj, err := canaryCfgMgr.fissionClient.CoreV1().HTTPTriggers(canaryConfig.ObjectMeta.Namespace).Get(canaryConfig.Spec.Trigger, metav1.GetOptions{})
|
||||
triggerObj, err := canaryCfgMgr.fissionClient.CoreV1().HTTPTriggers(canaryConfig.ObjectMeta.Namespace).Get(context.TODO(), canaryConfig.Spec.Trigger, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
// if the http trigger is not found, then give up processing this config.
|
||||
if k8serrors.IsNotFound(err) {
|
||||
@@ -361,7 +361,7 @@ func (canaryCfgMgr *canaryConfigMgr) RollForwardOrBack(canaryConfig *fv1.CanaryC
|
||||
|
||||
func (canaryCfgMgr *canaryConfigMgr) updateHttpTriggerWithRetries(triggerName, triggerNamespace string, fnWeights map[string]int) (err error) {
|
||||
for i := 0; i < maxRetries; i++ {
|
||||
triggerObj, err := canaryCfgMgr.fissionClient.CoreV1().HTTPTriggers(triggerNamespace).Get(triggerName, metav1.GetOptions{})
|
||||
triggerObj, err := canaryCfgMgr.fissionClient.CoreV1().HTTPTriggers(triggerNamespace).Get(context.TODO(), triggerName, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
e := "error getting http trigger object"
|
||||
canaryCfgMgr.logger.Error(e, zap.Error(err), zap.String("trigger_name", triggerName), zap.String("trigger_namespace", triggerNamespace))
|
||||
@@ -370,7 +370,7 @@ func (canaryCfgMgr *canaryConfigMgr) updateHttpTriggerWithRetries(triggerName, t
|
||||
|
||||
triggerObj.Spec.FunctionReference.FunctionWeights = fnWeights
|
||||
|
||||
_, err = canaryCfgMgr.fissionClient.CoreV1().HTTPTriggers(triggerNamespace).Update(triggerObj)
|
||||
_, err = canaryCfgMgr.fissionClient.CoreV1().HTTPTriggers(triggerNamespace).Update(context.TODO(), triggerObj, metav1.UpdateOptions{})
|
||||
switch {
|
||||
case err == nil:
|
||||
canaryCfgMgr.logger.Debug("updated http trigger", zap.String("trigger_name", triggerName), zap.String("trigger_namespace", triggerNamespace))
|
||||
@@ -396,7 +396,7 @@ func (canaryCfgMgr *canaryConfigMgr) updateHttpTriggerWithRetries(triggerName, t
|
||||
|
||||
func (canaryCfgMgr *canaryConfigMgr) updateCanaryConfigStatusWithRetries(cfgName, cfgNamespace string, status string) (err error) {
|
||||
for i := 0; i < maxRetries; i++ {
|
||||
canaryCfgObj, err := canaryCfgMgr.fissionClient.CoreV1().CanaryConfigs(cfgNamespace).Get(cfgName, metav1.GetOptions{})
|
||||
canaryCfgObj, err := canaryCfgMgr.fissionClient.CoreV1().CanaryConfigs(cfgNamespace).Get(context.TODO(), cfgName, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
e := "error getting http canary config object"
|
||||
canaryCfgMgr.logger.Error(e,
|
||||
@@ -414,7 +414,7 @@ func (canaryCfgMgr *canaryConfigMgr) updateCanaryConfigStatusWithRetries(cfgName
|
||||
|
||||
canaryCfgObj.Status.Status = status
|
||||
|
||||
_, err = canaryCfgMgr.fissionClient.CoreV1().CanaryConfigs(cfgNamespace).Update(canaryCfgObj)
|
||||
_, err = canaryCfgMgr.fissionClient.CoreV1().CanaryConfigs(cfgNamespace).Update(context.TODO(), canaryCfgObj, metav1.UpdateOptions{})
|
||||
switch {
|
||||
case err == nil:
|
||||
canaryCfgMgr.logger.Info("updated canary config",
|
||||
|
||||
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
@@ -134,14 +135,14 @@ func (api *API) createNsIfNotExists(ns string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
_, err := api.kubernetesClient.CoreV1().Namespaces().Get(ns, metav1.GetOptions{})
|
||||
_, err := api.kubernetesClient.CoreV1().Namespaces().Get(context.TODO(), ns, metav1.GetOptions{})
|
||||
if err != nil && kerrors.IsNotFound(err) {
|
||||
ns := &apiv1.Namespace{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: ns,
|
||||
},
|
||||
}
|
||||
_, err = api.kubernetesClient.CoreV1().Namespaces().Create(ns)
|
||||
_, err = api.kubernetesClient.CoreV1().Namespaces().Create(context.TODO(), ns, metav1.CreateOptions{})
|
||||
}
|
||||
|
||||
return err
|
||||
@@ -183,7 +184,7 @@ func (api *API) HealthHandler(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
func (api *API) GetSvcName(w http.ResponseWriter, r *http.Request) {
|
||||
appLabelSelector := "application=" + r.URL.Query().Get("application")
|
||||
services, err := api.kubernetesClient.CoreV1().Services(podNamespace).List(metav1.ListOptions{
|
||||
services, err := api.kubernetesClient.CoreV1().Services(podNamespace).List(context.TODO(), metav1.ListOptions{
|
||||
LabelSelector: appLabelSelector,
|
||||
})
|
||||
if err != nil || len(services.Items) > 1 || len(services.Items) == 0 {
|
||||
|
||||
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
"flag"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
@@ -359,13 +360,13 @@ func TestMain(m *testing.M) {
|
||||
|
||||
// testNS isolation for running multiple CI builds concurrently.
|
||||
testNS = uuid.NewV4().String()
|
||||
_, err = kubeClient.CoreV1().Namespaces().Create(&v1.Namespace{
|
||||
_, err = kubeClient.CoreV1().Namespaces().Create(context.TODO(), &v1.Namespace{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: testNS,
|
||||
},
|
||||
})
|
||||
}, metav1.CreateOptions{})
|
||||
panicIf(err)
|
||||
defer panicIf(kubeClient.CoreV1().Namespaces().Delete(testNS, nil))
|
||||
defer panicIf(kubeClient.CoreV1().Namespaces().Delete(context.TODO(), testNS, metav1.DeleteOptions{}))
|
||||
|
||||
config := zap.NewDevelopmentConfig()
|
||||
config.EncoderConfig.EncodeTime = zapcore.ISO8601TimeEncoder
|
||||
|
||||
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
@@ -122,7 +123,7 @@ func (a *API) CanaryConfigApiCreate(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
canaryCfgNew, err := a.fissionClient.CoreV1().CanaryConfigs(canaryCfg.ObjectMeta.Namespace).Create(&canaryCfg)
|
||||
canaryCfgNew, err := a.fissionClient.CoreV1().CanaryConfigs(canaryCfg.ObjectMeta.Namespace).Create(context.TODO(), &canaryCfg, metav1.CreateOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
@@ -153,7 +154,7 @@ func (a *API) CanaryConfigApiGet(w http.ResponseWriter, r *http.Request) {
|
||||
ns = metav1.NamespaceDefault
|
||||
}
|
||||
|
||||
canaryCfg, err := a.fissionClient.CoreV1().CanaryConfigs(ns).Get(name, metav1.GetOptions{})
|
||||
canaryCfg, err := a.fissionClient.CoreV1().CanaryConfigs(ns).Get(context.TODO(), name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
@@ -180,7 +181,7 @@ func (a *API) CanaryConfigApiList(w http.ResponseWriter, r *http.Request) {
|
||||
ns = metav1.NamespaceDefault
|
||||
}
|
||||
|
||||
canaryCfgs, err := a.fissionClient.CoreV1().CanaryConfigs(ns).List(metav1.ListOptions{})
|
||||
canaryCfgs, err := a.fissionClient.CoreV1().CanaryConfigs(ns).List(context.TODO(), metav1.ListOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
@@ -215,7 +216,7 @@ func (a *API) CanaryConfigApiUpdate(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
canayCfgNew, err := a.fissionClient.CoreV1().CanaryConfigs(c.ObjectMeta.Namespace).Update(&c)
|
||||
canayCfgNew, err := a.fissionClient.CoreV1().CanaryConfigs(c.ObjectMeta.Namespace).Update(context.TODO(), &c, metav1.UpdateOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
@@ -244,7 +245,7 @@ func (a *API) CanaryConfigApiDelete(w http.ResponseWriter, r *http.Request) {
|
||||
ns = metav1.NamespaceDefault
|
||||
}
|
||||
|
||||
err := a.fissionClient.CoreV1().CanaryConfigs(ns).Delete(name, &metav1.DeleteOptions{})
|
||||
err := a.fissionClient.CoreV1().CanaryConfigs(ns).Delete(context.TODO(), name, metav1.DeleteOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
|
||||
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
@@ -32,7 +33,7 @@ func (a *API) ConfigMapExists(w http.ResponseWriter, r *http.Request) {
|
||||
ns = metav1.NamespaceDefault
|
||||
}
|
||||
|
||||
_, err := a.kubernetesClient.CoreV1().ConfigMaps(ns).Get(name, metav1.GetOptions{})
|
||||
_, err := a.kubernetesClient.CoreV1().ConfigMaps(ns).Get(context.TODO(), name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
a.logger.Error("error getting config map", zap.Error(err), zap.String("config_map_name", name), zap.String("namespace", ns))
|
||||
a.respondWithError(w, err)
|
||||
|
||||
@@ -34,7 +34,7 @@ func Start(logger *zap.Logger, port int, unitTestFlag bool) {
|
||||
|
||||
err = crd.EnsureFissionCRDs(cLogger, apiExtClient)
|
||||
if err != nil {
|
||||
cLogger.Fatal("failed to create fission CRDs", zap.Error(err))
|
||||
cLogger.Fatal("failed to find fission CRDs", zap.Error(err))
|
||||
}
|
||||
|
||||
err = fc.WaitForCRDs()
|
||||
|
||||
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
@@ -105,7 +106,7 @@ func (a *API) EnvironmentApiList(w http.ResponseWriter, r *http.Request) {
|
||||
ns = metav1.NamespaceAll
|
||||
}
|
||||
|
||||
envs, err := a.fissionClient.CoreV1().Environments(ns).List(metav1.ListOptions{})
|
||||
envs, err := a.fissionClient.CoreV1().Environments(ns).List(context.TODO(), metav1.ListOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
@@ -142,7 +143,7 @@ func (a *API) EnvironmentApiCreate(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
enew, err := a.fissionClient.CoreV1().Environments(env.ObjectMeta.Namespace).Create(&env)
|
||||
enew, err := a.fissionClient.CoreV1().Environments(env.ObjectMeta.Namespace).Create(context.TODO(), &env, metav1.CreateOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
@@ -167,7 +168,7 @@ func (a *API) EnvironmentApiGet(w http.ResponseWriter, r *http.Request) {
|
||||
ns = metav1.NamespaceDefault
|
||||
}
|
||||
|
||||
env, err := a.fissionClient.CoreV1().Environments(ns).Get(name, metav1.GetOptions{})
|
||||
env, err := a.fissionClient.CoreV1().Environments(ns).Get(context.TODO(), name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
@@ -205,7 +206,7 @@ func (a *API) EnvironmentApiUpdate(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
enew, err := a.fissionClient.CoreV1().Environments(env.ObjectMeta.Namespace).Update(&env)
|
||||
enew, err := a.fissionClient.CoreV1().Environments(env.ObjectMeta.Namespace).Update(context.TODO(), &env, metav1.UpdateOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
@@ -229,7 +230,7 @@ func (a *API) EnvironmentApiDelete(w http.ResponseWriter, r *http.Request) {
|
||||
ns = metav1.NamespaceDefault
|
||||
}
|
||||
|
||||
err := a.fissionClient.CoreV1().Environments(ns).Delete(name, &metav1.DeleteOptions{})
|
||||
err := a.fissionClient.CoreV1().Environments(ns).Delete(context.TODO(), name, metav1.DeleteOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
|
||||
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
@@ -116,7 +117,7 @@ func (a *API) FunctionApiList(w http.ResponseWriter, r *http.Request) {
|
||||
ns = metav1.NamespaceAll
|
||||
}
|
||||
|
||||
funcs, err := a.fissionClient.CoreV1().Functions(ns).List(metav1.ListOptions{})
|
||||
funcs, err := a.fissionClient.CoreV1().Functions(ns).List(context.TODO(), metav1.ListOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
@@ -152,7 +153,7 @@ func (a *API) FunctionApiCreate(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
fnew, err := a.fissionClient.CoreV1().Functions(f.ObjectMeta.Namespace).Create(&f)
|
||||
fnew, err := a.fissionClient.CoreV1().Functions(f.ObjectMeta.Namespace).Create(context.TODO(), &f, metav1.CreateOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
@@ -176,7 +177,7 @@ func (a *API) FunctionApiGet(w http.ResponseWriter, r *http.Request) {
|
||||
ns = metav1.NamespaceDefault
|
||||
}
|
||||
|
||||
f, err := a.fissionClient.CoreV1().Functions(ns).Get(name, metav1.GetOptions{})
|
||||
f, err := a.fissionClient.CoreV1().Functions(ns).Get(context.TODO(), name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
@@ -213,7 +214,7 @@ func (a *API) FunctionApiUpdate(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
fnew, err := a.fissionClient.CoreV1().Functions(f.ObjectMeta.Namespace).Update(&f)
|
||||
fnew, err := a.fissionClient.CoreV1().Functions(f.ObjectMeta.Namespace).Update(context.TODO(), &f, metav1.UpdateOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
@@ -235,7 +236,7 @@ func (a *API) FunctionApiDelete(w http.ResponseWriter, r *http.Request) {
|
||||
ns = metav1.NamespaceDefault
|
||||
}
|
||||
|
||||
err := a.fissionClient.CoreV1().Functions(ns).Delete(name, &metav1.DeleteOptions{})
|
||||
err := a.fissionClient.CoreV1().Functions(ns).Delete(context.TODO(), name, metav1.DeleteOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
@@ -298,7 +299,7 @@ func (a *API) FunctionPodLogs(w http.ResponseWriter, r *http.Request) {
|
||||
podNs = ns
|
||||
}
|
||||
|
||||
f, err := a.fissionClient.CoreV1().Functions(ns).Get(fnName, metav1.GetOptions{})
|
||||
f, err := a.fissionClient.CoreV1().Functions(ns).Get(context.TODO(), fnName, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
@@ -310,7 +311,7 @@ func (a *API) FunctionPodLogs(w http.ResponseWriter, r *http.Request) {
|
||||
fv1.ENVIRONMENT_NAME: f.Spec.Environment.Name,
|
||||
fv1.ENVIRONMENT_NAMESPACE: f.Spec.Environment.Namespace,
|
||||
}
|
||||
podList, err := a.kubernetesClient.CoreV1().Pods(podNs).List(metav1.ListOptions{
|
||||
podList, err := a.kubernetesClient.CoreV1().Pods(podNs).List(context.TODO(), metav1.ListOptions{
|
||||
LabelSelector: labels.Set(selector).AsSelector().String(),
|
||||
})
|
||||
if err != nil {
|
||||
@@ -346,7 +347,7 @@ func getContainerLog(kubernetesClient *kubernetes.Clientset, w http.ResponseWrit
|
||||
podLogOpts := apiv1.PodLogOptions{Container: container.Name} // Only the env container, not fetcher
|
||||
podLogsReq := kubernetesClient.CoreV1().Pods(pod.Namespace).GetLogs(pod.ObjectMeta.Name, &podLogOpts)
|
||||
|
||||
podLogs, err := podLogsReq.Stream()
|
||||
podLogs, err := podLogsReq.Stream(context.Background())
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "error streaming pod log")
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
@@ -105,7 +106,7 @@ func (a *API) HTTPTriggerApiList(w http.ResponseWriter, r *http.Request) {
|
||||
ns = metav1.NamespaceAll
|
||||
}
|
||||
|
||||
triggers, err := a.fissionClient.CoreV1().HTTPTriggers(ns).List(metav1.ListOptions{})
|
||||
triggers, err := a.fissionClient.CoreV1().HTTPTriggers(ns).List(context.TODO(), metav1.ListOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
@@ -122,7 +123,7 @@ func (a *API) HTTPTriggerApiList(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
// checkHTTPTriggerDuplicates checks whether the tuple (Method, Host, URL) is duplicate or not.
|
||||
func (a *API) checkHTTPTriggerDuplicates(t *fv1.HTTPTrigger) error {
|
||||
triggers, err := a.fissionClient.CoreV1().HTTPTriggers(metav1.NamespaceAll).List(metav1.ListOptions{})
|
||||
triggers, err := a.fissionClient.CoreV1().HTTPTriggers(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -168,7 +169,7 @@ func (a *API) HTTPTriggerApiCreate(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
tnew, err := a.fissionClient.CoreV1().HTTPTriggers(t.ObjectMeta.Namespace).Create(&t)
|
||||
tnew, err := a.fissionClient.CoreV1().HTTPTriggers(t.ObjectMeta.Namespace).Create(context.TODO(), &t, metav1.CreateOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
@@ -192,7 +193,7 @@ func (a *API) HTTPTriggerApiGet(w http.ResponseWriter, r *http.Request) {
|
||||
ns = metav1.NamespaceDefault
|
||||
}
|
||||
|
||||
t, err := a.fissionClient.CoreV1().HTTPTriggers(ns).Get(name, metav1.GetOptions{})
|
||||
t, err := a.fissionClient.CoreV1().HTTPTriggers(ns).Get(context.TODO(), name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
@@ -236,7 +237,7 @@ func (a *API) HTTPTriggerApiUpdate(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
tnew, err := a.fissionClient.CoreV1().HTTPTriggers(t.ObjectMeta.Namespace).Update(&t)
|
||||
tnew, err := a.fissionClient.CoreV1().HTTPTriggers(t.ObjectMeta.Namespace).Update(context.TODO(), &t, metav1.UpdateOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
@@ -258,7 +259,7 @@ func (a *API) HTTPTriggerApiDelete(w http.ResponseWriter, r *http.Request) {
|
||||
ns = metav1.NamespaceDefault
|
||||
}
|
||||
|
||||
err := a.fissionClient.CoreV1().HTTPTriggers(ns).Delete(name, &metav1.DeleteOptions{})
|
||||
err := a.fissionClient.CoreV1().HTTPTriggers(ns).Delete(context.TODO(), name, metav1.DeleteOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
|
||||
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
@@ -105,7 +106,7 @@ func (a *API) MessageQueueTriggerApiList(w http.ResponseWriter, r *http.Request)
|
||||
ns = metav1.NamespaceAll
|
||||
}
|
||||
|
||||
triggers, err := a.fissionClient.CoreV1().MessageQueueTriggers(ns).List(metav1.ListOptions{})
|
||||
triggers, err := a.fissionClient.CoreV1().MessageQueueTriggers(ns).List(context.TODO(), metav1.ListOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
@@ -139,7 +140,7 @@ func (a *API) MessageQueueTriggerApiCreate(w http.ResponseWriter, r *http.Reques
|
||||
return
|
||||
}
|
||||
|
||||
tnew, err := a.fissionClient.CoreV1().MessageQueueTriggers(mqTrigger.ObjectMeta.Namespace).Create(&mqTrigger)
|
||||
tnew, err := a.fissionClient.CoreV1().MessageQueueTriggers(mqTrigger.ObjectMeta.Namespace).Create(context.TODO(), &mqTrigger, metav1.CreateOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
@@ -162,7 +163,7 @@ func (a *API) MessageQueueTriggerApiGet(w http.ResponseWriter, r *http.Request)
|
||||
ns = metav1.NamespaceDefault
|
||||
}
|
||||
|
||||
mqTrigger, err := a.fissionClient.CoreV1().MessageQueueTriggers(ns).Get(name, metav1.GetOptions{})
|
||||
mqTrigger, err := a.fissionClient.CoreV1().MessageQueueTriggers(ns).Get(context.TODO(), name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
@@ -198,7 +199,7 @@ func (a *API) MessageQueueTriggerApiUpdate(w http.ResponseWriter, r *http.Reques
|
||||
return
|
||||
}
|
||||
|
||||
tnew, err := a.fissionClient.CoreV1().MessageQueueTriggers(mqTrigger.ObjectMeta.Namespace).Update(&mqTrigger)
|
||||
tnew, err := a.fissionClient.CoreV1().MessageQueueTriggers(mqTrigger.ObjectMeta.Namespace).Update(context.TODO(), &mqTrigger, metav1.UpdateOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
@@ -220,7 +221,7 @@ func (a *API) MessageQueueTriggerApiDelete(w http.ResponseWriter, r *http.Reques
|
||||
ns = metav1.NamespaceDefault
|
||||
}
|
||||
|
||||
err := a.fissionClient.CoreV1().MessageQueueTriggers(ns).Delete(name, &metav1.DeleteOptions{})
|
||||
err := a.fissionClient.CoreV1().MessageQueueTriggers(ns).Delete(context.TODO(), name, metav1.DeleteOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
|
||||
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
@@ -105,7 +106,7 @@ func (a *API) PackageApiList(w http.ResponseWriter, r *http.Request) {
|
||||
if len(ns) == 0 {
|
||||
ns = metav1.NamespaceAll
|
||||
}
|
||||
funcs, err := a.fissionClient.CoreV1().Packages(ns).List(metav1.ListOptions{})
|
||||
funcs, err := a.fissionClient.CoreV1().Packages(ns).List(context.TODO(), metav1.ListOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
@@ -155,7 +156,7 @@ func (a *API) PackageApiCreate(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
fnew, err := a.fissionClient.CoreV1().Packages(f.ObjectMeta.Namespace).Create(&f)
|
||||
fnew, err := a.fissionClient.CoreV1().Packages(f.ObjectMeta.Namespace).Create(context.TODO(), &f, metav1.CreateOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
@@ -180,7 +181,7 @@ func (a *API) PackageApiGet(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
raw := r.FormValue("raw") // just the deployment pkg
|
||||
|
||||
f, err := a.fissionClient.CoreV1().Packages(ns).Get(name, metav1.GetOptions{})
|
||||
f, err := a.fissionClient.CoreV1().Packages(ns).Get(context.TODO(), name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
@@ -222,7 +223,7 @@ func (a *API) PackageApiUpdate(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
fnew, err := a.fissionClient.CoreV1().Packages(f.ObjectMeta.Namespace).Update(&f)
|
||||
fnew, err := a.fissionClient.CoreV1().Packages(f.ObjectMeta.Namespace).Update(context.TODO(), &f, metav1.UpdateOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
@@ -244,7 +245,7 @@ func (a *API) PackageApiDelete(w http.ResponseWriter, r *http.Request) {
|
||||
ns = metav1.NamespaceDefault
|
||||
}
|
||||
|
||||
err := a.fissionClient.CoreV1().Packages(ns).Delete(name, &metav1.DeleteOptions{})
|
||||
err := a.fissionClient.CoreV1().Packages(ns).Delete(context.TODO(), name, metav1.DeleteOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
|
||||
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
@@ -32,7 +33,7 @@ func (a *API) SecretExists(w http.ResponseWriter, r *http.Request) {
|
||||
ns = metav1.NamespaceDefault
|
||||
}
|
||||
|
||||
_, err := a.kubernetesClient.CoreV1().Secrets(ns).Get(name, metav1.GetOptions{})
|
||||
_, err := a.kubernetesClient.CoreV1().Secrets(ns).Get(context.TODO(), name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
a.logger.Error("error getting secret",
|
||||
zap.Error(err),
|
||||
|
||||
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
@@ -105,7 +106,7 @@ func (a *API) TimeTriggerApiList(w http.ResponseWriter, r *http.Request) {
|
||||
ns = metav1.NamespaceAll
|
||||
}
|
||||
|
||||
triggers, err := a.fissionClient.CoreV1().TimeTriggers(ns).List(metav1.ListOptions{})
|
||||
triggers, err := a.fissionClient.CoreV1().TimeTriggers(ns).List(context.TODO(), metav1.ListOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
@@ -149,7 +150,7 @@ func (a *API) TimeTriggerApiCreate(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
tnew, err := a.fissionClient.CoreV1().TimeTriggers(t.ObjectMeta.Namespace).Create(&t)
|
||||
tnew, err := a.fissionClient.CoreV1().TimeTriggers(t.ObjectMeta.Namespace).Create(context.TODO(), &t, metav1.CreateOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
@@ -173,7 +174,7 @@ func (a *API) TimeTriggerApiGet(w http.ResponseWriter, r *http.Request) {
|
||||
ns = metav1.NamespaceDefault
|
||||
}
|
||||
|
||||
t, err := a.fissionClient.CoreV1().TimeTriggers(ns).Get(name, metav1.GetOptions{})
|
||||
t, err := a.fissionClient.CoreV1().TimeTriggers(ns).Get(context.TODO(), name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
@@ -218,7 +219,7 @@ func (a *API) TimeTriggerApiUpdate(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
tnew, err := a.fissionClient.CoreV1().TimeTriggers(t.ObjectMeta.Namespace).Update(&t)
|
||||
tnew, err := a.fissionClient.CoreV1().TimeTriggers(t.ObjectMeta.Namespace).Update(context.TODO(), &t, metav1.UpdateOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
@@ -240,7 +241,7 @@ func (a *API) TimeTriggerApiDelete(w http.ResponseWriter, r *http.Request) {
|
||||
ns = metav1.NamespaceDefault
|
||||
}
|
||||
|
||||
err := a.fissionClient.CoreV1().TimeTriggers(ns).Delete(name, &metav1.DeleteOptions{})
|
||||
err := a.fissionClient.CoreV1().TimeTriggers(ns).Delete(context.TODO(), name, metav1.DeleteOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
|
||||
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package controller
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
@@ -104,7 +105,7 @@ func (a *API) WatchApiList(w http.ResponseWriter, r *http.Request) {
|
||||
ns = metav1.NamespaceAll
|
||||
}
|
||||
|
||||
watches, err := a.fissionClient.CoreV1().KubernetesWatchTriggers(ns).List(metav1.ListOptions{})
|
||||
watches, err := a.fissionClient.CoreV1().KubernetesWatchTriggers(ns).List(context.TODO(), metav1.ListOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
@@ -142,7 +143,7 @@ func (a *API) WatchApiCreate(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
wnew, err := a.fissionClient.CoreV1().KubernetesWatchTriggers(watch.ObjectMeta.Namespace).Create(&watch)
|
||||
wnew, err := a.fissionClient.CoreV1().KubernetesWatchTriggers(watch.ObjectMeta.Namespace).Create(context.TODO(), &watch, metav1.CreateOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
@@ -166,7 +167,7 @@ func (a *API) WatchApiGet(w http.ResponseWriter, r *http.Request) {
|
||||
ns = metav1.NamespaceDefault
|
||||
}
|
||||
|
||||
watch, err := a.fissionClient.CoreV1().KubernetesWatchTriggers(ns).Get(name, metav1.GetOptions{})
|
||||
watch, err := a.fissionClient.CoreV1().KubernetesWatchTriggers(ns).Get(context.TODO(), name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
@@ -194,7 +195,7 @@ func (a *API) WatchApiDelete(w http.ResponseWriter, r *http.Request) {
|
||||
ns = metav1.NamespaceDefault
|
||||
}
|
||||
|
||||
err := a.fissionClient.CoreV1().KubernetesWatchTriggers(ns).Delete(name, &metav1.DeleteOptions{})
|
||||
err := a.fissionClient.CoreV1().KubernetesWatchTriggers(ns).Delete(context.TODO(), name, metav1.DeleteOptions{})
|
||||
if err != nil {
|
||||
a.respondWithError(w, err)
|
||||
return
|
||||
|
||||
+5
-2
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package crd
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"os"
|
||||
"time"
|
||||
@@ -34,12 +35,13 @@ import (
|
||||
)
|
||||
|
||||
type (
|
||||
// FissionClient exports the client interface to be used
|
||||
FissionClient struct {
|
||||
genClientset.Interface
|
||||
}
|
||||
)
|
||||
|
||||
// Get a kubernetes client using the kubeconfig file at the
|
||||
// GetKubernetesClient gets a kubernetes client using the kubeconfig file at the
|
||||
// environment var $KUBECONFIG, or an in-cluster config if that's
|
||||
// undefined.
|
||||
func GetKubernetesClient() (*rest.Config, *kubernetes.Clientset, *apiextensionsclient.Clientset, *metricsclient.Clientset, error) {
|
||||
@@ -95,11 +97,12 @@ func MakeFissionClient() (*FissionClient, *kubernetes.Clientset, *apiextensionsc
|
||||
return fc, kubeClient, apiExtClient, metricsClient, nil
|
||||
}
|
||||
|
||||
// WaitForCRDs does a timeout to check if CRDs have been installed
|
||||
func (fc *FissionClient) WaitForCRDs() error {
|
||||
start := time.Now()
|
||||
for {
|
||||
fi := fc.CoreV1().Functions(metav1.NamespaceDefault)
|
||||
_, err := fi.List(metav1.ListOptions{})
|
||||
_, err := fi.List(context.TODO(), metav1.ListOptions{})
|
||||
if err != nil {
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
} else {
|
||||
|
||||
+21
-176
@@ -17,191 +17,36 @@ limitations under the License.
|
||||
package crd
|
||||
|
||||
import (
|
||||
"time"
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/hashicorp/go-multierror"
|
||||
"go.uber.org/zap"
|
||||
apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"
|
||||
apiextensionsclient "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset"
|
||||
k8serrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
const (
|
||||
crdGroupName = "fission.io"
|
||||
crdVersion = "v1"
|
||||
)
|
||||
|
||||
// ensureCRD checks if the given CRD type exists, and creates it if
|
||||
// needed. (Note that this creates the CRD type; it doesn't create any
|
||||
// _instances_ of that type.)
|
||||
func ensureCRD(logger *zap.Logger, clientset *apiextensionsclient.Clientset, crd *apiextensionsv1beta1.CustomResourceDefinition) (err error) {
|
||||
maxRetries := 5
|
||||
|
||||
for i := 0; i < maxRetries; i++ {
|
||||
_, err = clientset.ApiextensionsV1beta1().CustomResourceDefinitions().Create(crd)
|
||||
if err == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
// return if the resource already exists
|
||||
if k8serrors.IsAlreadyExists(err) {
|
||||
return nil
|
||||
} else {
|
||||
// The requests fail to connect to k8s api server before
|
||||
// istio-prxoy is ready to serve traffic. Retry again.
|
||||
logger.Info("error connecting to kubernetes api service, retrying", zap.Error(err))
|
||||
time.Sleep(500 * time.Duration(2*i) * time.Millisecond)
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// EnsureFissionCRDs creates the CRDs
|
||||
// EnsureFissionCRDs checks if all Fission CRDs are present
|
||||
func EnsureFissionCRDs(logger *zap.Logger, clientset *apiextensionsclient.Clientset) error {
|
||||
|
||||
crds := []apiextensionsv1beta1.CustomResourceDefinition{
|
||||
// Functions
|
||||
{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "functions.fission.io",
|
||||
},
|
||||
Spec: apiextensionsv1beta1.CustomResourceDefinitionSpec{
|
||||
Group: crdGroupName,
|
||||
Version: crdVersion,
|
||||
Scope: apiextensionsv1beta1.NamespaceScoped,
|
||||
Names: apiextensionsv1beta1.CustomResourceDefinitionNames{
|
||||
Kind: "Function",
|
||||
Plural: "functions",
|
||||
Singular: "function",
|
||||
},
|
||||
PreserveUnknownFields: boolPtr(false),
|
||||
Validation: functionValidation,
|
||||
},
|
||||
},
|
||||
// Environments (function containers)
|
||||
{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "environments.fission.io",
|
||||
},
|
||||
Spec: apiextensionsv1beta1.CustomResourceDefinitionSpec{
|
||||
Group: crdGroupName,
|
||||
Version: crdVersion,
|
||||
Scope: apiextensionsv1beta1.NamespaceScoped,
|
||||
Names: apiextensionsv1beta1.CustomResourceDefinitionNames{
|
||||
Kind: "Environment",
|
||||
Plural: "environments",
|
||||
Singular: "environment",
|
||||
},
|
||||
PreserveUnknownFields: boolPtr(false),
|
||||
Validation: environmentValidation,
|
||||
},
|
||||
},
|
||||
// HTTP triggers for functions
|
||||
{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "httptriggers.fission.io",
|
||||
},
|
||||
Spec: apiextensionsv1beta1.CustomResourceDefinitionSpec{
|
||||
Group: crdGroupName,
|
||||
Version: crdVersion,
|
||||
Scope: apiextensionsv1beta1.NamespaceScoped,
|
||||
Names: apiextensionsv1beta1.CustomResourceDefinitionNames{
|
||||
Kind: "HTTPTrigger",
|
||||
Plural: "httptriggers",
|
||||
Singular: "httptrigger",
|
||||
},
|
||||
},
|
||||
},
|
||||
// Kubernetes watch triggers for functions
|
||||
{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "kuberneteswatchtriggers.fission.io",
|
||||
},
|
||||
Spec: apiextensionsv1beta1.CustomResourceDefinitionSpec{
|
||||
Group: crdGroupName,
|
||||
Version: crdVersion,
|
||||
Scope: apiextensionsv1beta1.NamespaceScoped,
|
||||
Names: apiextensionsv1beta1.CustomResourceDefinitionNames{
|
||||
Kind: "KubernetesWatchTrigger",
|
||||
Plural: "kuberneteswatchtriggers",
|
||||
Singular: "kuberneteswatchtrigger",
|
||||
},
|
||||
},
|
||||
},
|
||||
// Time-based triggers for functions
|
||||
{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "timetriggers.fission.io",
|
||||
},
|
||||
Spec: apiextensionsv1beta1.CustomResourceDefinitionSpec{
|
||||
Group: crdGroupName,
|
||||
Version: crdVersion,
|
||||
Scope: apiextensionsv1beta1.NamespaceScoped,
|
||||
Names: apiextensionsv1beta1.CustomResourceDefinitionNames{
|
||||
Kind: "TimeTrigger",
|
||||
Plural: "timetriggers",
|
||||
Singular: "timetrigger",
|
||||
},
|
||||
},
|
||||
},
|
||||
// Message queue triggers for functions
|
||||
{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "messagequeuetriggers.fission.io",
|
||||
},
|
||||
Spec: apiextensionsv1beta1.CustomResourceDefinitionSpec{
|
||||
Group: crdGroupName,
|
||||
Version: crdVersion,
|
||||
Scope: apiextensionsv1beta1.NamespaceScoped,
|
||||
Names: apiextensionsv1beta1.CustomResourceDefinitionNames{
|
||||
Kind: "MessageQueueTrigger",
|
||||
Plural: "messagequeuetriggers",
|
||||
Singular: "messagequeuetrigger",
|
||||
},
|
||||
},
|
||||
},
|
||||
// Packages: archives containing source or binaries for one or more functions
|
||||
{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "packages.fission.io",
|
||||
},
|
||||
Spec: apiextensionsv1beta1.CustomResourceDefinitionSpec{
|
||||
Group: crdGroupName,
|
||||
Version: crdVersion,
|
||||
Scope: apiextensionsv1beta1.NamespaceScoped,
|
||||
Names: apiextensionsv1beta1.CustomResourceDefinitionNames{
|
||||
Kind: "Package",
|
||||
Plural: "packages",
|
||||
Singular: "package",
|
||||
},
|
||||
PreserveUnknownFields: boolPtr(false),
|
||||
Validation: packageValidation,
|
||||
},
|
||||
},
|
||||
// CanaryConfig: configuration for canary deployment of functions
|
||||
{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "canaryconfigs.fission.io",
|
||||
},
|
||||
Spec: apiextensionsv1beta1.CustomResourceDefinitionSpec{
|
||||
Group: crdGroupName,
|
||||
Version: crdVersion,
|
||||
Scope: apiextensionsv1beta1.NamespaceScoped,
|
||||
Names: apiextensionsv1beta1.CustomResourceDefinitionNames{
|
||||
Kind: "CanaryConfig",
|
||||
Plural: "canaryconfigs",
|
||||
Singular: "canaryconfig",
|
||||
},
|
||||
},
|
||||
},
|
||||
crdsExpected := []string{
|
||||
"canaryconfigs.fission.io",
|
||||
"environments.fission.io",
|
||||
"functions.fission.io",
|
||||
"httptriggers.fission.io",
|
||||
"kuberneteswatchtriggers.fission.io",
|
||||
"messagequeuetriggers.fission.io",
|
||||
"packages.fission.io",
|
||||
"timetriggers.fission.io",
|
||||
}
|
||||
for _, crd := range crds {
|
||||
err := ensureCRD(logger, clientset, &crd)
|
||||
errs := &multierror.Error{}
|
||||
for _, crdName := range crdsExpected {
|
||||
crd, err := clientset.ApiextensionsV1().CustomResourceDefinitions().Get(context.TODO(), crdName, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
return err
|
||||
multierror.Append(errs, fmt.Errorf("CRD %s not found: %s", crdName, err))
|
||||
}
|
||||
if crd == nil {
|
||||
multierror.Append(errs, fmt.Errorf("CRD %s not found", crdName))
|
||||
}
|
||||
}
|
||||
return nil
|
||||
return errs.ErrorOrNil()
|
||||
}
|
||||
|
||||
@@ -1,472 +0,0 @@
|
||||
/*
|
||||
Copyright 2016 The Fission 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 crd
|
||||
|
||||
import (
|
||||
"log"
|
||||
"os"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
uuid "github.com/satori/go.uuid"
|
||||
"go.uber.org/zap"
|
||||
"go.uber.org/zap/zapcore"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
fv1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
genInformerCoreV1 "github.com/fission/fission/pkg/apis/genclient/clientset/versioned/typed/core/v1"
|
||||
)
|
||||
|
||||
var testNS = metav1.NamespaceDefault
|
||||
|
||||
func panicIf(err error) {
|
||||
if err != nil {
|
||||
log.Panicf("err: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func functionTests(crdClient genInformerCoreV1.CoreV1Interface) {
|
||||
// sample function object
|
||||
function := &fv1.Function{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
Kind: "Function",
|
||||
APIVersion: "fission.io/v1",
|
||||
},
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "hello",
|
||||
Namespace: testNS,
|
||||
},
|
||||
Spec: fv1.FunctionSpec{
|
||||
Package: fv1.FunctionPackageRef{
|
||||
PackageRef: fv1.PackageRef{
|
||||
Name: "foo",
|
||||
Namespace: "bar",
|
||||
},
|
||||
FunctionName: "hello",
|
||||
},
|
||||
Environment: fv1.EnvironmentReference{
|
||||
Name: "xxx",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
// Test function CRUD
|
||||
fi := crdClient.Functions(testNS)
|
||||
|
||||
// cleanup from old crashed tests, ignore errors
|
||||
fi.Delete(function.ObjectMeta.Name, nil) //nolint: errcheck
|
||||
|
||||
// create
|
||||
f, err := fi.Create(function)
|
||||
panicIf(err)
|
||||
if f.ObjectMeta.Name != function.ObjectMeta.Name {
|
||||
log.Panicf("Bad result from create: %v", f)
|
||||
}
|
||||
|
||||
// read
|
||||
f, err = fi.Get(function.ObjectMeta.Name, metav1.GetOptions{})
|
||||
panicIf(err)
|
||||
if f.Spec.Environment.Name != function.Spec.Environment.Name {
|
||||
log.Panicf("Bad result from Get: %v", f)
|
||||
}
|
||||
|
||||
log.Printf("f.ObjectMeta = %#v", f.ObjectMeta)
|
||||
|
||||
// update
|
||||
function.ObjectMeta.ResourceVersion = f.ObjectMeta.ResourceVersion
|
||||
function.Spec.Environment.Name = "yyy"
|
||||
f, err = fi.Update(function)
|
||||
panicIf(err)
|
||||
|
||||
log.Printf("f.ObjectMeta = %#v", f.ObjectMeta)
|
||||
|
||||
// list
|
||||
fl, err := fi.List(metav1.ListOptions{})
|
||||
panicIf(err)
|
||||
if len(fl.Items) != 1 {
|
||||
log.Panicf("wrong count from function list: %v", len(fl.Items))
|
||||
}
|
||||
if fl.Items[0].Spec.Environment.Name != f.Spec.Environment.Name {
|
||||
log.Panicf("bad object from list: %v", fl.Items[0])
|
||||
}
|
||||
|
||||
// delete
|
||||
err = fi.Delete(f.ObjectMeta.Name, nil)
|
||||
panicIf(err)
|
||||
|
||||
// start a watch
|
||||
wi, err := fi.Watch(metav1.ListOptions{})
|
||||
panicIf(err)
|
||||
|
||||
start := time.Now()
|
||||
function.ObjectMeta.ResourceVersion = ""
|
||||
f, err = fi.Create(function)
|
||||
panicIf(err)
|
||||
defer func() {
|
||||
err := fi.Delete(f.ObjectMeta.Name, nil)
|
||||
panicIf(err)
|
||||
}()
|
||||
|
||||
// assert that we get a watch event for the new function
|
||||
recvd := false
|
||||
select {
|
||||
case <-time.NewTimer(1 * time.Second).C:
|
||||
if !recvd {
|
||||
log.Panicf("Didn't get watch event")
|
||||
}
|
||||
case ev := <-wi.ResultChan():
|
||||
wf, ok := ev.Object.(*fv1.Function)
|
||||
if !ok {
|
||||
log.Panicf("Can't cast to Function")
|
||||
}
|
||||
if wf.Spec.Environment.Name != function.Spec.Environment.Name {
|
||||
log.Panicf("Bad object from watch: %#v", wf)
|
||||
}
|
||||
log.Printf("watch event took %v", time.Since(start))
|
||||
}
|
||||
}
|
||||
|
||||
func environmentTests(crdClient genInformerCoreV1.CoreV1Interface) {
|
||||
// sample environment object
|
||||
environment := &fv1.Environment{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
Kind: "Environment",
|
||||
APIVersion: "fission.io/v1",
|
||||
},
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "hello",
|
||||
Namespace: testNS,
|
||||
},
|
||||
Spec: fv1.EnvironmentSpec{
|
||||
Version: 1,
|
||||
Runtime: fv1.Runtime{
|
||||
Image: "xxx",
|
||||
},
|
||||
Builder: fv1.Builder{
|
||||
Image: "yyy",
|
||||
Command: "zzz",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
// Test environment CRUD
|
||||
ei := crdClient.Environments(testNS)
|
||||
|
||||
// cleanup from old crashed tests, ignore errors
|
||||
ei.Delete(environment.ObjectMeta.Name, nil) //nolint: errCheck
|
||||
|
||||
// create
|
||||
e, err := ei.Create(environment)
|
||||
panicIf(err)
|
||||
if e.ObjectMeta.Name != environment.ObjectMeta.Name {
|
||||
log.Panicf("Bad result from create: %v", e)
|
||||
}
|
||||
|
||||
// read
|
||||
e, err = ei.Get(environment.ObjectMeta.Name, metav1.GetOptions{})
|
||||
panicIf(err)
|
||||
if len(e.Spec.Runtime.Image) != len(environment.Spec.Runtime.Image) {
|
||||
log.Panicf("Bad result from Get: %#v", e)
|
||||
}
|
||||
|
||||
// update
|
||||
environment.ObjectMeta.ResourceVersion = e.ObjectMeta.ResourceVersion
|
||||
environment.Spec.Runtime.Image = "www"
|
||||
e, err = ei.Update(environment)
|
||||
panicIf(err)
|
||||
|
||||
// list
|
||||
el, err := ei.List(metav1.ListOptions{})
|
||||
panicIf(err)
|
||||
if len(el.Items) != 1 {
|
||||
log.Panicf("wrong count from environment list: %v", len(el.Items))
|
||||
}
|
||||
if el.Items[0].Spec.Runtime.Image != e.Spec.Runtime.Image {
|
||||
log.Panicf("bad object from list: %v", el.Items[0])
|
||||
}
|
||||
|
||||
// delete
|
||||
err = ei.Delete(e.ObjectMeta.Name, nil)
|
||||
panicIf(err)
|
||||
|
||||
// start a watch
|
||||
wi, err := ei.Watch(metav1.ListOptions{})
|
||||
panicIf(err)
|
||||
|
||||
start := time.Now()
|
||||
environment.ObjectMeta.ResourceVersion = ""
|
||||
e, err = ei.Create(environment)
|
||||
panicIf(err)
|
||||
defer func() {
|
||||
err := ei.Delete(e.ObjectMeta.Name, nil)
|
||||
panicIf(err)
|
||||
}()
|
||||
|
||||
// assert that we get a watch event for the new environment
|
||||
recvd := false
|
||||
select {
|
||||
case <-time.NewTimer(1 * time.Second).C:
|
||||
if !recvd {
|
||||
log.Panicf("Didn't get watch event")
|
||||
}
|
||||
case ev := <-wi.ResultChan():
|
||||
obj, ok := ev.Object.(*fv1.Environment)
|
||||
if !ok {
|
||||
log.Panicf("Can't cast to Environment")
|
||||
}
|
||||
if obj.Spec.Runtime.Image != environment.Spec.Runtime.Image {
|
||||
log.Panicf("Bad object from watch: %#v", obj)
|
||||
}
|
||||
log.Printf("watch event took %v", time.Since(start))
|
||||
}
|
||||
}
|
||||
|
||||
func httpTriggerTests(crdClient genInformerCoreV1.CoreV1Interface) {
|
||||
// sample httpTrigger object
|
||||
httpTrigger := &fv1.HTTPTrigger{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
Kind: "HTTPTrigger",
|
||||
APIVersion: "fission.io/v1",
|
||||
},
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "hello",
|
||||
Namespace: testNS,
|
||||
},
|
||||
Spec: fv1.HTTPTriggerSpec{
|
||||
RelativeURL: "/hi",
|
||||
Method: "GET",
|
||||
FunctionReference: fv1.FunctionReference{
|
||||
Type: fv1.FunctionReferenceTypeFunctionName,
|
||||
Name: "hello",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
// Test httpTrigger CRUD
|
||||
ei := crdClient.HTTPTriggers(testNS)
|
||||
|
||||
// cleanup from old crashed tests, ignore errors
|
||||
ei.Delete(httpTrigger.ObjectMeta.Name, nil) //nolint: errCheck
|
||||
|
||||
// create
|
||||
e, err := ei.Create(httpTrigger)
|
||||
panicIf(err)
|
||||
if e.ObjectMeta.Name != httpTrigger.ObjectMeta.Name {
|
||||
log.Panicf("Bad result from create: %v", e)
|
||||
}
|
||||
|
||||
// read
|
||||
e, err = ei.Get(httpTrigger.ObjectMeta.Name, metav1.GetOptions{})
|
||||
panicIf(err)
|
||||
if len(e.Spec.Method) != len(httpTrigger.Spec.Method) {
|
||||
log.Panicf("Bad result from Get: %#v", e)
|
||||
}
|
||||
|
||||
// update
|
||||
httpTrigger.ObjectMeta.ResourceVersion = e.ObjectMeta.ResourceVersion
|
||||
httpTrigger.Spec.Method = "POST"
|
||||
e, err = ei.Update(httpTrigger)
|
||||
panicIf(err)
|
||||
|
||||
// list
|
||||
el, err := ei.List(metav1.ListOptions{})
|
||||
panicIf(err)
|
||||
if len(el.Items) != 1 {
|
||||
log.Panicf("wrong count from http trigger list: %v", len(el.Items))
|
||||
}
|
||||
if el.Items[0].Spec.Method != e.Spec.Method {
|
||||
log.Panicf("bad object from list: %v", el.Items[0])
|
||||
}
|
||||
|
||||
// delete
|
||||
err = ei.Delete(e.ObjectMeta.Name, nil)
|
||||
panicIf(err)
|
||||
|
||||
// start a watch
|
||||
wi, err := ei.Watch(metav1.ListOptions{})
|
||||
panicIf(err)
|
||||
|
||||
start := time.Now()
|
||||
httpTrigger.ObjectMeta.ResourceVersion = ""
|
||||
e, err = ei.Create(httpTrigger)
|
||||
panicIf(err)
|
||||
defer func() {
|
||||
err := ei.Delete(e.ObjectMeta.Name, nil)
|
||||
panicIf(err)
|
||||
}()
|
||||
|
||||
// assert that we get a watch event for the new httpTrigger
|
||||
recvd := false
|
||||
select {
|
||||
case <-time.NewTimer(1 * time.Second).C:
|
||||
if !recvd {
|
||||
log.Panicf("Didn't get watch event")
|
||||
}
|
||||
case ev := <-wi.ResultChan():
|
||||
obj, ok := ev.Object.(*fv1.HTTPTrigger)
|
||||
if !ok {
|
||||
log.Panicf("Can't cast to HTTPTrigger")
|
||||
}
|
||||
if obj.Spec.Method != httpTrigger.Spec.Method {
|
||||
log.Panicf("Bad object from watch: %#v", obj)
|
||||
}
|
||||
log.Printf("watch event took %v", time.Since(start))
|
||||
}
|
||||
}
|
||||
|
||||
func kubernetesWatchTriggerTests(crdClient genInformerCoreV1.CoreV1Interface) {
|
||||
// sample kubernetesWatchTrigger object
|
||||
kubernetesWatchTrigger := &fv1.KubernetesWatchTrigger{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
Kind: "KubernetesWatchTrigger",
|
||||
APIVersion: "fission.io/v1",
|
||||
},
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "hello",
|
||||
Namespace: testNS,
|
||||
},
|
||||
Spec: fv1.KubernetesWatchTriggerSpec{
|
||||
Namespace: "foo",
|
||||
Type: "pod",
|
||||
LabelSelector: map[string]string{
|
||||
"x": "y",
|
||||
},
|
||||
FunctionReference: fv1.FunctionReference{
|
||||
Type: fv1.FunctionReferenceTypeFunctionName,
|
||||
Name: "foo",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
// Test kubernetesWatchTrigger CRUD
|
||||
ei := crdClient.KubernetesWatchTriggers(testNS)
|
||||
|
||||
// cleanup from old crashed tests, ignore errors
|
||||
ei.Delete(kubernetesWatchTrigger.ObjectMeta.Name, nil) //nolint: errCheck
|
||||
|
||||
// create
|
||||
e, err := ei.Create(kubernetesWatchTrigger)
|
||||
panicIf(err)
|
||||
if e.ObjectMeta.Name != kubernetesWatchTrigger.ObjectMeta.Name {
|
||||
log.Panicf("Bad result from create: %v", e)
|
||||
}
|
||||
|
||||
// read
|
||||
e, err = ei.Get(kubernetesWatchTrigger.ObjectMeta.Name, metav1.GetOptions{})
|
||||
panicIf(err)
|
||||
if e.Spec.Type != kubernetesWatchTrigger.Spec.Type {
|
||||
log.Panicf("Bad result from Get: %#v", e)
|
||||
}
|
||||
|
||||
// update
|
||||
kubernetesWatchTrigger.ObjectMeta.ResourceVersion = e.ObjectMeta.ResourceVersion
|
||||
kubernetesWatchTrigger.Spec.Type = "service"
|
||||
e, err = ei.Update(kubernetesWatchTrigger)
|
||||
panicIf(err)
|
||||
|
||||
// list
|
||||
el, err := ei.List(metav1.ListOptions{})
|
||||
panicIf(err)
|
||||
if len(el.Items) != 1 {
|
||||
log.Panicf("wrong count from kubeWatcher list: %v", len(el.Items))
|
||||
}
|
||||
if el.Items[0].Spec.Type != e.Spec.Type {
|
||||
log.Panicf("bad object from list: %v", el.Items[0])
|
||||
}
|
||||
|
||||
// delete
|
||||
err = ei.Delete(e.ObjectMeta.Name, nil)
|
||||
panicIf(err)
|
||||
|
||||
// start a watch
|
||||
wi, err := ei.Watch(metav1.ListOptions{})
|
||||
panicIf(err)
|
||||
|
||||
start := time.Now()
|
||||
kubernetesWatchTrigger.ObjectMeta.ResourceVersion = ""
|
||||
e, err = ei.Create(kubernetesWatchTrigger)
|
||||
panicIf(err)
|
||||
defer func() {
|
||||
err := ei.Delete(e.ObjectMeta.Name, nil)
|
||||
panicIf(err)
|
||||
}()
|
||||
|
||||
// assert that we get a watch event for the new kubernetesWatchTrigger
|
||||
recvd := false
|
||||
select {
|
||||
case <-time.NewTimer(1 * time.Second).C:
|
||||
if !recvd {
|
||||
log.Panicf("Didn't get watch event")
|
||||
}
|
||||
case ev := <-wi.ResultChan():
|
||||
obj, ok := ev.Object.(*fv1.KubernetesWatchTrigger)
|
||||
if !ok {
|
||||
log.Panicf("Can't cast to KubernetesWatchTrigger")
|
||||
}
|
||||
if obj.Spec.Type != kubernetesWatchTrigger.Spec.Type {
|
||||
log.Panicf("Bad object from watch: %#v", obj)
|
||||
}
|
||||
log.Printf("watch event took %v", time.Since(start))
|
||||
}
|
||||
}
|
||||
|
||||
func TestCrd(t *testing.T) {
|
||||
// skip test if no cluster available for testing
|
||||
kubeconfig := os.Getenv("KUBECONFIG")
|
||||
if len(kubeconfig) == 0 {
|
||||
log.Println("Skipping test, no kubernetes cluster")
|
||||
return
|
||||
}
|
||||
|
||||
config := zap.NewDevelopmentConfig()
|
||||
config.EncoderConfig.EncodeTime = zapcore.ISO8601TimeEncoder
|
||||
logger, err := config.Build()
|
||||
|
||||
panicIf(err)
|
||||
|
||||
fc, kubeClient, apiExtClient, _, err := MakeFissionClient()
|
||||
if err != nil {
|
||||
panicIf(err)
|
||||
}
|
||||
|
||||
// testNS isolation for running multiple CI builds concurrently.
|
||||
testNS = uuid.NewV4().String()
|
||||
_, err = kubeClient.CoreV1().Namespaces().Create(&v1.Namespace{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: testNS,
|
||||
},
|
||||
})
|
||||
panicIf(err)
|
||||
defer func() {
|
||||
err := kubeClient.CoreV1().Namespaces().Delete(testNS, nil)
|
||||
panicIf(err)
|
||||
}()
|
||||
|
||||
// init our types
|
||||
err = EnsureFissionCRDs(logger, apiExtClient)
|
||||
panicIf(err)
|
||||
|
||||
err = fc.WaitForCRDs()
|
||||
panicIf(err)
|
||||
|
||||
// rest client with knowledge about our crd types
|
||||
functionTests(fc.CoreV1())
|
||||
environmentTests(fc.CoreV1())
|
||||
httpTriggerTests(fc.CoreV1())
|
||||
kubernetesWatchTriggerTests(fc.CoreV1())
|
||||
}
|
||||
@@ -1,430 +0,0 @@
|
||||
/*
|
||||
Copyright 2016 The Fission 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 crd
|
||||
|
||||
import (
|
||||
apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"
|
||||
)
|
||||
|
||||
var (
|
||||
// Function validation schema properties
|
||||
functionSchemaProps = map[string]apiextensionsv1beta1.JSONSchemaProps{
|
||||
"spec": {
|
||||
Type: "object",
|
||||
Description: "Specification of the desired behaviour of the Function",
|
||||
Properties: map[string]apiextensionsv1beta1.JSONSchemaProps{
|
||||
"environment": environmentReferenceSchema,
|
||||
"package": functionPackageRefSchema,
|
||||
"secrets": secretReferenceSchema,
|
||||
"configmaps": configMapReferenceSchema,
|
||||
"resources": {
|
||||
Type: "object",
|
||||
Description: "ResourceRequirements describes the compute resource requirements. This is only for newdeploy to set up resource limitation when creating deployment for a function.",
|
||||
XPreserveUnknownFields: boolPtr(true),
|
||||
},
|
||||
"InvokeStrategy": invokeStrategySchema,
|
||||
"functionTimeout": {
|
||||
Type: "integer",
|
||||
Description: " FunctionTimeout provides a maximum amount of duration within which a request for a particular function execution should be complete.\nThis is optional. If not specified default value will be taken as 60s",
|
||||
},
|
||||
"idletimeout": {
|
||||
Type: "integer",
|
||||
Description: "IdleTimeout specifies the length of time that a function is idle before the function pod(s) are eligible for deletion. If no traffic to the function is detected within the idle timeout, the executor will then recycle the function pod(s) to release resources.",
|
||||
},
|
||||
"concurrency": {
|
||||
Type: "integer",
|
||||
Description: "Concurrency specifies the maximum number of pods that can be specialized concurrently to serve requests.\n This is optional. If not specified default value will be taken as 500",
|
||||
},
|
||||
"requestsPerPod": {
|
||||
Type: "integer",
|
||||
Description: "RequestsPerPod indicates the maximum number of concurrent requests that can be served by a specialized pod.\n This is optional. If not specified default value will be taken as 1",
|
||||
},
|
||||
"onceOnly": {
|
||||
Type: "boolean",
|
||||
Description: "OnceOnly specifies if specialized pod will serve exactly one request in its lifetime and would be garbage collected after serving that one request.\nThis is optional. If not specified default value will be taken as false",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
// Function validation schema
|
||||
functionSchema = apiextensionsv1beta1.JSONSchemaProps{
|
||||
Type: "object",
|
||||
Description: "A Function is a code and a runtime environment which can be used to execute code",
|
||||
Properties: functionSchemaProps,
|
||||
}
|
||||
|
||||
// Function validation object
|
||||
functionValidation = &apiextensionsv1beta1.CustomResourceValidation{
|
||||
OpenAPIV3Schema: &functionSchema,
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
// Environment validation schema properties
|
||||
environmentSchemaProps = map[string]apiextensionsv1beta1.JSONSchemaProps{
|
||||
"spec": {
|
||||
Type: "object",
|
||||
Description: "Specification of the desired behaviour of the Environment",
|
||||
Properties: map[string]apiextensionsv1beta1.JSONSchemaProps{
|
||||
"version": {
|
||||
Type: "integer",
|
||||
Description: "Version is the Environment API version",
|
||||
},
|
||||
"runtime": runtimeSchema,
|
||||
"builder": builderSchema,
|
||||
"allowedFunctionsPerContainer": {
|
||||
Type: "string",
|
||||
Description: "Allowed functions per container. Allowed Values: single, multiple",
|
||||
},
|
||||
"allowAccessToExternalNetwork": {
|
||||
Type: "boolean",
|
||||
Description: "To enable accessibility of external network for builder/function pod, set to 'true'.",
|
||||
},
|
||||
"resources": {
|
||||
Type: "object",
|
||||
Description: "The request and limit CPU/MEM resource setting for the pods of the function. Can be overridden at Function in case of newdeployment executor type",
|
||||
XPreserveUnknownFields: boolPtr(true),
|
||||
},
|
||||
"poolsize": {
|
||||
Type: "integer",
|
||||
Description: "The initial pool size for environment",
|
||||
},
|
||||
"terminationGracePeriod": {
|
||||
Type: "integer",
|
||||
Format: "int64",
|
||||
Description: "The grace time for pod to perform connection draining before termination. The unit is in seconds.",
|
||||
},
|
||||
"keeparchive": {
|
||||
Type: "boolean",
|
||||
Description: "KeepArchive is used by fetcher to determine if the extracted archive should be extracted. For compiled languages such as Java, it should be true",
|
||||
},
|
||||
"imagepullsecret": {
|
||||
Type: "string",
|
||||
Description: "ImagePullSecret is the secret for Kubernetes to pull an image from a private registry.",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
// Environment validation schema
|
||||
environmentSchema = apiextensionsv1beta1.JSONSchemaProps{
|
||||
Type: "object",
|
||||
Description: "Environments are the language-specific runtime parts of Fission. An Environment contains just enough software to build and run a Fission Function.",
|
||||
Properties: environmentSchemaProps,
|
||||
}
|
||||
|
||||
// Environment validation object
|
||||
environmentValidation = &apiextensionsv1beta1.CustomResourceValidation{
|
||||
OpenAPIV3Schema: &environmentSchema,
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
// Package validation schema properties
|
||||
packageSchemaProps = map[string]apiextensionsv1beta1.JSONSchemaProps{
|
||||
"spec": {
|
||||
Type: "object",
|
||||
Description: "Specification of the desired behaviour of the package.",
|
||||
Properties: map[string]apiextensionsv1beta1.JSONSchemaProps{
|
||||
"environment": environmentReferenceSchema,
|
||||
"source": archiveSchema,
|
||||
"deployment": archiveSchema,
|
||||
"configmaps": configMapReferenceSchema,
|
||||
"buildcmd": {
|
||||
Type: "string",
|
||||
Description: "BuildCommand is a custom build command that builder uses to build the source archive.",
|
||||
},
|
||||
},
|
||||
},
|
||||
"status": {
|
||||
Type: "object",
|
||||
Description: "PackageStatus contains the build status of a package also the build log for examination.",
|
||||
Properties: map[string]apiextensionsv1beta1.JSONSchemaProps{
|
||||
"buildstatus": {
|
||||
Type: "string",
|
||||
Description: "BuildStatus is the package build status.",
|
||||
},
|
||||
"buildlog": {
|
||||
Type: "string",
|
||||
Description: "BuildCommand is a custom build command that builder used to build the source archive.",
|
||||
},
|
||||
"lastUpdateTimestamp": {
|
||||
Type: "string",
|
||||
Nullable: true,
|
||||
Description: "LastUpdateTimestamp will store the timestamp the package was last updated metav1.Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON.",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
// Package validation schema
|
||||
packageSchema = apiextensionsv1beta1.JSONSchemaProps{
|
||||
Type: "object",
|
||||
Description: "A Package is a Fission object containing a Deployment Archive and a Source Archive (if any). A Package also references a certain environment.",
|
||||
Properties: packageSchemaProps,
|
||||
}
|
||||
|
||||
// Environment validation object
|
||||
packageValidation = &apiextensionsv1beta1.CustomResourceValidation{
|
||||
OpenAPIV3Schema: &packageSchema,
|
||||
}
|
||||
)
|
||||
|
||||
// Children of Package crd schema
|
||||
var (
|
||||
archiveSchemaProps = map[string]apiextensionsv1beta1.JSONSchemaProps{
|
||||
"type": {
|
||||
Type: "string",
|
||||
Description: "Type defines how the package is specified: literal or url.",
|
||||
},
|
||||
"literal": {
|
||||
Type: "string",
|
||||
Format: "byte",
|
||||
Description: "Literal contents of the package.",
|
||||
},
|
||||
"url": {
|
||||
Type: "string",
|
||||
Description: "URL references a package.",
|
||||
},
|
||||
"checksum": checksumSchema,
|
||||
}
|
||||
archiveSchema = apiextensionsv1beta1.JSONSchemaProps{
|
||||
Type: "object",
|
||||
Description: "Package contains or references a collection of source or binary files.",
|
||||
Properties: archiveSchemaProps,
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
checksumSchemaProps = map[string]apiextensionsv1beta1.JSONSchemaProps{
|
||||
"type": {
|
||||
Type: "string",
|
||||
Description: "ChecksumType specifies the checksum algorithm, such as sha256, used for a checksum.",
|
||||
},
|
||||
"sum": {
|
||||
Type: "string",
|
||||
Description: " Sum is hex encoded chechsum value.",
|
||||
},
|
||||
}
|
||||
checksumSchema = apiextensionsv1beta1.JSONSchemaProps{
|
||||
Type: "object",
|
||||
Description: "Checksum of package contents when the contents are stored outside the Package struct. Type is the checksum algorithm; sha256 is the only currently supported one. Sum is hex encoded.",
|
||||
Properties: checksumSchemaProps,
|
||||
}
|
||||
)
|
||||
|
||||
// Children of Function crd schema
|
||||
var (
|
||||
environmentReferenceSchemaProps = map[string]apiextensionsv1beta1.JSONSchemaProps{
|
||||
"namespace": {
|
||||
Type: "string",
|
||||
Description: "Namespace for corresponding Environment",
|
||||
},
|
||||
"name": {
|
||||
Type: "string",
|
||||
Description: "Name of the Environment to use",
|
||||
},
|
||||
}
|
||||
environmentReferenceSchema = apiextensionsv1beta1.JSONSchemaProps{
|
||||
Type: "object",
|
||||
Description: "Reference to Fission Environment type custom resource.",
|
||||
Properties: environmentReferenceSchemaProps,
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
packageRefSchemaProps = map[string]apiextensionsv1beta1.JSONSchemaProps{
|
||||
"namespace": {
|
||||
Type: "string",
|
||||
Description: "Namespace for corresponding Package",
|
||||
},
|
||||
"name": {
|
||||
Type: "string",
|
||||
Description: "Name of the Package to use",
|
||||
},
|
||||
"resourceversion": {
|
||||
Type: "string",
|
||||
Description: "Including resource version in the reference forces the function to be updated on package update, making it possible to cache the function based on its metadata.",
|
||||
},
|
||||
}
|
||||
functionPackageRefSchemaProps = map[string]apiextensionsv1beta1.JSONSchemaProps{
|
||||
"packageref": {
|
||||
Type: "object",
|
||||
Description: "Package Reference",
|
||||
Properties: packageRefSchemaProps,
|
||||
},
|
||||
"functionName": {
|
||||
Type: "string",
|
||||
Description: "FunctionName specifies a specific function within the package using the path and specific function and varies based on language/environment",
|
||||
},
|
||||
}
|
||||
functionPackageRefSchema = apiextensionsv1beta1.JSONSchemaProps{
|
||||
Type: "object",
|
||||
Description: "FunctionPackageRef includes the reference to the package.",
|
||||
Properties: functionPackageRefSchemaProps,
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
secretReferenceSchemaProps = map[string]apiextensionsv1beta1.JSONSchemaProps{
|
||||
"namespace": {
|
||||
Type: "string",
|
||||
Description: "Namespace for corresponding secret",
|
||||
},
|
||||
"name": {
|
||||
Type: "string",
|
||||
Description: "Name of the secret to use",
|
||||
},
|
||||
}
|
||||
secretReferenceObjectSchema = apiextensionsv1beta1.JSONSchemaProps{
|
||||
Type: "object",
|
||||
Description: "Reference to a Kubernetes secret.",
|
||||
Properties: secretReferenceSchemaProps,
|
||||
}
|
||||
secretReferenceSchema = apiextensionsv1beta1.JSONSchemaProps{
|
||||
Type: "array",
|
||||
Nullable: true,
|
||||
Items: &apiextensionsv1beta1.JSONSchemaPropsOrArray{
|
||||
Schema: &secretReferenceObjectSchema,
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
configMapReferenceSchemaProps = map[string]apiextensionsv1beta1.JSONSchemaProps{
|
||||
"namespace": {
|
||||
Type: "string",
|
||||
Description: "Namespace for corresponding ConfigMap",
|
||||
},
|
||||
"name": {
|
||||
Type: "string",
|
||||
Description: "Name of the ConfigMap to use",
|
||||
},
|
||||
}
|
||||
configMapReferenceObjectSchema = apiextensionsv1beta1.JSONSchemaProps{
|
||||
Type: "object",
|
||||
Description: "Reference to a Kubernetes ConfigMap.",
|
||||
Properties: configMapReferenceSchemaProps,
|
||||
}
|
||||
|
||||
configMapReferenceSchema = apiextensionsv1beta1.JSONSchemaProps{
|
||||
Type: "array",
|
||||
Nullable: true,
|
||||
Items: &apiextensionsv1beta1.JSONSchemaPropsOrArray{
|
||||
Schema: &configMapReferenceObjectSchema,
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
var (
|
||||
executionStrategySchema = map[string]apiextensionsv1beta1.JSONSchemaProps{
|
||||
"ExecutorType": {
|
||||
Type: "string",
|
||||
Description: "ExecutorType is the executor type of a function used. Defaults to poolmgr. Available value: poolmgr, newdeploy",
|
||||
},
|
||||
"MinScale": {
|
||||
Type: "integer",
|
||||
Description: "Only for newdeploy executor to set up minimum replicas of deployment.",
|
||||
},
|
||||
"MaxScale": {
|
||||
Type: "integer",
|
||||
Description: "Only for newdeploy executor to set up maximum replicas of deployment.",
|
||||
},
|
||||
"TargetCPUPercent": {
|
||||
Type: "integer",
|
||||
Description: "Only for newdeploy executor to set up target CPU utilization of HPA.",
|
||||
},
|
||||
"SpecializationTimeout": {
|
||||
Type: "integer",
|
||||
Description: "Timeout setting for executor to wait for pod specialization.",
|
||||
},
|
||||
}
|
||||
invokeStrategySchemaProps = map[string]apiextensionsv1beta1.JSONSchemaProps{
|
||||
"ExecutionStrategy": {
|
||||
Type: "object",
|
||||
Description: "ExecutionStrategy specifies low-level parameters for function execution, such as the number of instances, scaling strategy etc.",
|
||||
Properties: executionStrategySchema,
|
||||
},
|
||||
"StrategyType": {
|
||||
Type: "string",
|
||||
Description: "StrategyType is the strategy type of a function.",
|
||||
},
|
||||
}
|
||||
invokeStrategySchema = apiextensionsv1beta1.JSONSchemaProps{
|
||||
Type: "object",
|
||||
Description: "InvokeStrategy is a set of controls over how the function executes. It affects the performance and resource usage of the function. An InvokeStrategy is of one of two types: ExecutionStrategy, which controls low-level parameters such as which ExecutorType to use, when to autoscale, minimum and maximum number of running instances, etc.",
|
||||
Properties: invokeStrategySchemaProps,
|
||||
}
|
||||
)
|
||||
|
||||
// Children of Environment crd schema
|
||||
var (
|
||||
runtimeSchemaProps = map[string]apiextensionsv1beta1.JSONSchemaProps{
|
||||
"image": {
|
||||
Type: "string",
|
||||
Description: "Image for containing the language runtime.",
|
||||
},
|
||||
"container": {
|
||||
Type: "object",
|
||||
Description: "(Optional) Container allows the modification of the deployed runtime container using the Kubernetes Container spec. Fission overrides the following fields: Name, Image (set to the Runtime.Image), TerminationMessagePath, ImagePullPolicy\n You can set either PodSpec or Container, but not both.",
|
||||
XPreserveUnknownFields: boolPtr(true),
|
||||
},
|
||||
"podspec": {
|
||||
Type: "object",
|
||||
Description: "(Optional) Podspec allows modification of deployed runtime pod with Kubernetes PodSpec.\n You can set either PodSpec or Container, but not both.\n More info for podspec:\n https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#podspec-v1-core",
|
||||
XPreserveUnknownFields: boolPtr(true),
|
||||
},
|
||||
}
|
||||
runtimeSchema = apiextensionsv1beta1.JSONSchemaProps{
|
||||
Type: "object",
|
||||
Description: "Runtime is configuration for running function, like container image etc.",
|
||||
Properties: runtimeSchemaProps,
|
||||
}
|
||||
)
|
||||
var (
|
||||
builderSchemaProps = map[string]apiextensionsv1beta1.JSONSchemaProps{
|
||||
"image": {
|
||||
Type: "string",
|
||||
Description: "Image for containing the language runtime.",
|
||||
},
|
||||
"command": {
|
||||
Type: "string",
|
||||
Description: "(Optional) Default build command to run for this build environment.",
|
||||
},
|
||||
"container": {
|
||||
Type: "object",
|
||||
Description: "(Optional) Container allows the modification of the deployed runtime container using the Kubernetes Container spec. Fission overrides the following fields: Name, Image (set to the Runtime.Image), TerminationMessagePath, ImagePullPolicy\n You can set either PodSpec or Container, but not both.",
|
||||
XPreserveUnknownFields: boolPtr(true),
|
||||
},
|
||||
"podspec": {
|
||||
Type: "object",
|
||||
Description: "(Optional) Podspec allows modification of deployed runtime pod with Kubernetes PodSpec.\n You can set either PodSpec or Container, but not both.",
|
||||
XPreserveUnknownFields: boolPtr(true),
|
||||
},
|
||||
}
|
||||
builderSchema = apiextensionsv1beta1.JSONSchemaProps{
|
||||
Type: "object",
|
||||
Description: "(Optional) Builder is configuration for builder manager to launch environment builder to build source code into deployable binary.",
|
||||
Properties: builderSchemaProps,
|
||||
}
|
||||
)
|
||||
|
||||
func boolPtr(b bool) *bool {
|
||||
return &b
|
||||
}
|
||||
+1
-1
@@ -22,7 +22,7 @@ import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// Given metadata, create a key that uniquely identifies the contents
|
||||
// CacheKey : Given metadata, create a key that uniquely identifies the contents
|
||||
// of the object. Since resourceVersion changes on every update and
|
||||
// UIDs are unique, uid+resourceVersion identifies the
|
||||
// content. (ResourceVersion may also update on status updates, so
|
||||
|
||||
@@ -94,7 +94,7 @@ func initConfigmapController(logger *zap.Logger, fissionClient *crd.FissionClien
|
||||
}
|
||||
|
||||
func getConfigmapRelatedFuncs(logger *zap.Logger, m *metav1.ObjectMeta, fissionClient *crd.FissionClient) ([]fv1.Function, error) {
|
||||
funcList, err := fissionClient.CoreV1().Functions(metav1.NamespaceAll).List(metav1.ListOptions{})
|
||||
funcList, err := fissionClient.CoreV1().Functions(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -141,7 +141,7 @@ func initSecretController(logger *zap.Logger, fissionClient *crd.FissionClient,
|
||||
}
|
||||
|
||||
func getSecretRelatedFuncs(logger *zap.Logger, m *metav1.ObjectMeta, fissionClient *crd.FissionClient) ([]fv1.Function, error) {
|
||||
funcList, err := fissionClient.CoreV1().Functions(metav1.NamespaceAll).List(metav1.ListOptions{})
|
||||
funcList, err := fissionClient.CoreV1().Functions(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ func panicIf(err error) {
|
||||
|
||||
// return the number of pods in the given namespace matching the given labels
|
||||
func countPods(kubeClient *kubernetes.Clientset, ns string, labelz map[string]string) int {
|
||||
pods, err := kubeClient.CoreV1().Pods(ns).List(metav1.ListOptions{
|
||||
pods, err := kubeClient.CoreV1().Pods(ns).List(context.TODO(), metav1.ListOptions{
|
||||
LabelSelector: labels.Set(labelz).AsSelector().String(),
|
||||
})
|
||||
if err != nil {
|
||||
@@ -62,11 +62,11 @@ func countPods(kubeClient *kubernetes.Clientset, ns string, labelz map[string]st
|
||||
}
|
||||
|
||||
func createTestNamespace(kubeClient *kubernetes.Clientset, ns string) {
|
||||
_, err := kubeClient.CoreV1().Namespaces().Create(&apiv1.Namespace{
|
||||
_, err := kubeClient.CoreV1().Namespaces().Create(context.TODO(), &apiv1.Namespace{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: ns,
|
||||
},
|
||||
})
|
||||
}, metav1.CreateOptions{})
|
||||
if err != nil {
|
||||
log.Panicf("failed to create ns %v: %v", ns, err)
|
||||
}
|
||||
@@ -75,7 +75,7 @@ func createTestNamespace(kubeClient *kubernetes.Clientset, ns string) {
|
||||
|
||||
// create a nodeport service
|
||||
func createSvc(kubeClient *kubernetes.Clientset, ns string, name string, targetPort int, nodePort int32, labels map[string]string) *apiv1.Service {
|
||||
svc, err := kubeClient.CoreV1().Services(ns).Create(&apiv1.Service{
|
||||
svc, err := kubeClient.CoreV1().Services(ns).Create(context.TODO(), &apiv1.Service{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: name,
|
||||
},
|
||||
@@ -91,7 +91,7 @@ func createSvc(kubeClient *kubernetes.Clientset, ns string, name string, targetP
|
||||
},
|
||||
Selector: labels,
|
||||
},
|
||||
})
|
||||
}, metav1.CreateOptions{})
|
||||
if err != nil {
|
||||
log.Panicf("Failed to create svc: %v", err)
|
||||
}
|
||||
@@ -123,7 +123,7 @@ func TestExecutor(t *testing.T) {
|
||||
// create the test's namespaces
|
||||
createTestNamespace(kubeClient, fissionNs)
|
||||
defer func() {
|
||||
err := kubeClient.CoreV1().Namespaces().Delete(fissionNs, nil)
|
||||
err := kubeClient.CoreV1().Namespaces().Delete(context.TODO(), fissionNs, metav1.DeleteOptions{})
|
||||
if err != nil {
|
||||
log.Fatalf("failed to delete namespace: %v", err)
|
||||
}
|
||||
@@ -131,7 +131,7 @@ func TestExecutor(t *testing.T) {
|
||||
|
||||
createTestNamespace(kubeClient, functionNs)
|
||||
defer func() {
|
||||
err := kubeClient.CoreV1().Namespaces().Delete(fissionNs, nil)
|
||||
err := kubeClient.CoreV1().Namespaces().Delete(context.TODO(), functionNs, metav1.DeleteOptions{})
|
||||
if err != nil {
|
||||
log.Fatalf("failed to delete namespace: %v", err)
|
||||
}
|
||||
@@ -154,7 +154,7 @@ func TestExecutor(t *testing.T) {
|
||||
}
|
||||
|
||||
// create an env on the cluster
|
||||
env, err := fissionClient.CoreV1().Environments(fissionNs).Create(&fv1.Environment{
|
||||
env, err := fissionClient.CoreV1().Environments(fissionNs).Create(context.TODO(), &fv1.Environment{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "nodejs",
|
||||
Namespace: fissionNs,
|
||||
@@ -166,7 +166,7 @@ func TestExecutor(t *testing.T) {
|
||||
},
|
||||
Builder: fv1.Builder{},
|
||||
},
|
||||
})
|
||||
}, metav1.CreateOptions{})
|
||||
if err != nil {
|
||||
log.Panicf("failed to create env: %v", err)
|
||||
}
|
||||
@@ -207,7 +207,7 @@ func TestExecutor(t *testing.T) {
|
||||
Deployment: deployment,
|
||||
},
|
||||
}
|
||||
p, err = fissionClient.CoreV1().Packages(fissionNs).Create(p)
|
||||
p, err = fissionClient.CoreV1().Packages(fissionNs).Create(context.TODO(), p, metav1.CreateOptions{})
|
||||
if err != nil {
|
||||
log.Panicf("failed to create package: %v", err)
|
||||
}
|
||||
@@ -229,7 +229,7 @@ func TestExecutor(t *testing.T) {
|
||||
},
|
||||
},
|
||||
}
|
||||
_, err = fissionClient.CoreV1().Functions(fissionNs).Create(f)
|
||||
_, err = fissionClient.CoreV1().Functions(fissionNs).Create(context.TODO(), f, metav1.CreateOptions{})
|
||||
if err != nil {
|
||||
log.Panicf("failed to create function: %v", err)
|
||||
}
|
||||
@@ -239,7 +239,7 @@ func TestExecutor(t *testing.T) {
|
||||
var fetcherPort int32 = 30001
|
||||
fetcherSvc := createSvc(kubeClient, functionNs, fmt.Sprintf("%v-%v", f.ObjectMeta.Name, "fetcher"), 8000, fetcherPort, labels)
|
||||
defer func() {
|
||||
err := kubeClient.CoreV1().Services(functionNs).Delete(fetcherSvc.ObjectMeta.Name, nil)
|
||||
err := kubeClient.CoreV1().Services(functionNs).Delete(context.TODO(), fetcherSvc.ObjectMeta.Name, metav1.DeleteOptions{})
|
||||
if err != nil {
|
||||
log.Fatalf("failed to delete service: %v", err)
|
||||
}
|
||||
@@ -248,7 +248,7 @@ func TestExecutor(t *testing.T) {
|
||||
var funcSvcPort int32 = 30002
|
||||
functionSvc := createSvc(kubeClient, functionNs, f.ObjectMeta.Name, 8888, funcSvcPort, labels)
|
||||
defer func() {
|
||||
err := kubeClient.CoreV1().Services(functionNs).Delete(functionSvc.ObjectMeta.Name, nil)
|
||||
err := kubeClient.CoreV1().Services(functionNs).Delete(context.TODO(), functionSvc.ObjectMeta.Name, metav1.DeleteOptions{})
|
||||
if err != nil {
|
||||
log.Fatalf("failed to delete service: %v", err)
|
||||
}
|
||||
@@ -256,7 +256,7 @@ func TestExecutor(t *testing.T) {
|
||||
|
||||
// the main test: get a service for a given function
|
||||
t1 := time.Now()
|
||||
svc, err := poolmgrClient.GetServiceForFunction(context.Background(), f)
|
||||
svc, err := poolmgrClient.GetServiceForFunction(context.TODO(), f)
|
||||
if err != nil {
|
||||
log.Panicf("failed to get func svc: %v", err)
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package newdeploy
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"time"
|
||||
@@ -62,7 +63,7 @@ func (deploy *NewDeploy) createOrGetDeployment(fn *fv1.Function, env *fv1.Enviro
|
||||
return nil, err
|
||||
}
|
||||
|
||||
existingDepl, err := deploy.kubernetesClient.AppsV1().Deployments(deployNamespace).Get(deployName, metav1.GetOptions{})
|
||||
existingDepl, err := deploy.kubernetesClient.AppsV1().Deployments(deployNamespace).Get(context.TODO(), deployName, metav1.GetOptions{})
|
||||
if err == nil {
|
||||
// Try to adopt orphan deployment created by the old executor.
|
||||
if existingDepl.Annotations[fv1.EXECUTOR_INSTANCEID_LABEL] != deploy.instanceID {
|
||||
@@ -74,7 +75,7 @@ func (deploy *NewDeploy) createOrGetDeployment(fn *fv1.Function, env *fv1.Enviro
|
||||
|
||||
// Update with the latest deployment spec. Kubernetes will trigger
|
||||
// rolling update if spec is different from the one in the cluster.
|
||||
existingDepl, err = deploy.kubernetesClient.AppsV1().Deployments(deployNamespace).Update(existingDepl)
|
||||
existingDepl, err = deploy.kubernetesClient.AppsV1().Deployments(deployNamespace).Update(context.TODO(), existingDepl, metav1.UpdateOptions{})
|
||||
if err != nil {
|
||||
deploy.logger.Warn("error adopting deploy", zap.Error(err),
|
||||
zap.String("deploy", deployName), zap.String("ns", deployNamespace))
|
||||
@@ -102,10 +103,10 @@ func (deploy *NewDeploy) createOrGetDeployment(fn *fv1.Function, env *fv1.Enviro
|
||||
return nil, err
|
||||
}
|
||||
|
||||
depl, err := deploy.kubernetesClient.AppsV1().Deployments(deployNamespace).Create(deployment)
|
||||
depl, err := deploy.kubernetesClient.AppsV1().Deployments(deployNamespace).Create(context.TODO(), deployment, metav1.CreateOptions{})
|
||||
if err != nil {
|
||||
if k8s_err.IsAlreadyExists(err) {
|
||||
depl, err = deploy.kubernetesClient.AppsV1().Deployments(deployNamespace).Get(deployName, metav1.GetOptions{})
|
||||
depl, err = deploy.kubernetesClient.AppsV1().Deployments(deployNamespace).Get(context.TODO(), deployName, metav1.GetOptions{})
|
||||
}
|
||||
if err != nil {
|
||||
deploy.logger.Error("error while creating function deployment",
|
||||
@@ -166,7 +167,7 @@ func (deploy *NewDeploy) setupRBACObjs(deployNamespace string, fn *fv1.Function)
|
||||
}
|
||||
|
||||
func (deploy *NewDeploy) updateDeployment(deployment *appsv1.Deployment, ns string) error {
|
||||
_, err := deploy.kubernetesClient.AppsV1().Deployments(ns).Update(deployment)
|
||||
_, err := deploy.kubernetesClient.AppsV1().Deployments(ns).Update(context.TODO(), deployment, metav1.UpdateOptions{})
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -174,7 +175,7 @@ func (deploy *NewDeploy) deleteDeployment(ns string, name string) error {
|
||||
// DeletePropagationBackground deletes the object immediately and dependent are deleted later
|
||||
// DeletePropagationForeground not advisable; it marks for deleteion and API can still serve those objects
|
||||
deletePropagation := metav1.DeletePropagationBackground
|
||||
return deploy.kubernetesClient.AppsV1().Deployments(ns).Delete(name, &metav1.DeleteOptions{
|
||||
return deploy.kubernetesClient.AppsV1().Deployments(ns).Delete(context.TODO(), name, metav1.DeleteOptions{
|
||||
PropagationPolicy: &deletePropagation,
|
||||
})
|
||||
}
|
||||
@@ -399,14 +400,14 @@ func (deploy *NewDeploy) createOrGetHpa(hpaName string, execStrategy *fv1.Execut
|
||||
},
|
||||
}
|
||||
|
||||
existingHpa, err := deploy.kubernetesClient.AutoscalingV1().HorizontalPodAutoscalers(depl.ObjectMeta.Namespace).Get(hpaName, metav1.GetOptions{})
|
||||
existingHpa, err := deploy.kubernetesClient.AutoscalingV1().HorizontalPodAutoscalers(depl.ObjectMeta.Namespace).Get(context.TODO(), hpaName, metav1.GetOptions{})
|
||||
if err == nil {
|
||||
// to adopt orphan service
|
||||
if existingHpa.Annotations[fv1.EXECUTOR_INSTANCEID_LABEL] != deploy.instanceID {
|
||||
existingHpa.Annotations = hpa.Annotations
|
||||
existingHpa.Labels = hpa.Labels
|
||||
existingHpa.Spec = hpa.Spec
|
||||
existingHpa, err = deploy.kubernetesClient.AutoscalingV1().HorizontalPodAutoscalers(depl.ObjectMeta.Namespace).Update(existingHpa)
|
||||
existingHpa, err = deploy.kubernetesClient.AutoscalingV1().HorizontalPodAutoscalers(depl.ObjectMeta.Namespace).Update(context.TODO(), existingHpa, metav1.UpdateOptions{})
|
||||
if err != nil {
|
||||
deploy.logger.Warn("error adopting HPA", zap.Error(err),
|
||||
zap.String("HPA", hpaName), zap.String("ns", depl.ObjectMeta.Namespace))
|
||||
@@ -415,10 +416,10 @@ func (deploy *NewDeploy) createOrGetHpa(hpaName string, execStrategy *fv1.Execut
|
||||
}
|
||||
return existingHpa, err
|
||||
} else if k8s_err.IsNotFound(err) {
|
||||
cHpa, err := deploy.kubernetesClient.AutoscalingV1().HorizontalPodAutoscalers(depl.ObjectMeta.Namespace).Create(hpa)
|
||||
cHpa, err := deploy.kubernetesClient.AutoscalingV1().HorizontalPodAutoscalers(depl.ObjectMeta.Namespace).Create(context.TODO(), hpa, metav1.CreateOptions{})
|
||||
if err != nil {
|
||||
if k8s_err.IsAlreadyExists(err) {
|
||||
cHpa, err = deploy.kubernetesClient.AutoscalingV1().HorizontalPodAutoscalers(depl.ObjectMeta.Namespace).Get(hpaName, metav1.GetOptions{})
|
||||
cHpa, err = deploy.kubernetesClient.AutoscalingV1().HorizontalPodAutoscalers(depl.ObjectMeta.Namespace).Get(context.TODO(), hpaName, metav1.GetOptions{})
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -430,16 +431,16 @@ func (deploy *NewDeploy) createOrGetHpa(hpaName string, execStrategy *fv1.Execut
|
||||
}
|
||||
|
||||
func (deploy *NewDeploy) getHpa(ns, name string) (*asv1.HorizontalPodAutoscaler, error) {
|
||||
return deploy.kubernetesClient.AutoscalingV1().HorizontalPodAutoscalers(ns).Get(name, metav1.GetOptions{})
|
||||
return deploy.kubernetesClient.AutoscalingV1().HorizontalPodAutoscalers(ns).Get(context.TODO(), name, metav1.GetOptions{})
|
||||
}
|
||||
|
||||
func (deploy *NewDeploy) updateHpa(hpa *asv1.HorizontalPodAutoscaler) error {
|
||||
_, err := deploy.kubernetesClient.AutoscalingV1().HorizontalPodAutoscalers(hpa.ObjectMeta.Namespace).Update(hpa)
|
||||
_, err := deploy.kubernetesClient.AutoscalingV1().HorizontalPodAutoscalers(hpa.ObjectMeta.Namespace).Update(context.TODO(), hpa, metav1.UpdateOptions{})
|
||||
return err
|
||||
}
|
||||
|
||||
func (deploy *NewDeploy) deleteHpa(ns string, name string) error {
|
||||
return deploy.kubernetesClient.AutoscalingV1().HorizontalPodAutoscalers(ns).Delete(name, &metav1.DeleteOptions{})
|
||||
return deploy.kubernetesClient.AutoscalingV1().HorizontalPodAutoscalers(ns).Delete(context.TODO(), name, metav1.DeleteOptions{})
|
||||
}
|
||||
|
||||
func (deploy *NewDeploy) createOrGetSvc(deployLabels map[string]string, deployAnnotations map[string]string, svcName string, svcNamespace string) (*apiv1.Service, error) {
|
||||
@@ -462,7 +463,7 @@ func (deploy *NewDeploy) createOrGetSvc(deployLabels map[string]string, deployAn
|
||||
},
|
||||
}
|
||||
|
||||
existingSvc, err := deploy.kubernetesClient.CoreV1().Services(svcNamespace).Get(svcName, metav1.GetOptions{})
|
||||
existingSvc, err := deploy.kubernetesClient.CoreV1().Services(svcNamespace).Get(context.TODO(), svcName, metav1.GetOptions{})
|
||||
if err == nil {
|
||||
// to adopt orphan service
|
||||
if existingSvc.Annotations[fv1.EXECUTOR_INSTANCEID_LABEL] != deploy.instanceID {
|
||||
@@ -471,7 +472,7 @@ func (deploy *NewDeploy) createOrGetSvc(deployLabels map[string]string, deployAn
|
||||
existingSvc.Spec.Ports = service.Spec.Ports
|
||||
existingSvc.Spec.Selector = service.Spec.Selector
|
||||
existingSvc.Spec.Type = service.Spec.Type
|
||||
existingSvc, err = deploy.kubernetesClient.CoreV1().Services(svcNamespace).Update(existingSvc)
|
||||
existingSvc, err = deploy.kubernetesClient.CoreV1().Services(svcNamespace).Update(context.TODO(), existingSvc, metav1.UpdateOptions{})
|
||||
if err != nil {
|
||||
deploy.logger.Warn("error adopting service", zap.Error(err),
|
||||
zap.String("service", svcName), zap.String("ns", svcNamespace))
|
||||
@@ -480,10 +481,10 @@ func (deploy *NewDeploy) createOrGetSvc(deployLabels map[string]string, deployAn
|
||||
}
|
||||
return existingSvc, err
|
||||
} else if k8s_err.IsNotFound(err) {
|
||||
svc, err := deploy.kubernetesClient.CoreV1().Services(svcNamespace).Create(service)
|
||||
svc, err := deploy.kubernetesClient.CoreV1().Services(svcNamespace).Create(context.TODO(), service, metav1.CreateOptions{})
|
||||
if err != nil {
|
||||
if k8s_err.IsAlreadyExists(err) {
|
||||
svc, err = deploy.kubernetesClient.CoreV1().Services(svcNamespace).Get(svcName, metav1.GetOptions{})
|
||||
svc, err = deploy.kubernetesClient.CoreV1().Services(svcNamespace).Get(context.TODO(), svcName, metav1.GetOptions{})
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -495,7 +496,7 @@ func (deploy *NewDeploy) createOrGetSvc(deployLabels map[string]string, deployAn
|
||||
}
|
||||
|
||||
func (deploy *NewDeploy) deleteSvc(ns string, name string) error {
|
||||
return deploy.kubernetesClient.CoreV1().Services(ns).Delete(name, &metav1.DeleteOptions{})
|
||||
return deploy.kubernetesClient.CoreV1().Services(ns).Delete(context.TODO(), name, metav1.DeleteOptions{})
|
||||
}
|
||||
|
||||
func (deploy *NewDeploy) waitForDeploy(depl *appsv1.Deployment, replicas int32, specializationTimeout int) (*appsv1.Deployment, error) {
|
||||
@@ -505,7 +506,7 @@ func (deploy *NewDeploy) waitForDeploy(depl *appsv1.Deployment, replicas int32,
|
||||
}
|
||||
|
||||
for i := 0; i < specializationTimeout; i++ {
|
||||
latestDepl, err := deploy.kubernetesClient.AppsV1().Deployments(depl.ObjectMeta.Namespace).Get(depl.Name, metav1.GetOptions{})
|
||||
latestDepl, err := deploy.kubernetesClient.AppsV1().Deployments(depl.ObjectMeta.Namespace).Get(context.TODO(), depl.Name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -569,7 +570,7 @@ func referencedResourcesRVSum(client *kubernetes.Clientset, namespace string, se
|
||||
rvCount := 0
|
||||
|
||||
if len(secrets) > 0 {
|
||||
list, err := client.CoreV1().Secrets(namespace).List(metav1.ListOptions{})
|
||||
list, err := client.CoreV1().Secrets(namespace).List(context.TODO(), metav1.ListOptions{})
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
@@ -589,7 +590,7 @@ func referencedResourcesRVSum(client *kubernetes.Clientset, namespace string, se
|
||||
}
|
||||
|
||||
if len(cfgmaps) > 0 {
|
||||
list, err := client.CoreV1().ConfigMaps(namespace).List(metav1.ListOptions{})
|
||||
list, err := client.CoreV1().ConfigMaps(namespace).List(context.TODO(), metav1.ListOptions{})
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ func (deploy *NewDeploy) IsValid(fsvc *fscache.FuncSvc) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
_, err := deploy.kubernetesClient.CoreV1().Services(service[1]).Get(service[0], metav1.GetOptions{})
|
||||
_, err := deploy.kubernetesClient.CoreV1().Services(service[1]).Get(context.TODO(), service[0], metav1.GetOptions{})
|
||||
if err != nil {
|
||||
if !k8sErrs.IsNotFound(err) {
|
||||
deploy.logger.Error("error validating function service address", zap.String("function", fsvc.Function.Name), zap.Error(err))
|
||||
@@ -204,7 +204,7 @@ func (deploy *NewDeploy) IsValid(fsvc *fscache.FuncSvc) bool {
|
||||
}
|
||||
|
||||
currentDeploy, err := deploy.kubernetesClient.AppsV1().
|
||||
Deployments(deployObj.Namespace).Get(deployObj.Name, metav1.GetOptions{})
|
||||
Deployments(deployObj.Namespace).Get(context.TODO(), deployObj.Name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
if !k8sErrs.IsNotFound(err) {
|
||||
deploy.logger.Error("error validating function deployment", zap.Error(err), zap.String("function", fsvc.Function.Name))
|
||||
@@ -223,7 +223,7 @@ func (deploy *NewDeploy) IsValid(fsvc *fscache.FuncSvc) bool {
|
||||
// RefreshFuncPods deleted pods related to the function so that new pods are replenished
|
||||
func (deploy *NewDeploy) RefreshFuncPods(logger *zap.Logger, f fv1.Function) error {
|
||||
|
||||
env, err := deploy.fissionClient.CoreV1().Environments(f.Spec.Environment.Namespace).Get(f.Spec.Environment.Name, metav1.GetOptions{})
|
||||
env, err := deploy.fissionClient.CoreV1().Environments(f.Spec.Environment.Namespace).Get(context.TODO(), f.Spec.Environment.Name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -234,7 +234,7 @@ func (deploy *NewDeploy) RefreshFuncPods(logger *zap.Logger, f fv1.Function) err
|
||||
UID: env.ObjectMeta.UID,
|
||||
})
|
||||
|
||||
dep, err := deploy.kubernetesClient.AppsV1().Deployments(metav1.NamespaceAll).List(metav1.ListOptions{
|
||||
dep, err := deploy.kubernetesClient.AppsV1().Deployments(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{
|
||||
LabelSelector: labels.Set(funcLabels).AsSelector().String(),
|
||||
})
|
||||
|
||||
@@ -252,9 +252,9 @@ func (deploy *NewDeploy) RefreshFuncPods(logger *zap.Logger, f fv1.Function) err
|
||||
patch := fmt.Sprintf(`{"spec" : {"template": {"spec":{"containers":[{"name": "%s", "env":[{"name": "%s", "value": "%v"}]}]}}}}`,
|
||||
f.ObjectMeta.Name, fv1.ResourceVersionCount, rvCount)
|
||||
|
||||
_, err = deploy.kubernetesClient.AppsV1().Deployments(deployment.ObjectMeta.Namespace).Patch(deployment.ObjectMeta.Name,
|
||||
_, err = deploy.kubernetesClient.AppsV1().Deployments(deployment.ObjectMeta.Namespace).Patch(context.TODO(), deployment.ObjectMeta.Name,
|
||||
k8sTypes.StrategicMergePatchType,
|
||||
[]byte(patch))
|
||||
[]byte(patch), metav1.PatchOptions{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -264,7 +264,7 @@ func (deploy *NewDeploy) RefreshFuncPods(logger *zap.Logger, f fv1.Function) err
|
||||
|
||||
// AdoptExistingResources attempts to adopt resources for functions in all namespaces.
|
||||
func (deploy *NewDeploy) AdoptExistingResources() {
|
||||
fnList, err := deploy.fissionClient.CoreV1().Functions(metav1.NamespaceAll).List(metav1.ListOptions{})
|
||||
fnList, err := deploy.fissionClient.CoreV1().Functions(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{})
|
||||
if err != nil {
|
||||
deploy.logger.Error("error getting function list", zap.Error(err))
|
||||
return
|
||||
@@ -384,7 +384,7 @@ func (deploy *NewDeploy) initEnvController() (k8sCache.Store, k8sCache.Controlle
|
||||
deploy.logger.Debug("Updating all function of the environment that changed, old env:", zap.Any("environment", oldEnv))
|
||||
funcs := deploy.getEnvFunctions(&newEnv.ObjectMeta)
|
||||
for _, f := range funcs {
|
||||
function, err := deploy.fissionClient.CoreV1().Functions(f.ObjectMeta.Namespace).Get(f.ObjectMeta.Name, metav1.GetOptions{})
|
||||
function, err := deploy.fissionClient.CoreV1().Functions(f.ObjectMeta.Namespace).Get(context.TODO(), f.ObjectMeta.Name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
deploy.logger.Error("Error getting function", zap.Error(err), zap.Any("function", function))
|
||||
continue
|
||||
@@ -402,7 +402,7 @@ func (deploy *NewDeploy) initEnvController() (k8sCache.Store, k8sCache.Controlle
|
||||
}
|
||||
|
||||
func (deploy *NewDeploy) getEnvFunctions(m *metav1.ObjectMeta) []fv1.Function {
|
||||
funcList, err := deploy.fissionClient.CoreV1().Functions(metav1.NamespaceAll).List(metav1.ListOptions{})
|
||||
funcList, err := deploy.fissionClient.CoreV1().Functions(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{})
|
||||
if err != nil {
|
||||
deploy.logger.Error("Error getting functions for env", zap.Error(err), zap.Any("environment", m))
|
||||
}
|
||||
@@ -458,7 +458,7 @@ func (deploy *NewDeploy) deleteFunction(fn *fv1.Function) error {
|
||||
func (deploy *NewDeploy) fnCreate(fn *fv1.Function) (*fscache.FuncSvc, error) {
|
||||
env, err := deploy.fissionClient.CoreV1().
|
||||
Environments(fn.Spec.Environment.Namespace).
|
||||
Get(fn.Spec.Environment.Name, metav1.GetOptions{})
|
||||
Get(context.TODO(), fn.Spec.Environment.Name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -664,7 +664,7 @@ func (deploy *NewDeploy) updateFunction(oldFn *fv1.Function, newFn *fv1.Function
|
||||
|
||||
if deployChanged {
|
||||
env, err := deploy.fissionClient.CoreV1().Environments(newFn.Spec.Environment.Namespace).
|
||||
Get(newFn.Spec.Environment.Name, metav1.GetOptions{})
|
||||
Get(context.TODO(), newFn.Spec.Environment.Name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
deploy.updateStatus(oldFn, err, "failed to get environment while updating function")
|
||||
return err
|
||||
@@ -695,7 +695,7 @@ func (deploy *NewDeploy) updateFuncDeployment(fn *fv1.Function, env *fv1.Environ
|
||||
ns = fn.ObjectMeta.Namespace
|
||||
}
|
||||
|
||||
existingDepl, err := deploy.kubernetesClient.AppsV1().Deployments(ns).Get(fnObjName, metav1.GetOptions{})
|
||||
existingDepl, err := deploy.kubernetesClient.AppsV1().Deployments(ns).Get(context.TODO(), fnObjName, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -794,7 +794,7 @@ func (deploy *NewDeploy) idleObjectReaper() {
|
||||
for {
|
||||
time.Sleep(pollSleep)
|
||||
|
||||
envs, err := deploy.fissionClient.CoreV1().Environments(metav1.NamespaceAll).List(metav1.ListOptions{})
|
||||
envs, err := deploy.fissionClient.CoreV1().Environments(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{})
|
||||
if err != nil {
|
||||
deploy.logger.Fatal("failed to get environment list", zap.Error(err))
|
||||
}
|
||||
@@ -825,7 +825,7 @@ func (deploy *NewDeploy) idleObjectReaper() {
|
||||
zap.String("function", fsvc.Name))
|
||||
}
|
||||
|
||||
fn, err := deploy.fissionClient.CoreV1().Functions(fsvc.Function.Namespace).Get(fsvc.Function.Name, metav1.GetOptions{})
|
||||
fn, err := deploy.fissionClient.CoreV1().Functions(fsvc.Function.Namespace).Get(context.TODO(), fsvc.Function.Name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
// Newdeploy manager handles the function delete event and clean cache/kubeobjs itself,
|
||||
// so we ignore the not found error for functions with newdeploy executor type here.
|
||||
@@ -856,7 +856,7 @@ func (deploy *NewDeploy) idleObjectReaper() {
|
||||
}
|
||||
|
||||
currentDeploy, err := deploy.kubernetesClient.AppsV1().
|
||||
Deployments(deployObj.Namespace).Get(deployObj.Name, metav1.GetOptions{})
|
||||
Deployments(deployObj.Namespace).Get(context.TODO(), deployObj.Name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
deploy.logger.Error("error getting function deployment", zap.Error(err), zap.String("function", fsvc.Function.Name))
|
||||
return
|
||||
@@ -894,7 +894,7 @@ func (deploy *NewDeploy) scaleDeployment(deplNS string, deplName string, replica
|
||||
zap.String("deployment", deplName),
|
||||
zap.String("namespace", deplNS),
|
||||
zap.Int32("replicas", replicas))
|
||||
_, err := deploy.kubernetesClient.AppsV1().Deployments(deplNS).UpdateScale(deplName, &autoscalingv1.Scale{
|
||||
_, err := deploy.kubernetesClient.AppsV1().Deployments(deplNS).UpdateScale(context.TODO(), deplName, &autoscalingv1.Scale{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: deplName,
|
||||
Namespace: deplNS,
|
||||
@@ -902,6 +902,6 @@ func (deploy *NewDeploy) scaleDeployment(deplNS string, deplName string, replica
|
||||
Spec: autoscalingv1.ScaleSpec{
|
||||
Replicas: replicas,
|
||||
},
|
||||
})
|
||||
}, metav1.UpdateOptions{})
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package poolmgr
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"go.uber.org/zap"
|
||||
@@ -124,7 +125,7 @@ func (gpm *GenericPoolManager) makeFuncController(fissionClient *crd.FissionClie
|
||||
}
|
||||
|
||||
// create function istio service if it does not exist
|
||||
_, err = kubernetesClient.CoreV1().Services(envNs).Create(&svc)
|
||||
_, err = kubernetesClient.CoreV1().Services(envNs).Create(context.TODO(), &svc, metav1.CreateOptions{})
|
||||
if err != nil && !kerrors.IsAlreadyExists(err) {
|
||||
gpm.logger.Error("error creating istio service for function",
|
||||
zap.Error(err),
|
||||
@@ -151,7 +152,7 @@ func (gpm *GenericPoolManager) makeFuncController(fissionClient *crd.FissionClie
|
||||
if istioEnabled {
|
||||
svcName := utils.GetFunctionIstioServiceName(fn.ObjectMeta.Name, fn.ObjectMeta.Namespace)
|
||||
// delete function istio service
|
||||
err := kubernetesClient.CoreV1().Services(envNs).Delete(svcName, nil)
|
||||
err := kubernetesClient.CoreV1().Services(envNs).Delete(context.TODO(), svcName, metav1.DeleteOptions{})
|
||||
if err != nil && !kerrors.IsNotFound(err) {
|
||||
gpm.logger.Error("error deleting istio service for function",
|
||||
zap.Error(err),
|
||||
|
||||
@@ -174,7 +174,7 @@ func (gp *GenericPool) getDeployAnnotations() map[string]string {
|
||||
|
||||
func (gp *GenericPool) updateCPUUtilizationSvc() {
|
||||
for {
|
||||
podMetricsList, err := gp.metricsClient.MetricsV1beta1().PodMetricses(gp.namespace).List(v1.ListOptions{
|
||||
podMetricsList, err := gp.metricsClient.MetricsV1beta1().PodMetricses(gp.namespace).List(context.TODO(), v1.ListOptions{
|
||||
LabelSelector: "managed=false",
|
||||
})
|
||||
|
||||
@@ -257,7 +257,7 @@ func (gp *GenericPool) choosePod(newLabels map[string]string) (string, *apiv1.Po
|
||||
|
||||
patch := fmt.Sprintf(`{"metadata":{"annotations":%v, "labels":%v}}`, string(annotationPatch), string(labelPatch))
|
||||
gp.logger.Info("relabel pod", zap.String("pod", patch))
|
||||
newPod, err := gp.kubernetesClient.CoreV1().Pods(chosenPod.Namespace).Patch(chosenPod.Name, k8sTypes.StrategicMergePatchType, []byte(patch))
|
||||
newPod, err := gp.kubernetesClient.CoreV1().Pods(chosenPod.Namespace).Patch(context.TODO(), chosenPod.Name, k8sTypes.StrategicMergePatchType, []byte(patch), metav1.PatchOptions{})
|
||||
if err != nil {
|
||||
gp.logger.Error("failed to relabel pod", zap.Error(err), zap.String("pod", chosenPod.Name), zap.Duration("delay", expoDelay))
|
||||
gp.readyPodQueue.Done(key)
|
||||
@@ -305,7 +305,7 @@ func (gp *GenericPool) scheduleDeletePod(name string) {
|
||||
// cleaned up. (We need a better solutions for both those things; log
|
||||
// aggregation and storage will help.)
|
||||
gp.logger.Error("error in pod - scheduling cleanup", zap.String("pod", name))
|
||||
err := gp.kubernetesClient.CoreV1().Pods(gp.namespace).Delete(name, nil)
|
||||
err := gp.kubernetesClient.CoreV1().Pods(gp.namespace).Delete(context.TODO(), name, metav1.DeleteOptions{})
|
||||
if err != nil {
|
||||
gp.logger.Error(
|
||||
"error deleting pod",
|
||||
@@ -502,13 +502,13 @@ func (gp *GenericPool) createPool() error {
|
||||
deployment.Spec.Template.Spec = *newPodSpec
|
||||
}
|
||||
|
||||
depl, err := gp.kubernetesClient.AppsV1().Deployments(gp.namespace).Get(deployment.Name, metav1.GetOptions{})
|
||||
depl, err := gp.kubernetesClient.AppsV1().Deployments(gp.namespace).Get(context.TODO(), deployment.Name, metav1.GetOptions{})
|
||||
if err == nil {
|
||||
if depl.Annotations[fv1.EXECUTOR_INSTANCEID_LABEL] != gp.instanceID {
|
||||
deployment.Annotations[fv1.EXECUTOR_INSTANCEID_LABEL] = gp.instanceID
|
||||
// Update with the latest deployment spec. Kubernetes will trigger
|
||||
// rolling update if spec is different from the one in the cluster.
|
||||
depl, err = gp.kubernetesClient.AppsV1().Deployments(gp.namespace).Update(deployment)
|
||||
depl, err = gp.kubernetesClient.AppsV1().Deployments(gp.namespace).Update(context.TODO(), deployment, metav1.UpdateOptions{})
|
||||
}
|
||||
gp.deployment = depl
|
||||
return err
|
||||
@@ -517,7 +517,7 @@ func (gp *GenericPool) createPool() error {
|
||||
return err
|
||||
}
|
||||
|
||||
depl, err = gp.kubernetesClient.AppsV1().Deployments(gp.namespace).Create(deployment)
|
||||
depl, err = gp.kubernetesClient.AppsV1().Deployments(gp.namespace).Create(context.TODO(), deployment, metav1.CreateOptions{})
|
||||
if err != nil {
|
||||
gp.logger.Error("error creating deployment in kubernetes", zap.Error(err), zap.String("deployment", deployment.Name))
|
||||
return err
|
||||
@@ -545,7 +545,7 @@ func (gp *GenericPool) createSvc(name string, labels map[string]string) (*apiv1.
|
||||
Selector: labels,
|
||||
},
|
||||
}
|
||||
svc, err := gp.kubernetesClient.CoreV1().Services(gp.namespace).Create(&service)
|
||||
svc, err := gp.kubernetesClient.CoreV1().Services(gp.namespace).Create(context.TODO(), &service, metav1.CreateOptions{})
|
||||
return svc, err
|
||||
}
|
||||
|
||||
@@ -580,7 +580,7 @@ func (gp *GenericPool) getFuncSvc(ctx context.Context, fn *fv1.Function) (*fscac
|
||||
"functionName": fn.ObjectMeta.Name,
|
||||
"functionUid": string(fn.ObjectMeta.UID),
|
||||
}
|
||||
podList, err := gp.kubernetesClient.CoreV1().Pods(gp.namespace).List(metav1.ListOptions{
|
||||
podList, err := gp.kubernetesClient.CoreV1().Pods(gp.namespace).List(context.TODO(), metav1.ListOptions{
|
||||
LabelSelector: labels.Set(sel).AsSelector().String(),
|
||||
})
|
||||
if err != nil {
|
||||
@@ -590,7 +590,7 @@ func (gp *GenericPool) getFuncSvc(ctx context.Context, fn *fv1.Function) (*fscac
|
||||
// Remove old versions function pods
|
||||
for _, pod := range podList.Items {
|
||||
// Delete pod no matter what status it is
|
||||
gp.kubernetesClient.CoreV1().Pods(gp.namespace).Delete(pod.ObjectMeta.Name, nil) //nolint errcheck
|
||||
gp.kubernetesClient.CoreV1().Pods(gp.namespace).Delete(context.TODO(), pod.ObjectMeta.Name, metav1.DeleteOptions{}) //nolint errcheck
|
||||
}
|
||||
}
|
||||
|
||||
@@ -636,7 +636,7 @@ func (gp *GenericPool) getFuncSvc(ctx context.Context, fn *fv1.Function) (*fscac
|
||||
// patch svc-host and resource version to the pod annotations for new executor to adopt the pod
|
||||
patch := fmt.Sprintf(`{"metadata":{"annotations":{"%v":"%v","%v":"%v"}}}`,
|
||||
fv1.ANNOTATION_SVC_HOST, svcHost, fv1.FUNCTION_RESOURCE_VERSION, fn.ObjectMeta.ResourceVersion)
|
||||
p, err := gp.kubernetesClient.CoreV1().Pods(pod.Namespace).Patch(pod.Name, k8sTypes.StrategicMergePatchType, []byte(patch))
|
||||
p, err := gp.kubernetesClient.CoreV1().Pods(pod.Namespace).Patch(context.TODO(), pod.Name, k8sTypes.StrategicMergePatchType, []byte(patch), metav1.PatchOptions{})
|
||||
if err != nil {
|
||||
// just log the error since it won't affect the function serving
|
||||
gp.logger.Warn("error patching svc-host to pod", zap.Error(err),
|
||||
@@ -718,7 +718,7 @@ func (gp *GenericPool) destroy() error {
|
||||
}
|
||||
|
||||
err := gp.kubernetesClient.AppsV1().
|
||||
Deployments(gp.namespace).Delete(gp.deployment.ObjectMeta.Name, &delOpt)
|
||||
Deployments(gp.namespace).Delete(context.TODO(), gp.deployment.ObjectMeta.Name, delOpt)
|
||||
if err != nil {
|
||||
gp.logger.Error("error destroying deployment",
|
||||
zap.Error(err),
|
||||
|
||||
@@ -212,7 +212,7 @@ func (gpm *GenericPoolManager) getPodInfo(obj apiv1.ObjectReference) (*apiv1.Pod
|
||||
|
||||
if !exists {
|
||||
gpm.logger.Debug("Falling back to getting pod info from k8s API -- this may cause performace issues for your function.")
|
||||
pod, err := gpm.kubernetesClient.CoreV1().Pods(obj.Namespace).Get(obj.Name, metav1.GetOptions{})
|
||||
pod, err := gpm.kubernetesClient.CoreV1().Pods(obj.Namespace).Get(context.TODO(), obj.Name, metav1.GetOptions{})
|
||||
return pod, err
|
||||
}
|
||||
|
||||
@@ -248,7 +248,7 @@ func (gpm *GenericPoolManager) IsValid(fsvc *fscache.FuncSvc) bool {
|
||||
|
||||
func (gpm *GenericPoolManager) RefreshFuncPods(logger *zap.Logger, f fv1.Function) error {
|
||||
|
||||
env, err := gpm.fissionClient.CoreV1().Environments(f.Spec.Environment.Namespace).Get(f.Spec.Environment.Name, metav1.GetOptions{})
|
||||
env, err := gpm.fissionClient.CoreV1().Environments(f.Spec.Environment.Namespace).Get(context.TODO(), f.Spec.Environment.Name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -267,7 +267,7 @@ func (gpm *GenericPoolManager) RefreshFuncPods(logger *zap.Logger, f fv1.Functio
|
||||
|
||||
funcLabels := gp.labelsForFunction(&f.ObjectMeta)
|
||||
|
||||
podList, err := gpm.kubernetesClient.CoreV1().Pods(metav1.NamespaceAll).List(metav1.ListOptions{
|
||||
podList, err := gpm.kubernetesClient.CoreV1().Pods(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{
|
||||
LabelSelector: labels.Set(funcLabels).AsSelector().String(),
|
||||
})
|
||||
|
||||
@@ -276,7 +276,7 @@ func (gpm *GenericPoolManager) RefreshFuncPods(logger *zap.Logger, f fv1.Functio
|
||||
}
|
||||
|
||||
for _, po := range podList.Items {
|
||||
err := gpm.kubernetesClient.CoreV1().Pods(po.ObjectMeta.Namespace).Delete(po.ObjectMeta.Name, &metav1.DeleteOptions{})
|
||||
err := gpm.kubernetesClient.CoreV1().Pods(po.ObjectMeta.Namespace).Delete(context.TODO(), po.ObjectMeta.Name, metav1.DeleteOptions{})
|
||||
if k8serrors.IsNotFound(err) {
|
||||
return nil
|
||||
}
|
||||
@@ -289,7 +289,7 @@ func (gpm *GenericPoolManager) RefreshFuncPods(logger *zap.Logger, f fv1.Functio
|
||||
}
|
||||
|
||||
func (gpm *GenericPoolManager) AdoptExistingResources() {
|
||||
envs, err := gpm.fissionClient.CoreV1().Environments(metav1.NamespaceAll).List(metav1.ListOptions{})
|
||||
envs, err := gpm.fissionClient.CoreV1().Environments(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{})
|
||||
if err != nil {
|
||||
gpm.logger.Error("error getting environment list", zap.Error(err))
|
||||
return
|
||||
@@ -321,7 +321,7 @@ func (gpm *GenericPoolManager) AdoptExistingResources() {
|
||||
fv1.EXECUTOR_TYPE: string(fv1.ExecutorTypePoolmgr),
|
||||
}
|
||||
|
||||
podList, err := gpm.kubernetesClient.CoreV1().Pods(metav1.NamespaceAll).List(metav1.ListOptions{
|
||||
podList, err := gpm.kubernetesClient.CoreV1().Pods(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{
|
||||
LabelSelector: labels.Set(l).AsSelector().String(),
|
||||
})
|
||||
|
||||
@@ -344,7 +344,7 @@ func (gpm *GenericPoolManager) AdoptExistingResources() {
|
||||
time.Sleep(time.Duration(rand.Intn(30)) * time.Millisecond)
|
||||
|
||||
patch := fmt.Sprintf(`{"metadata":{"annotations":{"%v":"%v"}}}`, fv1.EXECUTOR_INSTANCEID_LABEL, gpm.instanceID)
|
||||
pod, err = gpm.kubernetesClient.CoreV1().Pods(pod.Namespace).Patch(pod.Name, k8sTypes.StrategicMergePatchType, []byte(patch))
|
||||
pod, err = gpm.kubernetesClient.CoreV1().Pods(pod.Namespace).Patch(context.TODO(), pod.Name, k8sTypes.StrategicMergePatchType, []byte(patch), metav1.PatchOptions{})
|
||||
if err != nil {
|
||||
// just log the error since it won't affect the function serving
|
||||
gpm.logger.Warn("error patching executor instance ID of pod", zap.Error(err),
|
||||
@@ -525,7 +525,7 @@ func (gpm *GenericPoolManager) getFunctionEnv(fn *fv1.Function) (*fv1.Environmen
|
||||
}
|
||||
|
||||
// Get env from controller
|
||||
env, err = gpm.fissionClient.CoreV1().Environments(fn.Spec.Environment.Namespace).Get(fn.Spec.Environment.Name, metav1.GetOptions{})
|
||||
env, err = gpm.fissionClient.CoreV1().Environments(fn.Spec.Environment.Namespace).Get(context.TODO(), fn.Spec.Environment.Name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -547,7 +547,7 @@ func (gpm *GenericPoolManager) eagerPoolCreator() {
|
||||
pollSleep := 2 * time.Second
|
||||
for {
|
||||
// get list of envs from controller
|
||||
envs, err := gpm.fissionClient.CoreV1().Environments(metav1.NamespaceAll).List(metav1.ListOptions{})
|
||||
envs, err := gpm.fissionClient.CoreV1().Environments(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{})
|
||||
if err != nil {
|
||||
if utils.IsNetworkError(err) {
|
||||
gpm.logger.Error("encountered network error, retrying", zap.Error(err))
|
||||
@@ -609,7 +609,7 @@ func (gpm *GenericPoolManager) idleObjectReaper() {
|
||||
for {
|
||||
time.Sleep(pollSleep)
|
||||
|
||||
envs, err := gpm.fissionClient.CoreV1().Environments(metav1.NamespaceAll).List(metav1.ListOptions{})
|
||||
envs, err := gpm.fissionClient.CoreV1().Environments(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{})
|
||||
if err != nil {
|
||||
gpm.logger.Error("failed to get environment list", zap.Error(err))
|
||||
continue
|
||||
@@ -620,7 +620,7 @@ func (gpm *GenericPoolManager) idleObjectReaper() {
|
||||
envList[env.ObjectMeta.UID] = struct{}{}
|
||||
}
|
||||
|
||||
fns, err := gpm.fissionClient.CoreV1().Functions(metav1.NamespaceAll).List(metav1.ListOptions{})
|
||||
fns, err := gpm.fissionClient.CoreV1().Functions(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{})
|
||||
if err != nil {
|
||||
gpm.logger.Error("failed to get environment list", zap.Error(err))
|
||||
continue
|
||||
@@ -705,11 +705,11 @@ func (gpm *GenericPoolManager) WebsocketStartEventChecker(kubeClient *kubernetes
|
||||
&k8scache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
options.FieldSelector = "involvedObject.kind=Pod,type=Normal,reason=WsConnectionStarted"
|
||||
return kubeClient.CoreV1().Events(apiv1.NamespaceAll).List(options)
|
||||
return kubeClient.CoreV1().Events(apiv1.NamespaceAll).List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
options.FieldSelector = "involvedObject.kind=Pod,type=Normal,reason=WsConnectionStarted"
|
||||
return kubeClient.CoreV1().Events(apiv1.NamespaceAll).Watch(options)
|
||||
return kubeClient.CoreV1().Events(apiv1.NamespaceAll).Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&apiv1.Event{},
|
||||
@@ -741,11 +741,11 @@ func (gpm *GenericPoolManager) NoActiveConnectionEventChecker(kubeClient *kubern
|
||||
&k8scache.ListWatch{
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
options.FieldSelector = "involvedObject.kind=Pod,type=Normal,reason=NoActiveConnections"
|
||||
return kubeClient.CoreV1().Events(apiv1.NamespaceAll).List(options)
|
||||
return kubeClient.CoreV1().Events(apiv1.NamespaceAll).List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
options.FieldSelector = "involvedObject.kind=Pod,type=Normal,reason=NoActiveConnections"
|
||||
return kubeClient.CoreV1().Events(apiv1.NamespaceAll).Watch(options)
|
||||
return kubeClient.CoreV1().Events(apiv1.NamespaceAll).Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&apiv1.Event{},
|
||||
|
||||
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package reaper
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -39,25 +40,25 @@ var (
|
||||
func CleanupKubeObject(logger *zap.Logger, kubeClient *kubernetes.Clientset, kubeobj *apiv1.ObjectReference) {
|
||||
switch strings.ToLower(kubeobj.Kind) {
|
||||
case "pod":
|
||||
err := kubeClient.CoreV1().Pods(kubeobj.Namespace).Delete(kubeobj.Name, nil)
|
||||
err := kubeClient.CoreV1().Pods(kubeobj.Namespace).Delete(context.TODO(), kubeobj.Name, meta_v1.DeleteOptions{})
|
||||
if err != nil {
|
||||
logger.Error("error cleaning up pod", zap.Error(err), zap.String("pod", kubeobj.Name))
|
||||
}
|
||||
|
||||
case "service":
|
||||
err := kubeClient.CoreV1().Services(kubeobj.Namespace).Delete(kubeobj.Name, nil)
|
||||
err := kubeClient.CoreV1().Services(kubeobj.Namespace).Delete(context.TODO(), kubeobj.Name, meta_v1.DeleteOptions{})
|
||||
if err != nil {
|
||||
logger.Error("error cleaning up service", zap.Error(err), zap.String("service", kubeobj.Name))
|
||||
}
|
||||
|
||||
case "deployment":
|
||||
err := kubeClient.AppsV1().Deployments(kubeobj.Namespace).Delete(kubeobj.Name, &delOpt)
|
||||
err := kubeClient.AppsV1().Deployments(kubeobj.Namespace).Delete(context.TODO(), kubeobj.Name, delOpt)
|
||||
if err != nil {
|
||||
logger.Error("error cleaning up deployment", zap.Error(err), zap.String("deployment", kubeobj.Name))
|
||||
}
|
||||
|
||||
case "horizontalpodautoscaler":
|
||||
err := kubeClient.AutoscalingV1().HorizontalPodAutoscalers(kubeobj.Namespace).Delete(kubeobj.Name, nil)
|
||||
err := kubeClient.AutoscalingV1().HorizontalPodAutoscalers(kubeobj.Namespace).Delete(context.TODO(), kubeobj.Name, meta_v1.DeleteOptions{})
|
||||
if err != nil {
|
||||
logger.Error("error cleaning up horizontalpodautoscaler", zap.Error(err), zap.String("horizontalpodautoscaler", kubeobj.Name))
|
||||
}
|
||||
@@ -70,7 +71,7 @@ func CleanupKubeObject(logger *zap.Logger, kubeClient *kubernetes.Clientset, kub
|
||||
|
||||
// CleanupDeployments deletes deployment(s) for a given instanceID
|
||||
func CleanupDeployments(logger *zap.Logger, client *kubernetes.Clientset, instanceID string, listOps meta_v1.ListOptions) error {
|
||||
deploymentList, err := client.AppsV1().Deployments(meta_v1.NamespaceAll).List(listOps)
|
||||
deploymentList, err := client.AppsV1().Deployments(meta_v1.NamespaceAll).List(context.TODO(), listOps)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -82,7 +83,7 @@ func CleanupDeployments(logger *zap.Logger, client *kubernetes.Clientset, instan
|
||||
}
|
||||
if ok && id != instanceID {
|
||||
logger.Info("cleaning up deployment", zap.String("deployment", dep.ObjectMeta.Name))
|
||||
err := client.AppsV1().Deployments(dep.ObjectMeta.Namespace).Delete(dep.ObjectMeta.Name, &delOpt)
|
||||
err := client.AppsV1().Deployments(dep.ObjectMeta.Namespace).Delete(context.TODO(), dep.ObjectMeta.Name, delOpt)
|
||||
if err != nil {
|
||||
logger.Error("error cleaning up deployment",
|
||||
zap.Error(err),
|
||||
@@ -97,7 +98,7 @@ func CleanupDeployments(logger *zap.Logger, client *kubernetes.Clientset, instan
|
||||
|
||||
// CleanupPods deletes pod(s) for a given instanceID
|
||||
func CleanupPods(logger *zap.Logger, client *kubernetes.Clientset, instanceID string, listOps meta_v1.ListOptions) error {
|
||||
podList, err := client.CoreV1().Pods(meta_v1.NamespaceAll).List(listOps)
|
||||
podList, err := client.CoreV1().Pods(meta_v1.NamespaceAll).List(context.TODO(), listOps)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -109,7 +110,7 @@ func CleanupPods(logger *zap.Logger, client *kubernetes.Clientset, instanceID st
|
||||
}
|
||||
if ok && id != instanceID {
|
||||
logger.Info("cleaning up pod", zap.String("pod", pod.ObjectMeta.Name))
|
||||
err := client.CoreV1().Pods(pod.ObjectMeta.Namespace).Delete(pod.ObjectMeta.Name, nil)
|
||||
err := client.CoreV1().Pods(pod.ObjectMeta.Namespace).Delete(context.TODO(), pod.ObjectMeta.Name, meta_v1.DeleteOptions{})
|
||||
if err != nil {
|
||||
logger.Error("error cleaning up pod",
|
||||
zap.Error(err),
|
||||
@@ -124,7 +125,7 @@ func CleanupPods(logger *zap.Logger, client *kubernetes.Clientset, instanceID st
|
||||
|
||||
// CleanupServices deletes service(s) for a given instanceID
|
||||
func CleanupServices(logger *zap.Logger, client *kubernetes.Clientset, instanceID string, listOps meta_v1.ListOptions) error {
|
||||
svcList, err := client.CoreV1().Services(meta_v1.NamespaceAll).List(listOps)
|
||||
svcList, err := client.CoreV1().Services(meta_v1.NamespaceAll).List(context.TODO(), listOps)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -136,7 +137,7 @@ func CleanupServices(logger *zap.Logger, client *kubernetes.Clientset, instanceI
|
||||
}
|
||||
if ok && id != instanceID {
|
||||
logger.Info("cleaning up service", zap.String("service", svc.ObjectMeta.Name))
|
||||
err := client.CoreV1().Services(svc.ObjectMeta.Namespace).Delete(svc.ObjectMeta.Name, nil)
|
||||
err := client.CoreV1().Services(svc.ObjectMeta.Namespace).Delete(context.TODO(), svc.ObjectMeta.Name, meta_v1.DeleteOptions{})
|
||||
if err != nil {
|
||||
logger.Error("error cleaning up service",
|
||||
zap.Error(err),
|
||||
@@ -151,7 +152,7 @@ func CleanupServices(logger *zap.Logger, client *kubernetes.Clientset, instanceI
|
||||
|
||||
// CleanupHpa deletes horizontal pod autoscaler(s) for a given instanceID
|
||||
func CleanupHpa(logger *zap.Logger, client *kubernetes.Clientset, instanceID string, listOps meta_v1.ListOptions) error {
|
||||
hpaList, err := client.AutoscalingV1().HorizontalPodAutoscalers(meta_v1.NamespaceAll).List(listOps)
|
||||
hpaList, err := client.AutoscalingV1().HorizontalPodAutoscalers(meta_v1.NamespaceAll).List(context.TODO(), listOps)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -164,7 +165,7 @@ func CleanupHpa(logger *zap.Logger, client *kubernetes.Clientset, instanceID str
|
||||
}
|
||||
if ok && id != instanceID {
|
||||
logger.Info("cleaning up HPA", zap.String("hpa", hpa.ObjectMeta.Name))
|
||||
err := client.AutoscalingV1().HorizontalPodAutoscalers(hpa.ObjectMeta.Namespace).Delete(hpa.ObjectMeta.Name, nil)
|
||||
err := client.AutoscalingV1().HorizontalPodAutoscalers(hpa.ObjectMeta.Namespace).Delete(context.TODO(), hpa.ObjectMeta.Name, meta_v1.DeleteOptions{})
|
||||
if err != nil {
|
||||
logger.Error("error cleaning up HPA",
|
||||
zap.Error(err),
|
||||
@@ -186,7 +187,7 @@ func CleanupRoleBindings(logger *zap.Logger, client *kubernetes.Clientset, fissi
|
||||
|
||||
logger.Debug("starting cleanupRoleBindings cycle")
|
||||
// get all rolebindings ( just to be efficient, one call to kubernetes )
|
||||
rbList, err := client.RbacV1beta1().RoleBindings(meta_v1.NamespaceAll).List(meta_v1.ListOptions{})
|
||||
rbList, err := client.RbacV1beta1().RoleBindings(meta_v1.NamespaceAll).List(context.TODO(), meta_v1.ListOptions{})
|
||||
if err != nil {
|
||||
// something wrong, but next iteration hopefully succeeds
|
||||
logger.Error("error listing role bindings in all namespaces", zap.Error(err))
|
||||
@@ -207,7 +208,7 @@ func CleanupRoleBindings(logger *zap.Logger, client *kubernetes.Clientset, fissi
|
||||
|
||||
// in order to find out if there are any functions that need this role-binding in role-binding namespace,
|
||||
// we can list the functions once per role-binding.
|
||||
funcList, err := fissionClient.CoreV1().Functions(roleBinding.Namespace).List(meta_v1.ListOptions{})
|
||||
funcList, err := fissionClient.CoreV1().Functions(roleBinding.Namespace).List(context.TODO(), meta_v1.ListOptions{})
|
||||
if err != nil {
|
||||
logger.Error("error fetching function list in namespace", zap.Error(err), zap.String("namespace", roleBinding.Namespace))
|
||||
continue
|
||||
@@ -258,7 +259,7 @@ func CleanupRoleBindings(logger *zap.Logger, client *kubernetes.Clientset, fissi
|
||||
// else if its a secret-configmap-rb, we have only one SA which is fission-fetcher
|
||||
if roleBinding.Name == fv1.PackageGetterRB {
|
||||
// check if there is an env obj in saNs
|
||||
envList, err := fissionClient.CoreV1().Environments(saNs).List(meta_v1.ListOptions{})
|
||||
envList, err := fissionClient.CoreV1().Environments(saNs).List(context.TODO(), meta_v1.ListOptions{})
|
||||
if err != nil {
|
||||
logger.Error("error fetching environment list in service account namespace", zap.Error(err), zap.String("namespace", saNs))
|
||||
continue
|
||||
|
||||
@@ -356,7 +356,7 @@ func (fetcher *Fetcher) Fetch(ctx context.Context, pkg *fv1.Package, req Functio
|
||||
func (fetcher *Fetcher) FetchSecretsAndCfgMaps(secrets []fv1.SecretReference, cfgmaps []fv1.ConfigMapReference) (int, error) {
|
||||
if len(secrets) > 0 {
|
||||
for _, secret := range secrets {
|
||||
data, err := fetcher.kubeClient.CoreV1().Secrets(secret.Namespace).Get(secret.Name, metav1.GetOptions{})
|
||||
data, err := fetcher.kubeClient.CoreV1().Secrets(secret.Namespace).Get(context.TODO(), secret.Name, metav1.GetOptions{})
|
||||
|
||||
if err != nil {
|
||||
e := "error getting secret from kubeapi"
|
||||
@@ -400,7 +400,7 @@ func (fetcher *Fetcher) FetchSecretsAndCfgMaps(secrets []fv1.SecretReference, cf
|
||||
|
||||
if len(cfgmaps) > 0 {
|
||||
for _, config := range cfgmaps {
|
||||
data, err := fetcher.kubeClient.CoreV1().ConfigMaps(config.Namespace).Get(config.Name, metav1.GetOptions{})
|
||||
data, err := fetcher.kubeClient.CoreV1().ConfigMaps(config.Namespace).Get(context.TODO(), config.Name, metav1.GetOptions{})
|
||||
|
||||
if err != nil {
|
||||
e := "error getting configmap from kubeapi"
|
||||
@@ -584,7 +584,7 @@ func (fetcher *Fetcher) unarchive(src string, dst string) error {
|
||||
func (fetcher *Fetcher) getPkgInformation(req FunctionFetchRequest) (pkg *fv1.Package, err error) {
|
||||
maxRetries := 5
|
||||
for i := 0; i < maxRetries; i++ {
|
||||
pkg, err = fetcher.fissionClient.CoreV1().Packages(req.Package.Namespace).Get(req.Package.Name, metav1.GetOptions{})
|
||||
pkg, err = fetcher.fissionClient.CoreV1().Packages(req.Package.Namespace).Get(context.TODO(), req.Package.Name, metav1.GetOptions{})
|
||||
if err == nil {
|
||||
return pkg, nil
|
||||
}
|
||||
@@ -700,7 +700,7 @@ func (fetcher *Fetcher) WsStartHandler(w http.ResponseWriter, r *http.Request) {
|
||||
klog.Errorf("Error creating recorder %s", err)
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
pods, err := fetcher.kubeClient.CoreV1().Pods(fetcher.Info.Namespace).List(metav1.ListOptions{
|
||||
pods, err := fetcher.kubeClient.CoreV1().Pods(fetcher.Info.Namespace).List(context.TODO(), metav1.ListOptions{
|
||||
FieldSelector: "metadata.name=" + fetcher.Info.Name,
|
||||
})
|
||||
if err != nil {
|
||||
@@ -730,7 +730,7 @@ func (fetcher *Fetcher) WsEndHandler(w http.ResponseWriter, r *http.Request) {
|
||||
klog.Errorf("Error creating recorder %s", err)
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
pods, err := fetcher.kubeClient.CoreV1().Pods(fetcher.Info.Namespace).List(metav1.ListOptions{
|
||||
pods, err := fetcher.kubeClient.CoreV1().Pods(fetcher.Info.Namespace).List(context.TODO(), metav1.ListOptions{
|
||||
FieldSelector: "metadata.name=" + fetcher.Info.Name,
|
||||
})
|
||||
if err != nil {
|
||||
|
||||
@@ -19,6 +19,7 @@ package resources
|
||||
import (
|
||||
"bufio"
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"path/filepath"
|
||||
@@ -78,7 +79,7 @@ func NewKubernetesObjectDumper(clientset *kubernetes.Clientset, objType string,
|
||||
func (res KubernetesObjectDumper) Dump(dumpDir string) {
|
||||
switch res.objType {
|
||||
case KubernetesService:
|
||||
objs, err := res.client.CoreV1().Services(metav1.NamespaceAll).List(metav1.ListOptions{LabelSelector: res.selector})
|
||||
objs, err := res.client.CoreV1().Services(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{LabelSelector: res.selector})
|
||||
if err != nil {
|
||||
console.Error(fmt.Sprintf("Error getting %v list with selector %v: %v", res.objType, res.selector, err))
|
||||
return
|
||||
@@ -91,7 +92,7 @@ func (res KubernetesObjectDumper) Dump(dumpDir string) {
|
||||
}
|
||||
|
||||
case KubernetesDeployment:
|
||||
objs, err := res.client.AppsV1().Deployments(metav1.NamespaceAll).List(metav1.ListOptions{LabelSelector: res.selector})
|
||||
objs, err := res.client.AppsV1().Deployments(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{LabelSelector: res.selector})
|
||||
if err != nil {
|
||||
console.Error(fmt.Sprintf("Error getting %v list with selector %v: %v", res.objType, res.selector, err))
|
||||
return
|
||||
@@ -103,7 +104,7 @@ func (res KubernetesObjectDumper) Dump(dumpDir string) {
|
||||
}
|
||||
|
||||
case KubernetesPod:
|
||||
objs, err := res.client.CoreV1().Pods(metav1.NamespaceAll).List(metav1.ListOptions{LabelSelector: res.selector})
|
||||
objs, err := res.client.CoreV1().Pods(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{LabelSelector: res.selector})
|
||||
if err != nil {
|
||||
console.Error(fmt.Sprintf("Error getting %v list with selector %v: %v", res.objType, res.selector, err))
|
||||
return
|
||||
@@ -115,7 +116,7 @@ func (res KubernetesObjectDumper) Dump(dumpDir string) {
|
||||
}
|
||||
|
||||
case KubernetesHPA:
|
||||
objs, err := res.client.AutoscalingV2beta1().HorizontalPodAutoscalers(metav1.NamespaceAll).List(metav1.ListOptions{LabelSelector: res.selector})
|
||||
objs, err := res.client.AutoscalingV2beta1().HorizontalPodAutoscalers(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{LabelSelector: res.selector})
|
||||
if err != nil {
|
||||
console.Error(fmt.Sprintf("Error getting %v list with selector %v: %v", res.objType, res.selector, err))
|
||||
return
|
||||
@@ -127,7 +128,7 @@ func (res KubernetesObjectDumper) Dump(dumpDir string) {
|
||||
}
|
||||
|
||||
case KubernetesDaemonSet:
|
||||
objs, err := res.client.AppsV1().DaemonSets(metav1.NamespaceAll).List(metav1.ListOptions{LabelSelector: res.selector})
|
||||
objs, err := res.client.AppsV1().DaemonSets(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{LabelSelector: res.selector})
|
||||
if err != nil {
|
||||
console.Error(fmt.Sprintf("Error getting %v list with selector %v: %v", res.objType, res.selector, err))
|
||||
return
|
||||
@@ -139,7 +140,7 @@ func (res KubernetesObjectDumper) Dump(dumpDir string) {
|
||||
}
|
||||
|
||||
case KubernetesNode:
|
||||
objs, err := res.client.CoreV1().Nodes().List(metav1.ListOptions{LabelSelector: res.selector})
|
||||
objs, err := res.client.CoreV1().Nodes().List(context.TODO(), metav1.ListOptions{LabelSelector: res.selector})
|
||||
if err != nil {
|
||||
console.Error(fmt.Sprintf("Error getting %v list with selector %v: %v", res.objType, res.selector, err))
|
||||
return
|
||||
@@ -197,7 +198,7 @@ func NewKubernetesPodLogDumper(clientset *kubernetes.Clientset, selector string)
|
||||
func (res KubernetesPodLogDumper) Dump(dumpDir string) {
|
||||
l, err := res.client.CoreV1().
|
||||
Pods(metav1.NamespaceAll).
|
||||
List(metav1.ListOptions{LabelSelector: res.labelSelector})
|
||||
List(context.TODO(), metav1.ListOptions{LabelSelector: res.labelSelector})
|
||||
if err != nil {
|
||||
console.Error(fmt.Sprintf("Error getting controller list: %v", err))
|
||||
return
|
||||
@@ -216,7 +217,7 @@ func (res KubernetesPodLogDumper) Dump(dumpDir string) {
|
||||
req := res.client.CoreV1().Pods(pod.Namespace).
|
||||
GetLogs(pod.Name, &corev1.PodLogOptions{Container: container.Name})
|
||||
|
||||
stream, err := req.Stream()
|
||||
stream, err := req.Stream(context.Background())
|
||||
if err != nil {
|
||||
console.Error(fmt.Sprintf("Error streaming logs for pod %v: %v", pod.Name, err))
|
||||
return
|
||||
|
||||
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package util
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net"
|
||||
"net/http"
|
||||
@@ -118,7 +119,7 @@ func runPortForward(labelSelector string, localPort string, ns string, kubeConte
|
||||
|
||||
// get the pod; if there is more than one, ask the user to disambiguate
|
||||
podList, err := clientset.CoreV1().Pods(ns).
|
||||
List(meta_v1.ListOptions{LabelSelector: labelSelector})
|
||||
List(context.TODO(), meta_v1.ListOptions{LabelSelector: labelSelector})
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "error getting pod for port-forwarding with label selector %v", labelSelector)
|
||||
} else if len(podList.Items) == 0 {
|
||||
@@ -164,7 +165,7 @@ func runPortForward(labelSelector string, localPort string, ns string, kubeConte
|
||||
|
||||
// get the service and the target port
|
||||
svcs, err := clientset.CoreV1().Services(podNameSpace).
|
||||
List(meta_v1.ListOptions{LabelSelector: labelSelector})
|
||||
List(context.TODO(), meta_v1.ListOptions{LabelSelector: labelSelector})
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "Error getting %v service", labelSelector)
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ package kubewatcher
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
@@ -162,13 +163,13 @@ func createKubernetesWatch(kubeClient *kubernetes.Clientset, w *fv1.KubernetesWa
|
||||
// TODO handle the full list of types
|
||||
switch strings.ToUpper(w.Spec.Type) {
|
||||
case "POD":
|
||||
wi, err = kubeClient.CoreV1().Pods(w.Spec.Namespace).Watch(listOptions)
|
||||
wi, err = kubeClient.CoreV1().Pods(w.Spec.Namespace).Watch(context.TODO(), listOptions)
|
||||
case "SERVICE":
|
||||
wi, err = kubeClient.CoreV1().Services(w.Spec.Namespace).Watch(listOptions)
|
||||
wi, err = kubeClient.CoreV1().Services(w.Spec.Namespace).Watch(context.TODO(), listOptions)
|
||||
case "REPLICATIONCONTROLLER":
|
||||
wi, err = kubeClient.CoreV1().ReplicationControllers(w.Spec.Namespace).Watch(listOptions)
|
||||
wi, err = kubeClient.CoreV1().ReplicationControllers(w.Spec.Namespace).Watch(context.TODO(), listOptions)
|
||||
case "JOB":
|
||||
wi, err = kubeClient.BatchV1().Jobs(w.Spec.Namespace).Watch(listOptions)
|
||||
wi, err = kubeClient.BatchV1().Jobs(w.Spec.Namespace).Watch(context.TODO(), listOptions)
|
||||
default:
|
||||
err = errors.NewBadRequest(fmt.Sprintf("Error: unknown obj type '%v'", w.Spec.Type))
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package kubewatcher
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"go.uber.org/zap"
|
||||
@@ -46,7 +47,7 @@ func MakeWatchSync(logger *zap.Logger, client *crd.FissionClient, kubeWatcher *K
|
||||
func (ws *WatchSync) syncSvc() {
|
||||
// TODO watch instead of polling
|
||||
for {
|
||||
watches, err := ws.client.CoreV1().KubernetesWatchTriggers(metav1.NamespaceAll).List(metav1.ListOptions{})
|
||||
watches, err := ws.client.CoreV1().KubernetesWatchTriggers(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{})
|
||||
if err != nil {
|
||||
ws.logger.Fatal("failed to get Kubernetes watch trigger list", zap.Error(err))
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package mqtrigger
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"time"
|
||||
|
||||
@@ -141,7 +142,7 @@ func (mqt *MessageQueueTriggerManager) delTrigger(m *metav1.ObjectMeta) {
|
||||
func (mqt *MessageQueueTriggerManager) syncTriggers() {
|
||||
for {
|
||||
// get new set of triggers
|
||||
newTriggers, err := mqt.fissionClient.CoreV1().MessageQueueTriggers(metav1.NamespaceAll).List(metav1.ListOptions{})
|
||||
newTriggers, err := mqt.fissionClient.CoreV1().MessageQueueTriggers(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{})
|
||||
if err != nil {
|
||||
if utils.IsNetworkError(err) {
|
||||
mqt.logger.Error("encountered network error, will retry", zap.Error(err))
|
||||
|
||||
@@ -208,7 +208,7 @@ func getEnvVarlist(mqt *fv1.MessageQueueTrigger, routerURL string, kubeClient ku
|
||||
// Add Auth Fields
|
||||
secretName := mqt.Spec.Secret
|
||||
if len(secretName) > 0 {
|
||||
secret, err := kubeClient.CoreV1().Secrets(apiv1.NamespaceDefault).Get(secretName, metav1.GetOptions{})
|
||||
secret, err := kubeClient.CoreV1().Secrets(apiv1.NamespaceDefault).Get(context.TODO(), secretName, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -290,7 +290,7 @@ func checkAndUpdateTriggerFields(mqt, newMqt *fv1.MessageQueueTrigger) bool {
|
||||
}
|
||||
|
||||
func getResourceVersion(scaledObjectName string, kedaClient dynamic.ResourceInterface) (version string, err error) {
|
||||
scaledObject, err := kedaClient.Get(scaledObjectName, metav1.GetOptions{})
|
||||
scaledObject, err := kedaClient.Get(context.TODO(), scaledObjectName, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
@@ -298,7 +298,7 @@ func getResourceVersion(scaledObjectName string, kedaClient dynamic.ResourceInte
|
||||
}
|
||||
|
||||
func getAuthTriggerSpec(mqt *fv1.MessageQueueTrigger, authenticationRef string, kubeClient kubernetes.Interface) (*unstructured.Unstructured, error) {
|
||||
secret, err := kubeClient.CoreV1().Secrets(apiv1.NamespaceDefault).Get(mqt.Spec.Secret, metav1.GetOptions{})
|
||||
secret, err := kubeClient.CoreV1().Secrets(apiv1.NamespaceDefault).Get(context.TODO(), mqt.Spec.Secret, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -344,7 +344,7 @@ func createAuthTrigger(mqt *fv1.MessageQueueTrigger, authenticationRef string, k
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, err = authTriggerClient.Create(authTriggerObj, metav1.CreateOptions{})
|
||||
_, err = authTriggerClient.Create(context.Background(), authTriggerObj, metav1.CreateOptions{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -356,7 +356,7 @@ func updateAuthTrigger(mqt *fv1.MessageQueueTrigger, authenticationRef string, k
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
oldAuthTriggerObj, err := authTriggerClient.Get(authenticationRef, metav1.GetOptions{})
|
||||
oldAuthTriggerObj, err := authTriggerClient.Get(context.Background(), authenticationRef, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -367,7 +367,7 @@ func updateAuthTrigger(mqt *fv1.MessageQueueTrigger, authenticationRef string, k
|
||||
return err
|
||||
}
|
||||
authTriggerObj.SetResourceVersion(resourceVersion)
|
||||
_, err = authTriggerClient.Update(authTriggerObj, metav1.UpdateOptions{})
|
||||
_, err = authTriggerClient.Update(context.Background(), authTriggerObj, metav1.UpdateOptions{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -379,7 +379,7 @@ func deleteAuthTrigger(name, namespace string) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = authTriggerClient.Delete(name, &metav1.DeleteOptions{})
|
||||
err = authTriggerClient.Delete(context.Background(), name, metav1.DeleteOptions{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -444,7 +444,7 @@ func createDeployment(mqt *fv1.MessageQueueTrigger, routerURL string, kubeClient
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, err = kubeClient.AppsV1().Deployments(apiv1.NamespaceDefault).Create(deployment)
|
||||
_, err = kubeClient.AppsV1().Deployments(apiv1.NamespaceDefault).Create(context.TODO(), deployment, metav1.CreateOptions{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -456,7 +456,7 @@ func updateDeployment(mqt *fv1.MessageQueueTrigger, routerURL string, kubeClient
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, err = kubeClient.AppsV1().Deployments(apiv1.NamespaceDefault).Update(deployment)
|
||||
_, err = kubeClient.AppsV1().Deployments(apiv1.NamespaceDefault).Update(context.TODO(), deployment, metav1.UpdateOptions{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -465,7 +465,7 @@ func updateDeployment(mqt *fv1.MessageQueueTrigger, routerURL string, kubeClient
|
||||
|
||||
func deleteDeployment(name string, kubeClient *kubernetes.Clientset) error {
|
||||
deletePolicy := metav1.DeletePropagationForeground
|
||||
if err := kubeClient.AppsV1().Deployments(apiv1.NamespaceDefault).Delete(name, &metav1.DeleteOptions{
|
||||
if err := kubeClient.AppsV1().Deployments(apiv1.NamespaceDefault).Delete(context.TODO(), name, metav1.DeleteOptions{
|
||||
PropagationPolicy: &deletePolicy,
|
||||
}); err != nil {
|
||||
return err
|
||||
@@ -519,7 +519,7 @@ func createScaledObject(mqt *fv1.MessageQueueTrigger, authenticationRef string)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, err = kedaClient.Create(scaledObject, metav1.CreateOptions{})
|
||||
_, err = kedaClient.Create(context.Background(), scaledObject, metav1.CreateOptions{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -531,7 +531,7 @@ func updateScaledObject(mqt *fv1.MessageQueueTrigger, authenticationRef string)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
oldScaledObject, err := kedaClient.Get(mqt.ObjectMeta.Name, metav1.GetOptions{})
|
||||
oldScaledObject, err := kedaClient.Get(context.Background(), mqt.ObjectMeta.Name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -540,7 +540,7 @@ func updateScaledObject(mqt *fv1.MessageQueueTrigger, authenticationRef string)
|
||||
scaledObject := getScaledObject(mqt, authenticationRef)
|
||||
scaledObject.SetResourceVersion(resourceVersion)
|
||||
|
||||
_, err = kedaClient.Update(scaledObject, metav1.UpdateOptions{})
|
||||
_, err = kedaClient.Update(context.Background(), scaledObject, metav1.UpdateOptions{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package mqtrigger
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"reflect"
|
||||
"sort"
|
||||
@@ -95,7 +96,7 @@ func Test_getEnvVarlist(t *testing.T) {
|
||||
}
|
||||
|
||||
kubeClient := fake.NewSimpleClientset()
|
||||
_, err := kubeClient.CoreV1().Secrets(namespace).Create(secret)
|
||||
_, err := kubeClient.CoreV1().Secrets(namespace).Create(context.Background(), secret, metav1.CreateOptions{})
|
||||
if err != nil {
|
||||
assert.Equal(t, nil, err)
|
||||
}
|
||||
@@ -479,7 +480,7 @@ func Test_getAuthTriggerSpec(t *testing.T) {
|
||||
}
|
||||
|
||||
kubeClient := fake.NewSimpleClientset()
|
||||
_, err := kubeClient.CoreV1().Secrets(namespace).Create(secret)
|
||||
_, err := kubeClient.CoreV1().Secrets(namespace).Create(context.Background(), secret, metav1.CreateOptions{})
|
||||
if err != nil {
|
||||
assert.Equal(t, nil, err)
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user