Use code-generator v1.29.1 for code-generation (#2908)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
)
|
||||
|
||||
// ArchiveApplyConfiguration represents an declarative configuration of the Archive type for use
|
||||
// with apply.
|
||||
type ArchiveApplyConfiguration struct {
|
||||
Type *v1.ArchiveType `json:"type,omitempty"`
|
||||
Literal []byte `json:"literal,omitempty"`
|
||||
URL *string `json:"url,omitempty"`
|
||||
Checksum *ChecksumApplyConfiguration `json:"checksum,omitempty"`
|
||||
}
|
||||
|
||||
// ArchiveApplyConfiguration constructs an declarative configuration of the Archive type for use with
|
||||
// apply.
|
||||
func Archive() *ArchiveApplyConfiguration {
|
||||
return &ArchiveApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithType sets the Type field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Type field is set to the value of the last call.
|
||||
func (b *ArchiveApplyConfiguration) WithType(value v1.ArchiveType) *ArchiveApplyConfiguration {
|
||||
b.Type = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLiteral adds the given value to the Literal field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Literal field.
|
||||
func (b *ArchiveApplyConfiguration) WithLiteral(values ...byte) *ArchiveApplyConfiguration {
|
||||
for i := range values {
|
||||
b.Literal = append(b.Literal, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithURL sets the URL field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the URL field is set to the value of the last call.
|
||||
func (b *ArchiveApplyConfiguration) WithURL(value string) *ArchiveApplyConfiguration {
|
||||
b.URL = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithChecksum sets the Checksum field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Checksum field is set to the value of the last call.
|
||||
func (b *ArchiveApplyConfiguration) WithChecksum(value *ChecksumApplyConfiguration) *ArchiveApplyConfiguration {
|
||||
b.Checksum = value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// BuilderApplyConfiguration represents an declarative configuration of the Builder type for use
|
||||
// with apply.
|
||||
type BuilderApplyConfiguration struct {
|
||||
Image *string `json:"image,omitempty"`
|
||||
Command *string `json:"command,omitempty"`
|
||||
Container *v1.Container `json:"container,omitempty"`
|
||||
PodSpec *v1.PodSpec `json:"podspec,omitempty"`
|
||||
}
|
||||
|
||||
// BuilderApplyConfiguration constructs an declarative configuration of the Builder type for use with
|
||||
// apply.
|
||||
func Builder() *BuilderApplyConfiguration {
|
||||
return &BuilderApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithImage sets the Image field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Image field is set to the value of the last call.
|
||||
func (b *BuilderApplyConfiguration) WithImage(value string) *BuilderApplyConfiguration {
|
||||
b.Image = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCommand sets the Command field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Command field is set to the value of the last call.
|
||||
func (b *BuilderApplyConfiguration) WithCommand(value string) *BuilderApplyConfiguration {
|
||||
b.Command = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithContainer sets the Container field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Container field is set to the value of the last call.
|
||||
func (b *BuilderApplyConfiguration) WithContainer(value v1.Container) *BuilderApplyConfiguration {
|
||||
b.Container = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPodSpec sets the PodSpec field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the PodSpec field is set to the value of the last call.
|
||||
func (b *BuilderApplyConfiguration) WithPodSpec(value v1.PodSpec) *BuilderApplyConfiguration {
|
||||
b.PodSpec = &value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,219 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// CanaryConfigApplyConfiguration represents an declarative configuration of the CanaryConfig type for use
|
||||
// with apply.
|
||||
type CanaryConfigApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
Spec *CanaryConfigSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
Status *CanaryConfigStatusApplyConfiguration `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// CanaryConfig constructs an declarative configuration of the CanaryConfig type for use with
|
||||
// apply.
|
||||
func CanaryConfig(name, namespace string) *CanaryConfigApplyConfiguration {
|
||||
b := &CanaryConfigApplyConfiguration{}
|
||||
b.WithName(name)
|
||||
b.WithNamespace(namespace)
|
||||
b.WithKind("CanaryConfig")
|
||||
b.WithAPIVersion("fission.io/v1")
|
||||
return b
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
func (b *CanaryConfigApplyConfiguration) WithKind(value string) *CanaryConfigApplyConfiguration {
|
||||
b.Kind = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the APIVersion field is set to the value of the last call.
|
||||
func (b *CanaryConfigApplyConfiguration) WithAPIVersion(value string) *CanaryConfigApplyConfiguration {
|
||||
b.APIVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *CanaryConfigApplyConfiguration) WithName(value string) *CanaryConfigApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the GenerateName field is set to the value of the last call.
|
||||
func (b *CanaryConfigApplyConfiguration) WithGenerateName(value string) *CanaryConfigApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.GenerateName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNamespace sets the Namespace field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Namespace field is set to the value of the last call.
|
||||
func (b *CanaryConfigApplyConfiguration) WithNamespace(value string) *CanaryConfigApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Namespace = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUID sets the UID field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the UID field is set to the value of the last call.
|
||||
func (b *CanaryConfigApplyConfiguration) WithUID(value types.UID) *CanaryConfigApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.UID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ResourceVersion field is set to the value of the last call.
|
||||
func (b *CanaryConfigApplyConfiguration) WithResourceVersion(value string) *CanaryConfigApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ResourceVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGeneration sets the Generation field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Generation field is set to the value of the last call.
|
||||
func (b *CanaryConfigApplyConfiguration) WithGeneration(value int64) *CanaryConfigApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Generation = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
|
||||
func (b *CanaryConfigApplyConfiguration) WithCreationTimestamp(value metav1.Time) *CanaryConfigApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.CreationTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
|
||||
func (b *CanaryConfigApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *CanaryConfigApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
|
||||
func (b *CanaryConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *CanaryConfigApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionGracePeriodSeconds = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabels puts the entries into the Labels field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Labels field,
|
||||
// overwriting an existing map entries in Labels field with the same key.
|
||||
func (b *CanaryConfigApplyConfiguration) WithLabels(entries map[string]string) *CanaryConfigApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Labels == nil && len(entries) > 0 {
|
||||
b.Labels = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Labels[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Annotations field,
|
||||
// overwriting an existing map entries in Annotations field with the same key.
|
||||
func (b *CanaryConfigApplyConfiguration) WithAnnotations(entries map[string]string) *CanaryConfigApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Annotations == nil && len(entries) > 0 {
|
||||
b.Annotations = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Annotations[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
|
||||
func (b *CanaryConfigApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *CanaryConfigApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithOwnerReferences")
|
||||
}
|
||||
b.OwnerReferences = append(b.OwnerReferences, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Finalizers field.
|
||||
func (b *CanaryConfigApplyConfiguration) WithFinalizers(values ...string) *CanaryConfigApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
b.Finalizers = append(b.Finalizers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (b *CanaryConfigApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
|
||||
if b.ObjectMetaApplyConfiguration == nil {
|
||||
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
|
||||
}
|
||||
}
|
||||
|
||||
// WithSpec sets the Spec field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Spec field is set to the value of the last call.
|
||||
func (b *CanaryConfigApplyConfiguration) WithSpec(value *CanaryConfigSpecApplyConfiguration) *CanaryConfigApplyConfiguration {
|
||||
b.Spec = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithStatus sets the Status field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Status field is set to the value of the last call.
|
||||
func (b *CanaryConfigApplyConfiguration) WithStatus(value *CanaryConfigStatusApplyConfiguration) *CanaryConfigApplyConfiguration {
|
||||
b.Status = value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
)
|
||||
|
||||
// CanaryConfigSpecApplyConfiguration represents an declarative configuration of the CanaryConfigSpec type for use
|
||||
// with apply.
|
||||
type CanaryConfigSpecApplyConfiguration struct {
|
||||
Trigger *string `json:"trigger,omitempty"`
|
||||
NewFunction *string `json:"newfunction,omitempty"`
|
||||
OldFunction *string `json:"oldfunction,omitempty"`
|
||||
WeightIncrement *int `json:"weightincrement,omitempty"`
|
||||
WeightIncrementDuration *string `json:"duration,omitempty"`
|
||||
FailureThreshold *int `json:"failurethreshold,omitempty"`
|
||||
FailureType *v1.FailureType `json:"failureType,omitempty"`
|
||||
}
|
||||
|
||||
// CanaryConfigSpecApplyConfiguration constructs an declarative configuration of the CanaryConfigSpec type for use with
|
||||
// apply.
|
||||
func CanaryConfigSpec() *CanaryConfigSpecApplyConfiguration {
|
||||
return &CanaryConfigSpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithTrigger sets the Trigger field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Trigger field is set to the value of the last call.
|
||||
func (b *CanaryConfigSpecApplyConfiguration) WithTrigger(value string) *CanaryConfigSpecApplyConfiguration {
|
||||
b.Trigger = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNewFunction sets the NewFunction field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the NewFunction field is set to the value of the last call.
|
||||
func (b *CanaryConfigSpecApplyConfiguration) WithNewFunction(value string) *CanaryConfigSpecApplyConfiguration {
|
||||
b.NewFunction = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOldFunction sets the OldFunction field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the OldFunction field is set to the value of the last call.
|
||||
func (b *CanaryConfigSpecApplyConfiguration) WithOldFunction(value string) *CanaryConfigSpecApplyConfiguration {
|
||||
b.OldFunction = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithWeightIncrement sets the WeightIncrement field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the WeightIncrement field is set to the value of the last call.
|
||||
func (b *CanaryConfigSpecApplyConfiguration) WithWeightIncrement(value int) *CanaryConfigSpecApplyConfiguration {
|
||||
b.WeightIncrement = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithWeightIncrementDuration sets the WeightIncrementDuration field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the WeightIncrementDuration field is set to the value of the last call.
|
||||
func (b *CanaryConfigSpecApplyConfiguration) WithWeightIncrementDuration(value string) *CanaryConfigSpecApplyConfiguration {
|
||||
b.WeightIncrementDuration = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFailureThreshold sets the FailureThreshold field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the FailureThreshold field is set to the value of the last call.
|
||||
func (b *CanaryConfigSpecApplyConfiguration) WithFailureThreshold(value int) *CanaryConfigSpecApplyConfiguration {
|
||||
b.FailureThreshold = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFailureType sets the FailureType field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the FailureType field is set to the value of the last call.
|
||||
func (b *CanaryConfigSpecApplyConfiguration) WithFailureType(value v1.FailureType) *CanaryConfigSpecApplyConfiguration {
|
||||
b.FailureType = &value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// CanaryConfigStatusApplyConfiguration represents an declarative configuration of the CanaryConfigStatus type for use
|
||||
// with apply.
|
||||
type CanaryConfigStatusApplyConfiguration struct {
|
||||
Status *string `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// CanaryConfigStatusApplyConfiguration constructs an declarative configuration of the CanaryConfigStatus type for use with
|
||||
// apply.
|
||||
func CanaryConfigStatus() *CanaryConfigStatusApplyConfiguration {
|
||||
return &CanaryConfigStatusApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithStatus sets the Status field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Status field is set to the value of the last call.
|
||||
func (b *CanaryConfigStatusApplyConfiguration) WithStatus(value string) *CanaryConfigStatusApplyConfiguration {
|
||||
b.Status = &value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
)
|
||||
|
||||
// ChecksumApplyConfiguration represents an declarative configuration of the Checksum type for use
|
||||
// with apply.
|
||||
type ChecksumApplyConfiguration struct {
|
||||
Type *v1.ChecksumType `json:"type,omitempty"`
|
||||
Sum *string `json:"sum,omitempty"`
|
||||
}
|
||||
|
||||
// ChecksumApplyConfiguration constructs an declarative configuration of the Checksum type for use with
|
||||
// apply.
|
||||
func Checksum() *ChecksumApplyConfiguration {
|
||||
return &ChecksumApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithType sets the Type field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Type field is set to the value of the last call.
|
||||
func (b *ChecksumApplyConfiguration) WithType(value v1.ChecksumType) *ChecksumApplyConfiguration {
|
||||
b.Type = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSum sets the Sum field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Sum field is set to the value of the last call.
|
||||
func (b *ChecksumApplyConfiguration) WithSum(value string) *ChecksumApplyConfiguration {
|
||||
b.Sum = &value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// ConfigMapReferenceApplyConfiguration represents an declarative configuration of the ConfigMapReference type for use
|
||||
// with apply.
|
||||
type ConfigMapReferenceApplyConfiguration struct {
|
||||
Namespace *string `json:"namespace,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
}
|
||||
|
||||
// ConfigMapReferenceApplyConfiguration constructs an declarative configuration of the ConfigMapReference type for use with
|
||||
// apply.
|
||||
func ConfigMapReference() *ConfigMapReferenceApplyConfiguration {
|
||||
return &ConfigMapReferenceApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithNamespace sets the Namespace field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Namespace field is set to the value of the last call.
|
||||
func (b *ConfigMapReferenceApplyConfiguration) WithNamespace(value string) *ConfigMapReferenceApplyConfiguration {
|
||||
b.Namespace = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *ConfigMapReferenceApplyConfiguration) WithName(value string) *ConfigMapReferenceApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,210 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// EnvironmentApplyConfiguration represents an declarative configuration of the Environment type for use
|
||||
// with apply.
|
||||
type EnvironmentApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
Spec *EnvironmentSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
// Environment constructs an declarative configuration of the Environment type for use with
|
||||
// apply.
|
||||
func Environment(name, namespace string) *EnvironmentApplyConfiguration {
|
||||
b := &EnvironmentApplyConfiguration{}
|
||||
b.WithName(name)
|
||||
b.WithNamespace(namespace)
|
||||
b.WithKind("Environment")
|
||||
b.WithAPIVersion("fission.io/v1")
|
||||
return b
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
func (b *EnvironmentApplyConfiguration) WithKind(value string) *EnvironmentApplyConfiguration {
|
||||
b.Kind = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the APIVersion field is set to the value of the last call.
|
||||
func (b *EnvironmentApplyConfiguration) WithAPIVersion(value string) *EnvironmentApplyConfiguration {
|
||||
b.APIVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *EnvironmentApplyConfiguration) WithName(value string) *EnvironmentApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the GenerateName field is set to the value of the last call.
|
||||
func (b *EnvironmentApplyConfiguration) WithGenerateName(value string) *EnvironmentApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.GenerateName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNamespace sets the Namespace field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Namespace field is set to the value of the last call.
|
||||
func (b *EnvironmentApplyConfiguration) WithNamespace(value string) *EnvironmentApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Namespace = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUID sets the UID field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the UID field is set to the value of the last call.
|
||||
func (b *EnvironmentApplyConfiguration) WithUID(value types.UID) *EnvironmentApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.UID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ResourceVersion field is set to the value of the last call.
|
||||
func (b *EnvironmentApplyConfiguration) WithResourceVersion(value string) *EnvironmentApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ResourceVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGeneration sets the Generation field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Generation field is set to the value of the last call.
|
||||
func (b *EnvironmentApplyConfiguration) WithGeneration(value int64) *EnvironmentApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Generation = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
|
||||
func (b *EnvironmentApplyConfiguration) WithCreationTimestamp(value metav1.Time) *EnvironmentApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.CreationTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
|
||||
func (b *EnvironmentApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *EnvironmentApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
|
||||
func (b *EnvironmentApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *EnvironmentApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionGracePeriodSeconds = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabels puts the entries into the Labels field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Labels field,
|
||||
// overwriting an existing map entries in Labels field with the same key.
|
||||
func (b *EnvironmentApplyConfiguration) WithLabels(entries map[string]string) *EnvironmentApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Labels == nil && len(entries) > 0 {
|
||||
b.Labels = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Labels[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Annotations field,
|
||||
// overwriting an existing map entries in Annotations field with the same key.
|
||||
func (b *EnvironmentApplyConfiguration) WithAnnotations(entries map[string]string) *EnvironmentApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Annotations == nil && len(entries) > 0 {
|
||||
b.Annotations = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Annotations[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
|
||||
func (b *EnvironmentApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *EnvironmentApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithOwnerReferences")
|
||||
}
|
||||
b.OwnerReferences = append(b.OwnerReferences, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Finalizers field.
|
||||
func (b *EnvironmentApplyConfiguration) WithFinalizers(values ...string) *EnvironmentApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
b.Finalizers = append(b.Finalizers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (b *EnvironmentApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
|
||||
if b.ObjectMetaApplyConfiguration == nil {
|
||||
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
|
||||
}
|
||||
}
|
||||
|
||||
// WithSpec sets the Spec field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Spec field is set to the value of the last call.
|
||||
func (b *EnvironmentApplyConfiguration) WithSpec(value *EnvironmentSpecApplyConfiguration) *EnvironmentApplyConfiguration {
|
||||
b.Spec = value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// EnvironmentReferenceApplyConfiguration represents an declarative configuration of the EnvironmentReference type for use
|
||||
// with apply.
|
||||
type EnvironmentReferenceApplyConfiguration struct {
|
||||
Namespace *string `json:"namespace,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
}
|
||||
|
||||
// EnvironmentReferenceApplyConfiguration constructs an declarative configuration of the EnvironmentReference type for use with
|
||||
// apply.
|
||||
func EnvironmentReference() *EnvironmentReferenceApplyConfiguration {
|
||||
return &EnvironmentReferenceApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithNamespace sets the Namespace field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Namespace field is set to the value of the last call.
|
||||
func (b *EnvironmentReferenceApplyConfiguration) WithNamespace(value string) *EnvironmentReferenceApplyConfiguration {
|
||||
b.Namespace = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *EnvironmentReferenceApplyConfiguration) WithName(value string) *EnvironmentReferenceApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
apicorev1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// EnvironmentSpecApplyConfiguration represents an declarative configuration of the EnvironmentSpec type for use
|
||||
// with apply.
|
||||
type EnvironmentSpecApplyConfiguration struct {
|
||||
Version *int `json:"version,omitempty"`
|
||||
Runtime *RuntimeApplyConfiguration `json:"runtime,omitempty"`
|
||||
Builder *BuilderApplyConfiguration `json:"builder,omitempty"`
|
||||
AllowedFunctionsPerContainer *corev1.AllowedFunctionsPerContainer `json:"allowedFunctionsPerContainer,omitempty"`
|
||||
AllowAccessToExternalNetwork *bool `json:"allowAccessToExternalNetwork,omitempty"`
|
||||
Resources *apicorev1.ResourceRequirements `json:"resources,omitempty"`
|
||||
Poolsize *int `json:"poolsize,omitempty"`
|
||||
TerminationGracePeriod *int64 `json:"terminationGracePeriod,omitempty"`
|
||||
KeepArchive *bool `json:"keeparchive,omitempty"`
|
||||
ImagePullSecret *string `json:"imagepullsecret,omitempty"`
|
||||
}
|
||||
|
||||
// EnvironmentSpecApplyConfiguration constructs an declarative configuration of the EnvironmentSpec type for use with
|
||||
// apply.
|
||||
func EnvironmentSpec() *EnvironmentSpecApplyConfiguration {
|
||||
return &EnvironmentSpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithVersion sets the Version field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Version field is set to the value of the last call.
|
||||
func (b *EnvironmentSpecApplyConfiguration) WithVersion(value int) *EnvironmentSpecApplyConfiguration {
|
||||
b.Version = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRuntime sets the Runtime field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Runtime field is set to the value of the last call.
|
||||
func (b *EnvironmentSpecApplyConfiguration) WithRuntime(value *RuntimeApplyConfiguration) *EnvironmentSpecApplyConfiguration {
|
||||
b.Runtime = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithBuilder sets the Builder field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Builder field is set to the value of the last call.
|
||||
func (b *EnvironmentSpecApplyConfiguration) WithBuilder(value *BuilderApplyConfiguration) *EnvironmentSpecApplyConfiguration {
|
||||
b.Builder = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAllowedFunctionsPerContainer sets the AllowedFunctionsPerContainer field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the AllowedFunctionsPerContainer field is set to the value of the last call.
|
||||
func (b *EnvironmentSpecApplyConfiguration) WithAllowedFunctionsPerContainer(value corev1.AllowedFunctionsPerContainer) *EnvironmentSpecApplyConfiguration {
|
||||
b.AllowedFunctionsPerContainer = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAllowAccessToExternalNetwork sets the AllowAccessToExternalNetwork field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the AllowAccessToExternalNetwork field is set to the value of the last call.
|
||||
func (b *EnvironmentSpecApplyConfiguration) WithAllowAccessToExternalNetwork(value bool) *EnvironmentSpecApplyConfiguration {
|
||||
b.AllowAccessToExternalNetwork = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResources sets the Resources field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Resources field is set to the value of the last call.
|
||||
func (b *EnvironmentSpecApplyConfiguration) WithResources(value apicorev1.ResourceRequirements) *EnvironmentSpecApplyConfiguration {
|
||||
b.Resources = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPoolsize sets the Poolsize field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Poolsize field is set to the value of the last call.
|
||||
func (b *EnvironmentSpecApplyConfiguration) WithPoolsize(value int) *EnvironmentSpecApplyConfiguration {
|
||||
b.Poolsize = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTerminationGracePeriod sets the TerminationGracePeriod field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TerminationGracePeriod field is set to the value of the last call.
|
||||
func (b *EnvironmentSpecApplyConfiguration) WithTerminationGracePeriod(value int64) *EnvironmentSpecApplyConfiguration {
|
||||
b.TerminationGracePeriod = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithKeepArchive sets the KeepArchive field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the KeepArchive field is set to the value of the last call.
|
||||
func (b *EnvironmentSpecApplyConfiguration) WithKeepArchive(value bool) *EnvironmentSpecApplyConfiguration {
|
||||
b.KeepArchive = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithImagePullSecret sets the ImagePullSecret field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ImagePullSecret field is set to the value of the last call.
|
||||
func (b *EnvironmentSpecApplyConfiguration) WithImagePullSecret(value string) *EnvironmentSpecApplyConfiguration {
|
||||
b.ImagePullSecret = &value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
v2 "k8s.io/api/autoscaling/v2"
|
||||
)
|
||||
|
||||
// ExecutionStrategyApplyConfiguration represents an declarative configuration of the ExecutionStrategy type for use
|
||||
// with apply.
|
||||
type ExecutionStrategyApplyConfiguration struct {
|
||||
ExecutorType *v1.ExecutorType `json:"ExecutorType,omitempty"`
|
||||
MinScale *int `json:"MinScale,omitempty"`
|
||||
MaxScale *int `json:"MaxScale,omitempty"`
|
||||
TargetCPUPercent *int `json:"TargetCPUPercent,omitempty"`
|
||||
SpecializationTimeout *int `json:"SpecializationTimeout,omitempty"`
|
||||
Metrics []v2.MetricSpec `json:"hpaMetrics,omitempty"`
|
||||
Behavior *v2.HorizontalPodAutoscalerBehavior `json:"hpaBehavior,omitempty"`
|
||||
}
|
||||
|
||||
// ExecutionStrategyApplyConfiguration constructs an declarative configuration of the ExecutionStrategy type for use with
|
||||
// apply.
|
||||
func ExecutionStrategy() *ExecutionStrategyApplyConfiguration {
|
||||
return &ExecutionStrategyApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithExecutorType sets the ExecutorType field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ExecutorType field is set to the value of the last call.
|
||||
func (b *ExecutionStrategyApplyConfiguration) WithExecutorType(value v1.ExecutorType) *ExecutionStrategyApplyConfiguration {
|
||||
b.ExecutorType = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMinScale sets the MinScale field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the MinScale field is set to the value of the last call.
|
||||
func (b *ExecutionStrategyApplyConfiguration) WithMinScale(value int) *ExecutionStrategyApplyConfiguration {
|
||||
b.MinScale = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMaxScale sets the MaxScale field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the MaxScale field is set to the value of the last call.
|
||||
func (b *ExecutionStrategyApplyConfiguration) WithMaxScale(value int) *ExecutionStrategyApplyConfiguration {
|
||||
b.MaxScale = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTargetCPUPercent sets the TargetCPUPercent field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TargetCPUPercent field is set to the value of the last call.
|
||||
func (b *ExecutionStrategyApplyConfiguration) WithTargetCPUPercent(value int) *ExecutionStrategyApplyConfiguration {
|
||||
b.TargetCPUPercent = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSpecializationTimeout sets the SpecializationTimeout field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the SpecializationTimeout field is set to the value of the last call.
|
||||
func (b *ExecutionStrategyApplyConfiguration) WithSpecializationTimeout(value int) *ExecutionStrategyApplyConfiguration {
|
||||
b.SpecializationTimeout = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMetrics adds the given value to the Metrics field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Metrics field.
|
||||
func (b *ExecutionStrategyApplyConfiguration) WithMetrics(values ...v2.MetricSpec) *ExecutionStrategyApplyConfiguration {
|
||||
for i := range values {
|
||||
b.Metrics = append(b.Metrics, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithBehavior sets the Behavior field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Behavior field is set to the value of the last call.
|
||||
func (b *ExecutionStrategyApplyConfiguration) WithBehavior(value v2.HorizontalPodAutoscalerBehavior) *ExecutionStrategyApplyConfiguration {
|
||||
b.Behavior = &value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,210 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// FunctionApplyConfiguration represents an declarative configuration of the Function type for use
|
||||
// with apply.
|
||||
type FunctionApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
Spec *FunctionSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
// Function constructs an declarative configuration of the Function type for use with
|
||||
// apply.
|
||||
func Function(name, namespace string) *FunctionApplyConfiguration {
|
||||
b := &FunctionApplyConfiguration{}
|
||||
b.WithName(name)
|
||||
b.WithNamespace(namespace)
|
||||
b.WithKind("Function")
|
||||
b.WithAPIVersion("fission.io/v1")
|
||||
return b
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
func (b *FunctionApplyConfiguration) WithKind(value string) *FunctionApplyConfiguration {
|
||||
b.Kind = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the APIVersion field is set to the value of the last call.
|
||||
func (b *FunctionApplyConfiguration) WithAPIVersion(value string) *FunctionApplyConfiguration {
|
||||
b.APIVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *FunctionApplyConfiguration) WithName(value string) *FunctionApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the GenerateName field is set to the value of the last call.
|
||||
func (b *FunctionApplyConfiguration) WithGenerateName(value string) *FunctionApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.GenerateName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNamespace sets the Namespace field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Namespace field is set to the value of the last call.
|
||||
func (b *FunctionApplyConfiguration) WithNamespace(value string) *FunctionApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Namespace = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUID sets the UID field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the UID field is set to the value of the last call.
|
||||
func (b *FunctionApplyConfiguration) WithUID(value types.UID) *FunctionApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.UID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ResourceVersion field is set to the value of the last call.
|
||||
func (b *FunctionApplyConfiguration) WithResourceVersion(value string) *FunctionApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ResourceVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGeneration sets the Generation field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Generation field is set to the value of the last call.
|
||||
func (b *FunctionApplyConfiguration) WithGeneration(value int64) *FunctionApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Generation = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
|
||||
func (b *FunctionApplyConfiguration) WithCreationTimestamp(value metav1.Time) *FunctionApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.CreationTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
|
||||
func (b *FunctionApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *FunctionApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
|
||||
func (b *FunctionApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *FunctionApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionGracePeriodSeconds = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabels puts the entries into the Labels field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Labels field,
|
||||
// overwriting an existing map entries in Labels field with the same key.
|
||||
func (b *FunctionApplyConfiguration) WithLabels(entries map[string]string) *FunctionApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Labels == nil && len(entries) > 0 {
|
||||
b.Labels = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Labels[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Annotations field,
|
||||
// overwriting an existing map entries in Annotations field with the same key.
|
||||
func (b *FunctionApplyConfiguration) WithAnnotations(entries map[string]string) *FunctionApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Annotations == nil && len(entries) > 0 {
|
||||
b.Annotations = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Annotations[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
|
||||
func (b *FunctionApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *FunctionApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithOwnerReferences")
|
||||
}
|
||||
b.OwnerReferences = append(b.OwnerReferences, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Finalizers field.
|
||||
func (b *FunctionApplyConfiguration) WithFinalizers(values ...string) *FunctionApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
b.Finalizers = append(b.Finalizers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (b *FunctionApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
|
||||
if b.ObjectMetaApplyConfiguration == nil {
|
||||
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
|
||||
}
|
||||
}
|
||||
|
||||
// WithSpec sets the Spec field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Spec field is set to the value of the last call.
|
||||
func (b *FunctionApplyConfiguration) WithSpec(value *FunctionSpecApplyConfiguration) *FunctionApplyConfiguration {
|
||||
b.Spec = value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// FunctionPackageRefApplyConfiguration represents an declarative configuration of the FunctionPackageRef type for use
|
||||
// with apply.
|
||||
type FunctionPackageRefApplyConfiguration struct {
|
||||
PackageRef *PackageRefApplyConfiguration `json:"packageref,omitempty"`
|
||||
FunctionName *string `json:"functionName,omitempty"`
|
||||
}
|
||||
|
||||
// FunctionPackageRefApplyConfiguration constructs an declarative configuration of the FunctionPackageRef type for use with
|
||||
// apply.
|
||||
func FunctionPackageRef() *FunctionPackageRefApplyConfiguration {
|
||||
return &FunctionPackageRefApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithPackageRef sets the PackageRef field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the PackageRef field is set to the value of the last call.
|
||||
func (b *FunctionPackageRefApplyConfiguration) WithPackageRef(value *PackageRefApplyConfiguration) *FunctionPackageRefApplyConfiguration {
|
||||
b.PackageRef = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFunctionName sets the FunctionName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the FunctionName field is set to the value of the last call.
|
||||
func (b *FunctionPackageRefApplyConfiguration) WithFunctionName(value string) *FunctionPackageRefApplyConfiguration {
|
||||
b.FunctionName = &value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
)
|
||||
|
||||
// FunctionReferenceApplyConfiguration represents an declarative configuration of the FunctionReference type for use
|
||||
// with apply.
|
||||
type FunctionReferenceApplyConfiguration struct {
|
||||
Type *v1.FunctionReferenceType `json:"type,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
FunctionWeights map[string]int `json:"functionweights,omitempty"`
|
||||
}
|
||||
|
||||
// FunctionReferenceApplyConfiguration constructs an declarative configuration of the FunctionReference type for use with
|
||||
// apply.
|
||||
func FunctionReference() *FunctionReferenceApplyConfiguration {
|
||||
return &FunctionReferenceApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithType sets the Type field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Type field is set to the value of the last call.
|
||||
func (b *FunctionReferenceApplyConfiguration) WithType(value v1.FunctionReferenceType) *FunctionReferenceApplyConfiguration {
|
||||
b.Type = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *FunctionReferenceApplyConfiguration) WithName(value string) *FunctionReferenceApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFunctionWeights puts the entries into the FunctionWeights field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the FunctionWeights field,
|
||||
// overwriting an existing map entries in FunctionWeights field with the same key.
|
||||
func (b *FunctionReferenceApplyConfiguration) WithFunctionWeights(entries map[string]int) *FunctionReferenceApplyConfiguration {
|
||||
if b.FunctionWeights == nil && len(entries) > 0 {
|
||||
b.FunctionWeights = make(map[string]int, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.FunctionWeights[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// FunctionSpecApplyConfiguration represents an declarative configuration of the FunctionSpec type for use
|
||||
// with apply.
|
||||
type FunctionSpecApplyConfiguration struct {
|
||||
Environment *EnvironmentReferenceApplyConfiguration `json:"environment,omitempty"`
|
||||
Package *FunctionPackageRefApplyConfiguration `json:"package,omitempty"`
|
||||
Secrets []SecretReferenceApplyConfiguration `json:"secrets,omitempty"`
|
||||
ConfigMaps []ConfigMapReferenceApplyConfiguration `json:"configmaps,omitempty"`
|
||||
Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
|
||||
InvokeStrategy *InvokeStrategyApplyConfiguration `json:"InvokeStrategy,omitempty"`
|
||||
FunctionTimeout *int `json:"functionTimeout,omitempty"`
|
||||
IdleTimeout *int `json:"idletimeout,omitempty"`
|
||||
Concurrency *int `json:"concurrency,omitempty"`
|
||||
RequestsPerPod *int `json:"requestsPerPod,omitempty"`
|
||||
OnceOnly *bool `json:"onceOnly,omitempty"`
|
||||
RetainPods *int `json:"retainPods,omitempty"`
|
||||
PodSpec *corev1.PodSpec `json:"podspec,omitempty"`
|
||||
}
|
||||
|
||||
// FunctionSpecApplyConfiguration constructs an declarative configuration of the FunctionSpec type for use with
|
||||
// apply.
|
||||
func FunctionSpec() *FunctionSpecApplyConfiguration {
|
||||
return &FunctionSpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithEnvironment sets the Environment field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Environment field is set to the value of the last call.
|
||||
func (b *FunctionSpecApplyConfiguration) WithEnvironment(value *EnvironmentReferenceApplyConfiguration) *FunctionSpecApplyConfiguration {
|
||||
b.Environment = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPackage sets the Package field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Package field is set to the value of the last call.
|
||||
func (b *FunctionSpecApplyConfiguration) WithPackage(value *FunctionPackageRefApplyConfiguration) *FunctionSpecApplyConfiguration {
|
||||
b.Package = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSecrets adds the given value to the Secrets field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Secrets field.
|
||||
func (b *FunctionSpecApplyConfiguration) WithSecrets(values ...*SecretReferenceApplyConfiguration) *FunctionSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithSecrets")
|
||||
}
|
||||
b.Secrets = append(b.Secrets, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithConfigMaps adds the given value to the ConfigMaps field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the ConfigMaps field.
|
||||
func (b *FunctionSpecApplyConfiguration) WithConfigMaps(values ...*ConfigMapReferenceApplyConfiguration) *FunctionSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithConfigMaps")
|
||||
}
|
||||
b.ConfigMaps = append(b.ConfigMaps, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResources sets the Resources field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Resources field is set to the value of the last call.
|
||||
func (b *FunctionSpecApplyConfiguration) WithResources(value corev1.ResourceRequirements) *FunctionSpecApplyConfiguration {
|
||||
b.Resources = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithInvokeStrategy sets the InvokeStrategy field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the InvokeStrategy field is set to the value of the last call.
|
||||
func (b *FunctionSpecApplyConfiguration) WithInvokeStrategy(value *InvokeStrategyApplyConfiguration) *FunctionSpecApplyConfiguration {
|
||||
b.InvokeStrategy = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFunctionTimeout sets the FunctionTimeout field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the FunctionTimeout field is set to the value of the last call.
|
||||
func (b *FunctionSpecApplyConfiguration) WithFunctionTimeout(value int) *FunctionSpecApplyConfiguration {
|
||||
b.FunctionTimeout = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithIdleTimeout sets the IdleTimeout field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the IdleTimeout field is set to the value of the last call.
|
||||
func (b *FunctionSpecApplyConfiguration) WithIdleTimeout(value int) *FunctionSpecApplyConfiguration {
|
||||
b.IdleTimeout = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithConcurrency sets the Concurrency field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Concurrency field is set to the value of the last call.
|
||||
func (b *FunctionSpecApplyConfiguration) WithConcurrency(value int) *FunctionSpecApplyConfiguration {
|
||||
b.Concurrency = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRequestsPerPod sets the RequestsPerPod field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the RequestsPerPod field is set to the value of the last call.
|
||||
func (b *FunctionSpecApplyConfiguration) WithRequestsPerPod(value int) *FunctionSpecApplyConfiguration {
|
||||
b.RequestsPerPod = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOnceOnly sets the OnceOnly field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the OnceOnly field is set to the value of the last call.
|
||||
func (b *FunctionSpecApplyConfiguration) WithOnceOnly(value bool) *FunctionSpecApplyConfiguration {
|
||||
b.OnceOnly = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRetainPods sets the RetainPods field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the RetainPods field is set to the value of the last call.
|
||||
func (b *FunctionSpecApplyConfiguration) WithRetainPods(value int) *FunctionSpecApplyConfiguration {
|
||||
b.RetainPods = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPodSpec sets the PodSpec field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the PodSpec field is set to the value of the last call.
|
||||
func (b *FunctionSpecApplyConfiguration) WithPodSpec(value corev1.PodSpec) *FunctionSpecApplyConfiguration {
|
||||
b.PodSpec = &value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,210 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// HTTPTriggerApplyConfiguration represents an declarative configuration of the HTTPTrigger type for use
|
||||
// with apply.
|
||||
type HTTPTriggerApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
Spec *HTTPTriggerSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
// HTTPTrigger constructs an declarative configuration of the HTTPTrigger type for use with
|
||||
// apply.
|
||||
func HTTPTrigger(name, namespace string) *HTTPTriggerApplyConfiguration {
|
||||
b := &HTTPTriggerApplyConfiguration{}
|
||||
b.WithName(name)
|
||||
b.WithNamespace(namespace)
|
||||
b.WithKind("HTTPTrigger")
|
||||
b.WithAPIVersion("fission.io/v1")
|
||||
return b
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
func (b *HTTPTriggerApplyConfiguration) WithKind(value string) *HTTPTriggerApplyConfiguration {
|
||||
b.Kind = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the APIVersion field is set to the value of the last call.
|
||||
func (b *HTTPTriggerApplyConfiguration) WithAPIVersion(value string) *HTTPTriggerApplyConfiguration {
|
||||
b.APIVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *HTTPTriggerApplyConfiguration) WithName(value string) *HTTPTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the GenerateName field is set to the value of the last call.
|
||||
func (b *HTTPTriggerApplyConfiguration) WithGenerateName(value string) *HTTPTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.GenerateName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNamespace sets the Namespace field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Namespace field is set to the value of the last call.
|
||||
func (b *HTTPTriggerApplyConfiguration) WithNamespace(value string) *HTTPTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Namespace = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUID sets the UID field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the UID field is set to the value of the last call.
|
||||
func (b *HTTPTriggerApplyConfiguration) WithUID(value types.UID) *HTTPTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.UID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ResourceVersion field is set to the value of the last call.
|
||||
func (b *HTTPTriggerApplyConfiguration) WithResourceVersion(value string) *HTTPTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ResourceVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGeneration sets the Generation field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Generation field is set to the value of the last call.
|
||||
func (b *HTTPTriggerApplyConfiguration) WithGeneration(value int64) *HTTPTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Generation = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
|
||||
func (b *HTTPTriggerApplyConfiguration) WithCreationTimestamp(value metav1.Time) *HTTPTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.CreationTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
|
||||
func (b *HTTPTriggerApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *HTTPTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
|
||||
func (b *HTTPTriggerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *HTTPTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionGracePeriodSeconds = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabels puts the entries into the Labels field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Labels field,
|
||||
// overwriting an existing map entries in Labels field with the same key.
|
||||
func (b *HTTPTriggerApplyConfiguration) WithLabels(entries map[string]string) *HTTPTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Labels == nil && len(entries) > 0 {
|
||||
b.Labels = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Labels[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Annotations field,
|
||||
// overwriting an existing map entries in Annotations field with the same key.
|
||||
func (b *HTTPTriggerApplyConfiguration) WithAnnotations(entries map[string]string) *HTTPTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Annotations == nil && len(entries) > 0 {
|
||||
b.Annotations = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Annotations[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
|
||||
func (b *HTTPTriggerApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *HTTPTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithOwnerReferences")
|
||||
}
|
||||
b.OwnerReferences = append(b.OwnerReferences, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Finalizers field.
|
||||
func (b *HTTPTriggerApplyConfiguration) WithFinalizers(values ...string) *HTTPTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
b.Finalizers = append(b.Finalizers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (b *HTTPTriggerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
|
||||
if b.ObjectMetaApplyConfiguration == nil {
|
||||
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
|
||||
}
|
||||
}
|
||||
|
||||
// WithSpec sets the Spec field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Spec field is set to the value of the last call.
|
||||
func (b *HTTPTriggerApplyConfiguration) WithSpec(value *HTTPTriggerSpecApplyConfiguration) *HTTPTriggerApplyConfiguration {
|
||||
b.Spec = value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// HTTPTriggerSpecApplyConfiguration represents an declarative configuration of the HTTPTriggerSpec type for use
|
||||
// with apply.
|
||||
type HTTPTriggerSpecApplyConfiguration struct {
|
||||
Host *string `json:"host,omitempty"`
|
||||
RelativeURL *string `json:"relativeurl,omitempty"`
|
||||
Prefix *string `json:"prefix,omitempty"`
|
||||
KeepPrefix *bool `json:"keepPrefix,omitempty"`
|
||||
Method *string `json:"method,omitempty"`
|
||||
Methods []string `json:"methods,omitempty"`
|
||||
FunctionReference *FunctionReferenceApplyConfiguration `json:"functionref,omitempty"`
|
||||
CreateIngress *bool `json:"createingress,omitempty"`
|
||||
IngressConfig *IngressConfigApplyConfiguration `json:"ingressconfig,omitempty"`
|
||||
}
|
||||
|
||||
// HTTPTriggerSpecApplyConfiguration constructs an declarative configuration of the HTTPTriggerSpec type for use with
|
||||
// apply.
|
||||
func HTTPTriggerSpec() *HTTPTriggerSpecApplyConfiguration {
|
||||
return &HTTPTriggerSpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithHost sets the Host field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Host field is set to the value of the last call.
|
||||
func (b *HTTPTriggerSpecApplyConfiguration) WithHost(value string) *HTTPTriggerSpecApplyConfiguration {
|
||||
b.Host = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRelativeURL sets the RelativeURL field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the RelativeURL field is set to the value of the last call.
|
||||
func (b *HTTPTriggerSpecApplyConfiguration) WithRelativeURL(value string) *HTTPTriggerSpecApplyConfiguration {
|
||||
b.RelativeURL = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPrefix sets the Prefix field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Prefix field is set to the value of the last call.
|
||||
func (b *HTTPTriggerSpecApplyConfiguration) WithPrefix(value string) *HTTPTriggerSpecApplyConfiguration {
|
||||
b.Prefix = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithKeepPrefix sets the KeepPrefix field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the KeepPrefix field is set to the value of the last call.
|
||||
func (b *HTTPTriggerSpecApplyConfiguration) WithKeepPrefix(value bool) *HTTPTriggerSpecApplyConfiguration {
|
||||
b.KeepPrefix = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMethod sets the Method field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Method field is set to the value of the last call.
|
||||
func (b *HTTPTriggerSpecApplyConfiguration) WithMethod(value string) *HTTPTriggerSpecApplyConfiguration {
|
||||
b.Method = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMethods adds the given value to the Methods field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Methods field.
|
||||
func (b *HTTPTriggerSpecApplyConfiguration) WithMethods(values ...string) *HTTPTriggerSpecApplyConfiguration {
|
||||
for i := range values {
|
||||
b.Methods = append(b.Methods, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFunctionReference sets the FunctionReference field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the FunctionReference field is set to the value of the last call.
|
||||
func (b *HTTPTriggerSpecApplyConfiguration) WithFunctionReference(value *FunctionReferenceApplyConfiguration) *HTTPTriggerSpecApplyConfiguration {
|
||||
b.FunctionReference = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCreateIngress sets the CreateIngress field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the CreateIngress field is set to the value of the last call.
|
||||
func (b *HTTPTriggerSpecApplyConfiguration) WithCreateIngress(value bool) *HTTPTriggerSpecApplyConfiguration {
|
||||
b.CreateIngress = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithIngressConfig sets the IngressConfig field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the IngressConfig field is set to the value of the last call.
|
||||
func (b *HTTPTriggerSpecApplyConfiguration) WithIngressConfig(value *IngressConfigApplyConfiguration) *HTTPTriggerSpecApplyConfiguration {
|
||||
b.IngressConfig = value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// IngressConfigApplyConfiguration represents an declarative configuration of the IngressConfig type for use
|
||||
// with apply.
|
||||
type IngressConfigApplyConfiguration struct {
|
||||
Annotations map[string]string `json:"annotations,omitempty"`
|
||||
Path *string `json:"path,omitempty"`
|
||||
Host *string `json:"host,omitempty"`
|
||||
TLS *string `json:"tls,omitempty"`
|
||||
}
|
||||
|
||||
// IngressConfigApplyConfiguration constructs an declarative configuration of the IngressConfig type for use with
|
||||
// apply.
|
||||
func IngressConfig() *IngressConfigApplyConfiguration {
|
||||
return &IngressConfigApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Annotations field,
|
||||
// overwriting an existing map entries in Annotations field with the same key.
|
||||
func (b *IngressConfigApplyConfiguration) WithAnnotations(entries map[string]string) *IngressConfigApplyConfiguration {
|
||||
if b.Annotations == nil && len(entries) > 0 {
|
||||
b.Annotations = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Annotations[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPath sets the Path field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Path field is set to the value of the last call.
|
||||
func (b *IngressConfigApplyConfiguration) WithPath(value string) *IngressConfigApplyConfiguration {
|
||||
b.Path = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithHost sets the Host field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Host field is set to the value of the last call.
|
||||
func (b *IngressConfigApplyConfiguration) WithHost(value string) *IngressConfigApplyConfiguration {
|
||||
b.Host = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTLS sets the TLS field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the TLS field is set to the value of the last call.
|
||||
func (b *IngressConfigApplyConfiguration) WithTLS(value string) *IngressConfigApplyConfiguration {
|
||||
b.TLS = &value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
)
|
||||
|
||||
// InvokeStrategyApplyConfiguration represents an declarative configuration of the InvokeStrategy type for use
|
||||
// with apply.
|
||||
type InvokeStrategyApplyConfiguration struct {
|
||||
ExecutionStrategy *ExecutionStrategyApplyConfiguration `json:"ExecutionStrategy,omitempty"`
|
||||
StrategyType *corev1.StrategyType `json:"StrategyType,omitempty"`
|
||||
}
|
||||
|
||||
// InvokeStrategyApplyConfiguration constructs an declarative configuration of the InvokeStrategy type for use with
|
||||
// apply.
|
||||
func InvokeStrategy() *InvokeStrategyApplyConfiguration {
|
||||
return &InvokeStrategyApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithExecutionStrategy sets the ExecutionStrategy field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ExecutionStrategy field is set to the value of the last call.
|
||||
func (b *InvokeStrategyApplyConfiguration) WithExecutionStrategy(value *ExecutionStrategyApplyConfiguration) *InvokeStrategyApplyConfiguration {
|
||||
b.ExecutionStrategy = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithStrategyType sets the StrategyType field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the StrategyType field is set to the value of the last call.
|
||||
func (b *InvokeStrategyApplyConfiguration) WithStrategyType(value corev1.StrategyType) *InvokeStrategyApplyConfiguration {
|
||||
b.StrategyType = &value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,210 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// KubernetesWatchTriggerApplyConfiguration represents an declarative configuration of the KubernetesWatchTrigger type for use
|
||||
// with apply.
|
||||
type KubernetesWatchTriggerApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
Spec *KubernetesWatchTriggerSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
// KubernetesWatchTrigger constructs an declarative configuration of the KubernetesWatchTrigger type for use with
|
||||
// apply.
|
||||
func KubernetesWatchTrigger(name, namespace string) *KubernetesWatchTriggerApplyConfiguration {
|
||||
b := &KubernetesWatchTriggerApplyConfiguration{}
|
||||
b.WithName(name)
|
||||
b.WithNamespace(namespace)
|
||||
b.WithKind("KubernetesWatchTrigger")
|
||||
b.WithAPIVersion("fission.io/v1")
|
||||
return b
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
func (b *KubernetesWatchTriggerApplyConfiguration) WithKind(value string) *KubernetesWatchTriggerApplyConfiguration {
|
||||
b.Kind = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the APIVersion field is set to the value of the last call.
|
||||
func (b *KubernetesWatchTriggerApplyConfiguration) WithAPIVersion(value string) *KubernetesWatchTriggerApplyConfiguration {
|
||||
b.APIVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *KubernetesWatchTriggerApplyConfiguration) WithName(value string) *KubernetesWatchTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the GenerateName field is set to the value of the last call.
|
||||
func (b *KubernetesWatchTriggerApplyConfiguration) WithGenerateName(value string) *KubernetesWatchTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.GenerateName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNamespace sets the Namespace field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Namespace field is set to the value of the last call.
|
||||
func (b *KubernetesWatchTriggerApplyConfiguration) WithNamespace(value string) *KubernetesWatchTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Namespace = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUID sets the UID field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the UID field is set to the value of the last call.
|
||||
func (b *KubernetesWatchTriggerApplyConfiguration) WithUID(value types.UID) *KubernetesWatchTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.UID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ResourceVersion field is set to the value of the last call.
|
||||
func (b *KubernetesWatchTriggerApplyConfiguration) WithResourceVersion(value string) *KubernetesWatchTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ResourceVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGeneration sets the Generation field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Generation field is set to the value of the last call.
|
||||
func (b *KubernetesWatchTriggerApplyConfiguration) WithGeneration(value int64) *KubernetesWatchTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Generation = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
|
||||
func (b *KubernetesWatchTriggerApplyConfiguration) WithCreationTimestamp(value metav1.Time) *KubernetesWatchTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.CreationTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
|
||||
func (b *KubernetesWatchTriggerApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *KubernetesWatchTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
|
||||
func (b *KubernetesWatchTriggerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *KubernetesWatchTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionGracePeriodSeconds = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabels puts the entries into the Labels field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Labels field,
|
||||
// overwriting an existing map entries in Labels field with the same key.
|
||||
func (b *KubernetesWatchTriggerApplyConfiguration) WithLabels(entries map[string]string) *KubernetesWatchTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Labels == nil && len(entries) > 0 {
|
||||
b.Labels = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Labels[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Annotations field,
|
||||
// overwriting an existing map entries in Annotations field with the same key.
|
||||
func (b *KubernetesWatchTriggerApplyConfiguration) WithAnnotations(entries map[string]string) *KubernetesWatchTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Annotations == nil && len(entries) > 0 {
|
||||
b.Annotations = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Annotations[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
|
||||
func (b *KubernetesWatchTriggerApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *KubernetesWatchTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithOwnerReferences")
|
||||
}
|
||||
b.OwnerReferences = append(b.OwnerReferences, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Finalizers field.
|
||||
func (b *KubernetesWatchTriggerApplyConfiguration) WithFinalizers(values ...string) *KubernetesWatchTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
b.Finalizers = append(b.Finalizers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (b *KubernetesWatchTriggerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
|
||||
if b.ObjectMetaApplyConfiguration == nil {
|
||||
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
|
||||
}
|
||||
}
|
||||
|
||||
// WithSpec sets the Spec field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Spec field is set to the value of the last call.
|
||||
func (b *KubernetesWatchTriggerApplyConfiguration) WithSpec(value *KubernetesWatchTriggerSpecApplyConfiguration) *KubernetesWatchTriggerApplyConfiguration {
|
||||
b.Spec = value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// KubernetesWatchTriggerSpecApplyConfiguration represents an declarative configuration of the KubernetesWatchTriggerSpec type for use
|
||||
// with apply.
|
||||
type KubernetesWatchTriggerSpecApplyConfiguration struct {
|
||||
Namespace *string `json:"namespace,omitempty"`
|
||||
Type *string `json:"type,omitempty"`
|
||||
LabelSelector map[string]string `json:"labelselector,omitempty"`
|
||||
FunctionReference *FunctionReferenceApplyConfiguration `json:"functionref,omitempty"`
|
||||
}
|
||||
|
||||
// KubernetesWatchTriggerSpecApplyConfiguration constructs an declarative configuration of the KubernetesWatchTriggerSpec type for use with
|
||||
// apply.
|
||||
func KubernetesWatchTriggerSpec() *KubernetesWatchTriggerSpecApplyConfiguration {
|
||||
return &KubernetesWatchTriggerSpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithNamespace sets the Namespace field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Namespace field is set to the value of the last call.
|
||||
func (b *KubernetesWatchTriggerSpecApplyConfiguration) WithNamespace(value string) *KubernetesWatchTriggerSpecApplyConfiguration {
|
||||
b.Namespace = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithType sets the Type field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Type field is set to the value of the last call.
|
||||
func (b *KubernetesWatchTriggerSpecApplyConfiguration) WithType(value string) *KubernetesWatchTriggerSpecApplyConfiguration {
|
||||
b.Type = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabelSelector puts the entries into the LabelSelector field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the LabelSelector field,
|
||||
// overwriting an existing map entries in LabelSelector field with the same key.
|
||||
func (b *KubernetesWatchTriggerSpecApplyConfiguration) WithLabelSelector(entries map[string]string) *KubernetesWatchTriggerSpecApplyConfiguration {
|
||||
if b.LabelSelector == nil && len(entries) > 0 {
|
||||
b.LabelSelector = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.LabelSelector[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFunctionReference sets the FunctionReference field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the FunctionReference field is set to the value of the last call.
|
||||
func (b *KubernetesWatchTriggerSpecApplyConfiguration) WithFunctionReference(value *FunctionReferenceApplyConfiguration) *KubernetesWatchTriggerSpecApplyConfiguration {
|
||||
b.FunctionReference = value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,210 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// MessageQueueTriggerApplyConfiguration represents an declarative configuration of the MessageQueueTrigger type for use
|
||||
// with apply.
|
||||
type MessageQueueTriggerApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
Spec *MessageQueueTriggerSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
// MessageQueueTrigger constructs an declarative configuration of the MessageQueueTrigger type for use with
|
||||
// apply.
|
||||
func MessageQueueTrigger(name, namespace string) *MessageQueueTriggerApplyConfiguration {
|
||||
b := &MessageQueueTriggerApplyConfiguration{}
|
||||
b.WithName(name)
|
||||
b.WithNamespace(namespace)
|
||||
b.WithKind("MessageQueueTrigger")
|
||||
b.WithAPIVersion("fission.io/v1")
|
||||
return b
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
func (b *MessageQueueTriggerApplyConfiguration) WithKind(value string) *MessageQueueTriggerApplyConfiguration {
|
||||
b.Kind = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the APIVersion field is set to the value of the last call.
|
||||
func (b *MessageQueueTriggerApplyConfiguration) WithAPIVersion(value string) *MessageQueueTriggerApplyConfiguration {
|
||||
b.APIVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *MessageQueueTriggerApplyConfiguration) WithName(value string) *MessageQueueTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the GenerateName field is set to the value of the last call.
|
||||
func (b *MessageQueueTriggerApplyConfiguration) WithGenerateName(value string) *MessageQueueTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.GenerateName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNamespace sets the Namespace field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Namespace field is set to the value of the last call.
|
||||
func (b *MessageQueueTriggerApplyConfiguration) WithNamespace(value string) *MessageQueueTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Namespace = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUID sets the UID field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the UID field is set to the value of the last call.
|
||||
func (b *MessageQueueTriggerApplyConfiguration) WithUID(value types.UID) *MessageQueueTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.UID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ResourceVersion field is set to the value of the last call.
|
||||
func (b *MessageQueueTriggerApplyConfiguration) WithResourceVersion(value string) *MessageQueueTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ResourceVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGeneration sets the Generation field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Generation field is set to the value of the last call.
|
||||
func (b *MessageQueueTriggerApplyConfiguration) WithGeneration(value int64) *MessageQueueTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Generation = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
|
||||
func (b *MessageQueueTriggerApplyConfiguration) WithCreationTimestamp(value metav1.Time) *MessageQueueTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.CreationTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
|
||||
func (b *MessageQueueTriggerApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *MessageQueueTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
|
||||
func (b *MessageQueueTriggerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *MessageQueueTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionGracePeriodSeconds = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabels puts the entries into the Labels field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Labels field,
|
||||
// overwriting an existing map entries in Labels field with the same key.
|
||||
func (b *MessageQueueTriggerApplyConfiguration) WithLabels(entries map[string]string) *MessageQueueTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Labels == nil && len(entries) > 0 {
|
||||
b.Labels = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Labels[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Annotations field,
|
||||
// overwriting an existing map entries in Annotations field with the same key.
|
||||
func (b *MessageQueueTriggerApplyConfiguration) WithAnnotations(entries map[string]string) *MessageQueueTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Annotations == nil && len(entries) > 0 {
|
||||
b.Annotations = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Annotations[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
|
||||
func (b *MessageQueueTriggerApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *MessageQueueTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithOwnerReferences")
|
||||
}
|
||||
b.OwnerReferences = append(b.OwnerReferences, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Finalizers field.
|
||||
func (b *MessageQueueTriggerApplyConfiguration) WithFinalizers(values ...string) *MessageQueueTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
b.Finalizers = append(b.Finalizers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (b *MessageQueueTriggerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
|
||||
if b.ObjectMetaApplyConfiguration == nil {
|
||||
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
|
||||
}
|
||||
}
|
||||
|
||||
// WithSpec sets the Spec field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Spec field is set to the value of the last call.
|
||||
func (b *MessageQueueTriggerApplyConfiguration) WithSpec(value *MessageQueueTriggerSpecApplyConfiguration) *MessageQueueTriggerApplyConfiguration {
|
||||
b.Spec = value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,176 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
apicorev1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// MessageQueueTriggerSpecApplyConfiguration represents an declarative configuration of the MessageQueueTriggerSpec type for use
|
||||
// with apply.
|
||||
type MessageQueueTriggerSpecApplyConfiguration struct {
|
||||
FunctionReference *FunctionReferenceApplyConfiguration `json:"functionref,omitempty"`
|
||||
MessageQueueType *corev1.MessageQueueType `json:"messageQueueType,omitempty"`
|
||||
Topic *string `json:"topic,omitempty"`
|
||||
ResponseTopic *string `json:"respTopic,omitempty"`
|
||||
ErrorTopic *string `json:"errorTopic,omitempty"`
|
||||
MaxRetries *int `json:"maxRetries,omitempty"`
|
||||
ContentType *string `json:"contentType,omitempty"`
|
||||
PollingInterval *int32 `json:"pollingInterval,omitempty"`
|
||||
CooldownPeriod *int32 `json:"cooldownPeriod,omitempty"`
|
||||
MinReplicaCount *int32 `json:"minReplicaCount,omitempty"`
|
||||
MaxReplicaCount *int32 `json:"maxReplicaCount,omitempty"`
|
||||
Metadata map[string]string `json:"metadata,omitempty"`
|
||||
Secret *string `json:"secret,omitempty"`
|
||||
MqtKind *string `json:"mqtkind,omitempty"`
|
||||
PodSpec *apicorev1.PodSpec `json:"podspec,omitempty"`
|
||||
}
|
||||
|
||||
// MessageQueueTriggerSpecApplyConfiguration constructs an declarative configuration of the MessageQueueTriggerSpec type for use with
|
||||
// apply.
|
||||
func MessageQueueTriggerSpec() *MessageQueueTriggerSpecApplyConfiguration {
|
||||
return &MessageQueueTriggerSpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithFunctionReference sets the FunctionReference field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the FunctionReference field is set to the value of the last call.
|
||||
func (b *MessageQueueTriggerSpecApplyConfiguration) WithFunctionReference(value *FunctionReferenceApplyConfiguration) *MessageQueueTriggerSpecApplyConfiguration {
|
||||
b.FunctionReference = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMessageQueueType sets the MessageQueueType field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the MessageQueueType field is set to the value of the last call.
|
||||
func (b *MessageQueueTriggerSpecApplyConfiguration) WithMessageQueueType(value corev1.MessageQueueType) *MessageQueueTriggerSpecApplyConfiguration {
|
||||
b.MessageQueueType = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTopic sets the Topic field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Topic field is set to the value of the last call.
|
||||
func (b *MessageQueueTriggerSpecApplyConfiguration) WithTopic(value string) *MessageQueueTriggerSpecApplyConfiguration {
|
||||
b.Topic = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResponseTopic sets the ResponseTopic field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ResponseTopic field is set to the value of the last call.
|
||||
func (b *MessageQueueTriggerSpecApplyConfiguration) WithResponseTopic(value string) *MessageQueueTriggerSpecApplyConfiguration {
|
||||
b.ResponseTopic = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithErrorTopic sets the ErrorTopic field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ErrorTopic field is set to the value of the last call.
|
||||
func (b *MessageQueueTriggerSpecApplyConfiguration) WithErrorTopic(value string) *MessageQueueTriggerSpecApplyConfiguration {
|
||||
b.ErrorTopic = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMaxRetries sets the MaxRetries field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the MaxRetries field is set to the value of the last call.
|
||||
func (b *MessageQueueTriggerSpecApplyConfiguration) WithMaxRetries(value int) *MessageQueueTriggerSpecApplyConfiguration {
|
||||
b.MaxRetries = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithContentType sets the ContentType field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ContentType field is set to the value of the last call.
|
||||
func (b *MessageQueueTriggerSpecApplyConfiguration) WithContentType(value string) *MessageQueueTriggerSpecApplyConfiguration {
|
||||
b.ContentType = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPollingInterval sets the PollingInterval field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the PollingInterval field is set to the value of the last call.
|
||||
func (b *MessageQueueTriggerSpecApplyConfiguration) WithPollingInterval(value int32) *MessageQueueTriggerSpecApplyConfiguration {
|
||||
b.PollingInterval = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCooldownPeriod sets the CooldownPeriod field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the CooldownPeriod field is set to the value of the last call.
|
||||
func (b *MessageQueueTriggerSpecApplyConfiguration) WithCooldownPeriod(value int32) *MessageQueueTriggerSpecApplyConfiguration {
|
||||
b.CooldownPeriod = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMinReplicaCount sets the MinReplicaCount field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the MinReplicaCount field is set to the value of the last call.
|
||||
func (b *MessageQueueTriggerSpecApplyConfiguration) WithMinReplicaCount(value int32) *MessageQueueTriggerSpecApplyConfiguration {
|
||||
b.MinReplicaCount = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMaxReplicaCount sets the MaxReplicaCount field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the MaxReplicaCount field is set to the value of the last call.
|
||||
func (b *MessageQueueTriggerSpecApplyConfiguration) WithMaxReplicaCount(value int32) *MessageQueueTriggerSpecApplyConfiguration {
|
||||
b.MaxReplicaCount = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMetadata puts the entries into the Metadata field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Metadata field,
|
||||
// overwriting an existing map entries in Metadata field with the same key.
|
||||
func (b *MessageQueueTriggerSpecApplyConfiguration) WithMetadata(entries map[string]string) *MessageQueueTriggerSpecApplyConfiguration {
|
||||
if b.Metadata == nil && len(entries) > 0 {
|
||||
b.Metadata = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Metadata[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSecret sets the Secret field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Secret field is set to the value of the last call.
|
||||
func (b *MessageQueueTriggerSpecApplyConfiguration) WithSecret(value string) *MessageQueueTriggerSpecApplyConfiguration {
|
||||
b.Secret = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMqtKind sets the MqtKind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the MqtKind field is set to the value of the last call.
|
||||
func (b *MessageQueueTriggerSpecApplyConfiguration) WithMqtKind(value string) *MessageQueueTriggerSpecApplyConfiguration {
|
||||
b.MqtKind = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPodSpec sets the PodSpec field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the PodSpec field is set to the value of the last call.
|
||||
func (b *MessageQueueTriggerSpecApplyConfiguration) WithPodSpec(value apicorev1.PodSpec) *MessageQueueTriggerSpecApplyConfiguration {
|
||||
b.PodSpec = &value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,219 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// PackageApplyConfiguration represents an declarative configuration of the Package type for use
|
||||
// with apply.
|
||||
type PackageApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
Spec *PackageSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
Status *PackageStatusApplyConfiguration `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// Package constructs an declarative configuration of the Package type for use with
|
||||
// apply.
|
||||
func Package(name, namespace string) *PackageApplyConfiguration {
|
||||
b := &PackageApplyConfiguration{}
|
||||
b.WithName(name)
|
||||
b.WithNamespace(namespace)
|
||||
b.WithKind("Package")
|
||||
b.WithAPIVersion("fission.io/v1")
|
||||
return b
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
func (b *PackageApplyConfiguration) WithKind(value string) *PackageApplyConfiguration {
|
||||
b.Kind = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the APIVersion field is set to the value of the last call.
|
||||
func (b *PackageApplyConfiguration) WithAPIVersion(value string) *PackageApplyConfiguration {
|
||||
b.APIVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *PackageApplyConfiguration) WithName(value string) *PackageApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the GenerateName field is set to the value of the last call.
|
||||
func (b *PackageApplyConfiguration) WithGenerateName(value string) *PackageApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.GenerateName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNamespace sets the Namespace field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Namespace field is set to the value of the last call.
|
||||
func (b *PackageApplyConfiguration) WithNamespace(value string) *PackageApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Namespace = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUID sets the UID field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the UID field is set to the value of the last call.
|
||||
func (b *PackageApplyConfiguration) WithUID(value types.UID) *PackageApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.UID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ResourceVersion field is set to the value of the last call.
|
||||
func (b *PackageApplyConfiguration) WithResourceVersion(value string) *PackageApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ResourceVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGeneration sets the Generation field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Generation field is set to the value of the last call.
|
||||
func (b *PackageApplyConfiguration) WithGeneration(value int64) *PackageApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Generation = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
|
||||
func (b *PackageApplyConfiguration) WithCreationTimestamp(value metav1.Time) *PackageApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.CreationTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
|
||||
func (b *PackageApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *PackageApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
|
||||
func (b *PackageApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *PackageApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionGracePeriodSeconds = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabels puts the entries into the Labels field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Labels field,
|
||||
// overwriting an existing map entries in Labels field with the same key.
|
||||
func (b *PackageApplyConfiguration) WithLabels(entries map[string]string) *PackageApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Labels == nil && len(entries) > 0 {
|
||||
b.Labels = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Labels[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Annotations field,
|
||||
// overwriting an existing map entries in Annotations field with the same key.
|
||||
func (b *PackageApplyConfiguration) WithAnnotations(entries map[string]string) *PackageApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Annotations == nil && len(entries) > 0 {
|
||||
b.Annotations = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Annotations[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
|
||||
func (b *PackageApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *PackageApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithOwnerReferences")
|
||||
}
|
||||
b.OwnerReferences = append(b.OwnerReferences, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Finalizers field.
|
||||
func (b *PackageApplyConfiguration) WithFinalizers(values ...string) *PackageApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
b.Finalizers = append(b.Finalizers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (b *PackageApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
|
||||
if b.ObjectMetaApplyConfiguration == nil {
|
||||
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
|
||||
}
|
||||
}
|
||||
|
||||
// WithSpec sets the Spec field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Spec field is set to the value of the last call.
|
||||
func (b *PackageApplyConfiguration) WithSpec(value *PackageSpecApplyConfiguration) *PackageApplyConfiguration {
|
||||
b.Spec = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithStatus sets the Status field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Status field is set to the value of the last call.
|
||||
func (b *PackageApplyConfiguration) WithStatus(value *PackageStatusApplyConfiguration) *PackageApplyConfiguration {
|
||||
b.Status = value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// PackageRefApplyConfiguration represents an declarative configuration of the PackageRef type for use
|
||||
// with apply.
|
||||
type PackageRefApplyConfiguration struct {
|
||||
Namespace *string `json:"namespace,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
ResourceVersion *string `json:"resourceversion,omitempty"`
|
||||
}
|
||||
|
||||
// PackageRefApplyConfiguration constructs an declarative configuration of the PackageRef type for use with
|
||||
// apply.
|
||||
func PackageRef() *PackageRefApplyConfiguration {
|
||||
return &PackageRefApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithNamespace sets the Namespace field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Namespace field is set to the value of the last call.
|
||||
func (b *PackageRefApplyConfiguration) WithNamespace(value string) *PackageRefApplyConfiguration {
|
||||
b.Namespace = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *PackageRefApplyConfiguration) WithName(value string) *PackageRefApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ResourceVersion field is set to the value of the last call.
|
||||
func (b *PackageRefApplyConfiguration) WithResourceVersion(value string) *PackageRefApplyConfiguration {
|
||||
b.ResourceVersion = &value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// PackageSpecApplyConfiguration represents an declarative configuration of the PackageSpec type for use
|
||||
// with apply.
|
||||
type PackageSpecApplyConfiguration struct {
|
||||
Environment *EnvironmentReferenceApplyConfiguration `json:"environment,omitempty"`
|
||||
Source *ArchiveApplyConfiguration `json:"source,omitempty"`
|
||||
Deployment *ArchiveApplyConfiguration `json:"deployment,omitempty"`
|
||||
BuildCommand *string `json:"buildcmd,omitempty"`
|
||||
}
|
||||
|
||||
// PackageSpecApplyConfiguration constructs an declarative configuration of the PackageSpec type for use with
|
||||
// apply.
|
||||
func PackageSpec() *PackageSpecApplyConfiguration {
|
||||
return &PackageSpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithEnvironment sets the Environment field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Environment field is set to the value of the last call.
|
||||
func (b *PackageSpecApplyConfiguration) WithEnvironment(value *EnvironmentReferenceApplyConfiguration) *PackageSpecApplyConfiguration {
|
||||
b.Environment = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSource sets the Source field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Source field is set to the value of the last call.
|
||||
func (b *PackageSpecApplyConfiguration) WithSource(value *ArchiveApplyConfiguration) *PackageSpecApplyConfiguration {
|
||||
b.Source = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeployment sets the Deployment field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Deployment field is set to the value of the last call.
|
||||
func (b *PackageSpecApplyConfiguration) WithDeployment(value *ArchiveApplyConfiguration) *PackageSpecApplyConfiguration {
|
||||
b.Deployment = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithBuildCommand sets the BuildCommand field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the BuildCommand field is set to the value of the last call.
|
||||
func (b *PackageSpecApplyConfiguration) WithBuildCommand(value string) *PackageSpecApplyConfiguration {
|
||||
b.BuildCommand = &value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// PackageStatusApplyConfiguration represents an declarative configuration of the PackageStatus type for use
|
||||
// with apply.
|
||||
type PackageStatusApplyConfiguration struct {
|
||||
BuildStatus *v1.BuildStatus `json:"buildstatus,omitempty"`
|
||||
BuildLog *string `json:"buildlog,omitempty"`
|
||||
LastUpdateTimestamp *metav1.Time `json:"lastUpdateTimestamp,omitempty"`
|
||||
}
|
||||
|
||||
// PackageStatusApplyConfiguration constructs an declarative configuration of the PackageStatus type for use with
|
||||
// apply.
|
||||
func PackageStatus() *PackageStatusApplyConfiguration {
|
||||
return &PackageStatusApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithBuildStatus sets the BuildStatus field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the BuildStatus field is set to the value of the last call.
|
||||
func (b *PackageStatusApplyConfiguration) WithBuildStatus(value v1.BuildStatus) *PackageStatusApplyConfiguration {
|
||||
b.BuildStatus = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithBuildLog sets the BuildLog field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the BuildLog field is set to the value of the last call.
|
||||
func (b *PackageStatusApplyConfiguration) WithBuildLog(value string) *PackageStatusApplyConfiguration {
|
||||
b.BuildLog = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLastUpdateTimestamp sets the LastUpdateTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the LastUpdateTimestamp field is set to the value of the last call.
|
||||
func (b *PackageStatusApplyConfiguration) WithLastUpdateTimestamp(value metav1.Time) *PackageStatusApplyConfiguration {
|
||||
b.LastUpdateTimestamp = &value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// RuntimeApplyConfiguration represents an declarative configuration of the Runtime type for use
|
||||
// with apply.
|
||||
type RuntimeApplyConfiguration struct {
|
||||
Image *string `json:"image,omitempty"`
|
||||
Container *v1.Container `json:"container,omitempty"`
|
||||
PodSpec *v1.PodSpec `json:"podspec,omitempty"`
|
||||
}
|
||||
|
||||
// RuntimeApplyConfiguration constructs an declarative configuration of the Runtime type for use with
|
||||
// apply.
|
||||
func Runtime() *RuntimeApplyConfiguration {
|
||||
return &RuntimeApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithImage sets the Image field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Image field is set to the value of the last call.
|
||||
func (b *RuntimeApplyConfiguration) WithImage(value string) *RuntimeApplyConfiguration {
|
||||
b.Image = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithContainer sets the Container field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Container field is set to the value of the last call.
|
||||
func (b *RuntimeApplyConfiguration) WithContainer(value v1.Container) *RuntimeApplyConfiguration {
|
||||
b.Container = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPodSpec sets the PodSpec field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the PodSpec field is set to the value of the last call.
|
||||
func (b *RuntimeApplyConfiguration) WithPodSpec(value v1.PodSpec) *RuntimeApplyConfiguration {
|
||||
b.PodSpec = &value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// SecretReferenceApplyConfiguration represents an declarative configuration of the SecretReference type for use
|
||||
// with apply.
|
||||
type SecretReferenceApplyConfiguration struct {
|
||||
Namespace *string `json:"namespace,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
}
|
||||
|
||||
// SecretReferenceApplyConfiguration constructs an declarative configuration of the SecretReference type for use with
|
||||
// apply.
|
||||
func SecretReference() *SecretReferenceApplyConfiguration {
|
||||
return &SecretReferenceApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithNamespace sets the Namespace field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Namespace field is set to the value of the last call.
|
||||
func (b *SecretReferenceApplyConfiguration) WithNamespace(value string) *SecretReferenceApplyConfiguration {
|
||||
b.Namespace = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *SecretReferenceApplyConfiguration) WithName(value string) *SecretReferenceApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,210 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// TimeTriggerApplyConfiguration represents an declarative configuration of the TimeTrigger type for use
|
||||
// with apply.
|
||||
type TimeTriggerApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
Spec *TimeTriggerSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
// TimeTrigger constructs an declarative configuration of the TimeTrigger type for use with
|
||||
// apply.
|
||||
func TimeTrigger(name, namespace string) *TimeTriggerApplyConfiguration {
|
||||
b := &TimeTriggerApplyConfiguration{}
|
||||
b.WithName(name)
|
||||
b.WithNamespace(namespace)
|
||||
b.WithKind("TimeTrigger")
|
||||
b.WithAPIVersion("fission.io/v1")
|
||||
return b
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
func (b *TimeTriggerApplyConfiguration) WithKind(value string) *TimeTriggerApplyConfiguration {
|
||||
b.Kind = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the APIVersion field is set to the value of the last call.
|
||||
func (b *TimeTriggerApplyConfiguration) WithAPIVersion(value string) *TimeTriggerApplyConfiguration {
|
||||
b.APIVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *TimeTriggerApplyConfiguration) WithName(value string) *TimeTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the GenerateName field is set to the value of the last call.
|
||||
func (b *TimeTriggerApplyConfiguration) WithGenerateName(value string) *TimeTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.GenerateName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithNamespace sets the Namespace field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Namespace field is set to the value of the last call.
|
||||
func (b *TimeTriggerApplyConfiguration) WithNamespace(value string) *TimeTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Namespace = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUID sets the UID field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the UID field is set to the value of the last call.
|
||||
func (b *TimeTriggerApplyConfiguration) WithUID(value types.UID) *TimeTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.UID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ResourceVersion field is set to the value of the last call.
|
||||
func (b *TimeTriggerApplyConfiguration) WithResourceVersion(value string) *TimeTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ResourceVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGeneration sets the Generation field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Generation field is set to the value of the last call.
|
||||
func (b *TimeTriggerApplyConfiguration) WithGeneration(value int64) *TimeTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Generation = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
|
||||
func (b *TimeTriggerApplyConfiguration) WithCreationTimestamp(value metav1.Time) *TimeTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.CreationTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
|
||||
func (b *TimeTriggerApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *TimeTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
|
||||
func (b *TimeTriggerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *TimeTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionGracePeriodSeconds = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLabels puts the entries into the Labels field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Labels field,
|
||||
// overwriting an existing map entries in Labels field with the same key.
|
||||
func (b *TimeTriggerApplyConfiguration) WithLabels(entries map[string]string) *TimeTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Labels == nil && len(entries) > 0 {
|
||||
b.Labels = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Labels[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the Annotations field,
|
||||
// overwriting an existing map entries in Annotations field with the same key.
|
||||
func (b *TimeTriggerApplyConfiguration) WithAnnotations(entries map[string]string) *TimeTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Annotations == nil && len(entries) > 0 {
|
||||
b.Annotations = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Annotations[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
|
||||
func (b *TimeTriggerApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *TimeTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithOwnerReferences")
|
||||
}
|
||||
b.OwnerReferences = append(b.OwnerReferences, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Finalizers field.
|
||||
func (b *TimeTriggerApplyConfiguration) WithFinalizers(values ...string) *TimeTriggerApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
b.Finalizers = append(b.Finalizers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (b *TimeTriggerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
|
||||
if b.ObjectMetaApplyConfiguration == nil {
|
||||
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
|
||||
}
|
||||
}
|
||||
|
||||
// WithSpec sets the Spec field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Spec field is set to the value of the last call.
|
||||
func (b *TimeTriggerApplyConfiguration) WithSpec(value *TimeTriggerSpecApplyConfiguration) *TimeTriggerApplyConfiguration {
|
||||
b.Spec = value
|
||||
return b
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
)
|
||||
|
||||
// TimeTriggerSpecApplyConfiguration represents an declarative configuration of the TimeTriggerSpec type for use
|
||||
// with apply.
|
||||
type TimeTriggerSpecApplyConfiguration struct {
|
||||
Cron *string `json:"cron,omitempty"`
|
||||
*FunctionReferenceApplyConfiguration `json:"functionref,omitempty"`
|
||||
}
|
||||
|
||||
// TimeTriggerSpecApplyConfiguration constructs an declarative configuration of the TimeTriggerSpec type for use with
|
||||
// apply.
|
||||
func TimeTriggerSpec() *TimeTriggerSpecApplyConfiguration {
|
||||
return &TimeTriggerSpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithCron sets the Cron field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Cron field is set to the value of the last call.
|
||||
func (b *TimeTriggerSpecApplyConfiguration) WithCron(value string) *TimeTriggerSpecApplyConfiguration {
|
||||
b.Cron = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithType sets the Type field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Type field is set to the value of the last call.
|
||||
func (b *TimeTriggerSpecApplyConfiguration) WithType(value corev1.FunctionReferenceType) *TimeTriggerSpecApplyConfiguration {
|
||||
b.ensureFunctionReferenceApplyConfigurationExists()
|
||||
b.Type = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithName sets the Name field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *TimeTriggerSpecApplyConfiguration) WithName(value string) *TimeTriggerSpecApplyConfiguration {
|
||||
b.ensureFunctionReferenceApplyConfigurationExists()
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFunctionWeights puts the entries into the FunctionWeights field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, the entries provided by each call will be put on the FunctionWeights field,
|
||||
// overwriting an existing map entries in FunctionWeights field with the same key.
|
||||
func (b *TimeTriggerSpecApplyConfiguration) WithFunctionWeights(entries map[string]int) *TimeTriggerSpecApplyConfiguration {
|
||||
b.ensureFunctionReferenceApplyConfigurationExists()
|
||||
if b.FunctionWeights == nil && len(entries) > 0 {
|
||||
b.FunctionWeights = make(map[string]int, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.FunctionWeights[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (b *TimeTriggerSpecApplyConfiguration) ensureFunctionReferenceApplyConfigurationExists() {
|
||||
if b.FunctionReferenceApplyConfiguration == nil {
|
||||
b.FunctionReferenceApplyConfiguration = &FunctionReferenceApplyConfiguration{}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sync"
|
||||
|
||||
typed "sigs.k8s.io/structured-merge-diff/v4/typed"
|
||||
)
|
||||
|
||||
func Parser() *typed.Parser {
|
||||
parserOnce.Do(func() {
|
||||
var err error
|
||||
parser, err = typed.NewParser(schemaYAML)
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("Failed to parse schema: %v", err))
|
||||
}
|
||||
})
|
||||
return parser
|
||||
}
|
||||
|
||||
var parserOnce sync.Once
|
||||
var parser *typed.Parser
|
||||
var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: __untyped_atomic_
|
||||
scalar: untyped
|
||||
list:
|
||||
elementType:
|
||||
namedType: __untyped_atomic_
|
||||
elementRelationship: atomic
|
||||
map:
|
||||
elementType:
|
||||
namedType: __untyped_atomic_
|
||||
elementRelationship: atomic
|
||||
- name: __untyped_deduced_
|
||||
scalar: untyped
|
||||
list:
|
||||
elementType:
|
||||
namedType: __untyped_atomic_
|
||||
elementRelationship: atomic
|
||||
map:
|
||||
elementType:
|
||||
namedType: __untyped_deduced_
|
||||
elementRelationship: separable
|
||||
`)
|
||||
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package applyconfiguration
|
||||
|
||||
import (
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
corev1 "github.com/fission/fission/pkg/generated/applyconfiguration/core/v1"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
)
|
||||
|
||||
// ForKind returns an apply configuration type for the given GroupVersionKind, or nil if no
|
||||
// apply configuration type exists for the given GroupVersionKind.
|
||||
func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
switch kind {
|
||||
// Group=fission.io, Version=v1
|
||||
case v1.SchemeGroupVersion.WithKind("Archive"):
|
||||
return &corev1.ArchiveApplyConfiguration{}
|
||||
case v1.SchemeGroupVersion.WithKind("Builder"):
|
||||
return &corev1.BuilderApplyConfiguration{}
|
||||
case v1.SchemeGroupVersion.WithKind("CanaryConfig"):
|
||||
return &corev1.CanaryConfigApplyConfiguration{}
|
||||
case v1.SchemeGroupVersion.WithKind("CanaryConfigSpec"):
|
||||
return &corev1.CanaryConfigSpecApplyConfiguration{}
|
||||
case v1.SchemeGroupVersion.WithKind("CanaryConfigStatus"):
|
||||
return &corev1.CanaryConfigStatusApplyConfiguration{}
|
||||
case v1.SchemeGroupVersion.WithKind("Checksum"):
|
||||
return &corev1.ChecksumApplyConfiguration{}
|
||||
case v1.SchemeGroupVersion.WithKind("ConfigMapReference"):
|
||||
return &corev1.ConfigMapReferenceApplyConfiguration{}
|
||||
case v1.SchemeGroupVersion.WithKind("Environment"):
|
||||
return &corev1.EnvironmentApplyConfiguration{}
|
||||
case v1.SchemeGroupVersion.WithKind("EnvironmentReference"):
|
||||
return &corev1.EnvironmentReferenceApplyConfiguration{}
|
||||
case v1.SchemeGroupVersion.WithKind("EnvironmentSpec"):
|
||||
return &corev1.EnvironmentSpecApplyConfiguration{}
|
||||
case v1.SchemeGroupVersion.WithKind("ExecutionStrategy"):
|
||||
return &corev1.ExecutionStrategyApplyConfiguration{}
|
||||
case v1.SchemeGroupVersion.WithKind("Function"):
|
||||
return &corev1.FunctionApplyConfiguration{}
|
||||
case v1.SchemeGroupVersion.WithKind("FunctionPackageRef"):
|
||||
return &corev1.FunctionPackageRefApplyConfiguration{}
|
||||
case v1.SchemeGroupVersion.WithKind("FunctionReference"):
|
||||
return &corev1.FunctionReferenceApplyConfiguration{}
|
||||
case v1.SchemeGroupVersion.WithKind("FunctionSpec"):
|
||||
return &corev1.FunctionSpecApplyConfiguration{}
|
||||
case v1.SchemeGroupVersion.WithKind("HTTPTrigger"):
|
||||
return &corev1.HTTPTriggerApplyConfiguration{}
|
||||
case v1.SchemeGroupVersion.WithKind("HTTPTriggerSpec"):
|
||||
return &corev1.HTTPTriggerSpecApplyConfiguration{}
|
||||
case v1.SchemeGroupVersion.WithKind("IngressConfig"):
|
||||
return &corev1.IngressConfigApplyConfiguration{}
|
||||
case v1.SchemeGroupVersion.WithKind("InvokeStrategy"):
|
||||
return &corev1.InvokeStrategyApplyConfiguration{}
|
||||
case v1.SchemeGroupVersion.WithKind("KubernetesWatchTrigger"):
|
||||
return &corev1.KubernetesWatchTriggerApplyConfiguration{}
|
||||
case v1.SchemeGroupVersion.WithKind("KubernetesWatchTriggerSpec"):
|
||||
return &corev1.KubernetesWatchTriggerSpecApplyConfiguration{}
|
||||
case v1.SchemeGroupVersion.WithKind("MessageQueueTrigger"):
|
||||
return &corev1.MessageQueueTriggerApplyConfiguration{}
|
||||
case v1.SchemeGroupVersion.WithKind("MessageQueueTriggerSpec"):
|
||||
return &corev1.MessageQueueTriggerSpecApplyConfiguration{}
|
||||
case v1.SchemeGroupVersion.WithKind("Package"):
|
||||
return &corev1.PackageApplyConfiguration{}
|
||||
case v1.SchemeGroupVersion.WithKind("PackageRef"):
|
||||
return &corev1.PackageRefApplyConfiguration{}
|
||||
case v1.SchemeGroupVersion.WithKind("PackageSpec"):
|
||||
return &corev1.PackageSpecApplyConfiguration{}
|
||||
case v1.SchemeGroupVersion.WithKind("PackageStatus"):
|
||||
return &corev1.PackageStatusApplyConfiguration{}
|
||||
case v1.SchemeGroupVersion.WithKind("Runtime"):
|
||||
return &corev1.RuntimeApplyConfiguration{}
|
||||
case v1.SchemeGroupVersion.WithKind("SecretReference"):
|
||||
return &corev1.SecretReferenceApplyConfiguration{}
|
||||
case v1.SchemeGroupVersion.WithKind("TimeTrigger"):
|
||||
return &corev1.TimeTriggerApplyConfiguration{}
|
||||
case v1.SchemeGroupVersion.WithKind("TimeTriggerSpec"):
|
||||
return &corev1.TimeTriggerSpecApplyConfiguration{}
|
||||
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
/*
|
||||
Copyright The Fission Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// This package has the automatically generated clientset.
|
||||
package versioned
|
||||
@@ -20,9 +20,12 @@ package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
corev1 "github.com/fission/fission/pkg/generated/applyconfiguration/core/v1"
|
||||
scheme "github.com/fission/fission/pkg/generated/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -47,6 +50,8 @@ type CanaryConfigInterface interface {
|
||||
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)
|
||||
Apply(ctx context.Context, _canaryConfig *corev1.CanaryConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.CanaryConfig, err error)
|
||||
ApplyStatus(ctx context.Context, _canaryConfig *corev1.CanaryConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.CanaryConfig, err error)
|
||||
CanaryConfigExpansion
|
||||
}
|
||||
|
||||
@@ -193,3 +198,59 @@ func (c *canaryConfigs) Patch(ctx context.Context, name string, pt types.PatchTy
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied canaryConfig.
|
||||
func (c *canaryConfigs) Apply(ctx context.Context, _canaryConfig *corev1.CanaryConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.CanaryConfig, err error) {
|
||||
if _canaryConfig == nil {
|
||||
return nil, fmt.Errorf("_canaryConfig provided to Apply must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(_canaryConfig)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := _canaryConfig.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("_canaryConfig.Name must be provided to Apply")
|
||||
}
|
||||
result = &v1.CanaryConfig{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Namespace(c.ns).
|
||||
Resource("canaryconfigs").
|
||||
Name(*name).
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// ApplyStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
|
||||
func (c *canaryConfigs) ApplyStatus(ctx context.Context, _canaryConfig *corev1.CanaryConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.CanaryConfig, err error) {
|
||||
if _canaryConfig == nil {
|
||||
return nil, fmt.Errorf("_canaryConfig provided to Apply must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(_canaryConfig)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
name := _canaryConfig.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("_canaryConfig.Name must be provided to Apply")
|
||||
}
|
||||
|
||||
result = &v1.CanaryConfig{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Namespace(c.ns).
|
||||
Resource("canaryconfigs").
|
||||
Name(*name).
|
||||
SubResource("status").
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -20,9 +20,12 @@ package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
corev1 "github.com/fission/fission/pkg/generated/applyconfiguration/core/v1"
|
||||
scheme "github.com/fission/fission/pkg/generated/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -46,6 +49,7 @@ type EnvironmentInterface interface {
|
||||
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)
|
||||
Apply(ctx context.Context, _environment *corev1.EnvironmentApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Environment, err error)
|
||||
EnvironmentExpansion
|
||||
}
|
||||
|
||||
@@ -176,3 +180,29 @@ func (c *environments) Patch(ctx context.Context, name string, pt types.PatchTyp
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied environment.
|
||||
func (c *environments) Apply(ctx context.Context, _environment *corev1.EnvironmentApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Environment, err error) {
|
||||
if _environment == nil {
|
||||
return nil, fmt.Errorf("_environment provided to Apply must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(_environment)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := _environment.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("_environment.Name must be provided to Apply")
|
||||
}
|
||||
result = &v1.Environment{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Namespace(c.ns).
|
||||
Resource("environments").
|
||||
Name(*name).
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -20,11 +20,13 @@ package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
corev1 "github.com/fission/fission/pkg/generated/applyconfiguration/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
@@ -36,25 +38,25 @@ type FakeCanaryConfigs struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var canaryconfigsResource = schema.GroupVersionResource{Group: "fission.io", Version: "v1", Resource: "canaryconfigs"}
|
||||
var canaryconfigsResource = v1.SchemeGroupVersion.WithResource("canaryconfigs")
|
||||
|
||||
var canaryconfigsKind = schema.GroupVersionKind{Group: "fission.io", Version: "v1", Kind: "CanaryConfig"}
|
||||
var canaryconfigsKind = v1.SchemeGroupVersion.WithKind("CanaryConfig")
|
||||
|
||||
// Get takes name of the _canaryConfig, and returns the corresponding canaryConfig object, and an error if there is any.
|
||||
func (c *FakeCanaryConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.CanaryConfig, err error) {
|
||||
func (c *FakeCanaryConfigs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.CanaryConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(canaryconfigsResource, c.ns, name), &corev1.CanaryConfig{})
|
||||
Invokes(testing.NewGetAction(canaryconfigsResource, c.ns, name), &v1.CanaryConfig{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.CanaryConfig), err
|
||||
return obj.(*v1.CanaryConfig), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of CanaryConfigs that match those selectors.
|
||||
func (c *FakeCanaryConfigs) List(ctx context.Context, opts v1.ListOptions) (result *corev1.CanaryConfigList, err error) {
|
||||
func (c *FakeCanaryConfigs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.CanaryConfigList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(canaryconfigsResource, canaryconfigsKind, c.ns, opts), &corev1.CanaryConfigList{})
|
||||
Invokes(testing.NewListAction(canaryconfigsResource, canaryconfigsKind, c.ns, opts), &v1.CanaryConfigList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@@ -64,8 +66,8 @@ func (c *FakeCanaryConfigs) List(ctx context.Context, opts v1.ListOptions) (resu
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &corev1.CanaryConfigList{ListMeta: obj.(*corev1.CanaryConfigList).ListMeta}
|
||||
for _, item := range obj.(*corev1.CanaryConfigList).Items {
|
||||
list := &v1.CanaryConfigList{ListMeta: obj.(*v1.CanaryConfigList).ListMeta}
|
||||
for _, item := range obj.(*v1.CanaryConfigList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
@@ -74,69 +76,114 @@ func (c *FakeCanaryConfigs) List(ctx context.Context, opts v1.ListOptions) (resu
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested canaryConfigs.
|
||||
func (c *FakeCanaryConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakeCanaryConfigs) Watch(ctx context.Context, opts metav1.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(ctx context.Context, _canaryConfig *corev1.CanaryConfig, opts v1.CreateOptions) (result *corev1.CanaryConfig, err error) {
|
||||
func (c *FakeCanaryConfigs) Create(ctx context.Context, _canaryConfig *v1.CanaryConfig, opts metav1.CreateOptions) (result *v1.CanaryConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(canaryconfigsResource, c.ns, _canaryConfig), &corev1.CanaryConfig{})
|
||||
Invokes(testing.NewCreateAction(canaryconfigsResource, c.ns, _canaryConfig), &v1.CanaryConfig{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.CanaryConfig), err
|
||||
return obj.(*v1.CanaryConfig), err
|
||||
}
|
||||
|
||||
// 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(ctx context.Context, _canaryConfig *corev1.CanaryConfig, opts v1.UpdateOptions) (result *corev1.CanaryConfig, err error) {
|
||||
func (c *FakeCanaryConfigs) Update(ctx context.Context, _canaryConfig *v1.CanaryConfig, opts metav1.UpdateOptions) (result *v1.CanaryConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(canaryconfigsResource, c.ns, _canaryConfig), &corev1.CanaryConfig{})
|
||||
Invokes(testing.NewUpdateAction(canaryconfigsResource, c.ns, _canaryConfig), &v1.CanaryConfig{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.CanaryConfig), err
|
||||
return obj.(*v1.CanaryConfig), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeCanaryConfigs) UpdateStatus(ctx context.Context, _canaryConfig *corev1.CanaryConfig, opts v1.UpdateOptions) (*corev1.CanaryConfig, error) {
|
||||
func (c *FakeCanaryConfigs) UpdateStatus(ctx context.Context, _canaryConfig *v1.CanaryConfig, opts metav1.UpdateOptions) (*v1.CanaryConfig, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(canaryconfigsResource, "status", c.ns, _canaryConfig), &corev1.CanaryConfig{})
|
||||
Invokes(testing.NewUpdateSubresourceAction(canaryconfigsResource, "status", c.ns, _canaryConfig), &v1.CanaryConfig{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.CanaryConfig), err
|
||||
return obj.(*v1.CanaryConfig), err
|
||||
}
|
||||
|
||||
// Delete takes name of the _canaryConfig and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeCanaryConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
func (c *FakeCanaryConfigs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(canaryconfigsResource, c.ns, name, opts), &corev1.CanaryConfig{})
|
||||
Invokes(testing.NewDeleteActionWithOptions(canaryconfigsResource, c.ns, name, opts), &v1.CanaryConfig{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeCanaryConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
func (c *FakeCanaryConfigs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(canaryconfigsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.CanaryConfigList{})
|
||||
_, err := c.Fake.Invokes(action, &v1.CanaryConfigList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched canaryConfig.
|
||||
func (c *FakeCanaryConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.CanaryConfig, err error) {
|
||||
func (c *FakeCanaryConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CanaryConfig, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(canaryconfigsResource, c.ns, name, pt, data, subresources...), &corev1.CanaryConfig{})
|
||||
Invokes(testing.NewPatchSubresourceAction(canaryconfigsResource, c.ns, name, pt, data, subresources...), &v1.CanaryConfig{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.CanaryConfig), err
|
||||
return obj.(*v1.CanaryConfig), err
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied canaryConfig.
|
||||
func (c *FakeCanaryConfigs) Apply(ctx context.Context, _canaryConfig *corev1.CanaryConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.CanaryConfig, err error) {
|
||||
if _canaryConfig == nil {
|
||||
return nil, fmt.Errorf("_canaryConfig provided to Apply must not be nil")
|
||||
}
|
||||
data, err := json.Marshal(_canaryConfig)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := _canaryConfig.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("_canaryConfig.Name must be provided to Apply")
|
||||
}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(canaryconfigsResource, c.ns, *name, types.ApplyPatchType, data), &v1.CanaryConfig{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.CanaryConfig), err
|
||||
}
|
||||
|
||||
// ApplyStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
|
||||
func (c *FakeCanaryConfigs) ApplyStatus(ctx context.Context, _canaryConfig *corev1.CanaryConfigApplyConfiguration, opts metav1.ApplyOptions) (result *v1.CanaryConfig, err error) {
|
||||
if _canaryConfig == nil {
|
||||
return nil, fmt.Errorf("_canaryConfig provided to Apply must not be nil")
|
||||
}
|
||||
data, err := json.Marshal(_canaryConfig)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := _canaryConfig.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("_canaryConfig.Name must be provided to Apply")
|
||||
}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(canaryconfigsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1.CanaryConfig{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.CanaryConfig), err
|
||||
}
|
||||
|
||||
@@ -20,11 +20,13 @@ package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
corev1 "github.com/fission/fission/pkg/generated/applyconfiguration/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
@@ -36,25 +38,25 @@ type FakeEnvironments struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var environmentsResource = schema.GroupVersionResource{Group: "fission.io", Version: "v1", Resource: "environments"}
|
||||
var environmentsResource = v1.SchemeGroupVersion.WithResource("environments")
|
||||
|
||||
var environmentsKind = schema.GroupVersionKind{Group: "fission.io", Version: "v1", Kind: "Environment"}
|
||||
var environmentsKind = v1.SchemeGroupVersion.WithKind("Environment")
|
||||
|
||||
// Get takes name of the _environment, and returns the corresponding environment object, and an error if there is any.
|
||||
func (c *FakeEnvironments) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Environment, err error) {
|
||||
func (c *FakeEnvironments) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Environment, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(environmentsResource, c.ns, name), &corev1.Environment{})
|
||||
Invokes(testing.NewGetAction(environmentsResource, c.ns, name), &v1.Environment{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.Environment), err
|
||||
return obj.(*v1.Environment), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Environments that match those selectors.
|
||||
func (c *FakeEnvironments) List(ctx context.Context, opts v1.ListOptions) (result *corev1.EnvironmentList, err error) {
|
||||
func (c *FakeEnvironments) List(ctx context.Context, opts metav1.ListOptions) (result *v1.EnvironmentList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(environmentsResource, environmentsKind, c.ns, opts), &corev1.EnvironmentList{})
|
||||
Invokes(testing.NewListAction(environmentsResource, environmentsKind, c.ns, opts), &v1.EnvironmentList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@@ -64,8 +66,8 @@ func (c *FakeEnvironments) List(ctx context.Context, opts v1.ListOptions) (resul
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &corev1.EnvironmentList{ListMeta: obj.(*corev1.EnvironmentList).ListMeta}
|
||||
for _, item := range obj.(*corev1.EnvironmentList).Items {
|
||||
list := &v1.EnvironmentList{ListMeta: obj.(*v1.EnvironmentList).ListMeta}
|
||||
for _, item := range obj.(*v1.EnvironmentList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
@@ -74,57 +76,79 @@ func (c *FakeEnvironments) List(ctx context.Context, opts v1.ListOptions) (resul
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested environments.
|
||||
func (c *FakeEnvironments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakeEnvironments) Watch(ctx context.Context, opts metav1.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(ctx context.Context, _environment *corev1.Environment, opts v1.CreateOptions) (result *corev1.Environment, err error) {
|
||||
func (c *FakeEnvironments) Create(ctx context.Context, _environment *v1.Environment, opts metav1.CreateOptions) (result *v1.Environment, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(environmentsResource, c.ns, _environment), &corev1.Environment{})
|
||||
Invokes(testing.NewCreateAction(environmentsResource, c.ns, _environment), &v1.Environment{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.Environment), err
|
||||
return obj.(*v1.Environment), err
|
||||
}
|
||||
|
||||
// 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(ctx context.Context, _environment *corev1.Environment, opts v1.UpdateOptions) (result *corev1.Environment, err error) {
|
||||
func (c *FakeEnvironments) Update(ctx context.Context, _environment *v1.Environment, opts metav1.UpdateOptions) (result *v1.Environment, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(environmentsResource, c.ns, _environment), &corev1.Environment{})
|
||||
Invokes(testing.NewUpdateAction(environmentsResource, c.ns, _environment), &v1.Environment{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.Environment), err
|
||||
return obj.(*v1.Environment), err
|
||||
}
|
||||
|
||||
// Delete takes name of the _environment and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeEnvironments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
func (c *FakeEnvironments) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(environmentsResource, c.ns, name, opts), &corev1.Environment{})
|
||||
Invokes(testing.NewDeleteActionWithOptions(environmentsResource, c.ns, name, opts), &v1.Environment{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeEnvironments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
func (c *FakeEnvironments) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(environmentsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.EnvironmentList{})
|
||||
_, err := c.Fake.Invokes(action, &v1.EnvironmentList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched environment.
|
||||
func (c *FakeEnvironments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Environment, err error) {
|
||||
func (c *FakeEnvironments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Environment, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(environmentsResource, c.ns, name, pt, data, subresources...), &corev1.Environment{})
|
||||
Invokes(testing.NewPatchSubresourceAction(environmentsResource, c.ns, name, pt, data, subresources...), &v1.Environment{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.Environment), err
|
||||
return obj.(*v1.Environment), err
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied environment.
|
||||
func (c *FakeEnvironments) Apply(ctx context.Context, _environment *corev1.EnvironmentApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Environment, err error) {
|
||||
if _environment == nil {
|
||||
return nil, fmt.Errorf("_environment provided to Apply must not be nil")
|
||||
}
|
||||
data, err := json.Marshal(_environment)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := _environment.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("_environment.Name must be provided to Apply")
|
||||
}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(environmentsResource, c.ns, *name, types.ApplyPatchType, data), &v1.Environment{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.Environment), err
|
||||
}
|
||||
|
||||
@@ -20,11 +20,13 @@ package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
corev1 "github.com/fission/fission/pkg/generated/applyconfiguration/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
@@ -36,25 +38,25 @@ type FakeFunctions struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var functionsResource = schema.GroupVersionResource{Group: "fission.io", Version: "v1", Resource: "functions"}
|
||||
var functionsResource = v1.SchemeGroupVersion.WithResource("functions")
|
||||
|
||||
var functionsKind = schema.GroupVersionKind{Group: "fission.io", Version: "v1", Kind: "Function"}
|
||||
var functionsKind = v1.SchemeGroupVersion.WithKind("Function")
|
||||
|
||||
// Get takes name of the _function, and returns the corresponding function object, and an error if there is any.
|
||||
func (c *FakeFunctions) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Function, err error) {
|
||||
func (c *FakeFunctions) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Function, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(functionsResource, c.ns, name), &corev1.Function{})
|
||||
Invokes(testing.NewGetAction(functionsResource, c.ns, name), &v1.Function{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.Function), err
|
||||
return obj.(*v1.Function), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Functions that match those selectors.
|
||||
func (c *FakeFunctions) List(ctx context.Context, opts v1.ListOptions) (result *corev1.FunctionList, err error) {
|
||||
func (c *FakeFunctions) List(ctx context.Context, opts metav1.ListOptions) (result *v1.FunctionList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(functionsResource, functionsKind, c.ns, opts), &corev1.FunctionList{})
|
||||
Invokes(testing.NewListAction(functionsResource, functionsKind, c.ns, opts), &v1.FunctionList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@@ -64,8 +66,8 @@ func (c *FakeFunctions) List(ctx context.Context, opts v1.ListOptions) (result *
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &corev1.FunctionList{ListMeta: obj.(*corev1.FunctionList).ListMeta}
|
||||
for _, item := range obj.(*corev1.FunctionList).Items {
|
||||
list := &v1.FunctionList{ListMeta: obj.(*v1.FunctionList).ListMeta}
|
||||
for _, item := range obj.(*v1.FunctionList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
@@ -74,57 +76,79 @@ func (c *FakeFunctions) List(ctx context.Context, opts v1.ListOptions) (result *
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested functions.
|
||||
func (c *FakeFunctions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakeFunctions) Watch(ctx context.Context, opts metav1.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(ctx context.Context, _function *corev1.Function, opts v1.CreateOptions) (result *corev1.Function, err error) {
|
||||
func (c *FakeFunctions) Create(ctx context.Context, _function *v1.Function, opts metav1.CreateOptions) (result *v1.Function, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(functionsResource, c.ns, _function), &corev1.Function{})
|
||||
Invokes(testing.NewCreateAction(functionsResource, c.ns, _function), &v1.Function{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.Function), err
|
||||
return obj.(*v1.Function), err
|
||||
}
|
||||
|
||||
// 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(ctx context.Context, _function *corev1.Function, opts v1.UpdateOptions) (result *corev1.Function, err error) {
|
||||
func (c *FakeFunctions) Update(ctx context.Context, _function *v1.Function, opts metav1.UpdateOptions) (result *v1.Function, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(functionsResource, c.ns, _function), &corev1.Function{})
|
||||
Invokes(testing.NewUpdateAction(functionsResource, c.ns, _function), &v1.Function{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.Function), err
|
||||
return obj.(*v1.Function), err
|
||||
}
|
||||
|
||||
// Delete takes name of the _function and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeFunctions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
func (c *FakeFunctions) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(functionsResource, c.ns, name, opts), &corev1.Function{})
|
||||
Invokes(testing.NewDeleteActionWithOptions(functionsResource, c.ns, name, opts), &v1.Function{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeFunctions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
func (c *FakeFunctions) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(functionsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.FunctionList{})
|
||||
_, err := c.Fake.Invokes(action, &v1.FunctionList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched function.
|
||||
func (c *FakeFunctions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Function, err error) {
|
||||
func (c *FakeFunctions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Function, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(functionsResource, c.ns, name, pt, data, subresources...), &corev1.Function{})
|
||||
Invokes(testing.NewPatchSubresourceAction(functionsResource, c.ns, name, pt, data, subresources...), &v1.Function{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.Function), err
|
||||
return obj.(*v1.Function), err
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied function.
|
||||
func (c *FakeFunctions) Apply(ctx context.Context, _function *corev1.FunctionApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Function, err error) {
|
||||
if _function == nil {
|
||||
return nil, fmt.Errorf("_function provided to Apply must not be nil")
|
||||
}
|
||||
data, err := json.Marshal(_function)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := _function.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("_function.Name must be provided to Apply")
|
||||
}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(functionsResource, c.ns, *name, types.ApplyPatchType, data), &v1.Function{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.Function), err
|
||||
}
|
||||
|
||||
@@ -20,11 +20,13 @@ package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
corev1 "github.com/fission/fission/pkg/generated/applyconfiguration/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
@@ -36,25 +38,25 @@ type FakeHTTPTriggers struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var httptriggersResource = schema.GroupVersionResource{Group: "fission.io", Version: "v1", Resource: "httptriggers"}
|
||||
var httptriggersResource = v1.SchemeGroupVersion.WithResource("httptriggers")
|
||||
|
||||
var httptriggersKind = schema.GroupVersionKind{Group: "fission.io", Version: "v1", Kind: "HTTPTrigger"}
|
||||
var httptriggersKind = v1.SchemeGroupVersion.WithKind("HTTPTrigger")
|
||||
|
||||
// Get takes name of the _hTTPTrigger, and returns the corresponding hTTPTrigger object, and an error if there is any.
|
||||
func (c *FakeHTTPTriggers) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.HTTPTrigger, err error) {
|
||||
func (c *FakeHTTPTriggers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.HTTPTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(httptriggersResource, c.ns, name), &corev1.HTTPTrigger{})
|
||||
Invokes(testing.NewGetAction(httptriggersResource, c.ns, name), &v1.HTTPTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.HTTPTrigger), err
|
||||
return obj.(*v1.HTTPTrigger), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of HTTPTriggers that match those selectors.
|
||||
func (c *FakeHTTPTriggers) List(ctx context.Context, opts v1.ListOptions) (result *corev1.HTTPTriggerList, err error) {
|
||||
func (c *FakeHTTPTriggers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.HTTPTriggerList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(httptriggersResource, httptriggersKind, c.ns, opts), &corev1.HTTPTriggerList{})
|
||||
Invokes(testing.NewListAction(httptriggersResource, httptriggersKind, c.ns, opts), &v1.HTTPTriggerList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@@ -64,8 +66,8 @@ func (c *FakeHTTPTriggers) List(ctx context.Context, opts v1.ListOptions) (resul
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &corev1.HTTPTriggerList{ListMeta: obj.(*corev1.HTTPTriggerList).ListMeta}
|
||||
for _, item := range obj.(*corev1.HTTPTriggerList).Items {
|
||||
list := &v1.HTTPTriggerList{ListMeta: obj.(*v1.HTTPTriggerList).ListMeta}
|
||||
for _, item := range obj.(*v1.HTTPTriggerList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
@@ -74,57 +76,79 @@ func (c *FakeHTTPTriggers) List(ctx context.Context, opts v1.ListOptions) (resul
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested hTTPTriggers.
|
||||
func (c *FakeHTTPTriggers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakeHTTPTriggers) Watch(ctx context.Context, opts metav1.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(ctx context.Context, _hTTPTrigger *corev1.HTTPTrigger, opts v1.CreateOptions) (result *corev1.HTTPTrigger, err error) {
|
||||
func (c *FakeHTTPTriggers) Create(ctx context.Context, _hTTPTrigger *v1.HTTPTrigger, opts metav1.CreateOptions) (result *v1.HTTPTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(httptriggersResource, c.ns, _hTTPTrigger), &corev1.HTTPTrigger{})
|
||||
Invokes(testing.NewCreateAction(httptriggersResource, c.ns, _hTTPTrigger), &v1.HTTPTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.HTTPTrigger), err
|
||||
return obj.(*v1.HTTPTrigger), err
|
||||
}
|
||||
|
||||
// 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(ctx context.Context, _hTTPTrigger *corev1.HTTPTrigger, opts v1.UpdateOptions) (result *corev1.HTTPTrigger, err error) {
|
||||
func (c *FakeHTTPTriggers) Update(ctx context.Context, _hTTPTrigger *v1.HTTPTrigger, opts metav1.UpdateOptions) (result *v1.HTTPTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(httptriggersResource, c.ns, _hTTPTrigger), &corev1.HTTPTrigger{})
|
||||
Invokes(testing.NewUpdateAction(httptriggersResource, c.ns, _hTTPTrigger), &v1.HTTPTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.HTTPTrigger), err
|
||||
return obj.(*v1.HTTPTrigger), err
|
||||
}
|
||||
|
||||
// Delete takes name of the _hTTPTrigger and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeHTTPTriggers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
func (c *FakeHTTPTriggers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(httptriggersResource, c.ns, name, opts), &corev1.HTTPTrigger{})
|
||||
Invokes(testing.NewDeleteActionWithOptions(httptriggersResource, c.ns, name, opts), &v1.HTTPTrigger{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeHTTPTriggers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
func (c *FakeHTTPTriggers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(httptriggersResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.HTTPTriggerList{})
|
||||
_, err := c.Fake.Invokes(action, &v1.HTTPTriggerList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched hTTPTrigger.
|
||||
func (c *FakeHTTPTriggers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.HTTPTrigger, err error) {
|
||||
func (c *FakeHTTPTriggers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.HTTPTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(httptriggersResource, c.ns, name, pt, data, subresources...), &corev1.HTTPTrigger{})
|
||||
Invokes(testing.NewPatchSubresourceAction(httptriggersResource, c.ns, name, pt, data, subresources...), &v1.HTTPTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.HTTPTrigger), err
|
||||
return obj.(*v1.HTTPTrigger), err
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied hTTPTrigger.
|
||||
func (c *FakeHTTPTriggers) Apply(ctx context.Context, _hTTPTrigger *corev1.HTTPTriggerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.HTTPTrigger, err error) {
|
||||
if _hTTPTrigger == nil {
|
||||
return nil, fmt.Errorf("_hTTPTrigger provided to Apply must not be nil")
|
||||
}
|
||||
data, err := json.Marshal(_hTTPTrigger)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := _hTTPTrigger.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("_hTTPTrigger.Name must be provided to Apply")
|
||||
}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(httptriggersResource, c.ns, *name, types.ApplyPatchType, data), &v1.HTTPTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.HTTPTrigger), err
|
||||
}
|
||||
|
||||
+50
-26
@@ -20,11 +20,13 @@ package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
corev1 "github.com/fission/fission/pkg/generated/applyconfiguration/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
@@ -36,25 +38,25 @@ type FakeKubernetesWatchTriggers struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var kuberneteswatchtriggersResource = schema.GroupVersionResource{Group: "fission.io", Version: "v1", Resource: "kuberneteswatchtriggers"}
|
||||
var kuberneteswatchtriggersResource = v1.SchemeGroupVersion.WithResource("kuberneteswatchtriggers")
|
||||
|
||||
var kuberneteswatchtriggersKind = schema.GroupVersionKind{Group: "fission.io", Version: "v1", Kind: "KubernetesWatchTrigger"}
|
||||
var kuberneteswatchtriggersKind = v1.SchemeGroupVersion.WithKind("KubernetesWatchTrigger")
|
||||
|
||||
// Get takes name of the _kubernetesWatchTrigger, and returns the corresponding kubernetesWatchTrigger object, and an error if there is any.
|
||||
func (c *FakeKubernetesWatchTriggers) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.KubernetesWatchTrigger, err error) {
|
||||
func (c *FakeKubernetesWatchTriggers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.KubernetesWatchTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(kuberneteswatchtriggersResource, c.ns, name), &corev1.KubernetesWatchTrigger{})
|
||||
Invokes(testing.NewGetAction(kuberneteswatchtriggersResource, c.ns, name), &v1.KubernetesWatchTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.KubernetesWatchTrigger), err
|
||||
return obj.(*v1.KubernetesWatchTrigger), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of KubernetesWatchTriggers that match those selectors.
|
||||
func (c *FakeKubernetesWatchTriggers) List(ctx context.Context, opts v1.ListOptions) (result *corev1.KubernetesWatchTriggerList, err error) {
|
||||
func (c *FakeKubernetesWatchTriggers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.KubernetesWatchTriggerList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(kuberneteswatchtriggersResource, kuberneteswatchtriggersKind, c.ns, opts), &corev1.KubernetesWatchTriggerList{})
|
||||
Invokes(testing.NewListAction(kuberneteswatchtriggersResource, kuberneteswatchtriggersKind, c.ns, opts), &v1.KubernetesWatchTriggerList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@@ -64,8 +66,8 @@ func (c *FakeKubernetesWatchTriggers) List(ctx context.Context, opts v1.ListOpti
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &corev1.KubernetesWatchTriggerList{ListMeta: obj.(*corev1.KubernetesWatchTriggerList).ListMeta}
|
||||
for _, item := range obj.(*corev1.KubernetesWatchTriggerList).Items {
|
||||
list := &v1.KubernetesWatchTriggerList{ListMeta: obj.(*v1.KubernetesWatchTriggerList).ListMeta}
|
||||
for _, item := range obj.(*v1.KubernetesWatchTriggerList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
@@ -74,57 +76,79 @@ func (c *FakeKubernetesWatchTriggers) List(ctx context.Context, opts v1.ListOpti
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested kubernetesWatchTriggers.
|
||||
func (c *FakeKubernetesWatchTriggers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakeKubernetesWatchTriggers) Watch(ctx context.Context, opts metav1.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(ctx context.Context, _kubernetesWatchTrigger *corev1.KubernetesWatchTrigger, opts v1.CreateOptions) (result *corev1.KubernetesWatchTrigger, err error) {
|
||||
func (c *FakeKubernetesWatchTriggers) Create(ctx context.Context, _kubernetesWatchTrigger *v1.KubernetesWatchTrigger, opts metav1.CreateOptions) (result *v1.KubernetesWatchTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(kuberneteswatchtriggersResource, c.ns, _kubernetesWatchTrigger), &corev1.KubernetesWatchTrigger{})
|
||||
Invokes(testing.NewCreateAction(kuberneteswatchtriggersResource, c.ns, _kubernetesWatchTrigger), &v1.KubernetesWatchTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.KubernetesWatchTrigger), err
|
||||
return obj.(*v1.KubernetesWatchTrigger), err
|
||||
}
|
||||
|
||||
// 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(ctx context.Context, _kubernetesWatchTrigger *corev1.KubernetesWatchTrigger, opts v1.UpdateOptions) (result *corev1.KubernetesWatchTrigger, err error) {
|
||||
func (c *FakeKubernetesWatchTriggers) Update(ctx context.Context, _kubernetesWatchTrigger *v1.KubernetesWatchTrigger, opts metav1.UpdateOptions) (result *v1.KubernetesWatchTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(kuberneteswatchtriggersResource, c.ns, _kubernetesWatchTrigger), &corev1.KubernetesWatchTrigger{})
|
||||
Invokes(testing.NewUpdateAction(kuberneteswatchtriggersResource, c.ns, _kubernetesWatchTrigger), &v1.KubernetesWatchTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.KubernetesWatchTrigger), err
|
||||
return obj.(*v1.KubernetesWatchTrigger), err
|
||||
}
|
||||
|
||||
// Delete takes name of the _kubernetesWatchTrigger and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeKubernetesWatchTriggers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
func (c *FakeKubernetesWatchTriggers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(kuberneteswatchtriggersResource, c.ns, name, opts), &corev1.KubernetesWatchTrigger{})
|
||||
Invokes(testing.NewDeleteActionWithOptions(kuberneteswatchtriggersResource, c.ns, name, opts), &v1.KubernetesWatchTrigger{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeKubernetesWatchTriggers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
func (c *FakeKubernetesWatchTriggers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(kuberneteswatchtriggersResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.KubernetesWatchTriggerList{})
|
||||
_, err := c.Fake.Invokes(action, &v1.KubernetesWatchTriggerList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched kubernetesWatchTrigger.
|
||||
func (c *FakeKubernetesWatchTriggers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.KubernetesWatchTrigger, err error) {
|
||||
func (c *FakeKubernetesWatchTriggers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.KubernetesWatchTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(kuberneteswatchtriggersResource, c.ns, name, pt, data, subresources...), &corev1.KubernetesWatchTrigger{})
|
||||
Invokes(testing.NewPatchSubresourceAction(kuberneteswatchtriggersResource, c.ns, name, pt, data, subresources...), &v1.KubernetesWatchTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.KubernetesWatchTrigger), err
|
||||
return obj.(*v1.KubernetesWatchTrigger), err
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied kubernetesWatchTrigger.
|
||||
func (c *FakeKubernetesWatchTriggers) Apply(ctx context.Context, _kubernetesWatchTrigger *corev1.KubernetesWatchTriggerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubernetesWatchTrigger, err error) {
|
||||
if _kubernetesWatchTrigger == nil {
|
||||
return nil, fmt.Errorf("_kubernetesWatchTrigger provided to Apply must not be nil")
|
||||
}
|
||||
data, err := json.Marshal(_kubernetesWatchTrigger)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := _kubernetesWatchTrigger.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("_kubernetesWatchTrigger.Name must be provided to Apply")
|
||||
}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(kuberneteswatchtriggersResource, c.ns, *name, types.ApplyPatchType, data), &v1.KubernetesWatchTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.KubernetesWatchTrigger), err
|
||||
}
|
||||
|
||||
@@ -20,11 +20,13 @@ package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
corev1 "github.com/fission/fission/pkg/generated/applyconfiguration/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
@@ -36,25 +38,25 @@ type FakeMessageQueueTriggers struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var messagequeuetriggersResource = schema.GroupVersionResource{Group: "fission.io", Version: "v1", Resource: "messagequeuetriggers"}
|
||||
var messagequeuetriggersResource = v1.SchemeGroupVersion.WithResource("messagequeuetriggers")
|
||||
|
||||
var messagequeuetriggersKind = schema.GroupVersionKind{Group: "fission.io", Version: "v1", Kind: "MessageQueueTrigger"}
|
||||
var messagequeuetriggersKind = v1.SchemeGroupVersion.WithKind("MessageQueueTrigger")
|
||||
|
||||
// Get takes name of the _messageQueueTrigger, and returns the corresponding messageQueueTrigger object, and an error if there is any.
|
||||
func (c *FakeMessageQueueTriggers) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.MessageQueueTrigger, err error) {
|
||||
func (c *FakeMessageQueueTriggers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.MessageQueueTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(messagequeuetriggersResource, c.ns, name), &corev1.MessageQueueTrigger{})
|
||||
Invokes(testing.NewGetAction(messagequeuetriggersResource, c.ns, name), &v1.MessageQueueTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.MessageQueueTrigger), err
|
||||
return obj.(*v1.MessageQueueTrigger), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of MessageQueueTriggers that match those selectors.
|
||||
func (c *FakeMessageQueueTriggers) List(ctx context.Context, opts v1.ListOptions) (result *corev1.MessageQueueTriggerList, err error) {
|
||||
func (c *FakeMessageQueueTriggers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.MessageQueueTriggerList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(messagequeuetriggersResource, messagequeuetriggersKind, c.ns, opts), &corev1.MessageQueueTriggerList{})
|
||||
Invokes(testing.NewListAction(messagequeuetriggersResource, messagequeuetriggersKind, c.ns, opts), &v1.MessageQueueTriggerList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@@ -64,8 +66,8 @@ func (c *FakeMessageQueueTriggers) List(ctx context.Context, opts v1.ListOptions
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &corev1.MessageQueueTriggerList{ListMeta: obj.(*corev1.MessageQueueTriggerList).ListMeta}
|
||||
for _, item := range obj.(*corev1.MessageQueueTriggerList).Items {
|
||||
list := &v1.MessageQueueTriggerList{ListMeta: obj.(*v1.MessageQueueTriggerList).ListMeta}
|
||||
for _, item := range obj.(*v1.MessageQueueTriggerList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
@@ -74,57 +76,79 @@ func (c *FakeMessageQueueTriggers) List(ctx context.Context, opts v1.ListOptions
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested messageQueueTriggers.
|
||||
func (c *FakeMessageQueueTriggers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakeMessageQueueTriggers) Watch(ctx context.Context, opts metav1.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(ctx context.Context, _messageQueueTrigger *corev1.MessageQueueTrigger, opts v1.CreateOptions) (result *corev1.MessageQueueTrigger, err error) {
|
||||
func (c *FakeMessageQueueTriggers) Create(ctx context.Context, _messageQueueTrigger *v1.MessageQueueTrigger, opts metav1.CreateOptions) (result *v1.MessageQueueTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(messagequeuetriggersResource, c.ns, _messageQueueTrigger), &corev1.MessageQueueTrigger{})
|
||||
Invokes(testing.NewCreateAction(messagequeuetriggersResource, c.ns, _messageQueueTrigger), &v1.MessageQueueTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.MessageQueueTrigger), err
|
||||
return obj.(*v1.MessageQueueTrigger), err
|
||||
}
|
||||
|
||||
// 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(ctx context.Context, _messageQueueTrigger *corev1.MessageQueueTrigger, opts v1.UpdateOptions) (result *corev1.MessageQueueTrigger, err error) {
|
||||
func (c *FakeMessageQueueTriggers) Update(ctx context.Context, _messageQueueTrigger *v1.MessageQueueTrigger, opts metav1.UpdateOptions) (result *v1.MessageQueueTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(messagequeuetriggersResource, c.ns, _messageQueueTrigger), &corev1.MessageQueueTrigger{})
|
||||
Invokes(testing.NewUpdateAction(messagequeuetriggersResource, c.ns, _messageQueueTrigger), &v1.MessageQueueTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.MessageQueueTrigger), err
|
||||
return obj.(*v1.MessageQueueTrigger), err
|
||||
}
|
||||
|
||||
// Delete takes name of the _messageQueueTrigger and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeMessageQueueTriggers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
func (c *FakeMessageQueueTriggers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(messagequeuetriggersResource, c.ns, name, opts), &corev1.MessageQueueTrigger{})
|
||||
Invokes(testing.NewDeleteActionWithOptions(messagequeuetriggersResource, c.ns, name, opts), &v1.MessageQueueTrigger{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeMessageQueueTriggers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
func (c *FakeMessageQueueTriggers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(messagequeuetriggersResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.MessageQueueTriggerList{})
|
||||
_, err := c.Fake.Invokes(action, &v1.MessageQueueTriggerList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched messageQueueTrigger.
|
||||
func (c *FakeMessageQueueTriggers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.MessageQueueTrigger, err error) {
|
||||
func (c *FakeMessageQueueTriggers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.MessageQueueTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(messagequeuetriggersResource, c.ns, name, pt, data, subresources...), &corev1.MessageQueueTrigger{})
|
||||
Invokes(testing.NewPatchSubresourceAction(messagequeuetriggersResource, c.ns, name, pt, data, subresources...), &v1.MessageQueueTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.MessageQueueTrigger), err
|
||||
return obj.(*v1.MessageQueueTrigger), err
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied messageQueueTrigger.
|
||||
func (c *FakeMessageQueueTriggers) Apply(ctx context.Context, _messageQueueTrigger *corev1.MessageQueueTriggerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.MessageQueueTrigger, err error) {
|
||||
if _messageQueueTrigger == nil {
|
||||
return nil, fmt.Errorf("_messageQueueTrigger provided to Apply must not be nil")
|
||||
}
|
||||
data, err := json.Marshal(_messageQueueTrigger)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := _messageQueueTrigger.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("_messageQueueTrigger.Name must be provided to Apply")
|
||||
}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(messagequeuetriggersResource, c.ns, *name, types.ApplyPatchType, data), &v1.MessageQueueTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.MessageQueueTrigger), err
|
||||
}
|
||||
|
||||
@@ -20,11 +20,13 @@ package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
corev1 "github.com/fission/fission/pkg/generated/applyconfiguration/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
@@ -36,25 +38,25 @@ type FakePackages struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var packagesResource = schema.GroupVersionResource{Group: "fission.io", Version: "v1", Resource: "packages"}
|
||||
var packagesResource = v1.SchemeGroupVersion.WithResource("packages")
|
||||
|
||||
var packagesKind = schema.GroupVersionKind{Group: "fission.io", Version: "v1", Kind: "Package"}
|
||||
var packagesKind = v1.SchemeGroupVersion.WithKind("Package")
|
||||
|
||||
// Get takes name of the _package, and returns the corresponding package object, and an error if there is any.
|
||||
func (c *FakePackages) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.Package, err error) {
|
||||
func (c *FakePackages) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Package, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(packagesResource, c.ns, name), &corev1.Package{})
|
||||
Invokes(testing.NewGetAction(packagesResource, c.ns, name), &v1.Package{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.Package), err
|
||||
return obj.(*v1.Package), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Packages that match those selectors.
|
||||
func (c *FakePackages) List(ctx context.Context, opts v1.ListOptions) (result *corev1.PackageList, err error) {
|
||||
func (c *FakePackages) List(ctx context.Context, opts metav1.ListOptions) (result *v1.PackageList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(packagesResource, packagesKind, c.ns, opts), &corev1.PackageList{})
|
||||
Invokes(testing.NewListAction(packagesResource, packagesKind, c.ns, opts), &v1.PackageList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@@ -64,8 +66,8 @@ func (c *FakePackages) List(ctx context.Context, opts v1.ListOptions) (result *c
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &corev1.PackageList{ListMeta: obj.(*corev1.PackageList).ListMeta}
|
||||
for _, item := range obj.(*corev1.PackageList).Items {
|
||||
list := &v1.PackageList{ListMeta: obj.(*v1.PackageList).ListMeta}
|
||||
for _, item := range obj.(*v1.PackageList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
@@ -74,69 +76,114 @@ func (c *FakePackages) List(ctx context.Context, opts v1.ListOptions) (result *c
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested packages.
|
||||
func (c *FakePackages) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakePackages) Watch(ctx context.Context, opts metav1.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(ctx context.Context, _package *corev1.Package, opts v1.CreateOptions) (result *corev1.Package, err error) {
|
||||
func (c *FakePackages) Create(ctx context.Context, _package *v1.Package, opts metav1.CreateOptions) (result *v1.Package, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(packagesResource, c.ns, _package), &corev1.Package{})
|
||||
Invokes(testing.NewCreateAction(packagesResource, c.ns, _package), &v1.Package{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.Package), err
|
||||
return obj.(*v1.Package), err
|
||||
}
|
||||
|
||||
// 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(ctx context.Context, _package *corev1.Package, opts v1.UpdateOptions) (result *corev1.Package, err error) {
|
||||
func (c *FakePackages) Update(ctx context.Context, _package *v1.Package, opts metav1.UpdateOptions) (result *v1.Package, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(packagesResource, c.ns, _package), &corev1.Package{})
|
||||
Invokes(testing.NewUpdateAction(packagesResource, c.ns, _package), &v1.Package{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.Package), err
|
||||
return obj.(*v1.Package), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakePackages) UpdateStatus(ctx context.Context, _package *corev1.Package, opts v1.UpdateOptions) (*corev1.Package, error) {
|
||||
func (c *FakePackages) UpdateStatus(ctx context.Context, _package *v1.Package, opts metav1.UpdateOptions) (*v1.Package, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(packagesResource, "status", c.ns, _package), &corev1.Package{})
|
||||
Invokes(testing.NewUpdateSubresourceAction(packagesResource, "status", c.ns, _package), &v1.Package{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.Package), err
|
||||
return obj.(*v1.Package), err
|
||||
}
|
||||
|
||||
// Delete takes name of the _package and deletes it. Returns an error if one occurs.
|
||||
func (c *FakePackages) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
func (c *FakePackages) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(packagesResource, c.ns, name, opts), &corev1.Package{})
|
||||
Invokes(testing.NewDeleteActionWithOptions(packagesResource, c.ns, name, opts), &v1.Package{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakePackages) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
func (c *FakePackages) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(packagesResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.PackageList{})
|
||||
_, err := c.Fake.Invokes(action, &v1.PackageList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched package.
|
||||
func (c *FakePackages) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.Package, err error) {
|
||||
func (c *FakePackages) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Package, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(packagesResource, c.ns, name, pt, data, subresources...), &corev1.Package{})
|
||||
Invokes(testing.NewPatchSubresourceAction(packagesResource, c.ns, name, pt, data, subresources...), &v1.Package{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.Package), err
|
||||
return obj.(*v1.Package), err
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied package.
|
||||
func (c *FakePackages) Apply(ctx context.Context, _package *corev1.PackageApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Package, err error) {
|
||||
if _package == nil {
|
||||
return nil, fmt.Errorf("_package provided to Apply must not be nil")
|
||||
}
|
||||
data, err := json.Marshal(_package)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := _package.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("_package.Name must be provided to Apply")
|
||||
}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(packagesResource, c.ns, *name, types.ApplyPatchType, data), &v1.Package{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.Package), err
|
||||
}
|
||||
|
||||
// ApplyStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
|
||||
func (c *FakePackages) ApplyStatus(ctx context.Context, _package *corev1.PackageApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Package, err error) {
|
||||
if _package == nil {
|
||||
return nil, fmt.Errorf("_package provided to Apply must not be nil")
|
||||
}
|
||||
data, err := json.Marshal(_package)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := _package.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("_package.Name must be provided to Apply")
|
||||
}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(packagesResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1.Package{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.Package), err
|
||||
}
|
||||
|
||||
@@ -20,11 +20,13 @@ package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
|
||||
corev1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
corev1 "github.com/fission/fission/pkg/generated/applyconfiguration/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
@@ -36,25 +38,25 @@ type FakeTimeTriggers struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var timetriggersResource = schema.GroupVersionResource{Group: "fission.io", Version: "v1", Resource: "timetriggers"}
|
||||
var timetriggersResource = v1.SchemeGroupVersion.WithResource("timetriggers")
|
||||
|
||||
var timetriggersKind = schema.GroupVersionKind{Group: "fission.io", Version: "v1", Kind: "TimeTrigger"}
|
||||
var timetriggersKind = v1.SchemeGroupVersion.WithKind("TimeTrigger")
|
||||
|
||||
// Get takes name of the _timeTrigger, and returns the corresponding timeTrigger object, and an error if there is any.
|
||||
func (c *FakeTimeTriggers) Get(ctx context.Context, name string, options v1.GetOptions) (result *corev1.TimeTrigger, err error) {
|
||||
func (c *FakeTimeTriggers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.TimeTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(timetriggersResource, c.ns, name), &corev1.TimeTrigger{})
|
||||
Invokes(testing.NewGetAction(timetriggersResource, c.ns, name), &v1.TimeTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.TimeTrigger), err
|
||||
return obj.(*v1.TimeTrigger), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of TimeTriggers that match those selectors.
|
||||
func (c *FakeTimeTriggers) List(ctx context.Context, opts v1.ListOptions) (result *corev1.TimeTriggerList, err error) {
|
||||
func (c *FakeTimeTriggers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.TimeTriggerList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(timetriggersResource, timetriggersKind, c.ns, opts), &corev1.TimeTriggerList{})
|
||||
Invokes(testing.NewListAction(timetriggersResource, timetriggersKind, c.ns, opts), &v1.TimeTriggerList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@@ -64,8 +66,8 @@ func (c *FakeTimeTriggers) List(ctx context.Context, opts v1.ListOptions) (resul
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &corev1.TimeTriggerList{ListMeta: obj.(*corev1.TimeTriggerList).ListMeta}
|
||||
for _, item := range obj.(*corev1.TimeTriggerList).Items {
|
||||
list := &v1.TimeTriggerList{ListMeta: obj.(*v1.TimeTriggerList).ListMeta}
|
||||
for _, item := range obj.(*v1.TimeTriggerList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
@@ -74,57 +76,79 @@ func (c *FakeTimeTriggers) List(ctx context.Context, opts v1.ListOptions) (resul
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested timeTriggers.
|
||||
func (c *FakeTimeTriggers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakeTimeTriggers) Watch(ctx context.Context, opts metav1.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(ctx context.Context, _timeTrigger *corev1.TimeTrigger, opts v1.CreateOptions) (result *corev1.TimeTrigger, err error) {
|
||||
func (c *FakeTimeTriggers) Create(ctx context.Context, _timeTrigger *v1.TimeTrigger, opts metav1.CreateOptions) (result *v1.TimeTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(timetriggersResource, c.ns, _timeTrigger), &corev1.TimeTrigger{})
|
||||
Invokes(testing.NewCreateAction(timetriggersResource, c.ns, _timeTrigger), &v1.TimeTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.TimeTrigger), err
|
||||
return obj.(*v1.TimeTrigger), err
|
||||
}
|
||||
|
||||
// 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(ctx context.Context, _timeTrigger *corev1.TimeTrigger, opts v1.UpdateOptions) (result *corev1.TimeTrigger, err error) {
|
||||
func (c *FakeTimeTriggers) Update(ctx context.Context, _timeTrigger *v1.TimeTrigger, opts metav1.UpdateOptions) (result *v1.TimeTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(timetriggersResource, c.ns, _timeTrigger), &corev1.TimeTrigger{})
|
||||
Invokes(testing.NewUpdateAction(timetriggersResource, c.ns, _timeTrigger), &v1.TimeTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.TimeTrigger), err
|
||||
return obj.(*v1.TimeTrigger), err
|
||||
}
|
||||
|
||||
// Delete takes name of the _timeTrigger and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeTimeTriggers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
func (c *FakeTimeTriggers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(timetriggersResource, c.ns, name, opts), &corev1.TimeTrigger{})
|
||||
Invokes(testing.NewDeleteActionWithOptions(timetriggersResource, c.ns, name, opts), &v1.TimeTrigger{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeTimeTriggers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
func (c *FakeTimeTriggers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(timetriggersResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &corev1.TimeTriggerList{})
|
||||
_, err := c.Fake.Invokes(action, &v1.TimeTriggerList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched timeTrigger.
|
||||
func (c *FakeTimeTriggers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *corev1.TimeTrigger, err error) {
|
||||
func (c *FakeTimeTriggers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.TimeTrigger, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(timetriggersResource, c.ns, name, pt, data, subresources...), &corev1.TimeTrigger{})
|
||||
Invokes(testing.NewPatchSubresourceAction(timetriggersResource, c.ns, name, pt, data, subresources...), &v1.TimeTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*corev1.TimeTrigger), err
|
||||
return obj.(*v1.TimeTrigger), err
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied timeTrigger.
|
||||
func (c *FakeTimeTriggers) Apply(ctx context.Context, _timeTrigger *corev1.TimeTriggerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.TimeTrigger, err error) {
|
||||
if _timeTrigger == nil {
|
||||
return nil, fmt.Errorf("_timeTrigger provided to Apply must not be nil")
|
||||
}
|
||||
data, err := json.Marshal(_timeTrigger)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := _timeTrigger.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("_timeTrigger.Name must be provided to Apply")
|
||||
}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(timetriggersResource, c.ns, *name, types.ApplyPatchType, data), &v1.TimeTrigger{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.TimeTrigger), err
|
||||
}
|
||||
|
||||
@@ -20,9 +20,12 @@ package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
corev1 "github.com/fission/fission/pkg/generated/applyconfiguration/core/v1"
|
||||
scheme "github.com/fission/fission/pkg/generated/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -46,6 +49,7 @@ type FunctionInterface interface {
|
||||
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)
|
||||
Apply(ctx context.Context, _function *corev1.FunctionApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Function, err error)
|
||||
FunctionExpansion
|
||||
}
|
||||
|
||||
@@ -176,3 +180,29 @@ func (c *functions) Patch(ctx context.Context, name string, pt types.PatchType,
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied function.
|
||||
func (c *functions) Apply(ctx context.Context, _function *corev1.FunctionApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Function, err error) {
|
||||
if _function == nil {
|
||||
return nil, fmt.Errorf("_function provided to Apply must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(_function)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := _function.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("_function.Name must be provided to Apply")
|
||||
}
|
||||
result = &v1.Function{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Namespace(c.ns).
|
||||
Resource("functions").
|
||||
Name(*name).
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -20,9 +20,12 @@ package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
corev1 "github.com/fission/fission/pkg/generated/applyconfiguration/core/v1"
|
||||
scheme "github.com/fission/fission/pkg/generated/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -46,6 +49,7 @@ type HTTPTriggerInterface interface {
|
||||
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)
|
||||
Apply(ctx context.Context, _hTTPTrigger *corev1.HTTPTriggerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.HTTPTrigger, err error)
|
||||
HTTPTriggerExpansion
|
||||
}
|
||||
|
||||
@@ -176,3 +180,29 @@ func (c *hTTPTriggers) Patch(ctx context.Context, name string, pt types.PatchTyp
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied hTTPTrigger.
|
||||
func (c *hTTPTriggers) Apply(ctx context.Context, _hTTPTrigger *corev1.HTTPTriggerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.HTTPTrigger, err error) {
|
||||
if _hTTPTrigger == nil {
|
||||
return nil, fmt.Errorf("_hTTPTrigger provided to Apply must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(_hTTPTrigger)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := _hTTPTrigger.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("_hTTPTrigger.Name must be provided to Apply")
|
||||
}
|
||||
result = &v1.HTTPTrigger{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Namespace(c.ns).
|
||||
Resource("httptriggers").
|
||||
Name(*name).
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -20,9 +20,12 @@ package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
corev1 "github.com/fission/fission/pkg/generated/applyconfiguration/core/v1"
|
||||
scheme "github.com/fission/fission/pkg/generated/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -46,6 +49,7 @@ type KubernetesWatchTriggerInterface interface {
|
||||
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)
|
||||
Apply(ctx context.Context, _kubernetesWatchTrigger *corev1.KubernetesWatchTriggerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubernetesWatchTrigger, err error)
|
||||
KubernetesWatchTriggerExpansion
|
||||
}
|
||||
|
||||
@@ -176,3 +180,29 @@ func (c *kubernetesWatchTriggers) Patch(ctx context.Context, name string, pt typ
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied kubernetesWatchTrigger.
|
||||
func (c *kubernetesWatchTriggers) Apply(ctx context.Context, _kubernetesWatchTrigger *corev1.KubernetesWatchTriggerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.KubernetesWatchTrigger, err error) {
|
||||
if _kubernetesWatchTrigger == nil {
|
||||
return nil, fmt.Errorf("_kubernetesWatchTrigger provided to Apply must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(_kubernetesWatchTrigger)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := _kubernetesWatchTrigger.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("_kubernetesWatchTrigger.Name must be provided to Apply")
|
||||
}
|
||||
result = &v1.KubernetesWatchTrigger{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Namespace(c.ns).
|
||||
Resource("kuberneteswatchtriggers").
|
||||
Name(*name).
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -20,9 +20,12 @@ package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
corev1 "github.com/fission/fission/pkg/generated/applyconfiguration/core/v1"
|
||||
scheme "github.com/fission/fission/pkg/generated/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -46,6 +49,7 @@ type MessageQueueTriggerInterface interface {
|
||||
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)
|
||||
Apply(ctx context.Context, _messageQueueTrigger *corev1.MessageQueueTriggerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.MessageQueueTrigger, err error)
|
||||
MessageQueueTriggerExpansion
|
||||
}
|
||||
|
||||
@@ -176,3 +180,29 @@ func (c *messageQueueTriggers) Patch(ctx context.Context, name string, pt types.
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied messageQueueTrigger.
|
||||
func (c *messageQueueTriggers) Apply(ctx context.Context, _messageQueueTrigger *corev1.MessageQueueTriggerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.MessageQueueTrigger, err error) {
|
||||
if _messageQueueTrigger == nil {
|
||||
return nil, fmt.Errorf("_messageQueueTrigger provided to Apply must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(_messageQueueTrigger)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := _messageQueueTrigger.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("_messageQueueTrigger.Name must be provided to Apply")
|
||||
}
|
||||
result = &v1.MessageQueueTrigger{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Namespace(c.ns).
|
||||
Resource("messagequeuetriggers").
|
||||
Name(*name).
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -20,9 +20,12 @@ package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
corev1 "github.com/fission/fission/pkg/generated/applyconfiguration/core/v1"
|
||||
scheme "github.com/fission/fission/pkg/generated/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -47,6 +50,8 @@ type PackageInterface interface {
|
||||
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)
|
||||
Apply(ctx context.Context, _package *corev1.PackageApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Package, err error)
|
||||
ApplyStatus(ctx context.Context, _package *corev1.PackageApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Package, err error)
|
||||
PackageExpansion
|
||||
}
|
||||
|
||||
@@ -193,3 +198,59 @@ func (c *packages) Patch(ctx context.Context, name string, pt types.PatchType, d
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied package.
|
||||
func (c *packages) Apply(ctx context.Context, _package *corev1.PackageApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Package, err error) {
|
||||
if _package == nil {
|
||||
return nil, fmt.Errorf("_package provided to Apply must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(_package)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := _package.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("_package.Name must be provided to Apply")
|
||||
}
|
||||
result = &v1.Package{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Namespace(c.ns).
|
||||
Resource("packages").
|
||||
Name(*name).
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// ApplyStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
|
||||
func (c *packages) ApplyStatus(ctx context.Context, _package *corev1.PackageApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Package, err error) {
|
||||
if _package == nil {
|
||||
return nil, fmt.Errorf("_package provided to Apply must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(_package)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
name := _package.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("_package.Name must be provided to Apply")
|
||||
}
|
||||
|
||||
result = &v1.Package{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Namespace(c.ns).
|
||||
Resource("packages").
|
||||
Name(*name).
|
||||
SubResource("status").
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -20,9 +20,12 @@ package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
v1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
corev1 "github.com/fission/fission/pkg/generated/applyconfiguration/core/v1"
|
||||
scheme "github.com/fission/fission/pkg/generated/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -46,6 +49,7 @@ type TimeTriggerInterface interface {
|
||||
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)
|
||||
Apply(ctx context.Context, _timeTrigger *corev1.TimeTriggerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.TimeTrigger, err error)
|
||||
TimeTriggerExpansion
|
||||
}
|
||||
|
||||
@@ -176,3 +180,29 @@ func (c *timeTriggers) Patch(ctx context.Context, name string, pt types.PatchTyp
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied timeTrigger.
|
||||
func (c *timeTriggers) Apply(ctx context.Context, _timeTrigger *corev1.TimeTriggerApplyConfiguration, opts metav1.ApplyOptions) (result *v1.TimeTrigger, err error) {
|
||||
if _timeTrigger == nil {
|
||||
return nil, fmt.Errorf("_timeTrigger provided to Apply must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(_timeTrigger)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := _timeTrigger.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("_timeTrigger.Name must be provided to Apply")
|
||||
}
|
||||
result = &v1.TimeTrigger{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Namespace(c.ns).
|
||||
Resource("timetriggers").
|
||||
Name(*name).
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ type sharedInformerFactory struct {
|
||||
lock sync.Mutex
|
||||
defaultResync time.Duration
|
||||
customResync map[reflect.Type]time.Duration
|
||||
transform cache.TransformFunc
|
||||
|
||||
informers map[reflect.Type]cache.SharedIndexInformer
|
||||
// startedInformers is used for tracking which informers have been started.
|
||||
@@ -80,6 +81,14 @@ func WithNamespace(namespace string) SharedInformerOption {
|
||||
}
|
||||
}
|
||||
|
||||
// WithTransform sets a transform on all informers.
|
||||
func WithTransform(transform cache.TransformFunc) SharedInformerOption {
|
||||
return func(factory *sharedInformerFactory) *sharedInformerFactory {
|
||||
factory.transform = transform
|
||||
return factory
|
||||
}
|
||||
}
|
||||
|
||||
// NewSharedInformerFactory constructs a new instance of sharedInformerFactory for all namespaces.
|
||||
func NewSharedInformerFactory(client versioned.Interface, defaultResync time.Duration) SharedInformerFactory {
|
||||
return NewSharedInformerFactoryWithOptions(client, defaultResync)
|
||||
@@ -166,7 +175,7 @@ func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[ref
|
||||
return res
|
||||
}
|
||||
|
||||
// InternalInformerFor returns the SharedIndexInformer for obj using an internal
|
||||
// InformerFor returns the SharedIndexInformer for obj using an internal
|
||||
// client.
|
||||
func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer {
|
||||
f.lock.Lock()
|
||||
@@ -184,6 +193,7 @@ func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internal
|
||||
}
|
||||
|
||||
informer = newFunc(f.client, resyncPeriod)
|
||||
informer.SetTransform(f.transform)
|
||||
f.informers[informerType] = informer
|
||||
|
||||
return informer
|
||||
@@ -239,7 +249,7 @@ type SharedInformerFactory interface {
|
||||
// ForResource gives generic access to a shared informer of the matching type.
|
||||
ForResource(resource schema.GroupVersionResource) (GenericInformer, error)
|
||||
|
||||
// InternalInformerFor returns the SharedIndexInformer for obj using an internal
|
||||
// InformerFor returns the SharedIndexInformer for obj using an internal
|
||||
// client.
|
||||
InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer
|
||||
|
||||
|
||||
Reference in New Issue
Block a user