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:
Harsh Thakur
2021-05-26 15:07:03 +05:30
committed by GitHub
co-authored by Sanket Sudake
parent a9c56e5bb2
commit 1e0baf5f6c
108 changed files with 10713 additions and 2340 deletions
+108 -20
View File
@@ -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{})
@@ -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{})
@@ -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
}